Method and system for early warning of insect-filled insect trapping device in grain silo

By determining the coverage area of ​​the granary insect trap and obtaining historical data, combined with multi-source sensor data, the accuracy and timeliness of early warning for insect traps in the granary are achieved, solving the problem of low monitoring frequency and low accuracy in the existing technology. problem.

CN118468232BActive Publication Date: 2024-10-01BEIJING LIANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410925046.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-10-01
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

Existing insect traps in granaries lack an effective insect overflow early warning mechanism and rely on manual inspections and single sensor monitoring, resulting in low monitoring frequency, limited coverage, and low detection accuracy, making it difficult to achieve real-time monitoring and accurate early warning.

Method used

By determining the coverage area of ​​the insect trap in the granary, historical insect abundance and environmental data are obtained, combined with multi-source data from camera devices and pressure sensors, image preprocessing and data fusion are performed, and insect abundance identification is performed based on the trained insect abundance identification model. Correction, send warning message.

Benefits of technology

It improves the accuracy of the early warning of insect overflow of the granary insect trap, ensures the accuracy and timeliness of monitoring data, and enhances the ability of real-time monitoring and early warning of insect pests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468232B_ABST
    Figure CN118468232B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for early warning of insects in a granary insect trap, and relates to the technical field of granary management. In this method, the historical insect quantity and multiple historical environmental data corresponding to the coverage area are obtained; the current detection image corresponding to the granary insect trap is obtained, and the current pressure value collected by the pressure sensor is obtained at the same time; when the current pressure value is less than the preset pressure early warning threshold, the pre-identified insect quantity corresponding to the granary insect trap is obtained based on the current detection image and the current pressure value; based on the historical insect quantity and multiple historical environmental data, the pre-identified insect quantity is corrected to obtain the corrected insect quantity corresponding to the granary insect trap; when the corrected insect quantity is greater than the preset insect-full early warning threshold, a first early warning message is sent to a terminal of a granary manager; when the current pressure value is not less than the preset pressure early warning threshold, a second early warning message is sent to a terminal of a granary manager. The implementation of the technical solution of the present application can improve the accuracy of the early warning of insects in the granary insect trap.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of grain storage management, and in particular to a method and system for early warning of insect overfill of a grain storage insect trap. Background Art

[0002] At present, pest monitoring and prevention are important links in ensuring food quality and safety during grain storage. Although existing insect traps in grain silos can attract and capture pests, they lack an effective early warning mechanism for insect infestation. Traditional early warning methods for insect traps in grain silos mainly rely on manual inspections and single sensor monitoring. The manual inspection method has problems such as low monitoring frequency, limited coverage, and low detection accuracy, making it difficult to achieve real-time monitoring of insect traps in grain silos and accurate early warning of insect infestation. Single sensor monitoring methods, such as relying solely on data from cameras or pressure sensors to detect insect infestation in grain silos, are easily affected by environmental factors, resulting in inaccurate detection results.

[0003] Therefore, how to improve the accuracy of the insect-filled warning of the insect-attracting device in the grain silo has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method and system for early warning of an insect-filled insect trap in a granary, which can improve the accuracy of early warning of an insect-filled insect trap in a granary.

[0005] In a first aspect, the present application provides a method for early warning of insect fullness of a granary insect attractant, the method comprising: determining a coverage area corresponding to the granary insect attractant; obtaining a historical insect quantity and a plurality of historical environmental data corresponding to the coverage area; obtaining a current detection image corresponding to the granary insect attractant acquired by a camera device disposed in the coverage area, and simultaneously obtaining a current pressure value acquired by a pressure sensor disposed on the granary insect attractant; when the current pressure value is less than a preset pressure early warning threshold, obtaining a pre-identified insect quantity corresponding to the granary insect attractant based on the current detection image and the current pressure value; correcting the pre-identified insect quantity based on the historical insect quantity and a plurality of the historical environmental data to obtain a corrected insect quantity corresponding to the granary insect attractant; when the corrected insect quantity is greater than a preset insect fullness early warning threshold, sending a first early warning message to a granary management personnel terminal; when the current pressure value is not less than the preset pressure early warning threshold, sending a second early warning message to the granary management personnel terminal.

[0006] By adopting the above technical solution, by determining the coverage area corresponding to the granary insect trap device, the pest monitoring range can be accurately located, thereby ensuring the accuracy of the monitoring data. By obtaining the historical insect quantity and multiple historical environmental data corresponding to the coverage area, a reliable data basis can be provided for subsequent data analysis and model training, thereby using historical data and environmental factors to improve the accuracy of the insect-filled warning of the granary insect trap device. By obtaining the pre-identified insect quantity based on the detection image and pressure value when the current pressure value is less than the preset threshold, the multi-source data fusion method can be used to improve the accuracy of insect quantity identification, thereby more accurately performing the insect-filled warning of the insect trap device. By correcting the pre-identified insect quantity based on the historical insect quantity and environmental data, the environmental influencing factors in the historical data can be used to correct the current insect quantity assessment result, thereby improving the accuracy of the insect quantity assessment. By sending the first warning information to the granary manager terminal when the corrected insect quantity is greater than the preset insect-filled warning threshold, and sending the second warning information to the granary manager terminal when the current pressure value is not less than the preset pressure warning threshold, the accuracy of the insect-filled warning of the granary insect trap device can be effectively improved.

[0007] Optionally, the pre-identified insect quantity corresponding to the grain silo insect attractant is obtained based on the current detection image and the current pressure value, specifically including: performing image preprocessing on the current detection image to obtain a preprocessed current detection image; inputting the preprocessed current detection image into a trained insect quantity recognition model to obtain a first initial insect quantity; determining the average weight of each insect; obtaining a second initial insect quantity based on the current pressure value and the average weight; and obtaining the pre-identified insect quantity based on the first initial insect quantity and the second initial insect quantity.

[0008] By adopting the above technical solution, by performing image preprocessing on the current detection image, the noise in the image can be removed, the contrast can be enhanced, and the image size can be standardized, thereby improving the recognition accuracy of the subsequent insect quantity recognition model. By inputting the preprocessed image into the trained insect quantity recognition model, the powerful feature extraction ability of the deep learning model can be used to accurately identify the number of insects in the image and obtain the first initial insect quantity. By determining the average weight of each insect, the weight characteristics of the insect can be quantified, thereby establishing a connection between the pressure sensor data and the image recognition data, and improving the accuracy of comprehensive recognition. By calculating the second initial insect quantity based on the current pressure value and the average weight, the pressure sensor data can be used to supplement the image recognition data, thereby improving the reliability and accuracy of insect quantity recognition in multi-source data fusion. By combining the first initial insect quantity and the second initial insect quantity, the results of image recognition and pressure data can be combined to obtain a more accurate pre-identified insect quantity, ensuring the comprehensiveness and accuracy of insect quantity assessment.

[0009] Optionally, before inputting the preprocessed current detection image into a trained insect quantity recognition model to obtain a first initial insect quantity, the method further includes: collecting multiple original training images containing different numbers and distributions of insects; dividing each of the original training images into multiple block areas, and preprocessing each of the block areas to obtain multiple preprocessed block areas; marking the center point position of each insect in each of the preprocessed block areas; smoothing each of the center point positions based on a Gaussian kernel function to obtain a first density image corresponding to each of the original training images; determining an initial model suitable for density estimation; using multiple original training images and multiple first density images as input and output of the initial model, respectively, to construct a training data set; training the initial model based on the training data set to obtain the trained insect quantity recognition model.

[0010] By adopting the above technical solution, by collecting multiple original training images containing different numbers and distributions of insects, a diverse and comprehensive training data set can be constructed, thereby improving the generalization ability of the model for different scenes and insect distribution conditions. By dividing each original training image into multiple block areas and preprocessing them, the efficiency and accuracy of image processing can be improved, thereby providing clearer and more standardized image input for subsequent insect detection. By marking the center point position of each insect in each preprocessed block area, accurate training labels can be provided for the model, thereby enhancing the model's ability to accurately identify the insect position. By smoothing each center point position based on a Gaussian kernel function, a continuous density image can be generated, making it easier for the model to learn and predict the distribution density of insects and improve the accuracy of recognition. By determining an initial model suitable for density estimation, the best model architecture and parameters can be selected, thereby providing a solid foundation for subsequent model training and ensuring the efficiency and accuracy of the model. By taking multiple original training images and the corresponding first density images as the input and output of the initial model, a high-quality training data set is constructed, so that the model can learn the corresponding relationship between images and density, thereby improving the training effect of the model. By training the initial model based on the training data set, the model parameters and structure can be optimized to obtain an efficient and accurate insect population identification model, thereby improving the recognition ability and stability of the model in practical applications.

