Method, system and electronic equipment for controlling greenhouse
The system addresses manual greenhouse management limitations by implementing a data-driven, intelligent control system with a large language model for precise environmental regulation, improving agricultural production efficiency and sustainability.
Patent Information
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- HEBEI PETROLEUM UNIV OF TECH
- Filing Date
- 2025-08-05
- Publication Date
- 2026-06-03
AI Technical Summary
Traditional greenhouses rely heavily on manual operation and management, lacking automation and accuracy in environmental parameter monitoring and control, leading to potential misjudgments that can cause significant economic losses.
A system and method utilizing a data acquisition module, data processing module with a large language model, and greenhouse regulation module for intelligent environmental regulation, including light, temperature, ventilation, and irrigation control, supported by a cloud platform and human-computer interaction for precise and adaptive greenhouse management.
Enables comprehensive and accurate monitoring and regulation of greenhouse environments, enhancing agricultural production efficiency and sustainability by providing intelligent, data-driven decision-making and real-time risk warnings.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The present disclosure relates to the technical field of intelligent control, in particular to a method and a system and electronic equipment for controlling a greenhouse. BACKGROUND
[0002] As a modern agricultural production mode, the greenhouse has many advantages in the sustainable development of agricultural production, such as saving the water resources, reducing the pesticide use, and improving yield and quality.
[0003] However, the traditional greenhouse mainly relies on manual operation and management, the automaticity of the greenhouse is low, and the automatic monitoring and control of environmental parameters and equipment status cannot be realized. Various problems encountered in the process of crop growth inside the greenhouse are also judged and solved by farmers relying on their own experience and the assistance of professionals. However, this method can not guarantee the accuracy, once a misjudgment occurs, it may bring huge economic losses. SUMMARY
[0004] The present disclosure provides a method, a system and electronic equipment for controlling a greenhouse to overcome the defects of the traditional greenhouse that the manual operation and management are mainly adopted, the automaticity is low, and various encountered problems are mostly solved by the experience of farmers, which is not accurate and professional enough.The scheme of the present disclosure can provide comprehensive and accurate monitoring for greenhouse environmental parameters, as well as intelligent regulation of environmental data inside the greenhouse, to meet the needs of agricultural production, and improve the efficiency and sustainable development of agricultural production.
[0005] A system for controlling a greenhouse provided by the present disclosure includes the following modules.
[0006] A data acquisition module, which is configured to acquire environmental data inside the greenhouse.
[0007] A data processing module, which is configured to input the environmental data inside the greenhouse into a pre-constructed large language model and generate an intelligent regulation scheme; the large language model generates multiple intelligent regulation pre-selection schemes based on the environmental data inside the greenhouse, and determines the intelligent regulation scheme with the highest matching degree with user needs from the multiple intelligent regulation pre-selection schemes.
[0008] A greenhouse regulation module, which is configured to regulate the environmental data inside the greenhouse based on the intelligent regulation scheme.
[0009] According to the control system for controlling a greenhouse provided by the present disclosure, the data acquisition module is further configured to filter and process the collected raw data inside the greenhouse to obtain the environmental data.
[0010] According to the control system for controlling a greenhouse provided by the present disclosure, the data processing module is a cloud platform.
[0011] According to the control system for controlling a greenhouse provided by the present disclosure, the large language model is further configured to adjust the intelligent regulation scheme based on real-time changes of the environmental data inside the greenhouse after the the environmental data inside the greenhouse regulated by the greenhouse regulation module.
[0012] According to the control system for controlling a greenhouse provided by the present disclosure, the large language model is further configured for training based on environmental data of the greenhouse and corresponding intelligent regulation schemes.
[0013] According to the control system for controlling a greenhouse provided by the present disclosure, it further includes a human-computer interaction interface, which is configured to call the large language model to answer the user's question if the user raises a question.
[0014] According to the control system for controlling a greenhouse provided by the present disclosure, it further includes an early warning module, which is configured to trigger an alarm if the environmental data inside the greenhouse meets the alarm conditions.
[0015] According to the control system for controlling a greenhouse provided by the present disclosure, the greenhouse regulation module includes a light regulation unit, a temperature regulation unit, a ventilation regulation unit, and an irrigation regulation unit.
[0016] The light regulation unit is configured to regulate the light conditions of the greenhouse.
[0017] The temperature regulation unit is configured to regulate the temperature conditions of the greenhouse.
[0018] The ventilation regulation unit is configured to regulate the ventilation conditions of the greenhouse.
[0019] The irrigation regulation unit is configured to regulate the water conditions of the greenhouse.
[0020] A method for controlling a greenhouse provided by the present disclosure includes the following steps:
[0021] acquiring environmental data inside the greenhouse;
[0022] inputting the environmental data inside the greenhouse into a pre-constructed large language model and generating an intelligent regulation scheme; generating multiple intelligent regulation pre-selection schemes by the large language model based on the environmental data inside the greenhouse, and determining the intelligent regulation scheme with the highest matching degree with user needs from the multiple intelligent regulation pre-selection schemes; and
[0023] regulating the environmental data inside the greenhouse based on the intelligent regulation scheme.
[0024] The present disclosure also provides electronic equipment including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor can execute the program to implement the method for controlling a greenhouse as described above.
[0025] The present disclosure also provides a non transient computer-readable storage medium, on which a computer program is stored, and the computer program can be executed by a processor to implement the method for controlling a greenhouse as described above.
[0026] The present disclosure also provides a computer program product, including a computer program, which can be executed by a processor to implement the method for controlling a greenhouse as described above.
[0027] In the system for controlling the greenhouse provided by the present disclosure, the environmental data collected by the data acquisition module can be processed based on the data processing module. Two rounds of screening can be performed in the data processing module, wherein the first screening is the large language model generates multiple intelligent regulation pre-selection schemes based on the collected environmental data inside the greenhouse, which can adjust the current environmental data inside the greenhouse to a suitable scheme for crop growth, and the second screening is the most preferred scheme is selected and determined as the intelligent regulation scheme based on the intelligent regulation pre-selection schemes and combined with the user actual needs. Based on the intelligent regulation scheme, the greenhouse can be regulated to achieve precise regulation for the environmental data inside the greenhouse, and it can also adapt to the user actual needs, with a high degree of intelligence, which can effectively meet the needs of agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate technical solutions of the present disclosure or in the related art, the accompanying drawings used in the embodiments or the related art will now be described briefly. It is obvious that the drawings in the following description are only the embodiment of the disclosure, and that those skilled in the art can obtain other drawings from these drawings without any creative efforts.
[0029] FIG. 1 is a structure schematic diagram of the system for controlling a greenhouse provided by the present disclosure;
[0030] FIG. 2 is a schematic diagram of data flow of the system for controlling a greenhouse provided in an embodiment of the present disclosure;
[0031] FIG. 3 is a flowchart of the method for controlling a greenhouse provided in an embodiment of the present disclosure;
[0032] FIG. 4 is the first flowchart of the authentication method provided in an embodiment of the present disclosure;
[0033] FIG. 5 is the second flowchart of the authentication method provided in an embodiment of the present disclosure;
[0034] FIG. 6 is a flowchart of the data storage provided in an embodiment of the present disclosure;
[0035] FIG. 7 is a flowchart of the data communication provided in an embodiment of the present disclosure; and
[0036] FIG. 8 is a physical structure schematic diagram of electronic equipment provided in an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] In order to make the purpose, the technical solutions, and the advantages of the present disclosure clearer, the technical solutions in the present disclosure will be clearly and completely described with reference to the drawings in the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, but not all the embodiments thereof. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without any creative efforts shall fall within the scope of the present disclosure.
[0038] FIG. 1 is a structure schematic diagram of the system for controlling a greenhouse provided by the present disclosure.
[0039] As shown in FIG. 1, the system for controlling a greenhouse provided by the present embodiment includes a data acquisition module, a data processing module and a greenhouse regulation module.
[0040] The data acquisition module is configured to acquire environmental data inside the greenhouse.
[0041] TheA data processing module is configured to input the environmental data inside the greenhouse into a pre-constructed large language model and generate an intelligent regulation scheme; the large language model generates multiple intelligent regulation pre-selection schemes based on the environmental data inside the greenhouse, and determines the intelligent regulation scheme with the highest matching degree with user needs from the multiple intelligent regulation pre-selection schemes.
[0042] The greenhouse regulation module is configured to regulate the environmental data inside the greenhouse based on the intelligent regulation scheme.
[0043] In practical applications, the data acquisition module can be various sensors installed inside the greenhouse, such as light intensity sensors, soil temperature sensors, soil humidity sensors, air temperature sensors, carbon dioxide concentration sensors, and pH sensors. Wherein, the light intensity sensor can adopt the BH1750 digital light sensor module, which can measure a range of 1 to 65535 lux and adopts a two-wire serial bus interface; the soil temperature sensor adopts DS18B20 temperature sensor module, which outputs data through serial port and can display a temperature range of -1 to 85 degrees Celsius; the working voltage of the soil humidity sensor is between DC3.7V and DC12V. The humidity is detected by the probe and judged by a voltage comparator; the air temperature sensor adopts analog input to read the AD value of the temperature sensor in the air, and converts it into temperature units through a series of mathematical conversions; the carbon dioxide concentration sensor adopts the MQ-135 air quality module to detect carbon dioxide concentration, with a detection range of lOppm to lOOOppm, and operates at a working voltage of 4.8V to 5.2V; and the pH sensor can be a pH non rechargeable electrode probe, which can adopt an degree of acidity or alkalinity sensor to collect soil pH information.
[0044] The above sensors can be installed in suitable areas within the greenhouse according to actual needs and the mechanism of action of the sensors.
[0045] The large model in the present embodiment can adopt AgriGPT and ChatGPT 4.0 as the core to automate control and scheme decision-making based on real-time and historical data from greenhouses. The training process starts from agricultural research literature, agricultural databases, agricultural historical records, and farmer experience data, preprocesses the data (data cleaning, data labeling, and data transformation), and then selects advanced deep learning algorithms based on Transformer architecture, sets training parameters for training reasonably. During the training process, a portion of the data that has not participated in the training needs to be adopted to optimize the model, and finally, the data can be updated regularly.
[0046] In practical applications, the temperature regulation module can be utilized for various hardware devices inside the greenhouse, such as light sources for regulating lighting conditions, exhaust fans for regulating ventilation and temperature and humidity, water pumps and water pipelines for regulating moisture conditions.
[0047] In implementation, the data processing module can include a server, a data service layer, and a monitoring platform. Wherein, the server application is mainly developed in Java language, and the core framework adopts the open-source Spring Boot from the Pivot team, which is one of the most popular Java frameworks worldwide; the data service layer has chosen MySQL, the most popular open-source relational database, and adopted Redis based on memory storage as the cache database to store unstructured Key-Value data; and the monitoring platform adopts Prometheus, runs on the Docker container engine, and utilizes GitHub actions to have Docker automatically package the application into a portable container, which is then published to a Linux system server, and adopts Nignx for reverse proxy.
[0048] In the system for controlling the greenhouse provided by the present embodiment, the environmental data collected by the data acquisition module can be processed based on the data processing module. Two rounds of screening can be performed in the data processing module, wherein the first screening is the large language model generates multiple intelligent regulation pre-selection schemes based on the collected environmental data inside the greenhouse, which can adjust the current environmental data inside the greenhouse to a suitable scheme for crop growth, and the second screening is the most preferred scheme is selected and determined as the intelligent regulation scheme based on the intelligent regulation pre-selection schemes and combined with the user actual needs. Based on the intelligent regulation scheme, the greenhouse can be regulated to achieve precise regulation for the environmental data inside the greenhouse, and it can also adapt to the user actual needs, with a high degree of intelligence, which can effectively meet the needs of agricultural production.
[0049] In the exemplary embodiment, the data acquisition module is further configured to filter and process the collected raw data inside the greenhouse to obtain the environmental data.
[0050] In an implementation, filtering processing can be median filtering. At the same time, for the air humidity data, the carbon dioxide concentration data, and the soil temperature data in environmental data, data can be read from simulated input values, and then actually tested and mathematically converted to obtain data results with universal physical significance. Specifically, for different sensors, even the same sensor, due to the slight differences in production processes, there may be deviations in their measurement results for the same physical quantity without calibration and conversion. For example, two carbon dioxide concentration sensors of the same model may output slightly different simulated values in the same environment. After actual testing and mathematical conversion in the present embodiment, each sensor can be calibrated to minimize individual differences and reduce errors caused by sensor issues.
[0051] In the exemplary embodiment, the data processing module is a cloud platform.
[0052] The cloud platform in the present embodiment mainly includes the following units: a user module, a planting area module, an equipment module, a communication module, a data analysis and processing suggestion module, a data visualization module, an environmental factor regulation module, and a risk monitoring and data alarm module.
[0053] The user module is responsible for user registration, login, personal information management, and other functions. Through the user module, users can easily access and manage greenhouse systems.
[0054] The planting area module is responsible for the management function of greenhouses in the system. It includes the creation, editing, and deletion of the project itself, as well as the management of equipment within the project, and integrates the function of the large language model, and can enable the large language model to evaluate and optimize the planting schemes of the planting area created by the user.
[0055] The equipment module is responsible for the management and control for the equipment. Through this module, users can configure, monitor, and control various equipment in the greenhouse, achieving intelligent and automated management. The large language model can use it as context to construct the intelligent Agent through prompt technology, thereby achieving automated control of the equipment.
[0056] The communication module is responsible for receiving data sent by the equipment to the server, and issuing instructions and controlling operations to the equipment. This module interacts with the equipment module to achieve real-time communication with greenhouse equipment. In this project, MQTT and HTTP are mainly used for communication.
[0057] The data analysis and processing suggestion module is responsible for analyzing and processing the data collected by the equipment, and submitting the processing results to the agricultural large model for further processing. When interacting with farmers, this module can provide planting suggestions and decision support for farmers.
[0058] The data visualization module is responsible for gathering statistics and analyzing data collected by all equipment in the project, and visualizing the statistical results for users to intuitively view the equipment operation status and data.
[0059] The environmental factor regulation module is configured to manage the operating status of all equipment and is responsible for achieving automated control of the equipment. Through this module, users can set automated strategies for equipment to improve the management efficiency and production benefits of the greenhouses.
[0060] The risk monitoring and data alarm module is based on the sensor data and the agricultural large model, and carries out the comprehensive judgment of the risk based on the threshold and large language model by monitoring the data reporting of the environmental factors in real time.. It can detect risk situations such as temperature anomalies in a timely manner and send alarm information to users in a timely manner when abnormalities are found. Through this, users can take timely measures to avoid losses and risks. [0061 ] In the present embodiment, the combination of the technology stack of the intelligent cloud platform, the mature ecosystem and the rich resource support can help us to efficiently and stably construct the intelligent csheme for the greenhouse based on the agricultural large model.
[0062] In the exemplary embodiment, the large language model is further configured to adjust the intelligent regulation scheme based on real-time changes of the environmental data inside the greenhouse after the the environmental data inside the greenhouse regulated by the greenhouse regulation module.
[0063] Due to the constantly changing environment inside the greenhouse, the corresponding regulation schemes for different environmental data may also be different. Based on this, the large language model in the present embodiment has real-time error correction capability, which can adjust the given regulation scheme according to the real-time changes of the environmental data inside the greenhouse. Moreover, the real-time error correction capability of the large language model is also reflected in the fact that if the environmental data inside the greenhouse does not become more suitable for crop growth under the regulation of the intelligent regulation scheme, it indicates that there may be errors in the intelligent regulation scheme provided by the data processing module. At this time, the large language model can improve the provided regulation scheme and provide an improved and adjusted intelligent regulation scheme.
[0064] In the exemplary embodiment, the large language model is further configured for training based on environmental data of the greenhouse and corresponding intelligent regulation schemes.
[0065] The large language model provided in the present embodiment can continuously learn, and the learning process can be reflected in further training based on adjustments and feedback to the greenhouse at all times. It can also be connected to knowledge bases of the agricultural field, including planting techniques, pest control experience, etc.The large language model can provide more comprehensive and professional advice by learning and analyzing this knowledge to help farmers solve problems and optimize agricultural production. The generation and optimization of planting schemes mainly focus on the construction and evaluation of multi-dimensional comprehensive schemes around crop diseases, soil conditions, fertilizers, growth environment and other factors. Temporal-based decision reasoning can further increase the level of evaluation and expertise of the large language models.
[0066] In the exemplary embodiment, the system further includes a display module, which is configured to call the large language model to answer the user's question if the user raises a question.
[0067] The progressive JavaScript framework Vue. JS which is modem and can efficiently develop interfaces is mainly selected for the front-end interaction interface in the present embodiment, the cross-platform Node. JS is used as the development runtime environment of the front-end code, and the UI component library uses the open-source high-quality component library Element Plus UI based on Vue.js, which can quickly develop PC interfaces suitable for the middle and background applications.
[0068] In practical applications, the large language model is accessed to the knowledge base of the agricultural field to learn the professional knowledge in the agricultural field, which can carry out the dialogue interaction with the farmers, and answer the questions about the planting area, such as the crop growth period, the pest control method, and the like, and provide the relevant planting optimization solution. Combined with the Prompt engineering technology, the large language model can have the ability to call external tools, and can carry out web search, paper query and knowledge base query in real time, so that the large language model can better understand the problems of farmers and give accurate answers.
[0069] The construction of the knowledge base of the agricultural field is to slice and split the professional document data, convert it into a vector form through embedding, and then store it into the vector database. If a query is needed, the LLM generates a specific query word through the prompt word technology, and then the vector database is searched using methods such as Faiss to obtain Top K results which is put into the context of prompt for further reasoning.
[0070] If accessing the agricultural planting data, the latest reported environmental factor data is queried in the database by SQL and then embedded into the context of prompt for direct reasoning. The advantage of this scheme is that it is convenient to query. In addition, In addition, it is also possible to build a dDatabaseToolKit, combine prompt word technologies such as ReAct to create prompt templates, and implement SQL related driver interfaces on the Python side. The advantage of this scheme is that it can more easily generate customized query data if the query data types are diverse and the query data is complex.
[0071] For the construction of a large language model, the present embodiment deeply integrates Prompt technologies such as ReAct and CoT, and combines the promptulate framework to construct a complex Agent, In terms of external services, the service of the large language model constructs a restful-style interface through FastAPI, which is used to provide interaction for the greenhouse intelligent cloud platform.
[0072] In addition, it is worth mentioning that the scheme of the present disclosure does not adopt the mode of open source large model finetune, because the comprehensive reasoning effect of the open source large model is general, the deployment cost of the offline open source large model is high, and the project has no strong data privacy problem. Therefore, the engine of the large language model is not constructed in a manner of fine tuning and offline deployment of the large model, but is constructed by directly using an API related to GPT4. In addition, the system architecture used in the present disclosure can be quickly compatible with different types of large language models, so that seamless switching can be quickly achieved, and iteration can be quickly performed in scenarios requiring offline deployment, so as to ensure the stability of the product.
[0073] In the exemplary embodiment, the system further includes an early warning module, which is configured to trigger an alarm if the environmental data inside the greenhouse meets the alarm conditions.
[0074] In an implementation, the alarm condition may be that one or more environmental data in the greenhouse exceeds or is lower than a certain set threshold. For example, if the air temperature parameter inside the greenhouse exceeds the first threshold, an alarm may be triggered, and / or if the air humidity parameter inside the greenhouse is lower than athe second threshold, an alarm is triggered.
[0075] The alarm mode can also be flexibly set according to the actual situation. For example, a short message can be sent to the electronic equipment bound with the greenhouse control system, for example, a short message can be sent to the bound mobile phone to inform the farmer, or the alarm can be given by installing a buzzer or a warning light and other warning devices.
[0076] In the present embodiment, the safety of the crops in the greenhouse can be improved by alarming if the environmental data inside the greenhouse is not up to the standard, and the influence of various unknown factors on the normal growth of the crops is avoided.
[0077] In the exemplary embodiment, the greenhouse regulation module includes a light regulation unit, a temperature regulation unit, a ventilation regulation unit, and an irrigation regulation unit.
[0078] The light regulation unit is configured to regulate the light conditions of the greenhouse.
[0079] The temperature regulation unit is configured to regulate the temperature conditions of the greenhouse.
[0080] The ventilation regulation unit is configured to regulate the ventilation conditions of the greenhouse.
[0081] The irrigation regulation unit is configured to regulate the water conditions of the greenhouse.
[0082] Below is a specific embodiment to introduce the system for controlling a greenhouse disclosed in the present disclosure.
[0083] FIG. 2 is a schematic diagram of data flow of the system for controlling a greenhouse provided in an embodiment of the present disclosure.
[0084] As shown in FIG. 2, the data flow process flows through the following five subsystems.
[0085] The automatic data monitoring and acquisition system is responsible for the automatic monitoring and acquisition of various sensor data inside the greenhouse. The real-time data of environmental parameters such as temperature, humidity and light, as well as soil parameters such as soil humidity and nitrogen content can be obtained by installing intelligent sensors. At the same time, combined with sensor data and agricultural big data analysis technology, the key indicators in the planting process are monitored and collected to provide basic support for subsequent data analysis and decision-making.
[0086] The equipment management and scheduling system provides the management and scheduling functions of the equipment inside the greenhouse. Through the cloud platform, farmers can remotely monitor and control the equipment in the greenhouse, such as irrigation system, ventilation system, light regulation and so on. Farmers can adjust the operating parameters of the equipment according to the environmental conditions inside and outside the greenhouse and the growth state of crops, realize automatic greenhouse management, and improve production efficiency and product quality.
[0087] The data visualization system integrates and displays the monitoring data inside the greenhouse, and provides intuitive and understandable data charts and reports, so that farmers can monitor and master the operation status of the greenhouse in real time. Through data analysis and visual display, farmers can understand the changing trend of the environment inside and outside the greenhouse, as well as the evolution of crop growth status, so as to make scientific decisions and optimize the planting scheme.
[0088] The automatic regulation system of environmental factors based on the agricultural large language model combines the powerful semantic understanding and reasoning capabilities of the agricultural large model, and uses natural language processing technology to conduct dialogue and interaction with farmers. Farmers can consult the system about issues related to the planting area, such as crop growth period, pest control methods. The system can understand and analyze the farmers' questions, and give accurate answers. At the same time, the system can automatically adjust the irrigation volume, ventilation speed and other environmental factors according to the changes of the environment inside and outside the greenhouse and the growth state of crops, optimize the ecological environment of the greenhouse, and improve the yield and quality.
[0089] The structural health analysis and planting scheme evaluation system performs multidimensional comprehensive analysis and evaluation in combination with the structural health data and crop planting data of the greenhouse. The system can construct and evaluate planting schemes according to crop diseases, soil conditions, fertilizer use and other factors. Through the temporal decision reasoning, the system can predict the growth trend and yield of greenhouse according to historical data and real-time data, provide scientific planting suggestions for farmers, and optimize agricultural production.
[0090] The system for controlling a greenhouse provided by the present disclosure has the following innovative points.
[0091] Comprehensive data-driven intelligent decision-making. The present scheme combines intelligent cloud platforms with agricultural large models to achieve comprehensive data-driven intelligent decision-making. By centrally managing various sensor data inside the greenhouse and combining it with agricultural industry knowledge base and big data analysis, the present scheme can provide farmers with the best planting scheme, optimize yield and quality. Compared with traditional manual decision-making, data based intelligent decision-making of the present scheme is more accurate, scientific, and can adjust and optimize the schemes in real time, improving agricultural production efficiency.
[0092] Data driven risk warning and optimization. The present scheme achieves data driven risk warning and optimization by utilizing sensor data and agricultural large models. The cloud platform can monitor abnormal situations inside the greenhouse in real time, such as high temperature, low humidity, pest risks, and send alarm information to farmers timely. Compared with traditional manual inspections, the present scheme can detect and respond to potential problems earlier, reduce crop losses, and improve the stability and reliability of agricultural production.
[0093] Integration of automation control and large language modeling capability interaction. The present scheme combines the automation control and the functions of artificial intelligence dialogue interaction. As the core of the agricultural large model, AgriGPT can automate control and decision-making based on real-time data and historical data from the greenhouse, such as adjusting parameters such as irrigation volume and ventilation speed. At the same time, farmers can engage in dialogue with AgriGPT to obtain professional advice on planting schemes, pest control methods, and other aspects. This way of integrating automation control and artificial intelligence dialogue interaction enables farmers to more conveniently obtain professional knowledge and guidance, optimizing the agricultural production process.
[0094] Introduction of intelligent sensors and equipment management. The present scheme incorporates intelligent sensors and actuators to achieve high-precision monitoring and control of environmental parameters inside the greenhouses. By connecting with the cloud platform, farmers can remotely monitor and control greenhouse equipment such as irrigation systems, ventilation systems, and light regulation. Meanwhile, equipment failure prediction and maintenance based on the sensor data and the machine learning algorithms can reduce the impact of equipment failures on agricultural production and improve the stability and reliability of the greenhouse. The introduction of intelligent sensors and equipment management has greatly improved the automation level of greenhouses.
[0095] In summary, the scheme proposed in the present disclosure provides a comprehensive and efficient solution for the intelligent management of greenhouses through the comprehensive data-driven intelligent decision-making, the Data driven risk warning and optimization, the integration of automation control and artificial intelligence dialogue interaction, and the introduction of intelligent sensors and equipment management. Compared with traditional greenhouse management, the present scheme can monitor, optimize decision-making, accurately control, and respond to various risks in real time, improving the efficiency and sustainable development level of agricultural production.
[0096] The method for controlling a greenhouse provided by the present disclosure will be described below. The method for controlling a greenhouse described below can be referenced to the system for controlling a greenhouse described above.
[0097] FIG. 3 is a flowchart of the method for controlling a greenhouse provided in an embodiment of the present disclosure.
[0098] As shown in FIG. 3, the method for controlling a greenhouse provided in the present embodiment includes the following steps.
[0099] Step 301, the environmental data inside the greenhouse is acquired.
[0100] Step 302, the environmental data inside the greenhouse is input into a pre-constructed large language model and an intelligent regulation scheme is generated; multiple intelligent regulation pre-selection schemes are generated by the large language model based on the environmental data inside the greenhouse, and the intelligent regulation scheme with the highest matching degree with user needs is determined from the multiple intelligent regulation preselection schemes.
[0101] Step 303, the environmental data inside the greenhouse is regulated based on the intelligent regulation scheme.
[0102] In the exemplary embodiment, the method for controlling a greenhouse also includes steps for authenticating users, which can verify whether users have the right to access the greenhouse control system.
[0103] FIG. 4 is the first flowchart of the authentication method provided in an embodiment of the present disclosure.
[0104] As shown in FIG. 4, firstly, the user's request is processed through an address filter to determine the interface, if the interface does not exist, a "404" error is output. If the address is a private interface, a role filter is used to determine whether the user's account has access permission. If there is no permission, a "403" error is output. If there is access permission, an exception filter is used to determine whether the authentication program is exceptional. If the program encounters an exception, a "403" error is output. If there is no exception, the program executes normally and the authentication is successful. If the address is determined to be a shared interface through an address filter, a request counter is used to detect the number of requests. If the number of requests is too many, there may be a security issue with the address, and a "403" error is output. If the number of requests does not exceed the threshold, the program executes normally and the authentication is successful.
[0105] In the exemplary embodiment, the method for controlling a greenhouse further includes a step of authenticating the EMQX server.
[0106] FIG. 5 is the second flowchart of the authentication method provided in an embodiment of the present disclosure.
[0107] As shown in FIG. 5, after the user requests the JWT Token from the backend, the first step is to verify whether the user has the permission to apply the equipment. If not, an "403" error is output. If there is, authorization information is written to the authorization database. After that, the user can obtain the JWT Token. Then, the user can use the JWT Token to send a request to the EMQX server. By verifying whether the client ID and username in the JWT payload are consistent with the connection parameters, if they are consistent, continue to determine whether the JWT Token is valid. If it is valid, write the equipment information into the database.
[0108] FIG. 6 is a flowchart of the data storage provided in an embodiment of the present disclosure.
[0109] As shown in FIG. 6, if the system backend receives the information sent by the equipment, it first performs a validity check. If it is valid, the equipment information is stored in the receiving database, and the JSON is further analyzed to read the information and store it in the equipment message database. Processing the message can determine whether the subsequent process is information display, alarm, or further data processing, and transmit it to the corresponding module.
[0110] FIG. 7 is a flowchart of the data communication provided in an embodiment of the present disclosure.
[0111] As shown in FIG. 7, In the present embodiment, communication between the server and the equipment is carried out through the EMQX server, which serves as the message middleware. The server subscribes to specific topics, such as "device / {mad_id}", to achieve the process of monitoring device data reporting information. The server sends topics to specific topics, and the equipment subscribes after startup to control specific instructions. The relevant control events are saved in the database, and the generation of temporal control instructions for the large language model is also based on this data as the contextual basis.
[0112] The specific implementation method of the method for controlling a greenhouse provided in the present embodiment can refer to the above embodiment for implementation, and will not be repeated here.
[0113] FIG. 8 shows a physical structure schematic diagram of electronic equipment. As shown in FIG. 8, the electronic equipment may include a processor 810, a communication interface 820, a memory 830, and a communication bus 840. The processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a method for controlling a greenhouse, which includes the following steps.
[0114] The environmental data inside the greenhouse is acquired.
[0115] The environmental data inside the greenhouse is input into a pre-constructed large language model and an intelligent regulation scheme is generated; multiple intelligent regulation pre-selection schemes are generated by the large language model based on the environmental data inside the greenhouse, and the intelligent regulation scheme with the highest matching degree with user needs is determined from the multiple intelligent regulation pre-selection schemes.
[0116] The environmental data inside the greenhouse is regulated based on the intelligent regulation scheme.
[0117] In addition, the logical instructions in the aforementioned memory 830 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium if sold or used as independent products. Based on this understanding, the essence of the technical solution of the present disclosure or the part contributing to the prior art or the part of the technical solution may be embodied in the form of a software product. The computer software product is stored in a storage medium which includes several instructions to enable a computer device (which can be a personal computer, a server, or network equipment, etc.) to perform all or part of the steps of the method of the various embodiments of the present disclosure. The aforementioned storage media include: USB flash drives, portable hard drives, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disks or optical disks, and various other media that can store program code.
[0118] On the other hand, the present disclosure also provides a computer program product including a computer program that can be stored on a non transient computer-readable storage medium. If the computer program is executed by a processor, the computer is capable of executing the method for controlling the greenhouse provided by the above methods. The method includes the following steps.
[0119] The environmental data inside the greenhouse is acquired.
[0120] The environmental data inside the greenhouse is input into a pre-constructed large language model and an intelligent regulation scheme is generated; multiple intelligent regulation pre-selection schemes are generated by the large language model based on the environmental data inside the greenhouse, and the intelligent regulation scheme with the highest matching degree with user needs is determined from the multiple intelligent regulation pre-selection schemes.
[0121] The environmental data inside the greenhouse is regulated based on the intelligent regulation scheme.
[0122] In another aspect, the present disclosure also provides a non transient computer-readable storage medium, on which a computer program is stored. If the computer program is executed by a processor, it implements the method for controlling the greenhouse provided by the above methods. The method includes the following steps.
[0123] The environmental data inside the greenhouse is acquired.
[0124] The environmental data inside the greenhouse is input into a pre-constructed large language model and an intelligent regulation scheme is generated; multiple intelligent regulation pre-selection schemes are generated by the large language model based on the environmental data inside the greenhouse, and the intelligent regulation scheme with the highest matching degree with user needs is determined from the multiple intelligent regulation pre-selection schemes.
[0125] The environmental data inside the greenhouse is regulated based on the intelligent regulation scheme.
[0126] The device embodiments described above are only illustrative, where the units indicated as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, i.e. they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art can understand and implement it without the effort of creativity.
[0127] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus the necessary general hardware platform, and of course, hardware can also be used. Based on such understanding, the essence of the above technical solution or the part contributing to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a plurality of instructions for enabling computer equipment (which can be a personal computer, a server, Or network equipment, etc.) to perform the methods of various embodiments or portions of embodiments.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, not to limit the same. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that the technical solutions described in the foregoing embodiments can still be modified, or some of the technical features thereof can be equivalently replaced. These modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A system for controlling a greenhouse, comprising:a data acquisition module, configured to acquire environmental data inside a greenhouse;a data processing module, configured to input the environmental data inside the greenhouse into a pre-constructed large language model and generate an intelligent regulation scheme; the large language model generates multiple intelligent regulation pre-selection schemes based on the environmental data inside the greenhouse, and determines an intelligent regulation scheme with a highest matching degree with user needs from the multiple intelligent regulation pre-selection schemes; anda greenhouse regulation module, configured to regulate the environmental data inside the greenhouse based on the intelligent regulation scheme.
2. The system for controlling a greenhouse according to claim 1, wherein the data acquisition module is further configured to filter and process collected raw data inside the greenhouse to obtain the environmental data.
3. The system for controlling a greenhouse sensor according to claim 1, wherein the data processing module is a cloud platform.
4. The system for controlling a greenhouse according to claim 1, wherein the large language model is further configured to adjust the intelligent regulation scheme based on real-time changes of the environmental data inside the greenhouse after the the environmental data inside the greenhouse regulated by the greenhouse regulation module.
5. The system for controlling a greenhouse according to claim 1, wherein the large language model is further configured for training based on the environmental data of the greenhouse and corresponding intelligent regulation schemes.
6. The system for controlling a greenhouse according to claim 1, wherein it further comprises a display module, which is configured to call the large language model to answer a user's question if the user raises a question.
7. The system for controlling a greenhouse according to claim 1, wherein it further comprises an early warning module, which is configured to trigger an alarm if the environmental data inside the greenhouse meets alarm conditions.
8. The system for controlling a greenhouse according to claim 1, wherein the greenhouse regulation module comprises a light regulation unit, a temperature regulation unit, a ventilation regulation unit, and an irrigation regulation unit;the light regulation unit is configured to regulate light conditions of the greenhouse;the temperature regulation unit is configured to regulate temperature conditions of thegreenhouse;the ventilation regulation unit is configured to regulate ventilation conditions of the greenhouse; andthe irrigation regulation unit is configured to regulate water conditions of the greenhouse.
9. A method for controlling a greenhouse, comprising:acquiring environmental data inside a greenhouse;inputting the environmental data inside the greenhouse into a pre-constructed large language model and generating an intelligent regulation scheme; generating multiple intelligent regulation pre-selection schemes by a large language model based on the environmental data inside the greenhouse, and determining an intelligent regulation scheme with a highest matching degree with user needs from the multiple intelligent regulation pre-selection schemes; andregulating the environmental data inside the greenhouse based on the intelligent regulation scheme.
10. Electronic equipment for controlling a greenhous, comprising a memory, a processor and a computer program stored in the memory and operated on the processor, wherein the method for controlling a greenhouse according to claim 9 is realized if the processor executes the program.T +44(0)30 0300 2000A