Three.js and convolutional neural network-based three-dimensional crop growth model display method
Through the three-dimensional crop growth model display method based on three.js and convolutional neural network, the problems of data isolation, insufficient real-time performance and static models in the existing technology are solved, and efficient, accurate and dynamic display of crop growth monitoring is achieved, meeting the needs of modern smart agriculture.
Patent Information
- Application Number
- CN202411907198.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology has problems such as data isolation, insufficient real-time performance, inability to display growth dynamics, insufficient user operation and interaction functions in crop growth monitoring and three-dimensional visual display, and it is difficult to meet the needs of modern smart agriculture for crop dynamic display and precise management.
The three-dimensional crop growth model display method based on three.js and convolutional neural network is adopted to collect environmental data in real time through Internet of Things technology, combine with ResNet101 convolutional neural network to identify crop health status, and use three.js technology to build dynamic updated three-dimensional visual scenes to realize dynamic simulation and intelligent state recognition of crop growth.
Real-time linkage display of environmental data and crop growth status is realized, the accuracy and real-time nature of crop growth monitoring is improved, the dynamic display effect and user operation experience of three-dimensional visualization are enhanced, and the needs of modern smart agriculture for dynamic display and precise management of crops is met.
Smart Images

Figure CN119850794A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of crop growth simulation, and in particular to a three-dimensional crop growth model display method based on three.js and a convolutional neural network. Background Art
[0002] With the rapid development of modern agricultural technology, information and intelligent technologies are gradually applied to the agricultural field to improve agricultural production efficiency and crop yields and reduce management costs. In this context, the application of three-dimensional visualization technology, Internet of Things technology and artificial intelligence technology in agricultural planting management has received more and more attention. Especially in greenhouse agriculture, due to the strong controllability of the environment, monitoring and simulating the growth of vegetation is of great significance for scientific management. However, traditional crop growth monitoring and display technology has many shortcomings in practical applications, and it is difficult to meet the needs of modern smart agriculture for dynamic display and precise management of crops.
[0003] In the existing technology, most agricultural monitoring systems rely on two-dimensional images and text data to display the growth status of crops. This method cannot intuitively present the morphology and distribution of crops in three-dimensional space, limiting the user's comprehensive understanding of the overall health status and growth trends of crops. In addition, two-dimensional data lacks interactivity and three-dimensionality, making it difficult to meet managers' needs for multi-dimensional analysis and intuitive operation. At the same time, traditional static monitoring systems can usually only collect and display current data, but cannot simulate the dynamic growth process of crops, and cannot reflect the different stages of vegetation morphology over time, resulting in managers lacking effective support for actual decision-making.
[0004] In addition, although the current agricultural environmental monitoring system can collect environmental parameters such as temperature, humidity, soil moisture and light intensity inside the greenhouse through sensors, most of these data are presented in the form of reports or line graphs, and lack integration with crop growth models. It is difficult for users to directly link environmental changes with the growth status of crops, and it is impossible to fully grasp the growth dynamics and health status of vegetation under different environmental conditions. In addition, the existing technology for identifying abnormal crop conditions mainly relies on manual observation or simple statistical analysis, and cannot achieve high-precision, automated identification and prediction, resulting in abnormal crop problems (such as pests and diseases, nutrient deficiencies) cannot be discovered and resolved in a timely manner.
[0005] For the analysis of crop image data, existing technologies mainly use traditional image processing methods for analysis, such as edge detection, color extraction, etc., but these methods are less effective when processing images with complex lighting and different growth stages, and cannot accurately extract the health status, leaf structure and abnormal characteristics of crops. At the same time, traditional analysis methods lack learning capabilities and cannot efficiently process and classify large-scale image data, resulting in the inability to meet the needs of rapid analysis and real-time recognition in practical applications. In addition, in existing crop monitoring systems, the prediction and identification of crop status lack high-performance model support, and fail to effectively combine deep learning technology for feature extraction and status classification, affecting the accuracy and reliability of the system.
[0006] In terms of 3D visualization, some technologies have attempted to model crops through 3D modeling tools, but most models are statically designed and lack dynamic linkage with real-time data. These static models are usually unable to interact with environmental data and crop status analysis results, and cannot intuitively display the growth process of crops over time. On the other hand, existing 3D display systems often need to rely on high-performance computing devices and cannot achieve smooth display on ordinary web pages, limiting the scope of application of the technology. In addition, the user interface design is relatively complex and lacks effective user operation and interaction functions, resulting in poor system usability and user experience.
[0007] In summary, the existing technologies have the following major problems in crop growth monitoring and three-dimensional visualization: First, there is no effective linkage between environmental data, crop status and three-dimensional visualization, and the data is isolated, making it difficult to achieve dynamic updates and intuitive displays. Second, traditional image processing methods and static three-dimensional models cannot meet the needs of real-time status recognition and growth process simulation, resulting in the inability to detect and display abnormal crop conditions in a timely manner. Third, user operation and interaction functions are insufficient, and the system's flexibility and usability are poor, which cannot meet managers' comprehensive needs for crop monitoring, abnormal diagnosis and management decisions. Summary of the invention
[0008] One purpose of the present invention is to propose a three-dimensional crop growth model display method based on three.js and convolutional neural network. The present invention collects environmental data through Internet of Things technology, and combines ResNet101 convolutional neural network model to automatically analyze crop image data to realize crop health status recognition and abnormal feature detection. At the same time, based on three.js technology, a three-dimensional scene is constructed, and a dynamically updated three-dimensional crop model is loaded. By combining real-time environmental data with crop status, the growth process of vegetation is simulated, and morphological changes at different growth stages are displayed. Further, by designing an interactive user interface, zooming, rotating and panning operations are provided, so that users can intuitively view the crop distribution and health status in the three-dimensional scene, thereby realizing three-dimensional visualization of growth monitoring and management.
[0009] According to an embodiment of the present invention, a three-dimensional crop growth model display method based on three.js and a convolutional neural network includes the following steps:
[0010] S1. Use Selenium and BeautifulSoup tools to crawl crop data from agricultural encyclopedia websites, agricultural forums, and agricultural science platforms, store the acquired crop data in the MySQL database, migrate the crop data to the HDFS distributed storage system through Sqoop, and build a HIVE data warehouse;
[0011] S2, using embedded sensor devices to collect environmental data in real time, uploading the collected environmental data to the HDFS distributed storage system, and performing data deduplication, data verification, and data format conversion before storing it in the HIVE data warehouse;
[0012] S3, using a camera to collect crop image data and preprocess it, building a ResNet101 network model, using the preprocessed data to train the ResNet101 network model, evaluating the model performance, and applying the ResNet101 network model to classify and identify the state of the crop image data;
[0013] S4, create a 3D scene based on three.js, load the 3D model file encoded by DRACO, build the 3D model, and render the 3D scene through the renderer;
[0014] S5. Combine the environmental data in the HIVE data warehouse with the analysis results of the ResNet101 network model, dynamically update the environmental parameters and crop status of the 3D scene through three.js, simulate the vegetation growth process based on the animation function, and dynamically adjust the vegetation 3D model to show the morphological changes at different growth stages;
[0015] S6. Design a user interaction interface to display the three-dimensional model, combine real-time environmental data with crop status information, and provide users with three-dimensional visualized growth monitoring and management information.
[0016] Optionally, the S1 specifically includes:
[0017] S11, selecting agricultural encyclopedia websites, agricultural forums and agricultural science popularization platforms as target data sources, wherein the target data sources include crop types, abnormal conditions, growth forms and growth trend information;
[0018] S12, using Selenium tools to access the target data source, and dynamically crawling the web page content by setting the target URL, starting the browser engine, and loading the page;
[0019] S13, performing DOM parsing on the crawled web page content, locating web page elements through XPath selectors, extracting crop data including crop type, abnormal state, growth form and growth trend, and further processing the extracted crop data using the BeautifulSoup tool, including removing HTML tags, character encoding conversion, eliminating blank data and reorganizing unstructured data;
[0020] S14, classifying the processed crop data according to data fields, wherein the data fields include crop name, leaf color, stem structure, growth status, abnormal characteristics, and time trend;
[0021] S15, storing the classified crop data in a structured manner, writing the crop data into a MySQL database in the form of a table, and defining a table structure, wherein the table structure includes a field name, a data type, a primary key index, and a foreign key association relationship;
[0022] S16. Use the Sqoop tool to migrate the crop data stored in the MySQL database to the HDFS distributed storage system, establish a HIVE data warehouse, and import the migrated crop data into the HIVE data warehouse.
[0023] Optionally, the embedded sensor device includes a soil moisture sensor, a soil temperature sensor, and a light sensor.
[0024] Optionally, the S3 specifically includes:
[0025] S31, acquiring crop image data, wherein the crop image data includes images of crop growth status at different time periods and different angles;
[0026] S32, preprocessing the collected crop image data, wherein the preprocessing includes image resizing, normalization processing and data enhancement, wherein the data enhancement performs random flipping, rotation and cropping operations on the image to expand the diversity of data samples;
[0027] S33, constructing a ResNet101 network model, wherein the ResNet101 network model includes an input layer, a convolutional layer, a pooling layer, a fully connected layer and an output layer;
[0028] S34. Use the preprocessed crop image data to train the ResNet101 network model, and the training objective function is the cross entropy loss function:
[0029]
[0030] Among them, N represents the total number of samples, C represents the number of classification categories, and Y ij represents the true label, Represents the probability value predicted by the model, and L represents the cross entropy loss function;
[0031] S35, performing a model performance evaluation on the training process, calculating the accuracy, precision, recall rate and F1 score indicators, and tuning the ResNet101 network model according to the evaluation results, wherein the tuning includes adjusting the learning rate, batch size, optimizer parameters and the number of network layers;
[0032] S36. Save the trained ResNet101 network model, apply the ResNet101 network model to new crop image data, perform real-time state classification and recognition on the crop image data, and output the growth status, abnormal characteristics, and health status results of the crops.
[0033] Optionally, the S4 specifically includes:
[0034] S41. Create a three-dimensional scene based on three.js, where the three-dimensional scene includes a scene container, a scene camera, and a renderer;
[0035] S42, using the DRACOLoader loader of three.js to decode and load the 3D model file, wherein the 3D model file includes a greenhouse structure, vegetation, soil, and water source;
[0036] S43, initializing the position, scale and rotation parameters of the loaded three-dimensional model;
[0037] S44, setting a material and a texture for the three-dimensional model, wherein the material is a physical base rendering material, and the texture is loaded using a map file and mapped to the surface of the three-dimensional model;
[0038] S45, adding lighting to the three-dimensional scene, wherein the lighting includes ambient light, point light source and directional light;
[0039] S46, adding the processed 3D model to the three.js scene container, rendering it through a renderer, and outputting the rendering result to the Canvas element of the HTML page;
[0040] S47. Adjust the coordinate position and angle of the 3D model based on the coordinate system of three.js, so that the greenhouse structure, vegetation, soil and water source models are reasonably distributed in the 3D scene;
[0041] S48. Set the initial viewing angle and observation position of the 3D scene camera, and implement the scaling, rotation, and translation operations of the model through the track controller of three.js.
[0042] Optionally, the S5 specifically includes:
[0043] S51, obtaining environmental data in the HIVE data warehouse, wherein the environmental data includes soil moisture value, soil temperature value, light intensity and timestamp;
[0044] S52, calling the ResNet101 network model to analyze and process the crop image data;
[0045] S53, combining the environmental data in the HIVE data warehouse with the analysis results of the ResNet101 network model to generate a mapping relationship between crop growth status and environmental data;
[0046] S54, transmitting the mapping relationship data to the three.js rendering engine, and updating the environmental parameters and crop status of the three-dimensional model in real time through the dynamic update method provided by three.js;
[0047] S55. Based on the animation function of three.js, the growth process of vegetation is simulated by updating the scaling and growth height of the 3D model;
[0048] S56, rendering the updated three-dimensional model data into the scene, executing a rendering cycle, and continuously refreshing the three-dimensional scene to display the morphological changes of the crops at different growth stages;
[0049] S57. Synchronize the real-time environmental parameters and crop status information into the three-dimensional scene, and intuitively display the crop growth status through graphical identification and color changes, so as to realize dynamic update and display of three-dimensional visualized data.
[0050] Optionally, the S6 specifically includes:
[0051] S61. Designing a user interaction interface based on HTML5 and CSS3, wherein the user interaction interface includes a three-dimensional scene window, an environmental parameter data display panel, a crop health status display area, and an operation control panel;
[0052] S62, setting zoom, rotation and translation functions in the operation control panel, and realizing viewing angle adjustment of the three-dimensional scene through the track controller of three.js;
[0053] S63, loading the dynamically rendered crop growth model and greenhouse environment in the three-dimensional scene window, and displaying the environmental parameters and ResNet101 network model analysis results in the HIVE data warehouse in real time;
[0054] S64, displaying soil moisture, soil temperature, light intensity and timestamp in real time through the environmental parameter data display panel;
[0055] S65, displaying crop status information identified by the ResNet101 network model in the crop health status display area, wherein the crop status information includes a crop classification result and an abnormal feature identifier;
[0056] S66, providing a timeline function of the crop growth process through the operation control panel, and the user can drag the timeline to adjust the display stage of the crop growth;
[0057] S67. Dynamically update the user's operation feedback on the 3D scene through three.js, realize real-time response of zooming, rotating, panning and time axis based on event monitoring function, and render the operation results into the 3D scene window to generate interactive 3D visualization display.
[0058] The beneficial effects of the present invention are:
[0059] First, the present invention uses embedded sensor devices to collect environmental parameters such as temperature, humidity, soil moisture and light intensity in the greenhouse in real time, standardizes the data collected by the sensors, and stores them in the HIVE data warehouse, thus realizing efficient storage and management of environmental data. This IoT data collection technology ensures the real-time and accuracy of environmental data, provides reliable data support for crop growth status analysis, and makes up for the defects of isolated and insufficient dynamic environmental data in traditional monitoring technology.
[0060] Secondly, the present invention constructs a ResNet101 convolutional neural network model to automatically analyze and identify crop image data collected by cameras inside the greenhouse, and can accurately identify the growth status, health status and abnormal characteristics of crops. Through efficient image preprocessing and deep learning model training, the system can intelligently classify and predict key indicators such as leaf color, stem structure, and texture characteristics, effectively improving the accuracy and efficiency of crop status recognition, and overcoming the problem of poor recognition effect of traditional image processing methods in complex lighting environments. At the same time, the application of the ResNet101 model enables the system to have learning capabilities, process large-scale data and continuously optimize analysis results, thereby achieving high-precision assessment and abnormality detection of crop health status.
[0061] Again, the present invention creates a three-dimensional visualization scene based on three.js technology, loads the three-dimensional crop model encoded by DRACO, and combines environmental data with crop status analysis results to dynamically update and render the three-dimensional scene in real time. Through the animation function provided by three.js, the system can simulate the growth process of crops in different time periods, and dynamically adjust the scaling and morphology of the crop model according to real-time monitoring data, so that the growth state of vegetation can be truly restored in three-dimensional space. This three-dimensional dynamic display technology greatly improves the visualization effect, solves the problem that static models in the prior art cannot display growth dynamics, and enables users to observe the growth status and distribution of crops more intuitively.
[0062] In addition, the present invention also provides a highly interactive user operation interface. Through functions such as zooming, rotating, and panning, users can observe and operate the three-dimensional greenhouse scene from different angles and perspectives. In addition, the system integrates an environmental data panel and a crop health status display area to display environmental parameters such as soil moisture, temperature, and light intensity in real time, and intuitively presents the growth status and abnormal characteristics of crops in combination with the ResNet101 analysis results. This linkage display of data and three-dimensional models enables managers to fully understand the crop growth process, quickly discover abnormal situations, and make scientific decisions, significantly improving the practicality of the system and user experience.
[0063] In summary, the present invention realizes efficient rendering of three-dimensional models, dynamic simulation of crop growth and intelligent state recognition, achieves the effect of real-time linkage display of environmental data and crop growth status, and provides users with a more intuitive, accurate and convenient crop growth monitoring and management tool. The present invention not only improves the accuracy and real-time performance of crop growth monitoring, but also optimizes the three-dimensional visualization display effect and user operation experience, providing a technical solution with high practical value for modern smart agriculture. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0065] Figure 1 A flowchart of a three-dimensional crop growth model display method based on three.js and convolutional neural network proposed by the present invention;
[0066] Figure 2 This is a schematic diagram of the dynamic update of the three-dimensional visualization scene and the animation simulation of the vegetation growth process of the three-dimensional crop growth model display method based on three.js and convolutional neural network proposed by the present invention. DETAILED DESCRIPTION
[0067] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0068] refer to Figure 1 and Figure 2 A three-dimensional crop growth model display method based on three.js and convolutional neural network includes the following steps:
[0069] S1. Use Selenium and BeautifulSoup tools to crawl crop data from agricultural encyclopedia websites, agricultural forums, and agricultural science platforms, store the acquired crop data in the MySQL database, migrate the crop data to the HDFS distributed storage system through Sqoop, and build a HIVE data warehouse;
[0070] S2, using embedded sensor devices to collect environmental data in real time, uploading the collected environmental data to the HDFS distributed storage system, and performing data deduplication, data verification, and data format conversion before storing it in the HIVE data warehouse;
[0071] S3, using a camera to collect crop image data and preprocess it, building a ResNet101 network model, using the preprocessed data to train the ResNet101 network model, evaluating the model performance, and applying the ResNet101 network model to classify and identify the state of the crop image data;
[0072] S4, create a 3D scene based on three.js, load the 3D model file encoded by DRACO, build the 3D model, and render the 3D scene through the renderer;
[0073] S5. Combine the environmental data in the HIVE data warehouse with the analysis results of the ResNet101 network model, dynamically update the environmental parameters and crop status of the 3D scene through three.js, simulate the vegetation growth process based on the animation function, and dynamically adjust the vegetation 3D model to show the morphological changes at different growth stages;
[0074] S6. Design a user interaction interface to display the three-dimensional model, combine real-time environmental data with crop status information, and provide users with three-dimensional visualized growth monitoring and management information.
[0075] In this implementation, S1 specifically includes:
[0076] S11, selecting agricultural encyclopedia websites, agricultural forums and agricultural science popularization platforms as target data sources, wherein the target data sources include crop type, abnormal state, growth form and growth trend information;
[0077] S12, using Selenium tools to access the target data source, and dynamically crawling the web page content by setting the target URL, starting the browser engine, and loading the page;
[0078] S13, performing DOM parsing on the crawled web page content, locating web page elements through XPath selectors, extracting crop data including crop type, abnormal state, growth form and growth trend, and further processing the extracted crop data using the BeautifulSoup tool, including removing HTML tags, character encoding conversion, eliminating blank data and reorganizing unstructured data;
[0079] S14, classifying the processed crop data according to data fields, wherein the data fields include crop name, leaf color, stem structure, growth status, abnormal characteristics, and time trend;
[0080] S15, storing the classified crop data in a structured manner, writing the crop data into a MySQL database in the form of a table, and defining a table structure, wherein the table structure includes a field name, a data type, a primary key index, and a foreign key association relationship;
[0081] S16. Use the Sqoop tool to migrate the crop data stored in the MySQL database to the HDFS distributed storage system, establish a HIVE data warehouse, and import the migrated crop data into the HIVE data warehouse.
[0082] In this implementation, the embedded sensor device includes a soil moisture sensor, a soil temperature sensor, and a light sensor.
[0083] In this implementation, S3 specifically includes:
[0084] S31, acquiring crop image data, wherein the crop image data includes images of crop growth status at different time periods and different angles;
[0085] S32, preprocessing the collected crop image data, wherein the preprocessing includes image resizing, normalization processing and data enhancement, wherein the data enhancement performs random flipping, rotation and cropping operations on the image to expand the diversity of data samples;
[0086] S33, constructing a ResNet101 network model, wherein the ResNet101 network model includes an input layer, a convolutional layer, a pooling layer, a fully connected layer and an output layer;
[0087] S34. Use the preprocessed crop image data to train the ResNet101 network model, and the training objective function is the cross entropy loss function:
[0088]
[0089] Among them, N represents the total number of samples, C represents the number of classification categories, and Y ij represents the true label, Represents the probability value predicted by the model, and L represents the cross entropy loss function;
[0090] S35, performing a model performance evaluation on the training process, calculating the accuracy, precision, recall rate and F1 score indicators, and tuning the ResNet101 network model according to the evaluation results, wherein the tuning includes adjusting the learning rate, batch size, optimizer parameters and the number of network layers;
[0091] S36. Save the trained ResNet101 network model, apply the ResNet101 network model to new crop image data, perform real-time state classification and recognition on the crop image data, and output the growth status, abnormal characteristics, and health status results of the crops.
[0092] In this implementation, S4 specifically includes:
[0093] S41. Create a three-dimensional scene based on three.js, where the three-dimensional scene includes a scene container, a scene camera, and a renderer;
[0094] S42, using the DRACOLoader loader of three.js to decode and load the 3D model file, wherein the 3D model file includes a greenhouse structure, vegetation, soil, and water source;
[0095] S43, initializing the position, scale and rotation parameters of the loaded three-dimensional model;
[0096] S44, setting a material and a texture for the three-dimensional model, wherein the material is a physical base rendering material, and the texture is loaded using a map file and mapped to the surface of the three-dimensional model;
[0097] S45, adding lighting to the three-dimensional scene, wherein the lighting includes ambient light, point light source and directional light;
[0098] S46, adding the processed 3D model to the three.js scene container, rendering it through a renderer, and outputting the rendering result to the Canvas element of the HTML page;
[0099] S47. Adjust the coordinate position and angle of the 3D model based on the coordinate system of three.js, so that the greenhouse structure, vegetation, soil and water source models are reasonably distributed in the 3D scene;
[0100] S48. Set the initial viewing angle and observation position of the 3D scene camera, and implement the scaling, rotation, and translation operations of the model through the track controller of three.js.
[0101] In this implementation manner, S5 specifically includes:
[0102] S51, obtaining environmental data in the HIVE data warehouse, wherein the environmental data includes soil moisture value, soil temperature value, light intensity and timestamp;
[0103] S52, calling the ResNet101 network model to analyze and process the crop image data;
[0104] S53, combining the environmental data in the HIVE data warehouse with the analysis results of the ResNet101 network model to generate a mapping relationship between crop growth status and environmental data;
[0105] S54, transmitting the mapping relationship data to the three.js rendering engine, and updating the environmental parameters and crop status of the three-dimensional model in real time through the dynamic update method provided by three.js;
[0106] S55. Based on the animation function of three.js, the growth process of vegetation is simulated by updating the scaling and growth height of the 3D model;
[0107] S56, rendering the updated three-dimensional model data into the scene, executing a rendering cycle, and continuously refreshing the three-dimensional scene to display the morphological changes of the crops at different growth stages;
[0108] S57. Synchronize the real-time environmental parameters and crop status information into the three-dimensional scene, and intuitively display the crop growth status through graphical identification and color changes, so as to realize dynamic update and display of three-dimensional visualized data.
[0109] In this implementation manner, S6 specifically includes:
[0110] S61. Designing a user interaction interface based on HTML5 and CSS3, wherein the user interaction interface includes a three-dimensional scene window, an environmental parameter data display panel, a crop health status display area, and an operation control panel;
[0111] S62, setting zoom, rotation and translation functions in the operation control panel, and realizing viewing angle adjustment of the three-dimensional scene through the track controller of three.js;
[0112] S63, loading the dynamically rendered crop growth model and greenhouse environment in the three-dimensional scene window, and displaying the environmental parameters and ResNet101 network model analysis results in the HIVE data warehouse in real time;
[0113] S64, displaying soil moisture, soil temperature, light intensity and timestamp in real time through the environmental parameter data display panel;
[0114] S65, displaying crop status information identified by the ResNet101 network model in the crop health status display area, wherein the crop status information includes a crop classification result and an abnormal feature identifier;
[0115] S66, providing a timeline function of the crop growth process through the operation control panel, and the user can drag the timeline to adjust the display stage of the crop growth;
[0116] S67. Dynamically update the user's operation feedback on the 3D scene through three.js, realize real-time response of zooming, rotating, panning and time axis based on event monitoring function, and render the operation results into the 3D scene window to generate interactive 3D visualization display.
[0117] Embodiment 1:
[0118] The scenario of this embodiment is that in a modern agricultural greenhouse, the traditional crop monitoring system faces problems such as data isolation, non-intuitive monitoring, insufficient dynamic updates, and inability to automatically identify abnormal crop conditions, which seriously affects crop management efficiency and yield prediction. In order to solve these problems, a three-dimensional crop growth model display system based on three.js and convolutional neural networks is deployed. The system collects environmental data in real time through the Internet of Things technology, combines the ResNet101 convolutional neural network to identify the health status of crops, and uses three.js technology to build a three-dimensional visualization scene, ultimately realizing dynamic display and intelligent monitoring of crop growth.
[0119] Soil moisture, temperature and light sensors are installed in the greenhouse to monitor environmental data in real time and upload the data to the distributed storage system through embedded devices. At the same time, high-definition cameras are deployed in the greenhouse to periodically collect crop image data. The collected image data is trained and analyzed through the ResNet101 convolutional neural network model to identify the health status and abnormal characteristics of the crops. Subsequently, three.js technology is used to create a three-dimensional visual greenhouse model on the web page, and the environmental data and crop status analysis results are dynamically mapped to the three-dimensional scene. Managers can view real-time data through the interactive operation interface and observe the status of crops at different growth stages.
[0120] During the operation of the system, data is automatically collected and analyzed every day, and the three-dimensional visualization scene generated by the system intuitively presents the growth status of crops and environmental changes on the greenhouse management platform. For example, when the soil moisture in a certain area is detected to be lower than the set threshold, the system will mark the area in the three-dimensional model and indicate the abnormality through color changes. The crop health status recognition function uses the deep learning ability of convolutional neural networks to quickly identify abnormal phenomena such as pests and diseases and yellowing leaves and feedback them to management personnel. In addition, the system simulates the crop growth process through the animation function of three.js, realizes dynamic display from seedling stage to maturity, and provides more comprehensive crop growth information. After the system was deployed, data collection and testing were carried out in the greenhouse for two months. The functions and effects of the system have been verified through environmental data monitoring, crop image recognition and three-dimensional model display.
[0121] Table 1 Comparison of experimental data between traditional crop monitoring system and the system of the present invention
[0122]
[0123] In terms of environmental data collection, traditional crop monitoring systems can only collect data twice a day, and the collection error is as high as ±5%, which cannot meet the needs of real-time monitoring and high precision. The present invention uses embedded sensor technology to collect data once an hour, increasing the data collection frequency by 12 times and reducing the error to ±1%, greatly improving the real-time and accuracy of the data, and providing more reliable data support for crop growth monitoring.
[0124] In terms of crop health status recognition, traditional systems rely on simple image processing algorithms and manual observation, with a recognition accuracy rate of only 78.5%, and abnormal state detection takes 5-10 minutes, which is inefficient. The present invention introduces the ResNet101 convolutional neural network model, which can achieve efficient crop image analysis and state classification, with a health status recognition accuracy rate of 93.7%, and the average detection time is shortened to 1.2 seconds, and the detection speed is increased by about 300 times, which greatly improves the recognition efficiency and accuracy of crop abnormal states, and helps to find problems in time and take targeted measures.
[0125] In terms of 3D model display effects, traditional systems usually use static, low-precision models that cannot dynamically reflect the crop growth process, and the data display effect is poor. Based on three.js technology, the present invention realizes high-precision rendering and real-time dynamic updating of 3D scenes, can simulate the growth process of crops from seedling stage to maturity, and link environmental data with crop status analysis results to display, making the data more intuitive and the dynamic display effect clearer, effectively making up for the static limitations of traditional systems.
[0126] In terms of data processing and storage efficiency, the data of traditional monitoring systems are scattered and stored in isolation, making it difficult to achieve efficient integration and management of data. The present invention achieves unified management of environmental data and image data through the HIVE data warehouse, improves data storage and query efficiency by 70%, effectively reduces the complexity of data management, and provides data support for the efficient operation of the system.
[0127] In terms of user experience, the traditional system has a relatively simple function and poor interactivity, which makes it difficult to meet the manager's needs for data observation and operation. The present invention designs a highly interactive user interface that supports operation functions such as zooming, rotating, and panning. It combines timeline control to achieve dynamic display of the crop growth process, allowing users to observe crop status and abnormal characteristics from multiple angles and dimensions, improving the flexibility of the system and user experience. In addition, the abnormal state can be automatically located by color identification, which effectively improves the visualization effect of the abnormal state and improves the efficiency of abnormal handling by 90%.
[0128] In summary, the system of the present invention solves the shortcomings of traditional systems in real-time, accuracy, dynamic display and user interaction through high-frequency real-time data collection, accurate crop health status identification, efficient data storage management and three-dimensional dynamic visualization display, and improves the overall effect of crop growth monitoring.
[0129] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A three-dimensional crop growth model display method based on three.js and convolutional neural network, characterized in that: The steps include: S1. Use Selenium and BeautifulSoup tools to crawl crop data from agricultural encyclopedia websites, agricultural forums, and agricultural science platforms, store the acquired crop data in the MySQL database, migrate the crop data to the HDFS distributed storage system through Sqoop, and build a HIVE data warehouse; S2, using embedded sensor devices to collect environmental data in real time, uploading the collected environmental data to the HDFS distributed storage system, and performing data deduplication, data verification, and data format conversion before storing it in the HIVE data warehouse; S3, using a camera to collect crop image data and preprocess it, building a ResNet101 network model, using the preprocessed data to train the ResNet101 network model, evaluating the model performance, and applying the ResNet101 network model to classify and identify the state of the crop image data; S4, create a 3D scene based on three.js, load the 3D model file encoded by DRACO, build the 3D model, and render the 3D scene through the renderer; S5. Combine the environmental data in the HIVE data warehouse with the analysis results of the ResNet101 network model, dynamically update the environmental parameters and crop status of the 3D scene through three.js, simulate the vegetation growth process based on the animation function, and dynamically adjust the vegetation 3D model to show the morphological changes at different growth stages; S6. Design a user interaction interface to display the three-dimensional model, combine real-time environmental data with crop status information, and provide users with three-dimensional visualized growth monitoring and management information.
2. According to claim 1, a three-dimensional crop growth model display method based on three.js and convolutional neural network is characterized in that: The S1 specifically includes: S11, selecting agricultural encyclopedia websites, agricultural forums and agricultural science popularization platforms as target data sources, wherein the target data sources include crop types, abnormal conditions, growth forms and growth trend information; S12, using Selenium tools to access the target data source, and dynamically crawling the web page content by setting the target URL, starting the browser engine, and loading the page; S13, performing DOM parsing on the crawled web page content, locating web page elements through XPath selectors, extracting crop data including crop type, abnormal state, growth form and growth trend, and further processing the extracted crop data using the BeautifulSoup tool, including removing HTML tags, character encoding conversion, eliminating blank data and reorganizing unstructured data; S14, classifying the processed crop data according to data fields, wherein the data fields include crop name, leaf color, stem structure, growth status, abnormal characteristics, and time trend; S15, storing the classified crop data in a structured manner, writing the crop data into a MySQL database in the form of a table, and defining a table structure, wherein the table structure includes a field name, a data type, a primary key index, and a foreign key association relationship; S16. Use the Sqoop tool to migrate the crop data stored in the MySQL database to the HDFS distributed storage system, establish a HIVE data warehouse, and import the migrated crop data into the HIVE data warehouse.
3. The three-dimensional crop growth model display method based on three.js and convolutional neural network according to claim 1, characterized in that: The embedded sensor device includes a soil moisture sensor, a soil temperature sensor, and a light sensor.
4. The method for displaying a three-dimensional crop growth model based on three.js and a convolutional neural network according to claim 1, characterized in that: The S3 specifically includes: S31, acquiring crop image data, wherein the crop image data includes images of crop growth status at different time periods and different angles; S32, preprocessing the collected crop image data, wherein the preprocessing includes image resizing, normalization processing and data enhancement, wherein the data enhancement performs random flipping, rotation and cropping operations on the image to expand the diversity of data samples; S33, constructing a ResNet101 network model, wherein the ResNet101 network model includes an input layer, a convolutional layer, a pooling layer, a fully connected layer and an output layer; S34. Use the preprocessed crop image data to train the ResNet101 network model, and the training objective function is the cross entropy loss function: Among them, N represents the total number of samples, C represents the number of classification categories, and Y ij represents the true label, Represents the probability value predicted by the model, and L represents the cross entropy loss function; S35, performing a model performance evaluation on the training process, calculating the accuracy, precision, recall rate and F1 score indicators, and tuning the ResNet101 network model according to the evaluation results, wherein the tuning includes adjusting the learning rate, batch size, optimizer parameters and the number of network layers; S36. Save the trained ResNet101 network model, apply the ResNet101 network model to new crop image data, perform real-time state classification and recognition on the crop image data, and output the growth status, abnormal characteristics, and health status results of the crops.
5. The three-dimensional crop growth model display method based on three.js and convolutional neural network according to claim 1, characterized in that: The S4 specifically includes: S41. Create a three-dimensional scene based on three.js, where the three-dimensional scene includes a scene container, a scene camera, and a renderer; S42, using the DRACOLoader loader of three.js to decode and load the 3D model file, wherein the 3D model file includes a greenhouse structure, vegetation, soil, and water source; S43, initializing the position, scale and rotation parameters of the loaded three-dimensional model; S44, setting a material and a texture for the three-dimensional model, wherein the material is a physical base rendering material, and the texture is loaded using a map file and mapped to the surface of the three-dimensional model; S45, adding lighting to the three-dimensional scene, wherein the lighting includes ambient light, point light source and directional light; S46, adding the processed 3D model to the three.js scene container, rendering it through a renderer, and outputting the rendering result to the Canvas element of the HTML page; S47. Adjust the coordinate position and angle of the 3D model based on the coordinate system of three.js, so that the greenhouse structure, vegetation, soil and water source models are reasonably distributed in the 3D scene; S48. Set the initial viewing angle and observation position of the 3D scene camera, and implement the scaling, rotation, and translation operations of the model through the track controller of three.js.
6. The method for displaying a three-dimensional crop growth model based on three.js and a convolutional neural network according to claim 1, characterized in that: The S5 specifically includes: S51, obtaining environmental data in the HIVE data warehouse, wherein the environmental data includes soil moisture value, soil temperature value, light intensity and timestamp; S52, calling the ResNet101 network model to analyze and process the crop image data; S53, combining the environmental data in the HIVE data warehouse with the analysis results of the ResNet101 network model to generate a mapping relationship between crop growth status and environmental data; S54, transmitting the mapping relationship data to the three.js rendering engine, and updating the environmental parameters and crop status of the three-dimensional model in real time through the dynamic update method provided by three.js; S55. Based on the animation function of three.js, the growth process of vegetation is simulated by updating the scaling and growth height of the 3D model; S56, rendering the updated three-dimensional model data into the scene, executing a rendering cycle, and continuously refreshing the three-dimensional scene to display the morphological changes of the crops at different growth stages; S57. Synchronize the real-time environmental parameters and crop status information into the three-dimensional scene, and intuitively display the crop growth status through graphical identification and color changes, so as to realize dynamic update and display of three-dimensional visualized data.
7. The method for displaying a three-dimensional crop growth model based on three.js and a convolutional neural network according to claim 1, characterized in that: The S6 specifically includes: S61. Designing a user interaction interface based on HTML5 and CSS3, wherein the user interaction interface includes a three-dimensional scene window, an environmental parameter data display panel, a crop health status display area, and an operation control panel; S62, setting zoom, rotation and translation functions in the operation control panel, and realizing viewing angle adjustment of the three-dimensional scene through the track controller of three.js; S63, loading the dynamically rendered crop growth model and greenhouse environment in the three-dimensional scene window, and displaying the environmental parameters and ResNet101 network model analysis results in the HIVE data warehouse in real time; S64, displaying soil moisture, soil temperature, light intensity and timestamp in real time through the environmental parameter data display panel; S65, displaying crop status information identified by the ResNet101 network model in the crop health status display area, wherein the crop status information includes a crop classification result and an abnormal feature identifier; S66, providing a timeline function of the crop growth process through the operation control panel, and the user can drag the timeline to adjust the display stage of the crop growth; S67. Dynamically update the user's operation feedback on the 3D scene through three.js, realize real-time response of zooming, rotating, panning and time axis based on event monitoring function, and render the operation results into the 3D scene window to generate interactive 3D visualization display.