[0011] Optionally, the preprocessed current detection image is input into a trained insect quantity recognition model to obtain a first initial insect quantity, which specifically includes: inputting the preprocessed current detection image into a trained insect quantity recognition model to output a second density image, wherein each pixel value in the second density image represents the insect density at the current position; and summing the second density images to obtain the first initial insect quantity.

[0012] By adopting the above technical solution, by inputting the preprocessed current detection image into the trained insect quantity recognition model, a second density image is output, in which each pixel value represents the insect density at the current position, and the prediction ability of the model can be used to accurately generate the density distribution map of the insects, thereby providing detailed insect distribution information and improving the accuracy of insect quantity recognition. By summing the second density image to obtain the first initial insect quantity, the density distribution can be converted into a specific number of insects, thereby providing an intuitive total insect quantity assessment, simplifying the interpretation process of complex density images, and improving the convenience and accuracy of insect quantity assessment.

[0013] Optionally, determining the average weight of each insect specifically includes: determining the activity frequency of the insects, and determining a preset detection time interval based on the activity frequency; determining a first timestamp and a second timestamp based on the preset detection time interval; obtaining a first detection image and a first pressure value corresponding to the first timestamp, and obtaining a second detection image and a second pressure value corresponding to the second timestamp; determining a changed insect quantity based on the first detection image and the second detection image; determining a changed current pressure value based on the first pressure value and the second pressure value; and dividing the changed current pressure value by the changed insect quantity to obtain the average weight.

[0014] By adopting the above technical solution, by determining the activity frequency of insects, and determining the preset detection time interval based on the activity frequency, it is possible to ensure that detection is performed within a reasonable time interval, thereby obtaining sufficient insect activity data and improving the timeliness and accuracy of monitoring. By determining the first timestamp and the second timestamp based on the preset detection time interval, the detection time point can be reasonably arranged, thereby ensuring that the collected data has temporal continuity and representativeness, and improving the reliability of data analysis. By obtaining the first detection image and the first pressure value corresponding to the first timestamp, and obtaining the second detection image and the second pressure value corresponding to the second timestamp, the insect activity and pressure data at different time points can be obtained, thereby providing basic data for subsequent analysis of insect quantity and pressure changes, ensuring the integrity and accuracy of the data. By determining the change in insect quantity based on the first detection image and the second detection image, the change in the number of insects between the two time points can be calculated, thereby accurately reflecting the dynamic changes of the insects and improving the accuracy of the insect quantity assessment. By determining the change in the current pressure value based on the first pressure value and the second pressure value, the pressure change between the two time points can be calculated, thereby reflecting the influence of insect activity on the pressure in the granary, and providing a basis for the subsequent average weight calculation. By dividing the changing current pressure value by the changing insect quantity to obtain the average weight, the average weight of each insect can be accurately calculated, thereby providing key parameters for accurate identification and evaluation of the insect quantity and improving the accuracy of insect quantity identification.

[0015] Optionally, the pre-identified insect quantity is obtained based on the first initial insect quantity and the second initial insect quantity, specifically including: determining a first weight corresponding to the first initial insect quantity, wherein when the first initial insect quantity is greater than a preset first insect quantity threshold, the first weight is inversely proportional to the first initial insect quantity; determining a second weight corresponding to the second initial insect quantity, wherein when the second initial insect quantity is greater than a preset second insect quantity threshold, the second weight is directly proportional to the second initial insect quantity, and the sum of the first weight and the second weight is 1; based on the first initial insect quantity, the second initial insect quantity, the first weight and the second weight, the pre-identified insect quantity is obtained.

[0016] By adopting the above technical solution, by determining the first weight corresponding to the first initial insect quantity, and when the first initial insect quantity is greater than the preset first insect quantity threshold, the first weight is inversely proportional to the first initial insect quantity, it is possible to prevent excessive reliance on the first initial insect quantity when the first initial insect quantity statistics are inaccurate when the insect quantity is large, thereby balancing the influence of the data source and avoiding inaccurate identification caused by errors in a single data source. By determining the second weight corresponding to the second initial insect quantity, and when the second initial insect quantity is greater than the preset second insect quantity threshold, the second weight is in direct proportion to the second initial insect quantity, the reliability of the pressure sensor data can be fully utilized to improve the accuracy of the insect quantity assessment. In addition, ensuring that the sum of the first weight and the second weight is 1 can ensure the rationality and stability of the weight allocation. By obtaining the pre-identified insect quantity based on the first initial insect quantity, the second initial insect quantity, the first weight and the second weight, the image recognition data and the pressure sensor data can be comprehensively utilized to improve the accuracy and reliability of insect quantity identification and provide a more comprehensive insect quantity assessment.

[0017] Optionally, the pre-identified insect quantity is corrected based on the historical insect quantity and multiple historical environmental data to obtain a corrected insect quantity corresponding to the granary insect attractant, specifically including: determining multiple historical time points, and determining the environmental variables corresponding to each of the historical environmental data; standardizing the historical environmental data corresponding to each of the historical time points to obtain multiple standardized historical environmental data; constructing a feature matrix based on the multiple standardized historical environmental data corresponding to different historical time points, wherein each row in the feature matrix represents multiple standardized historical environmental data corresponding to the same historical time point; constructing a target variable vector based on the historical insect quantity corresponding to different historical time points; training a linear regression model based on the feature matrix and the target variable vector to obtain the regression coefficients corresponding to each of the environmental variables and the intercept of the linear regression model; determining the current environmental data corresponding to each of the environmental variables; standardizing the current environmental data to obtain multiple standardized standard environmental data; correcting the pre-identified insect quantity based on the multiple standardized standard environmental data, the multiple regression coefficients and the intercept to obtain the corrected insect quantity corresponding to the granary insect attractant.

[0018] By adopting the above technical solution, by determining multiple historical time points and determining the environmental variables corresponding to each historical environmental data, rich and diverse environmental data can be collected, thereby providing comprehensive data support for subsequent model training, ensuring that the model can cover different environmental conditions, and improving the generalization ability and prediction accuracy of the model. By standardizing the historical environmental data corresponding to each historical time point, the dimensional differences between different environmental variables can be eliminated, thereby improving the effect of model training, making each environmental variable equally important in the model, and improving the stability and accuracy of the model. By constructing a feature matrix based on multiple standardized historical environmental data corresponding to different historical time points, the environmental data can be systematically organized and represented, so that the model can effectively learn and capture the relationship between environmental variables and insect quantity, thereby improving the prediction ability of the model. By constructing a target variable vector based on the historical insect quantity corresponding to different historical time points, a clear prediction target can be provided for the model, so that the model can learn the mapping relationship between historical environmental data and insect quantity, and improve the accuracy and effectiveness of the model. By training a linear regression model based on the feature matrix and the target variable vector, the regression coefficients and model intercepts corresponding to each environmental variable can be obtained, thereby quantifying the impact of environmental variables on insect abundance, providing a scientific basis for subsequent insect abundance corrections, and improving the accuracy of insect abundance predictions. By determining the current environmental data corresponding to each environmental variable, the current environmental conditions can be collected in real time, thereby providing real-time data support for subsequent insect abundance corrections and ensuring the timeliness and accuracy of the prediction results. By standardizing the current environmental data, the current data can be converted into a standardized form consistent with the model training data, thereby ensuring that the model can maintain consistency when processing the current data and improving the accuracy of the prediction. By correcting the pre-identified insect abundance based on the standardized current environmental data, multiple regression coefficients, and intercepts, the environmental influencing factors in the historical data can be used to correct the current insect abundance assessment results, thereby improving the accuracy and reliability of the insect abundance assessment.

[0019] In a second aspect of the present application, a system for early warning of insect infestation of a granary insect trap is provided, the system comprising a processing module, an acquisition module and an early warning module; the processing module is used to determine a coverage area corresponding to the granary insect trap; the acquisition module is used to acquire a historical insect quantity and a plurality of historical environmental data corresponding to the coverage area; the acquisition module is also used to acquire a current detection image corresponding to the granary insect trap collected by a camera device arranged in the coverage area, and simultaneously acquire a current pressure value collected by a pressure sensor arranged on the granary insect trap; the processing module is also used to detect the current pressure value when the current pressure value When the pressure is less than a preset pressure warning threshold, the pre-identified insect quantity corresponding to the granary insect attractant is obtained based on the current detection image and the current pressure value; the processing module is also used to correct the pre-identified insect quantity based on the historical insect quantity and a plurality of historical environmental data to obtain the corrected insect quantity corresponding to the granary insect attractant; the warning module is used to send a first warning message to the granary management personnel terminal when the corrected insect quantity is greater than a preset insect full warning threshold; the warning module is also used to send a second warning message to the granary management personnel terminal when the current pressure value is not less than the preset pressure warning threshold.

