Universal intelligent plant cultivation system based on RT-Thread and large model technology
Through the RT-Thread operating system and large model technology, combined with Spark One and vision board development board, the automated management of intelligent planting and cultivation systems is realized, solving the problem that traditional planting and cultivation devices require a lot of manpower intervention, and improving the plant growth environment Automated management efficiency ensures healthy growth and high-quality yield of plants.
Patent Information
- Application Number
- CN202411227627.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional planting and cultivation devices cannot realize random multimodal data input, resulting in a large amount of repetitive human intervention and the inability to automatically adjust the plant growth environment.
Adopt a general intelligent planting and cultivation system based on the RT-Thread operating system, combined with large model technology, and collect and analyze data through the Spark 1 development board and vision board development board to automatically adjust the plant growth environment, including controlling water pumps, fill lights and cooling. Fans use machine vision to identify plant varieties and diseases and disasters to achieve intelligent plant growth environment management.
It realizes plant data collection, machine vision analysis and automatic decision-making, reduces human intervention, improves the efficiency of automated management of plant growth environment, and ensures healthy growth and high-quality yield of plants.
Smart Images

Figure CN119201834A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of plant cultivation, and in particular to a universal intelligent cultivation system based on RT-Thread and large model technology. Background Art
[0002] Cultivated plants are wild plants that have been artificially cultivated and have certain production value or economic traits, stable genetics, and are suitable for human needs. They include almost all crops, including food crops such as rice, wheat, corn, sorghum, etc.; fiber crops such as cotton, etc.; oil crops such as peanuts, rapeseed, sesame, etc.; most fruit trees such as apples, peaches, oranges, pears, etc.; vegetable crops such as cabbage, radish, kale, etc.; and various ornamental flowers such as peony, saffron, Clivia, etc.
[0003] The inventor discovered the following defects during the operation of the specific embodiment: Most cultivation devices are based only on sensor data transmission and platform monitoring, and the traditional inventory model cannot achieve random multimodal data input (for example, the probability of ambient temperature x and pest z is input simultaneously), which requires a lot of repetitive human intervention.
[0004] It should be noted that the above contents belong to the technical cognition scope of the inventor. Since the technical contents in this field are vast and too complicated, the above contents of this application do not necessarily constitute prior art. Summary of the invention
[0005] 1. Technical problem to be solved by the invention: The present invention provides a universal intelligent planting system based on RT-Thread and large model technology to solve the technical problems existing in the above-mentioned background technology.
[0006] 2. Technical solution: To achieve the above object, the technical solution provided by the present invention is: a universal intelligent planting system based on RT-Thread and large model technology, comprising a Spark-1 development board, a relay is provided on one side of the Spark-1 development board, and a soil sensor is provided on one side of the Spark-1 development board; A vision board development board, wherein the vision board development board is connected to the relay; A relay, wherein a cooling fan, a water pump and a fill light are respectively arranged on one side of the relay, and a drip arrow is arranged on one end of the water pump.
[0007] Furthermore, a temperature and humidity sensor, a light sensor and a wili module are also provided on the top of the Xinghuo-1 development board.
[0008] Furthermore, a wili module is arranged on the top of the vision board development board.
[0009] Furthermore, the wili module inside the Spark-1 development board and the wili module inside the vision board development board are connected to the same local area network.
[0010] 3. Beneficial effects: Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects: The RT-Thread operating system used in this invention is highly flexible and customizable, and is suitable for various embedded devices and IoT application scenarios. The artificial intelligence technology represented by the big model will change the current industrial form of the business model based on manpower and time. Therefore, we will collect plant data and perform machine vision analysis based on the task scheduling in the RT-Thread operating system. The big model will make decisions and control through pre-processed parameters, and display and interact with plant information through a visual interface to realize intelligent and innovative cultivation devices; The data collected by the Spark-1 development board is analyzed through the vision board development board, and decisions are made based on preset algorithms and models to automatically adjust the plant growth environment, such as controlling water pumps, fill lights, cooling fans and other equipment, and provide corresponding plant attributes and cultivation methods based on visual recognition of plant species; Based on the lightweight convolutional neural model of RT-Thread inside the vision board development board, plant types and diseases are classified. The model is deployed on the Vision Board to analyze the types and diseases of plants, and the information on plant varieties and the types of diseases to be identified is transmitted to the large model and the front end. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a structural schematic diagram of the present invention; Figure 2 It is the hardware connection diagram of the present invention; Figure 3 It is a code architecture diagram of the present invention; Figure 4 is a code diagram of the present invention; Figure 5 is a code diagram of the present invention; Figure 6 is a functional flow chart of the present invention; Figure 7 The wili connection process of the present invention; Figure 8 The wlil connection code diagram of the present invention; Fig. 9 It is the MQTT communication diagram of the present invention; Fig.10 The hardware structure diagram of the vision board development board and the Spark-1 development board of the present invention; Fig.11 is a system architecture diagram of the present invention; Fig.12 This is a structural block diagram of the Spark-1 development board of the present invention; Fig.13 A framework diagram for setting up the system of the present invention; Fig.14 It is a design diagram of the scheme of the present invention; Fig.15 It is a physical diagram of the present invention; Fig.16 It is a technical architecture design diagram of the present invention; Fig.17 It is the plant species data diagram of the present invention; Fig.18 It is the plant species data diagram of the present invention; Fig.19 The pest DPS image of the present invention; Fig. 20 It is the meaty DSP graphic diagram of the present invention; Fig.21 A diagram of plant species of the present invention; Fig. 22 is a plant disease hazard map of the present invention; Fig.23 It is a plant species identification diagram of the present invention; Fig.24 A plant disease hazard identification diagram of the present invention; Fig.25 It is a plant species identification diagram of the present invention; Fig.26 A plant disease hazard identification diagram of the present invention; Fig. 27 This is a design diagram of the communication framework of the present invention.
[0012] Reference numerals: 1. Spark-1 development board; 2. Vision board development board; 3. Rechargeable battery; 4. Cooling fan; 5. Water pump; 6. Drop arrow; 7. Soil sensor; 8. Fill light. DETAILED DESCRIPTION
[0013] To facilitate understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0014] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "page", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicating orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0015] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0016] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed", "provided with", "provided on" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. Example
[0017] See attached Figure 1-4 , a general intelligent planting system based on RT-Thread and large model technology, including a Spark-1 development board 1, a relay 3 is provided on one side of the Spark-1 development board 1, and a soil sensor 7 is provided on one side of the Spark-1 development board 1; Vision board development board 2, the vision board development board 2 is connected to the relay 3; A relay 3, one side of which is provided with a cooling fan 4, a water pump 5 and a fill light 8, and one end of the water pump 5 is provided with a drop arrow 6.
[0018] Furthermore, a temperature and humidity sensor, a light sensor and a wili module are also provided on the top of the Spark-1 development board 1.
[0019] like Figure 2 As shown, Figure 2 This is a hardware connection diagram. The Spark-1 development board 1 is mainly used for environmental perception, and it mainly includes the following sensors: Temperature and humidity sensor, its hardware interface: iicI2C3softscl(PE0), I2C3softsdaPE1, the temperature and humidity sensor sends acquisition commands and reads the ambient temperature and humidity data; Light sensor, its hardware interface: iicI2C2softscl(PF1), I2C2softsdaPF0, the light sensor sends acquisition commands and reads the ambient light intensity data; Soil sensor 7, its hardware interface: adcPA3, the microcontroller uses adc1 to obtain soil moisture data through sensor XH-M214.
[0020] like Figure 3-5 As shown, Figure 3 This is the code architecture diagram. Figure 4 and Figure 5 The control module is mainly used to control the cooling fan 4, the water pump 5 and the fill light 8: The relay 3 is composed of a 5V 4-way optocoupler isolation relay and a single-chip microcomputer. The hardware interfaces are: cooling fan 4PB6, water pump 5PB7, and fill light 8PA0. The single-chip microcomputer controls the cooling fan 4, water pump 5, and fill light 8 by giving high and low levels to the designated interfaces.
[0021] like Figure 6 As shown, Figure 6 It is a functional flow chart, which mainly obtains the parameters of the plant growth environment, such as temperature, humidity, light intensity, and soil humidity, through the Spark-1 development board 1, controls the fill light 8 to fill light for the plants, turns on the cooling fan 4 to cool down, and uses the water pump 5 to improve the soil humidity for the plants.
[0022] like Figure 7-8 As shown, Figure 8 For the wili connection process, Fig. 9 Connection code for wlil: Furthermore, a wili module is arranged on the top of the vision board development board 2 .
[0023] Further, the wili module inside the Spark-1 development board 1 and the wili module inside the vision board development board 2 are connected to the same local area network; like Fig. 9 As shown, Fig. 9The MQTT communication diagram is as follows: The data communication module as a whole uses wili of Spark-1 development board 1 and vision board development board 2 in conjunction with the MQTT protocol to realize data transmission between the device and the mobile end. First, the wili module is connected to the local area network around the device. The device collects and formats data through the environmental perception module inside the Spark-1 development board 1, and then accesses the MQTT server for data forwarding. After the mobile end receives the formatted data, it processes it, and the returned control instructions are also forwarded to the device end via the MQTT server, thereby realizing the coordination between the entire system modules.
[0024] like Figure 10-11 As shown, Fig.10 This is the hardware structure diagram of the Spark-1 development board 1 and the vision board development board 2. Fig.11 This is the system architecture diagram of the Spark-1 development board 1: Machine vision development is carried out through the vision board 2 provided by Renesas. It is equipped with the world's first 480MHz, ARMCortex-M85 chip, with the support of Helium and TrustZone technologies, and OpenMV can make the development of vision modules smoother.
[0025] The OpenMV compatible with the Spark-1 development board 1 provides a rich API in visual development, provides a rich set of routines for visual image processing, MicroPython provides mixed compilation, and Tinyusb supports a variety of MCUs. It also supports RT-ThreadAPI, which provides convenience in actual project development.
[0026] like Fig.12 As shown, Fig.12 This is the structural block diagram of the Spark-1 development board 1: Based on MobileNetV2ConvolutionalNeuralNetwork, CNN model training is carried out, and the trained model is deployed on the Spark-1 development board 1 through a TF card. The built-in CAM and supported OpenMVSDK are used to classify and identify common plant species and plant diseases with an accuracy of more than 90%.
[0027] The large model receives data from the environmental sensors inside the Xinghuo-1 development board 1 and performs necessary preprocessing on it. These sensors may include sensors for temperature, humidity, light, etc., which provide important information about the plant growth environment; Preprocessing includes data cleaning, standardization and correction to ensure data accuracy and consistency. Based on the analyzed data, the model determines the actions that need to be taken and generates corresponding instructions. The above instructions are usually used for cooling fans 4, water pumps 5 and fill lights 8 to optimize the growth environment of plants. This process is a dynamic closed-loop system that continuously receives, processes and responds to data to ensure that the plant growth environment is always in the best condition to promote healthy growth and high-quality yields of plants.
[0028] like Fig.13 As shown, Fig.13 Set up a framework diagram for the system: WeChat Mini Programs provide users with visual information and device interaction, and use the information and cloud interaction mode to interact and transmit application data, decision arbitration information or mobile terminals between local devices and the cloud. In this mode, the interaction between information and the cloud can be two-way, including upload, download, processing, storage, synchronization and other operations to facilitate the transmission and reception of data between hardware devices and mobile terminals; The information and interaction cloud service provides reliable data storage and management functions, and users can upload various types of data to the cloud, including text and images. Users can see the environmental parameters and plant images of plants in the WeChat applet. The data on the device side is filtered, and the final result is obtained through manual arbitration based on the results of the large model decision, and the result is sent to the WeChat applet through cloud interaction. The information and interaction cloud service provides reliable data storage and management functions, and users can upload various types of data to the cloud, including text, images, audio, video, etc.
[0029] Fig.14 and 15 As shown, Fig.14 15 is the design drawing, and 16 is the actual picture: The intelligent cultivation device obtains the growth environment of the plant through the sensor equipment. The vision board development board 2 deploys the visual model to identify the plant species and disease and disaster detection, and transmits the processed data to the big model through the MQTT cloud server for decision-making, and transmits the decision results to the cloud service. The WeChat applet receives the plant information sent by the single-chip microcomputer inside the extender 3 and the decision results of the big model. The user can view the plant information and interact with it through the applet. The big model sets the threshold and sends the control command to the single-chip microcomputer inside the extender 3 to realize the function of the control module and adjust the plant growth environment. The whole device uses acrylic as the base plate. The potted plants, water storage containers, Spark No. 1 development board 1, and relay 3 are placed in the groove of the acrylic base plate. The 5V 4-way relay and soil sensor 7 inside the relay 3 are connected to the interface end of the relay 3 through the GPIO. The cooling fan 4, water pump 5, and fill light 8 are connected to the interface end of the relay 3. The Spark No. 1 development board 1 is used to monitor and control the plant growth environment. The vision board development board 2 performs image recognition on the plants and feeds back monitoring data.
[0030] The plant growth environment data is collected by the temperature and humidity sensor I2C3 to collect the ambient temperature, the soil sensor 7 to collect the soil moisture through ADC, and the light intensity sensor to collect the light intensity through I2C2; The plant growth environment data is collected by various sensors and transmitted to the cloud. After the big model makes a decision, the environment is adjusted using the mach_control() function according to the instructions given by the decision. like Fig.16 As shown, the technical architecture design diagram.
[0031] like Figure 17-18 As shown in the plant species data diagram, the data set is first preprocessed, the images with watermarks and images that do not match the plant species are deleted, and then the data set is divided into a training set and a test set with a ratio of 8:2.
[0032] like Figure 19-22 As shown, machine learning is used to pre-process the image using the EDGIMPLUSE tool, the color depth is selected as RGB, and the features of each image after processing are obtained by DSP processing. After each image is processed by DSP, a visual feature distribution model is generated, which makes it easier for us to observe the quality of feature processing, such as Fig.21 , 22 As shown in the figure, we obtain the characteristic distribution images of plant classification and plant disease disasters respectively. In the figure, each color pixel represents a category. The more categories there are, the denser the pixel distribution will be. From the figure, we can see that the features will overlap slightly, but overall the feature selection is reasonable. The code is mainly to implement the training of image classification models using transfer learning, including loading of pre-trained models, construction of models, data processing, compilation and training of models, and fine-tuning of models. We use the MobileNetV2 model as the base model, a lightweight neural network model designed specifically for resource-constrained environments such as mobile devices and embedded devices, and set the input shape and load pre-trained weights. Then after setting the base model to untrainable, a new model is built, which contains all the layers of the base model except the last three layers, and then some additional layers are added. The last layer has 16 neurons and 0.1 dropout. Finally, the best model trained before is loaded for fine-tuning training.
[0033] like Figure 23-26As shown in the figure, confusion matrix and model test. In image accuracy evaluation, confusion matrix is mainly used to compare classification results with actual measured values. The accuracy of classification results can be displayed in a confusion matrix. It is calculated by comparing the position and classification of each measured pixel with the corresponding position and classification in the classification image. Each column represents the predicted category, and the total number of each column represents the number of data predicted to be in that category; each row represents the true category of the data, and the total number of data in each row represents the number of data instances in that category. Through the visualization chart of the confusion matrix, it can be seen that the model prediction accuracy and test set accuracy of plant species recognition and plant disease disaster monitoring are both above 90%, and the training model accuracy is good. The model training effect is displayed through OpenMVIDE. Through the CAM in the vision board development board 2, the real-time input stream recognition of green radish plant species, beetle plant disease disaster recognition and other recognition species are respectively performed, and the recognition accuracy has reached the expected effect. At this point, our entire plant species recognition and disease disaster monitoring module is completed.
[0034] Fig. 27 As shown, the wili modules of Spark-1 development board 1 and vision board development board 2 start wili hotspot scanning, connect to the preset AP, and register related callback functions such as connection success, connection failure, automatic reconnection, etc. After completing the connection, access the MQTT server. After wili successfully accesses the MQTT server, configure the MQTT text parameters to register related MQTT callback functions such as successful connection to the server, failure to connect to the server, and reconnection to the server, etc., set the username, password, and subscription topic, set the device end as the MQTT client to connect to the MQTT server, subscribe to the corresponding topic such as / mqtt / test / , send formatted plant environment data and plant information to the corresponding topic, set the MQTT text parameters, access the MQTT server through WebSocket, register the corresponding MQTT event, connect to the server as an MQTT client, and perform data visualization after receiving plant-related data from the corresponding topic. According to the large model decision, whether to start or judge whether to send the data to AIGC after being improved through the Prompt project, and finally return the device control command to the corresponding topic, thereby realizing a series of operations such as intelligent fill lighting, watering, and cooling.
[0035] The above-described embodiments only express a certain implementation mode of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the patent scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A universal intelligent cultivation system based on RT-Thread and large model technology, characterized by: include A Spark-1 development board (1), wherein a relay (3) is arranged on one side of the Spark-1 development board (1), and a soil sensor (7) is arranged on one side of the Spark-1 development board (1); A vision board development board (2), wherein the vision board development board (2) is connected to a relay (3); A relay (3), wherein a cooling fan (4), a water pump (5) and a fill light (8) are respectively arranged on one side of the relay (3), and a drip arrow (6) is arranged on one end of the water pump (5).
2. The universal intelligent planting system based on RT-Thread and large model technology according to claim 1 is characterized in that: The top of the Spark-1 development board (1) is also provided with a temperature and humidity sensor, a light sensor and a Wili module.
3. The universal intelligent planting system based on RT-Thread and large model technology according to claim 1 is characterized in that: A Wili module is arranged on the top of the vision board development board (2).
4. The universal intelligent planting system based on RT-Thread and large model technology according to claim 1 is characterized in that: The wili module inside the Spark No. 1 development board (1) and the wili module inside the vision board development board (2) are connected to the same local area network.
Citation Information
Cited By
Endoscope report quality control analysis method and equipment based on artificial intelligence
CN119558315A