[0020] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any method as described in the first aspect of the present application.

[0021] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program that can be loaded by a processor and execute the method as described in any one of the first aspects of the present application.

[0022] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0023] By determining the coverage area corresponding to the granary insect trap, the pest monitoring range can be accurately located, thereby ensuring the accuracy of the monitoring data. By obtaining the historical insect quantity and multiple historical environmental data corresponding to the coverage area, a reliable data basis can be provided for subsequent data analysis and model training, thereby using historical data and environmental factors to improve the accuracy of the insect-filled warning of the granary insect trap. By obtaining the pre-identified insect quantity based on the detection image and pressure value when the current pressure value is less than the preset threshold, the multi-source data fusion method can be used to improve the accuracy of insect quantity identification, thereby more accurately performing the insect-filled warning of the insect trap. By correcting the pre-identified insect quantity based on the historical insect quantity and environmental data, the environmental influencing factors in the historical data can be used to correct the current insect quantity assessment result, thereby improving the accuracy of the insect quantity assessment. By sending the first warning information to the granary manager terminal when the corrected insect quantity is greater than the preset insect-filled warning threshold, and sending the second warning information to the granary manager terminal when the current pressure value is not less than the preset pressure warning threshold, the accuracy of the insect-filled warning of the granary insect trap can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is one of the flow diagrams of a method for early warning of insect fullness of an insect trapping device in a granary provided in an embodiment of the present application;

[0025] Figure 2 This is a second flow chart of a method for early warning of insect fullness of an insect trapping device in a granary provided in an embodiment of the present application;

[0026] Figure 3 It is a structural schematic diagram of an insect-filled early warning system for an insect trapping device in a granary provided in an embodiment of the present application;

[0027] Figure 4 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.

[0028] Explanation of the accompanying drawings: 1. Processing module; 2. Acquisition module; 3. Warning module; 4. Model building module; 400. Electronic device; 401. Processor; 402. Communication bus; 403. User interface; 404. Network interface; 405. Memory. DETAILED DESCRIPTION

[0029] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0030] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.

[0031] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. 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 indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0032] The present application provides a method for early warning of insects in a granary insect trapping device. Figure 1 , which shows one of the flow diagrams of a method for early warning of insect fullness of a grain silo insect trapping device provided in an embodiment of the present application. The method includes steps S1-S7, which are as follows:

[0033] Step S1: Determine the coverage area corresponding to the insect trap device in the granary.

[0034] Specifically, in order to ensure that all potential pest areas in the granary are within the monitoring range, it is necessary to first determine the coverage area of ​​the granary insect trap. The accurate determination of the coverage area is of great significance for subsequent monitoring and early warning, because only with reasonable coverage can the comprehensiveness and effectiveness of the granary insect trap early warning be guaranteed, thereby improving the accuracy and reliability of the early warning.

[0035] The specific method for determining the coverage area is as follows: First, a detailed investigation and analysis of the structure and layout of the granary is required. Understand the size, shape, internal layout of the granary, and the location and method of grain stacking. Based on this information, preliminarily delineate key areas in the granary where pests may exist. These areas usually include grain stacking areas, ventilation openings, near doors and windows, and other places where pests are likely to breed and invade.

[0036] Next, use the granary's architectural drawings or on-site measurement data to determine the specific locations of each monitoring point. In order to ensure the comprehensiveness of monitoring, it is necessary to arrange an appropriate number of insect traps in each key area according to the actual situation of the granary. The coverage of each insect trap should be able to cover all potential pest activity areas in the area. For large granaries, a gridding method can be used to divide the entire granary into several small areas, and one or more insect traps can be arranged in each small area.

[0037] When arranging insect traps, the effective monitoring range of the camera and pressure sensor should be considered. The camera should be installed at a height and angle that can fully capture the pest activities in the area, ensuring that there are no blind spots in the camera's field of view. The pressure sensor should be installed at key locations in the grain stacking area to accurately detect changes in the weight of the grain stack.

[0038] After the coverage area is determined, the deployed insect traps need to be tested and calibrated. By simulating pest activities, check the monitoring effect of the camera and pressure sensor to ensure that all equipment can work properly and accurately capture and record pest information. If a monitoring blind spot or equipment failure is found, the equipment position should be adjusted or replaced in time until the monitoring effect of all areas reaches the expected level.

[0039] Step S2: Obtain historical insect population and multiple historical environmental data corresponding to the coverage area.

[0040] In order to improve the accuracy and real-time performance of granary pest monitoring, it is crucial to obtain historical pest abundance and multiple historical environmental data corresponding to the coverage area. By analyzing these historical data, we can understand the changing patterns of pests under different environmental conditions and provide a basis for subsequent pre-identification of pest abundance corrections.

[0041] Specifically, first, after determining the coverage area, it is necessary to collect historical insect population data in the area. This data can come from the records of monitoring equipment installed in the past, including data from past cameras and pressure sensors, or can be obtained through manually recorded historical pest reports. In order to ensure the accuracy and completeness of the data, it is necessary to collect data over as long a time span as possible, covering different seasons and climate conditions.

[0042] While collecting historical insect abundance data, it is also necessary to obtain historical environmental data for the corresponding time period. Historical environmental data includes historical temperature, historical humidity, historical air pressure, and historical light intensity, which can be obtained through environmental sensors in the granary. If environmental sensors are not installed, data from local weather stations can be used to supplement them. It is necessary to ensure that the timestamp of the environmental data corresponds to the timestamp of the historical insect abundance data in order to conduct effective correlation analysis.

[0043] Step S3: obtaining a current detection image corresponding to the grain silo insect attractant device collected by a camera device disposed in the coverage area, and simultaneously obtaining a current pressure value collected by a pressure sensor disposed on the grain silo insect attractant device.

[0044] Specifically, first, ensure that the cameras and pressure sensors in the coverage area are properly installed and calibrated. The cameras should be installed at a height and angle that can fully capture pest activities in the coverage area, ensuring clear images without blind spots. Pressure sensors should be installed at key locations in the granary, which can accurately sense the weight changes of the grain stack and be sensitive to tiny pressure changes.

[0045] Next, the current detection image is collected regularly by the camera device. In order to ensure the real-time and continuity of the image data, a timed collection mechanism can be set, such as automatically collecting images every 1 minute or other appropriate time intervals. These images will be used for subsequent insect quantity identification and analysis, so the image quality is required to be high and clearly show the pest activity.

[0046] At the same time, the current pressure value is collected in real time through the pressure sensor. The pressure sensor should be connected to the data acquisition system and can continuously record the weight changes in the granary. Set an appropriate collection frequency, such as recording the pressure value every 1 minute or other appropriate time intervals to automatically record the pressure value, and transmit this data in real time to the central monitoring system for processing and analysis.

[0047] Step S4: When the current pressure value is less than the preset pressure warning threshold, the pre-identified insect quantity corresponding to the grain silo insect attractant is obtained based on the current detection image and the current pressure value.

[0048] Specifically, in order to achieve accurate monitoring and timely warning of insect pests in the granary, when the current pressure value is less than the preset pressure warning threshold, it is necessary to obtain the pre-identified insect quantity corresponding to the granary insect attractant device based on the current detection image and the current pressure value.

[0049] In one possible implementation, refer to Figure 2 , which shows the second flow diagram of a method for early warning of insects in a granary insect trapping device provided in an embodiment of the present application. Step S4 specifically includes steps S41-S45:

[0050] Step S41: performing image preprocessing on the current detection image to obtain the preprocessed current detection image.

[0051] Specifically, first, after obtaining the current detection image, the image needs to be resized. The purpose of adjusting the image size is to unify the image size input into the insect quantity recognition model to ensure that the model can process images of different resolutions normally. The image is usually adjusted to the standard size during model training, such as 224×224 pixels. Secondly, the image is grayed. Converting color images to grayscale images can reduce the complexity of the data while retaining the necessary insect morphology information. Graying helps improve the processing speed and recognition efficiency of the model.

[0052] Next, the grayscale image is denoised. Due to the complex environment of the granary, the image may contain various noises, which will affect the accuracy of insect quantity identification. By applying denoising algorithms such as Gaussian filtering, random noise in the image can be effectively removed and the image clarity can be improved.

[0053] In addition, the image needs to be contrast enhanced. The unstable light conditions in the granary may lead to insufficient image contrast, making it difficult to distinguish the insects from the background. Through contrast enhancement techniques such as histogram equalization, the contrast of the image can be enhanced, making the insects more prominent in the image and easier to identify later.

[0054] After completing the above processing, data standardization can be performed. Standardization is to normalize the image pixel values ​​to a standard range (usually 0 to 1) to reduce the numerical differences between different images and ensure that the model can stably process different images.

[0055] Through these preprocessing steps, the quality of the current detection image can be significantly improved, ensuring that the image can be accurately analyzed and processed when it is input into the insect population recognition model.

[0056] Step S42: input the preprocessed current detection image into the trained insect quantity recognition model to obtain a first initial insect quantity.

[0057] Specifically, in order to accurately identify the number of insects in the current detection image, the preprocessed current detection image needs to be input into the trained insect quantity recognition model. The function of the insect quantity recognition model is to output a second density image representing the insect density by analyzing the features in the image, thereby obtaining the current first initial insect quantity.

[0058] The following examples will explain in detail how to train the insect population recognition model.

[0059] In a possible implementation, before step S42, the method further includes the following steps:

[0060] Collect multiple raw training images with different bug counts and distributions.

[0061] Specifically, first, you need to determine the appropriate collection equipment and environment. Choose a high-resolution camera to ensure that the details and location of the insects can be clearly captured. Shoot in different granary environments to ensure that the training data covers different lighting conditions, background complexity, and insect species and distribution. For example, collect images in different seasons, different granary areas, and different grain stacking methods to obtain as diverse insect distribution as possible.

[0062] Next, develop a detailed image acquisition plan. Determine the time and frequency of each day to ensure continuity and coverage of image acquisition. For example, you can take pictures every hour, for multiple time periods each day, for weeks or months to obtain enough training data. Each image should include a clearly marked timestamp and location information for subsequent data processing and analysis.

[0063] In the process of collecting images, it is necessary to ensure the quality and clarity of each image. Avoid situations that affect image quality, such as overexposure, blur or occlusion. Through inspection and screening, unqualified images are eliminated and clear, complete and high-quality images are retained.

[0064] The collected original training images should contain a variety of insect numbers and distributions, so that the model can learn various complex scenes during the training process and improve the accuracy and robustness of recognition. In order to ensure the diversity of data, the collection process needs to be repeated multiple times in different time periods and under different environmental conditions.

[0065] Each original training image is divided into a plurality of block regions, and each block region is preprocessed to obtain a plurality of preprocessed block regions.

[0066] Specifically, first, each collected original training image is segmented. The specific method of segmentation is to divide the image into several small blocks of fixed size. The size of each block should be determined according to the resolution of the original image and the size of the insect. Usually, the size is selected so that the insect can be clearly displayed in each block.

[0067] Next, each block region is preprocessed. The preprocessing steps include image resizing, grayscale, denoising, and contrast enhancement. First, the segmented block regions are resized to a uniform size to facilitate the input of the model. Then, the block regions are converted to grayscale images to reduce the complexity of the data while retaining the necessary insect morphology information.

[0068] In order to remove the noise in the image, a denoising algorithm such as Gaussian filtering can be applied. This step helps to improve the clarity of the image and make the bugs more obvious in the image. Next, the image is contrast enhanced by using techniques such as histogram equalization to enhance the image contrast, making the contrast between the bug and the background more obvious and easier to identify later.

[0069] After preprocessing, save each preprocessed block area and build a training dataset containing a large number of block area images. This dataset should cover different numbers and distributions of insects to ensure that the model can learn various complex scenes and details during training.

[0070] Mark the center point of each bug in each preprocessed block area.

[0071] Specifically, first, choose appropriate annotation tools and platforms to ensure the efficiency and accuracy of the annotation process. You can use open source annotation tools such as LabelImg, VGG Image Annotator (VIA), etc. These tools support manual annotation of target objects in images and can save the annotation results.

[0072] Next, annotate each preprocessed block image. The specific method is to import each block image into the annotation tool and annotate the center point of each bug one by one. When annotating, you need to click the center position of each bug as accurately as possible to ensure that the annotated point can reflect the actual position of the bug. During the annotation process, carefully check each block image to ensure that no bug is missed and the position of the annotated point is as accurate as possible.

[0073] After all images are labeled, save the annotation results in an appropriate format, such as XML or CSV. The annotation file should contain the center point coordinates (such as x, y coordinates) of all insects in each image, as well as the image identification information. This ensures that the annotation data corresponds one-to-one with the image data, which is convenient for subsequent processing and analysis.

[0074] Each center point position is smoothed based on the Gaussian kernel function to obtain the first density image corresponding to each original training image.

[0075] Specifically, in order for the insect quantity recognition model to learn the density distribution of insects, the labeled insect center point positions need to be converted into density images. This step is done by smoothing each center point position using a Gaussian kernel function to obtain the first density image corresponding to each original training image. Each pixel value in the density image represents the insect density at that location. This processing method can not only intuitively display the distribution of insects in the image, but also provide continuous target density information, thereby improving the recognition ability of the model.

[0076] First, read the center point coordinates of each bug in each preprocessed block area image from the annotation data. Each center point coordinate (x, y) represents the specific location of a bug, and these coordinates are obtained in the previous annotation process. In order to convert these discrete center point locations into a continuous density map, a Gaussian kernel function is used for smoothing.

[0077] Specifically, a Gaussian kernel function is applied to the center point of each bug to generate a two-dimensional Gaussian distribution. The standard deviation (σ) of the Gaussian kernel function determines the degree of smoothing, and an appropriate σ value is usually selected based on the resolution of the image and the size of the bug. The larger the standard deviation, the smoother the generated Gaussian distribution. The Gaussian distributions generated at each center point are superimposed together to form a density image.

[0078] For each center point position (x, y), the formula of the Gaussian kernel function is: The Gaussian distributions generated by the center points of all insects are accumulated to obtain the density map of the entire image. Each pixel value in the density map represents the density of insects at that location. The higher the density, the more insects there are. In this way, discrete annotation points can be converted into continuous density distributions, which better reflects the actual distribution of insects.

[0079] Next, the generated first density image is saved together with the corresponding preprocessed block area image as part of the training data set. The density image will be used to train the insect quantity recognition model so that it can learn the density distribution characteristics of insects, thereby improving the accuracy and robustness of recognition.

[0080] Determine an initial model suitable for density estimation.

[0081] Specifically, first, evaluate different density estimation models and select the model architecture that performs well in processing image density estimation tasks. Convolutional neural network (CNN) is a commonly used model for processing image data, especially suitable for image feature extraction and density estimation. Specifically, model architectures such as VGG, ResNet, and U-Net perform well in processing dense object counting and density estimation.

[0082] In order to determine the most suitable initial model, we first need to compare the structural characteristics and applicable scenarios of different models. For example, the VGG network structure is relatively simple and can perform well when processing small data sets. ResNet solves the gradient vanishing problem of deep networks by introducing residual blocks, and is suitable for processing more complex image data. U-Net, through a symmetrical encoder-decoder structure, can well preserve the spatial information of the image and is suitable for the generation and refinement of density images.

[0083] When choosing a model, you need to consider the following factors: model complexity, computing resource requirements, the size of the training dataset, and the expected accuracy requirements. Based on these considerations, you can first choose VGG or ResNet as the initial model. If the dataset is large and the computing resources are sufficient, you can choose a more complex U-Net structure to achieve higher accuracy.

[0084] After determining the initial model, perform preliminary model settings and hyperparameter adjustments. For example, set the input size of the model and select an appropriate loss function and optimizer. In density estimation tasks, commonly used loss functions include mean square error (MSE), which is used to measure the difference between the predicted density image and the actual density image. The optimizer can choose the Adam optimizer because it has a faster convergence speed and stable performance.

[0085] A plurality of original training images and a plurality of first density images are used as input and output of the initial model respectively to construct a training data set.

[0086] Specifically, first, the segmented and preprocessed block images are paired with the corresponding first density images to construct a training dataset. Each preprocessed block image should have a corresponding first density image, and each pixel value in the first density image represents the insect density at that location. These data will serve as the input and output of the model training.

[0087] To ensure the diversity and representativeness of the training dataset, it is necessary to collect image data from different granary environments, different seasons, and different lighting conditions. Each block area image should cover as many different insect numbers and distributions as possible to ensure that the model can learn various complex insect distribution patterns during training. By collecting diverse training data, the generalization ability of the model can be improved, enabling it to accurately identify the number of insects in different practical application scenarios.

[0088] Next, these image data and density images are divided into training sets and validation sets according to a certain ratio. Usually, 80% of the data is used for training and 20% of the data is used for validation. The training set is used to train the model, and the validation set is used to evaluate the performance of the model and adjust hyperparameters. Ensure the distribution consistency of the training set and validation set to avoid overfitting or underfitting of the model due to uneven data division.

[0089] The initial model is trained based on the training data set to obtain a trained insect quantity recognition model.

[0090] Specifically, after constructing the training dataset, start training the model. First, input the preprocessed block region image into the selected initial model (such as VGG, ResNet or U-Net). And set the appropriate loss function and optimizer.

[0091] When you start training the model, use the training data set to train the model, and adjust the model parameters through the back propagation algorithm so that the predicted density image gradually approaches the actual density image. During the training process, monitor the performance of the model on the validation set in real time, and determine whether the model is overfitting or underfitting by the validation error. Adjust hyperparameters such as learning rate and batch size in a timely manner to optimize the training process.

[0092] During the training process, data enhancement techniques such as rotation, translation, scaling, and flipping can be used to enhance the training data and further improve the robustness and generalization ability of the model. Through data enhancement, the model can learn more image transformation features and improve its performance in practical applications.

[0093] In a possible implementation, step S42 specifically includes the following steps:

[0094] The preprocessed current detection image is input into the trained insect quantity recognition model, and a second density image is output, wherein each pixel value in the second density image represents the insect density at the current position.

[0095] Specifically, first, make sure that the current detection image has been preprocessed. The preprocessing steps include adjusting the image size, grayscale, denoising, and contrast enhancement. The purpose of these steps is to improve the image quality and standardize it to meet the input requirements of the model.

[0096] Next, the preprocessed image is fed into a trained insect population recognition model. This model is trained based on a large number of training images containing different numbers and distributions of insects, through steps such as annotation, smoothing, and density estimation. After the model is fed with an image, it automatically extracts features from the image and performs analysis and processing.

[0097] The model extracts features from the image through a series of convolution and pooling operations, identifying the specific location and density distribution of the bugs. The output is a second density image, in which each pixel value represents the density of the bugs at that location. The density image can intuitively reflect the distribution and density of the bugs in the image.

[0098] In order to achieve higher accuracy, the model has learned the characteristics and distribution patterns of insects through a large amount of labeled data during the training process. In this way, the model can accurately identify the number and location of insects in the current detection image after preprocessing. The generation of density images allows the influence range of each insect to be accurately calculated, thereby improving the reliability of the recognition results.

[0099] The second density image is summed to obtain a first initial insect quantity.

[0100] Specifically, the second density image is summed by adding all pixel values ​​in the density image to obtain a sum value. This sum value is the first initial insect quantity in the current detection image. The mathematical expression for the sum is: First initial insect quantity = ;in, represents the density value of the pixel in the i-th row and j-th column in the second density image, and H and W represent the height and width of the density image respectively.

[0101] By summing the second density image, we can effectively convert the density distribution image into a total insect count. Each pixel value in the density image reflects the insect density at that location, so the total value after summing can accurately reflect the total number of insects in the image. This method is more accurate than direct counting because it takes into account the density and distribution of the insects.

[0102] The sum calculation can also be implemented through simple programming. For example, using the NumPy library in Python, the density image can be easily summed. The specific implementation code can be, import numpy as np; first_initial_insect_count = np.sum(density_map). Among them, density_map is the second density image output by the model.

[0103] Step S43: Determine the average weight of each insect.

[0104] Specifically, in order to further improve the accuracy of insect quantity identification, it is necessary to combine the current pressure value and the pre-identified insect quantity to determine the average weight of each insect. The purpose of this step is to accurately calculate the average weight of each insect by analyzing the insect quantity and pressure changes at different time points, thereby providing reliable parameters for subsequent insect quantity correction.

[0105] In a possible implementation, step S43 specifically includes the following steps:

[0106] The activity frequency of the insects is determined, and a preset detection time interval is determined based on the activity frequency.

[0107] Specifically, first, through observation and experiment, determine the activity frequency of insects in the granary. The activity frequency of insects is affected by many factors, including environmental conditions such as temperature, humidity, and light. By observing and recording at different time periods, understand the activity patterns of insects. For example, you can choose different time periods in the morning, noon, and evening to observe, record the activity of insects, and analyze their activity frequency.

[0108] After determining the frequency of insect activity, you need to set a preset detection interval based on that frequency. A reasonable detection interval should be short enough to capture changes in insect activity, but long enough to ensure that there is a noticeable amount of change. Typically, the detection interval can be set to 10 minutes, 15 minutes, or 30 minutes, and the specific time interval can be adjusted based on the frequency of insect activity. For example, if you observe insect activity every 10 minutes or so, you can choose 10 minutes as the detection interval.

[0109] Next, ensure that data is collected within the preset detection time interval. In actual operation, an automatic collection system can be set up so that the camera device and pressure sensor automatically collect data at the set time interval. For example, the detection image and pressure value are automatically collected every 10 minutes, and the data is stored in the central monitoring system for subsequent analysis.

[0110] By setting a reasonable detection time interval, the continuity and reliability of data collection can be ensured. The collected data can accurately reflect the activities of insects and provide reliable basic data for subsequent weight calculations.

[0111] Based on a preset detection time interval, a first timestamp and a second timestamp are determined.

[0112] Specifically, first, the detection cycle is set according to the previously determined insect activity frequency and the preset detection time interval. Assuming that the preset detection time interval is 10 minutes, a detection needs to be performed within 10 minutes to ensure that the data can reflect the insect activity.

[0113] Next, in actual operation, select specific time points as the start and end points of the test. Assuming that data collection starts at 8:00 in the morning, the first timestamp can be set to 8:00 and the second timestamp to 8:10. When selecting specific time points, ensure that the intervals between the time points are consistent with the preset detection time intervals to facilitate subsequent data comparison and analysis.

[0114] A first detection image and a first pressure value corresponding to a first timestamp are obtained, and a second detection image and a second pressure value corresponding to a second timestamp are obtained.

[0115] Specifically, first, at the set first timestamp (e.g., 8:00), the automated data acquisition system is started. The system controls the camera device to capture the current detection image and records the current pressure value through the pressure sensor. The camera device should ensure that the complete image in the coverage area is captured, and the image quality must meet the preprocessing requirements, such as resolution and clarity. The pressure sensor should accurately record the current pressure value in the granary to reflect the weight of the grain stack.

[0116] At the first time stamp, the image captured by the camera is called the first detection image, and the pressure value recorded by the pressure sensor is called the first pressure value. These data will serve as the reference data for subsequent analysis.

[0117] Next, at the set second timestamp (e.g. 8:10), the automated data acquisition system is started again. The system controls the camera device to capture the current detection image again, and records the new pressure value through the pressure sensor. As with the first timestamp, the camera device needs to ensure image quality, and the pressure sensor needs to accurately record the current pressure change.

[0118] At the second timestamp, the image captured by the camera is called the second detection image, and the pressure value recorded by the pressure sensor is called the second pressure value. These data will be used for comparative analysis with the data of the first timestamp.

[0119] Based on the first detection image and the second detection image, the changed insect quantity is determined.

[0120] Specifically, first, the first detection image corresponding to the first timestamp and the second detection image corresponding to the second timestamp are input into the trained insect quantity recognition model. This model has been trained with a large amount of labeled data and can accurately recognize the number and location of insects in the image.

[0121] At the first timestamp, the first detection image is input into the insect quantity recognition model, and the model outputs the first initial insect quantity. The first initial insect quantity is the total number of insects in the image at the first time point recognized by the model. Through the model's analysis of the image features, the specific location and quantity of each insect in the image can be obtained.

[0122] Similarly, at the second timestamp, the second detection image is input into the insect quantity recognition model, and the model outputs the second initial insect quantity. The second initial insect quantity is the total number of insects in the image at the second time point recognized by the model. As with the first timestamp, the model obtains the specific location and quantity of each insect in the image by analyzing the image features.

[0123] Next, the change in insect count is determined by comparing the first initial insect count with the second initial insect count. The change in insect count is the difference in the number of insects between two time points, which can be expressed as: change in insect count = second initial insect count − first initial insect count. The change in insect count reflects the increase or decrease in insects in the granary within a preset time interval. A positive change in insect count indicates that new insects have been added during the time interval, and a negative change in insect count indicates that fewer insects have been added.

[0124] Based on the first pressure value and the second pressure value, a change in the current pressure value is determined.

[0125] Specifically, the change current pressure value = the second pressure value − the first pressure value. The change current pressure value can be positive or negative, with a positive value indicating an increase in pressure during this period and a negative value indicating a decrease in pressure. These changes are mainly caused by the activity of the bugs and may include the increase or decrease in weight of the bugs.

[0126] Divide the current pressure value by the amount of insects that changed to get the average weight.

[0127] Specifically, average weight = change in insect quantity / change in current pressure value. The significance of this calculation is that it combines the pressure change and the change in the number of insects to provide an average weight value. This average weight value represents the contribution of each insect to the pressure sensor reading within a specific time interval. This value can help estimate the total number of insects more accurately, especially in complex environments. By combining the physical weight change and the change in the number of insects for calculation, the error of a single data source can be effectively eliminated.

[0128] Step S44: Based on the current pressure value and the average weight, a second initial insect quantity is obtained.

[0129] Specifically, the second initial insect quantity = average weight / current pressure value. The significance of this calculation is that by combining the pressure change and the insect weight change, the physical pressure value can be converted into the specific number of insects. The second initial insect quantity represents the number of insects estimated at the current moment based on the pressure sensor reading and the average weight.

[0130] Step S45: Based on the first initial insect quantity and the second initial insect quantity, a pre-identified insect quantity is obtained.

[0131] Specifically, in order to accurately estimate the number of insects in the granary, it is necessary to combine the first initial insect number obtained by image recognition and the second initial insect number calculated based on the pressure value. This step uses the weighted average method to combine the results of two different data sources to calculate a more reliable pre-identified insect number. This calculation is crucial to improving the accuracy of insect identification.

[0132] In a possible implementation, step S45 specifically includes the following steps:

[0133] A first weight corresponding to a first initial insect quantity is determined, wherein when the first initial insect quantity is greater than a preset first insect quantity threshold, the first weight is inversely proportional to the first initial insect quantity.

[0134] Specifically, in order to combine the first initial insect count and the second initial insect count to obtain a more accurate pre-identified insect count, it is necessary to determine the corresponding weights according to their respective reliability. In particular, when the first initial insect count is large, its weight should be appropriately reduced to avoid over-reliance on a single data source, thereby improving the stability and accuracy of the estimate.

[0135] In order to reasonably allocate weights, it is necessary to set a preset first insect quantity threshold. When the first initial insect quantity is greater than this threshold, it indicates that the number of insects in the image is large, and the image recognition result may have a certain cumulative error. Therefore, the first weight w1 should be appropriately reduced. Specifically, the weight can be inversely proportional to the first initial insect quantity, so that when the insect quantity is large, the weight will automatically decrease, thereby reducing the impact of errors. The calculation formula for determining the first weight of the first initial insect quantity is: w1=C / first initial insect quantity; C is a constant that can be determined based on experience or by experiment, so that within the normal insect quantity range, the first weight w1 remains within a reasonable range.

[0136] Determine a second weight corresponding to the second initial insect quantity, wherein when the second initial insect quantity is greater than a preset second insect quantity threshold, the second weight is directly proportional to the second initial insect quantity, and the sum of the first weight and the second weight is 1.

[0137] Specifically, in order to combine the first initial insect quantity and the second initial insect quantity to obtain a more accurate pre-identified insect quantity, it is necessary to determine the corresponding weights according to their respective reliability. In particular, when the second initial insect quantity is large, its weight should be appropriately increased to make full use of the results calculated based on the pressure value, thereby improving the stability and accuracy of the estimation.

[0138] In order to reasonably allocate weights, it is necessary to set a preset second insect quantity threshold. When the second initial insect quantity is greater than this threshold, it indicates that the insect quantity calculated by the pressure sensor is large. At this time, it can be considered that the change in pressure value is more significant and the result is more reliable. Therefore, the second weight w2 should be appropriately increased. Specifically, the weight can be in direct proportion to the second initial insect quantity, so that when the insect quantity is large, the weight will automatically increase, thereby making full use of the advantages of the pressure value calculation results. The calculation formula for determining the second weight of the second initial insect quantity is: w2=second initial insect quantity / (second initial insect quantity+first initial insect quantity).

[0139] Based on the first initial insect quantity, the second initial insect quantity, the first weight and the second weight, a pre-identified insect quantity is obtained.

[0140] Specifically, the pre-identified insect quantity = the first initial insect quantity × the first weight + the second initial insect quantity × the second weight.

[0141] Step S5: Based on the historical insect quantity and a plurality of historical environmental data, the pre-identified insect quantity is corrected to obtain a corrected insect quantity corresponding to the grain silo insect attracting device.

[0142] Specifically, in order to further improve the accuracy of pre-identified insect counts, it is necessary to combine historical insect counts and multiple historical environmental data to intelligently correct the current pre-identified insect counts. This process uses past data and environmental factors to adjust the current identification results, thereby obtaining a more reliable corrected insect count.

[0143] In a possible implementation, step S5 specifically includes the following steps:

[0144] Determine multiple historical time points and determine the environmental variables corresponding to each historical environmental data.

[0145] Specifically, first, the selection criteria for historical time points should be clarified. Historical time points should cover different seasons, different environmental conditions, and different pest situations. This is because the activity and number of insects are significantly affected by seasonal changes, environmental conditions (such as temperature, humidity, air pressure, and light intensity), and other factors. By selecting representative historical time points, the impact of these changes on insect abundance can be captured.

[0146] Next, we will select specific historical time points based on the above criteria. We can consider the following aspects:

[0147] Season: Select multiple time points in each of the four seasons. For example, March and May in spring, July and August in summer, September and October in autumn, and December and January in winter.

[0148] Environmental conditions: Select time points with significantly different environmental conditions such as temperature and humidity. For example, select time points with higher and lower temperatures, higher and lower humidity, etc.

[0149] Pest situation: Select time points with different pest situations. For example, select time points with peak pest situation and relatively low pest situation.

[0150] Through the above method, multiple historical time points are determined to ensure that the data at these time points can fully reflect the insects' activity patterns and environmental impacts.

[0151] The environmental variables corresponding to the historical environmental data are environmental variables such as temperature, humidity, air pressure and light intensity.

[0152] The historical environment data corresponding to each historical time point is standardized to obtain a plurality of standardized historical environment data.

[0153] Specifically, standardization is to convert the data into a form with a mean of 0 and a standard deviation of 1. The commonly used method is Z-score standardization. The specific steps are as follows: For each type of environmental data (such as temperature, humidity, etc.), calculate its mean and standard deviation at all historical time points. For example, calculate the mean and standard deviation of temperature at all historical time points. Standardize each type of environmental data at each historical time point. The standardization formula is: z=(k-μ) / γ. Among them, z is the standardized historical environmental data, k is the environmental data value at a certain time point, μ is the mean of the environmental data at all time points, and γ is the standard deviation of the environmental data at all time points. Through standardization, environmental data of different dimensions can be converted to the same dimension, eliminating the impact of different data ranges on model training.

[0154] Based on a plurality of standardized historical environmental data corresponding to different historical time points, a feature matrix is ​​constructed, wherein each row in the feature matrix represents a plurality of standardized historical environmental data corresponding to the same historical time point.

[0155] Specifically, the standardized historical environmental data at each historical time point are arranged in rows to construct a feature matrix X. Each row in the feature matrix represents multiple standardized environmental data at a historical time point, and each column represents a specific environmental factor. In this way, the feature matrix can fully reflect the environmental characteristics at each time point and provide a data basis for model training and prediction.

[0156] The steps to construct the feature matrix are as follows: Arrange the standardized historical environmental data of each historical time point in rows. For example, suppose there are N historical time points, and each time point has M types of standardized historical environmental data. The standardized historical environmental data can be represented as a matrix with N rows and M columns. Arrange the standardized environmental data of all historical time points into a feature matrix X. The form of the feature matrix is ​​as follows:

[0157] ;

[0158] Among them, z ij Represents the standardized value of the j-th standardized historical environmental data at the ith historical time point, i∈[1,N], j∈[1,M].

[0159] Based on the historical insect population corresponding to different historical time points, a target variable vector is constructed.

[0160] Specifically, arrange the historical insect population data at each historical time point in order to construct the target variable vector Y. Each element in the target variable vector represents the insect population data at a historical time point. This vector will serve as the output target of the model training, so that the model can make effective predictions by learning the relationship between the input feature matrix X and the target variable vector Y. The steps to construct the target variable vector are as follows: Arrange the historical insect population data at each historical time point in order. For example, assuming there are N historical time points, an N-dimensional vector is obtained after arrangement. Arrange the historical insect population data of all historical time points into the target variable vector Y. The form of the target variable vector is as follows:

[0161] ;

[0162] Among them, Y i Represents the historical insect quantity at the i-th historical time point, i∈[1,N].

[0163] The linear regression model is trained based on the feature matrix and the target variable vector to obtain the regression coefficients corresponding to each historical environmental data and the intercept of the linear regression model.

[0164] Specifically, the linear regression model is trained using the feature matrix X and the target variable vector Y. The goal of the linear regression model is to find a linear function that minimizes the error between the input feature matrix X and the output insect count. The model can be expressed as: . Among them, β is the regression coefficient vector, each element of which corresponds to the regression coefficient of an environmental variable; is the error term. By minimizing the error term, the regression coefficient vector β and the intercept α can be obtained.

[0165] Determine the current environmental data corresponding to each environmental variable; standardize the current environmental data to obtain a plurality of standardized standard environmental data.

[0166] Specifically, the method of performing standardization processing on the current environmental data to obtain a plurality of standardized standard environmental data has been described in detail in the aforementioned embodiments, so it will not be described in detail here.

[0167] Based on a plurality of standardized standard environmental data, a plurality of regression coefficients and an intercept, the pre-identified insect quantity is corrected to obtain the corrected insect quantity corresponding to the grain silo insect attractant device.

[0168] Specifically, the standardized current environmental data is input into the linear regression model trained in the previous step to calculate the correction factor. The prediction formula of the linear regression model is: Correction factor = β 1u1+ β 2u2+…+ βn u n +α ; where u1,u2,…,u n is the standardized current environment data, β1,β2,…,β n is the regression coefficient corresponding to various environmental variables, and α is the intercept. The pre-identified insect quantity is corrected by the calculated correction factor. The correction formula is: Corrected insect quantity = pre-identified insect quantity + correction factor.

[0169] Step S6: When the corrected insect quantity is greater than the preset insect full warning threshold, a first warning message is sent to the granary manager terminal.

[0170] Specifically, first, set a warning threshold for insects. For example, the warning threshold can be set to 1,000 insects. The warning threshold is a critical value of insect quantity determined based on historical data and granary management experience. When the insect quantity exceeds this value, it means that the insect pest situation in the granary may pose a threat to grain storage. When setting the warning threshold for insects, factors such as the specific situation of the granary, the variety of stored grain, and the actual impact of insect pests should be considered comprehensively.

[0171] Next, the corrected insect quantity is compared and judged. When the corrected insect quantity is greater than the preset insect full warning threshold, the system should automatically trigger the warning mechanism. After the warning mechanism is triggered, the system needs to generate the first warning information and send it to the terminal of the granary manager. The first warning information should include the following: the current corrected insect quantity, the preset insect full warning threshold, the timestamp (i.e. the specific time of detecting and calculating the corrected insect quantity), and the recommended emergency treatment measures.

[0172] Step S7: When the current pressure value is not less than the preset pressure warning threshold, a second warning message is sent to the granary manager terminal.

[0173] Specifically, first, set a pressure warning threshold. For example, the pressure warning threshold can be set to 2000Pa. This pressure warning threshold should be reasonably set according to the specific conditions of the granary, the grain stacking method, and historical pressure data. The set pressure warning threshold should be able to reflect the critical point where abnormal conditions may occur in the granary.

[0174] Next, the current pressure value is monitored in real time. When it is detected that the current pressure value is not less than the preset pressure warning threshold, the system should immediately trigger the warning mechanism. The current pressure value is collected in real time by the pressure sensor, reflecting the actual pressure situation in the granary. After the warning mechanism is triggered, the system needs to generate a second warning message and send it to the terminal of the granary manager. The second warning message should include the following: the current pressure value, the preset pressure warning threshold, the timestamp (that is, the specific time when the pressure abnormality is detected), and the recommended emergency treatment measures.

[0175] Reference Figure 3, which shows a schematic diagram of the structure of an insect-filled early warning system for an insect trapping device in a granary provided by an embodiment of the present application, the system comprises a processing module 1, an acquisition module 2 and an early warning module 3; the processing module 1 is used to determine the coverage area corresponding to the insect trapping device in the granary; the acquisition module 2 is used to acquire the historical insect quantity and a plurality of historical environmental data corresponding to the coverage area; the acquisition module 2 is also used to acquire the current detection image corresponding to the insect trapping device in the granary acquired by a camera device arranged in the coverage area, and simultaneously acquire the current pressure value acquired by a pressure sensor arranged on the insect trapping device in the granary; the processing module 1 is also used to obtain the pre-identified insect quantity corresponding to the insect trapping device in the granary based on the current detection image and the current pressure value when the current pressure value is less than a preset pressure early warning threshold; the processing module 1 is also used to correct the pre-identified insect quantity based on the historical insect quantity and a plurality of historical environmental data to obtain the corrected insect quantity corresponding to the insect trapping device in the granary; the early warning module 3 is used to send a first early warning message to the terminal of the granary manager when the corrected insect quantity is greater than the preset insect-filled early warning threshold; the early warning module 3 is also used to send a second early warning message to the terminal of the granary manager when the current pressure value is not less than the preset pressure early warning threshold.

[0176] In a possible implementation, the processing module 1 is also used to perform image preprocessing on the current detection image to obtain a preprocessed current detection image; the processing module 1 is also used to input the preprocessed current detection image into a trained insect quantity recognition model to obtain a first initial insect quantity; the processing module 1 is also used to determine the average weight of each insect; the processing module 1 is also used to obtain a second initial insect quantity based on the current pressure value and the average weight; the processing module 1 is also used to obtain a pre-identified insect quantity based on the first initial insect quantity and the second initial insect quantity.

[0177] In a possible implementation, the system further includes a model building module 4; the model building module 4 is used to collect multiple original training images containing different numbers and distributions of insects; the model building module 4 is also used to divide each original training image into multiple block areas, and preprocess each block area to obtain multiple preprocessed block areas; the model building module 4 is also used to mark the center point position of each insect in each preprocessed block area; the model building module 4 is also used to smooth each center point position based on a Gaussian kernel function to obtain a first density image corresponding to each original training image; determine an initial model suitable for density estimation; the model building module 4 is also used to use multiple original training images and multiple first density images as input and output of the initial model respectively to construct a training data set; the model building module 4 is also used to train the initial model based on the training data set to obtain a trained insect quantity recognition model.

[0178] In a possible implementation, the processing module 1 is also used to input the preprocessed current detection image into a trained insect quantity recognition model, and output a second density image, wherein each pixel value in the second density image represents the insect density at the current position; the processing module 1 is also used to sum the second density image to obtain a first initial insect quantity.

[0179] In a possible embodiment, the processing module 1 is also used to determine the activity frequency of the insects, and determine the preset detection time interval based on the activity frequency; the processing module 1 is also used to determine the first timestamp and the second timestamp based on the preset detection time interval; the acquisition module 2 is also used to acquire the first detection image and the first pressure value corresponding to the first timestamp, and acquire the second detection image and the second pressure value corresponding to the second timestamp; the processing module 1 is also used to determine the changed insect quantity based on the first detection image and the second detection image; the processing module 1 is also used to determine the changed current pressure value based on the first pressure value and the second pressure value; the processing module 1 is also used to divide the changed current pressure value by the changed insect quantity to obtain the average weight.

[0180] In one possible embodiment, the processing module 1 is also used to determine a first weight corresponding to a first initial insect quantity, wherein when the first initial insect quantity is greater than a preset first insect quantity threshold, the first weight is inversely proportional to the first initial insect quantity; the processing module 1 is also used to determine a second weight corresponding to a second initial insect quantity, wherein when the second initial insect quantity is greater than a preset second insect quantity threshold, the second weight is directly proportional to the second initial insect quantity, and the sum of the first weight and the second weight is 1; the processing module 1 is also used to obtain a pre-identified insect quantity based on the first initial insect quantity, the second initial insect quantity, the first weight and the second weight.

[0181] In a possible implementation, the processing module 1 is also used to determine multiple historical time points and determine the environmental variables corresponding to each historical environmental data; the processing module 1 is also used to standardize the historical environmental data corresponding to each historical time point to obtain multiple standardized historical environmental data; the processing module 1 is also used to construct a feature matrix based on the multiple standardized historical environmental data corresponding to different historical time points, wherein each row in the feature matrix represents the multiple standardized historical environmental data corresponding to the same historical time point; the processing module 1 is also used to construct a target variable vector based on the historical insect quantity corresponding to different historical time points; the processing module 1 is also used to train a linear regression model based on the feature matrix and the target variable vector to obtain the regression coefficient corresponding to each environmental variable and the intercept of the linear regression model; the processing module 1 is also used to determine the current environmental data corresponding to each environmental variable; the processing module 1 is also used to standardize the current environmental data to obtain multiple standardized standard environmental data; the processing module 1 is also used to correct the pre-identified insect quantity based on the multiple standardized standard environmental data, the multiple regression coefficients and the intercept to obtain the corrected insect quantity corresponding to the granary insect trapping device.

[0182] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0183] The present application also discloses an electronic device. Figure 4 , Figure 4 The electronic device 400 may include: at least one processor 401 , at least one network interface 404 , a user interface 403 , a memory 405 , and at least one communication bus 402 .

[0184] The communication bus 402 is used to realize the connection and communication between these components.

[0185] The user interface 403 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.

[0186] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0187] Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and calling data stored in the memory 405. Optionally, the processor 401 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 401 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 401, and it can be implemented separately through a chip.

[0188] Among them, the memory 405 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 405 may optionally be at least one storage device located away from the aforementioned processor 401. Refer to Figure 4 , the memory 405 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module and an application program.

[0189] exist Figure 4In the electronic device 400 shown, the user interface 403 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 401 can be used to call an application stored in the memory 405, and when executed by one or more processors 401, the electronic device 400 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.

[0190] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0191] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0192] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0194] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0195] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.

[0196] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for early warning of insects in a granary insect trapping device. It is characterized in that The method comprises: Determine the coverage area corresponding to the insect trap device in the grain silo; Acquire historical insect population and multiple historical environmental data corresponding to the coverage area; Acquire a current detection image corresponding to the grain silo insect attractant device collected by a camera device disposed in the coverage area, and simultaneously acquire a current pressure value collected by a pressure sensor disposed on the grain silo insect attractant device; When the current pressure value is less than a preset pressure warning threshold, a pre-identified insect quantity corresponding to the grain silo insect attracting device is obtained based on the current detection image and the current pressure value; Determine a plurality of historical time points, and determine the environmental variables corresponding to each of the historical environmental data; Performing standardization processing on the historical environment data corresponding to each of the historical time points to obtain a plurality of standardized historical environment data; The standardization formula is: z=(k-μ) / γ, where z is the standardized historical environmental data, k is the environmental data value at a certain time point, μ is the mean of the environmental data at all time points, and γ is the standard deviation of the environmental data at all time points; Based on the plurality of the standardized historical environment data corresponding to different historical time points, constructing a feature matrix, wherein each row in the feature matrix represents the plurality of the standardized historical environment data corresponding to the same historical time point; Constructing a target variable vector based on the historical insect population corresponding to different historical time points; Training a linear regression model based on the feature matrix and the target variable vector to obtain the regression coefficient corresponding to each of the environmental variables and the intercept of the linear regression model; Determine the current environment data corresponding to each of the environment variables; Performing standardization processing on the current environmental data to obtain a plurality of standardized standard environmental data; Input multiple standardized standard environment data into the trained linear regression model to calculate the correction factor. The prediction formula of the linear regression model is: Correction factor = β1u 1 +β2u 2 +…+βnu n +α; among them, u 1 ,u 2 ,…,u n is the standardized current environment data, β 1 ,β 2 ,…,β n are the regression coefficients corresponding to various environmental variables, and α is the intercept; Corrected insect quantity = pre-identified insect quantity + correction factor; When the corrected insect quantity is greater than a preset insect full warning threshold, a first warning message is sent to a granary manager terminal; When the current pressure value is not less than the preset pressure warning threshold, a second warning message is sent to the granary manager terminal.

2. The method according to claim 1, It is characterized in that The obtaining, based on the current detection image and the current pressure value, of the pre-identified insect quantity corresponding to the insect trapping device in the granary specifically includes: Performing image preprocessing on the current detection image to obtain a preprocessed current detection image; Inputting the preprocessed current detection image into a trained insect quantity recognition model to obtain a first initial insect quantity; Determine the average weight of each bug; Based on the current pressure value and the average weight, obtaining a second initial insect quantity; The pre-identified insect quantity is obtained based on the first initial insect quantity and the second initial insect quantity.

3. The method according to claim 2, It is characterized in that Before inputting the preprocessed current detection image into a trained insect quantity recognition model to obtain a first initial insect quantity, the method further includes: Collect multiple original training images containing different numbers and distributions of bugs; Dividing each of the original training images into a plurality of block regions, and preprocessing each of the block regions to obtain a plurality of preprocessed block regions; Marking the center point position of each insect in each pre-processed block area; Performing smoothing processing on each center point position based on a Gaussian kernel function to obtain a first density image corresponding to each original training image; Determine an initial model suitable for density estimation; Using the plurality of original training images and the plurality of the first density images as input and output of the initial model respectively, to construct a training data set; The initial model is trained based on the training data set to obtain the trained insect population recognition model.

4. The method according to claim 2, It is characterized in that The step of inputting the preprocessed current detection image into a trained insect quantity recognition model to obtain a first initial insect quantity specifically includes: Inputting the preprocessed current detection image into a trained insect quantity recognition model, and outputting a second density image, wherein each pixel value in the second density image represents the insect density at the current position; The second density images are summed to obtain the first initial insect quantity.

5. The method according to claim 2, It is characterized in that Determining the average weight of each insect specifically includes: Determining an activity frequency of the insects, and determining a preset detection time interval based on the activity frequency; Based on the preset detection time interval, determining a first timestamp and a second timestamp; Acquire a first detection image and a first pressure value corresponding to the first timestamp, and acquire a second detection image and a second pressure value corresponding to the second timestamp; Determining a changed insect quantity based on the first detection image and the second detection image; Based on the first pressure value and the second pressure value, determining a change in a current pressure value; The changed current pressure value is divided by the changed insect quantity to obtain the average weight.

6. The method according to claim 2, It is characterized in that The obtaining the pre-identified insect quantity based on the first initial insect quantity and the second initial insect quantity specifically includes: Determining a first weight corresponding to the first initial insect quantity, wherein when the first initial insect quantity is greater than a preset first insect quantity threshold, the first weight is inversely proportional to the first initial insect quantity; Determine a second weight corresponding to the second initial insect quantity, wherein when the second initial insect quantity is greater than a preset second insect quantity threshold, the second weight is directly proportional to the second initial insect quantity, and the sum of the first weight and the second weight is 1; The pre-identified insect quantity is obtained based on the first initial insect quantity, the second initial insect quantity, the first weight, and the second weight.

7. A grain silo insect trapping device insect full warning system, It is characterized in that The system includes a processing module, an acquisition module and an early warning module; The processing module is used to determine the coverage area corresponding to the insect trap device in the granary; The acquisition module is used to acquire the historical insect population and multiple historical environmental data corresponding to the coverage area; The acquisition module is further used to acquire a current detection image corresponding to the grain silo insect attractant device acquired by a camera device arranged in the coverage area, and simultaneously acquire a current pressure value acquired by a pressure sensor arranged on the grain silo insect attractant device; The processing module is further configured to obtain the pre-identified insect quantity corresponding to the grain silo insect attracting device based on the current detection image and the current pressure value when the current pressure value is less than a preset pressure warning threshold; The processing module is further used to determine multiple historical time points and determine the environmental variables corresponding to each of the historical environmental data; perform standardization processing on the historical environmental data corresponding to each of the historical time points to obtain multiple standardized historical environmental data; the standardization formula is: z=(k-μ) / γ, wherein z is the standardized historical environmental data, k is the environmental data value at a certain time point, μ is the mean of the environmental data at all time points, and γ is the standard deviation of the environmental data at all time points; based on the multiple standardized historical environmental data corresponding to different historical time points, construct a feature matrix, wherein each row in the feature matrix represents the same The invention relates to a plurality of standardized historical environmental data corresponding to the historical time points; constructing a target variable vector based on the historical insect quantity corresponding to different historical time points; training a linear regression model based on the feature matrix and the target variable vector to obtain the regression coefficient corresponding to each environmental variable and the intercept of the linear regression model; determining the current environmental data corresponding to each environmental variable; standardizing the current environmental data to obtain a plurality of standardized standard environmental data; inputting the plurality of standardized standard environmental data into the trained linear regression model to calculate the correction factor, and the prediction formula of the linear regression model is: correction factor = β1u 1 +β2u 2 +…+βnu n +α; among them, u 1 ,u 2 ,…,u n is the standardized current environment data, β 1 ,β 2 ,…,β n is the regression coefficient corresponding to various environmental variables, α is the intercept; Corrected insect quantity = pre-identified insect quantity + correction factor; The early warning module is used to send a first early warning message to a granary manager terminal when the corrected insect quantity is greater than a preset insect full warning threshold; The warning module is also used to send a second warning message to the granary manager terminal when the current pressure value is not less than the preset pressure warning threshold.

8. An electronic device, It is characterized in that The electronic device (400) comprises a processor (401), a memory (405), a user interface (403) and a network interface (404), wherein the memory (405) is used to store instructions, the user interface (403) and the network interface (404) are used to communicate with other devices, and the processor (401) is used to execute the instructions stored in the memory (405) so that the electronic device (400) executes the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 6 is performed.