Greenhouse control method and system and electronic equipment
By introducing control systems of data collection, data processing and greenhouse regulation modules into greenhouses, and using large language models to generate intelligent control solutions, the problem of low automation in traditional greenhouses is solved, and efficient and accurate environmental monitoring and regulation is achieved. Improve the sustainability of agricultural production.
Patent Information
- Application Number
- CN202411531863.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional greenhouses mainly rely on manual operation and management, with low degree of automation, and cannot realize automatic monitoring and control of environmental parameters and equipment status, making it difficult to accurately judge and solve problems encountered during crop growth, which may lead to huge economic loss.
Provide a greenhouse control system, including a data acquisition module, a data processing module and a greenhouse control module. The data acquisition module collects environmental data in the greenhouse, and the data processing module generates an intelligent control plan through a large language model, and the greenhouse control module regulates the environmental data according to the plan.
Comprehensive and accurate monitoring and intelligent regulation of greenhouse environmental parameters has been achieved, the efficiency and sustainable development of agricultural production have been improved, and the risk of artificial misjudgment has been reduced.
Smart Images

Figure CN119396236A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent control technology, and in particular to a greenhouse control method and system, and electronic equipment. Background Art
[0002] As a modern agricultural production method, greenhouses have many advantages in the sustainable development of agricultural production, such as saving water resources, reducing the use of pesticides, and increasing yield and quality.
[0003] However, traditional greenhouses mainly rely on manual operation and management. The degree of automation of greenhouses is low, and it is impossible to realize automatic monitoring and control of environmental parameters and equipment status. Various problems encountered during the growth of crops in greenhouses are also judged and solved by farmers relying on their own experience and the assistance of professionals. However, this method cannot guarantee accuracy. Once a misjudgment occurs, it may cause huge economic losses. Summary of the invention
[0004] The present invention provides a greenhouse control method and system, and electronic equipment to solve the problems that traditional greenhouses mainly rely on manual operation and management, have a low degree of automation, and mostly require farmers' experience to solve various problems encountered, and are not accurate and professional enough. The solution of the present application can provide comprehensive and accurate greenhouse environmental parameter monitoring, as well as intelligent regulation of environmental data in the greenhouse and other services to meet the needs of agricultural production and improve the efficiency and sustainable development of agricultural production.
[0005] The present invention provides a greenhouse control system, comprising:
[0006] Data acquisition module, used to collect environmental data in the greenhouse;
[0007] A data processing module, used for inputting the environmental data in the greenhouse into a pre-built large language model and generating an intelligent control scheme; the large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determines the intelligent control scheme with the highest degree of matching with the user's needs among the plurality of intelligent control pre-selected schemes;
[0008] The greenhouse control module is used to control the environmental data in the greenhouse based on the intelligent control scheme.
[0009] According to the greenhouse control system provided by the present invention, the data acquisition module is also used to obtain the environmental data after filtering the collected original data in the greenhouse.
[0010] According to the greenhouse control system provided by the present invention, the data processing module is a cloud platform.
[0011] According to the greenhouse control system provided by the present invention, the large language model is also used to adjust the intelligent control scheme according to the real-time changes of the environmental data in the greenhouse after the greenhouse control module controls the environmental data in the greenhouse.
[0012] According to the greenhouse control system provided by the present invention, the large language model is also used for training based on the environmental data of the greenhouse and the corresponding intelligent control scheme.
[0013] The greenhouse control system provided according to the present invention also includes a human-computer interaction interface, and the human-computer interaction interface is used to call the large language model to answer the user's question when the user asks a question.
[0014] The greenhouse control system provided according to the present invention further includes an early warning module, which is used to trigger an alarm when the environmental data in the greenhouse meets the alarm condition.
[0015] According to the greenhouse control system provided by the present invention, the greenhouse control module includes a light control unit, a temperature control unit, a ventilation control unit and an irrigation control unit;
[0016] The light control unit is used to control the light conditions of the greenhouse;
[0017] The temperature control unit is used to control the temperature condition of the greenhouse;
[0018] The ventilation control unit is used to control the ventilation conditions of the greenhouse;
[0019] The irrigation control unit is used to control the moisture condition of the greenhouse.
[0020] The present invention also provides a greenhouse control method, comprising:
[0021] Collect environmental data in greenhouses;
[0022] Inputting the environmental data in the greenhouse into a pre-built large language model, and generating an intelligent control scheme; the large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determining the intelligent control scheme with the highest degree of matching with the user's needs among the plurality of intelligent control pre-selected schemes;
[0023] The environmental data in the greenhouse is regulated based on the intelligent control scheme.
[0024] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the greenhouse control method as described above is implemented.
[0025] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the greenhouse control method as described above is implemented.
[0026] The present invention also provides a computer program product, including a computer program, which implements the above-mentioned greenhouse control method when executed by a processor.
[0027] In the greenhouse control system provided by the present invention, the environmental data collected by the data acquisition module can be processed based on the data processing module, and two rounds of screening can be performed in the data processing module. The first screening is that the large language model generates multiple intelligent control pre-selected schemes based on the collected environmental data in the greenhouse. These multiple pre-selected schemes can adjust the current environmental data in the greenhouse to a scheme suitable for crop growth. The second screening is based on the intelligent control pre-selected schemes, combined with the actual situation of the user, to select and determine the most preferred scheme as the intelligent control scheme. Controlling the greenhouse based on the intelligent control scheme can achieve precise control of the environmental data in the greenhouse, and can also adapt to the actual needs of the user. It has a high degree of intelligence and can effectively meet the needs of agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 It is a structural schematic diagram of the greenhouse control system provided by the present invention;
[0030] Figure 2 It is a data flow diagram of a greenhouse control system provided by an embodiment of the present invention;
[0031] Figure 3 It is a flow chart of a greenhouse control method provided by an embodiment of the present invention;
[0032] Figure 4 This is one of the flowcharts of the authentication method provided by the embodiment of the present invention;
[0033] Figure 5This is the second flow chart of the authentication method provided by the embodiment of the present invention;
[0034] Figure 6 It is a schematic diagram of a data storage process provided by an embodiment of the present invention;
[0035] Figure 7 is a schematic diagram of a data communication process provided by an embodiment of the present invention;
[0036] Figure 8 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] Figure 1 It is a structural schematic diagram of the greenhouse control system provided by the present invention.
[0039] like Figure 1 As shown, this embodiment provides a greenhouse control system, including:
[0040] Data acquisition module, used to collect environmental data in the greenhouse;
[0041] A data processing module, used for inputting the environmental data in the greenhouse into a pre-built large language model and generating an intelligent control scheme; the large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determines the intelligent control scheme with the highest degree of matching with the user's needs among the plurality of intelligent control pre-selected schemes;
[0042] The greenhouse control module is used to control the environmental data in the greenhouse based on the intelligent control scheme.
[0043] In practical applications, the data acquisition module can be various sensors installed in the greenhouse, such as light intensity sensor, soil temperature sensor, soil moisture sensor, air temperature sensor, carbon dioxide concentration sensor and pH value sensor, etc. The light intensity sensor can use BH1750 digital light sensor module, which can measure the range of 1 to 65535 lux and adopts two-wire serial bus interface; the soil temperature sensor adopts DS18B20 temperature sensor module, outputs data through serial port, and can display the temperature range of -1 to 85 degrees Celsius; the soil moisture sensor can measure the temperature of the greenhouse. The operating voltage is between DC3.7V and DC12V. The humidity is detected through the probe, and the voltage comparator is used to determine the humidity. The air temperature sensor uses analog input to read the temperature sensor AD value in the air, and converts it into temperature units through a series of mathematical conversions. The carbon dioxide concentration sensor uses the MQ-135 air quality module to detect the carbon dioxide concentration. Its detection range is 10ppm to 1000ppm, and it works at an operating voltage of 4.8V to 5.2V. The pH sensor can be a pH non-rechargeable electrode probe, and the pH sensor can be used to collect soil pH information.
[0044] The above-mentioned sensors can be arranged in appropriate areas in the greenhouse according to actual needs and the action mechanism of the sensors.
[0045] The large model in this embodiment can be based on AgriGPT and ChatGPT4.0, and can perform automated control and program decision-making based on real-time and historical data of greenhouses. The training process starts from agricultural research literature, agricultural databases, agricultural historical records, and farmers' experience data, pre-processes the data (data cleaning, labeling, and conversion), and then selects advanced deep learning algorithms based on Transformer architecture, reasonably sets training parameters for training, and uses part of the data that is not involved in the training to optimize the model during the training process. Finally, the data can be updated regularly.
[0046] In practical applications, the temperature control module can be various hardware devices in the greenhouse, for example, it can include a light source for controlling lighting conditions, an exhaust fan for adjusting ventilation and temperature and humidity, and a water pump and water pipe for adjusting moisture conditions.
[0047] In the implementation, the data processing module can include the server, data service layer and monitoring platform. The server application is mainly developed in Java language, and the core framework uses the open source Spring Boot of the Pivotal team, which is one of the most popular Java frameworks in the world. The data service layer uses the most popular open source relational database MySQL, and uses Redis based on memory storage as a cache database to store unstructured Key-Value data. The monitoring platform uses Prometheus, and the application runs on the Docker container engine. GitHub actions are used to let Docker automatically package the application into a portable container, and then publish it to the Linux system server, and use Nignx for reverse proxy.
[0048] In the greenhouse control system provided in this 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. The first screening is that the large language model generates multiple intelligent control pre-selected schemes based on the collected environmental data in the greenhouse. These multiple pre-selected schemes can adjust the current environmental data in the greenhouse to a scheme suitable for crop growth. The second screening is based on the intelligent control pre-selected schemes, combined with the actual situation of the user, to select and determine the most preferred scheme as the intelligent control scheme. Controlling the greenhouse based on the intelligent control scheme can achieve precise control of the environmental data in the greenhouse, and can also adapt to the actual needs of the user. It has a high degree of intelligence and can effectively meet the needs of agricultural production.
[0049] In an exemplary embodiment, the data acquisition module is also used to obtain the environmental data after filtering the collected raw data in the greenhouse.
[0050] In implementation, the filtering process may be a median filter. At the same time, for the air humidity data, carbon dioxide concentration data, and soil temperature data in the environmental data, the data may be read from the analog input value, and then after actual testing and mathematical conversion, the data results with universal physical meaning may be obtained. Specifically, for different sensors, or even the same sensor, due to slight differences in production processes, in the absence of calibration and conversion, their measurement results for the same physical quantity may also have deviations. For example, two carbon dioxide concentration sensors of the same model may output slightly different analog values in the same environment. After actual testing and mathematical conversion in this embodiment, each sensor can be calibrated to eliminate these individual differences to the maximum extent and reduce errors caused by the sensor.
[0051] In an exemplary embodiment, the data processing module is a cloud platform.
[0052] The cloud platform in this embodiment mainly includes the following units:
[0053] User module: This module is responsible for user registration, login, personal information management and other functions. Through the user module, users can easily access and manage the greenhouse system.
[0054] Planting area module: responsible for the management 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. It also integrates the function of the big language model, which allows the big language model to evaluate and optimize the planting plan for the planting area created by the user.
[0055] Equipment module: The equipment module is responsible for the management and control of equipment. Through this module, users can configure, monitor and control various types of equipment in the greenhouse to achieve intelligent and automated management. The large language model can be used as context to build an intelligent agent through prompt technology to automatically control the equipment.
[0056] Communication module: The communication module is responsible for receiving data sent by the device to the server, and issuing instructions and controlling operations on the device. This module interacts with the device module to achieve real-time communication with the greenhouse equipment. In this project, MQTT and HTTP are mainly used for communication.
[0057] Data analysis and processing suggestion module: This module is responsible for analyzing and processing the data collected by the equipment, and submitting the processing results to the agricultural model for further processing. When interacting with farmers, this module can provide farmers with planting suggestions and decision support.
[0058] Data visualization module: This module is responsible for statistics and analysis of the data collected by all devices in the project, and visualizes the statistical results so that users can intuitively view the equipment operation status and data.
[0059] Environmental Factor Control Module: Environmental factor control is used to manage the operating status of all equipment and is responsible for realizing the automatic control of equipment. Through this module, users can set the automation strategy of equipment to improve the management efficiency and production benefits of greenhouses.
[0060] Risk monitoring and data alarm module: This module is based on sensor data and agricultural big models. It monitors the data reporting of environmental factors in real time, and makes comprehensive risk judgments based on thresholds + big language models. It can detect risk situations such as abnormal temperature in a timely manner, and send alarm information to users in a timely manner when abnormalities are found. Through this, users can take corresponding measures in time to avoid losses and risks.
[0061] This embodiment combines the technology stack of the intelligent cloud platform, a mature ecosystem, and abundant resource support to help us efficiently and stably build intelligent greenhouse solutions based on large agricultural models.
[0062] In an exemplary embodiment, the large language model is also used to adjust the intelligent control scheme according to real-time changes in the environmental data in the greenhouse after the greenhouse control module controls the environmental data in the greenhouse.
[0063] Since the environment in the greenhouse is constantly changing, the corresponding control schemes may be different for different environmental data. On this basis, the large language model in this embodiment has real-time error correction capabilities and can adjust the control schemes given according to the real-time changes of the environmental data in the greenhouse. Not only that, the real-time error correction capability of the large language model is also reflected in that if the environmental data of the greenhouse does not become more suitable for crop growth under the control of the intelligent control scheme, this means that the intelligent control scheme provided by the data processing module may be wrong. At this time, the large language model can improve the provided control scheme and provide an improved and adjusted intelligent control scheme.
[0064] In an exemplary embodiment, the large language model is also used for training based on environmental data of the greenhouse and a corresponding intelligent control scheme.
[0065] The large language model provided in this embodiment can learn continuously. The learning process can be reflected in further training based on the adjustment and feedback of the greenhouse at every moment. It can also access the knowledge base in the agricultural field, including planting techniques, pest control experience, etc. By learning and analyzing this knowledge, the large language model can provide more comprehensive and professional advice to help farmers solve problems and optimize agricultural production. The generation and optimization of planting plans mainly focus on the construction and evaluation of multi-dimensional comprehensive plans around factors such as crop diseases, soil conditions, fertilizers, and growth environment. Time-based decision reasoning can further increase the evaluation level and professional level of the large language model.
[0066] In an exemplary embodiment, a display module is also included, and the display module is used to call the large language model to answer the user's question when the user asks a question.
[0067] The front-end interactive interface in this embodiment mainly selects Vue.js, a modern and progressive JavaScript framework that can efficiently develop interfaces. The cross-platform Node.js is used as the front-end code development runtime environment. The UI component library uses the open source high-quality component library ElementPlus UI based on Vue.js, which can quickly develop a PC interface suitable for mid- and back-end applications.
[0068] In actual applications, by connecting the large language model to the agricultural knowledge base and learning agricultural expertise, it is possible to interact with farmers and answer their questions about the planting area, such as crop growth period, pest control methods, etc., and provide relevant planting optimization solutions. Combined with Prompt engineering technology, the large language model can have the ability to call external tools, perform web searches, paper queries, and knowledge base queries in real time, allowing the large language model to better understand farmers' questions and give accurate answers.
[0069] The construction of the agricultural field knowledge base is to slice and split the professional document data, convert it into vector form through embedding, and then store it in the vector database. When a query is needed, the prompt word technology is used to let LLM generate specific query words, and then use faiss and other methods to search the vector database, and obtain the Top K results for further reasoning in the context of the prompt.
[0070] When accessing agricultural planting data, use SQL to query the most recently reported environmental factor data in the database and then embed it into the prompt context for direct reasoning. The advantage of this solution is that it is easy to query. In addition, you can also build SqlDatabaseToolKit, combine prompt word technologies such as ReAct to establish prompt templates, and implement SQL-related driver interfaces on the Python side. The advantage of this solution is that it can more conveniently generate customized query data when the query data types are diverse and the query data is complex.
[0071] In the construction of the large language model, this embodiment deeply integrates prompt technologies such as ReAct and CoT, and combines the promptulate framework to construct complex Agents; in external services, the service of the large language model uses FastAPI to build a restful-style interface for interaction with the greenhouse intelligent cloud platform.
[0072] It is also worth mentioning that the solution of this application does not adopt the open source large model fine-tune method, because the comprehensive reasoning effect of the open source large model is average, and the cost of offline open source large model deployment is high, and the project does not have strong data privacy issues. Therefore, the large model fine-tuning + offline deployment method is not used to build the engine of the large language model, but directly uses the GPT4-related API to build it. In addition, the system architecture used in this application can quickly be compatible with different types of large language models, quickly achieve seamless switching, and we quickly iterate in scenarios that require offline deployment to ensure product stability.
[0073] In an exemplary embodiment, an early warning module is also included, and the early warning module is used to trigger an alarm when the environmental data in the greenhouse meets the alarm condition.
[0074] During implementation, the alarm condition may be that one or several environmental data in the greenhouse exceeds or falls below a set threshold. For example, when the air temperature parameter in the greenhouse exceeds a first threshold, an alarm may be triggered, and / or when the air humidity parameter in the greenhouse falls below a second threshold, an alarm may be triggered.
[0075] The alarm method can also be flexibly set according to actual conditions. For example, a text message can be sent to an electronic device bound to the greenhouse control system, such as sending a text message to a bound mobile phone to notify farmers, or an alarm can be issued by installing warning devices such as buzzers or warning lights.
[0076] In this embodiment, by giving an alarm when the environmental data in the greenhouse does not meet the standards, the safety of crops in the greenhouse can be improved to prevent the normal growth of crops from being affected by various unknown factors.
[0077] In an exemplary embodiment, the greenhouse control module includes a light control unit, a temperature control unit, a ventilation control unit, and an irrigation control unit;
[0078] The light control unit is used to control the light conditions of the greenhouse;
[0079] The temperature control unit is used to control the temperature condition of the greenhouse;
[0080] The ventilation control unit is used to control the ventilation conditions of the greenhouse;
[0081] The irrigation control unit is used to control the moisture condition of the greenhouse.
[0082] The greenhouse control system disclosed in the solution of this application is introduced below with a specific embodiment.
[0083] Figure 2 It is a data flow diagram of a greenhouse control system provided by an embodiment of the present invention.
[0084] like Figure 2 As shown in the figure, the data flow process flows through the following five subsystems:
[0085] The data automatic monitoring and collection system is responsible for the automatic monitoring and collection of various sensor data in the greenhouse. By installing intelligent sensors, real-time data on environmental parameters such as temperature, humidity, and light, as well as soil parameters such as soil moisture and nitrogen content can be obtained. At the same time, combined with sensor data and agricultural big data analysis technology, 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 management and scheduling functions for equipment in greenhouses. Through the cloud platform, farmers can remotely monitor and control equipment in greenhouses, such as irrigation systems, ventilation systems, and light regulation. Farmers can adjust the operating parameters of equipment according to the environmental conditions inside and outside the greenhouse and the growth status of crops, realize automated greenhouse management, and improve production efficiency and product quality.
[0087] The data visualization system integrates and displays the monitoring data in the greenhouse, providing intuitive and easy-to-understand data charts and reports, so that farmers can monitor and grasp the operation status of the greenhouse in real time. Through data analysis and visualization, farmers can understand the changing trends 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 planting plans.
[0088] The automatic control system of environmental factors based on the agricultural big language model combines the powerful semantic understanding and reasoning capabilities of the agricultural big model and uses natural language processing technology to interact with farmers. Farmers can consult the system about issues in the planting area, such as crop growth period, pest and disease control methods, etc. The system can understand and analyze farmers' questions and give accurate answers. At the same time, the system can automatically adjust environmental factors such as irrigation amount and ventilation speed according to changes in the environment inside and outside the greenhouse and the growth status of crops, optimize the ecological environment of the greenhouse, and improve yield and quality.
[0089] The structural health analysis and planting plan evaluation system combines the structural health data of the greenhouse and the crop planting data to conduct multi-dimensional comprehensive analysis and evaluation. The system can build and evaluate planting plans based on factors such as crop diseases, soil conditions, and fertilizer use. Through time-series decision reasoning, the system can predict the growth trend and yield of greenhouses based on historical data and real-time data, provide farmers with scientific planting suggestions, and optimize agricultural production.
[0090] The greenhouse control system provided by this application has the following innovative features:
[0091] Comprehensive data-driven intelligent decision-making, this solution uses a combination of intelligent cloud platform and agricultural big model to achieve comprehensive data-driven intelligent decision-making. By centrally managing various sensor data in greenhouses, combined with agricultural industry knowledge base and big data analysis, this solution can provide farmers with the best planting plan, optimize yield and quality. Compared with traditional manual decision-making, this solution's data-based intelligent decision-making is more accurate and scientific, and can adjust and optimize the plan in real time to improve agricultural production efficiency.
[0092] Data-driven risk warning and optimization. This solution uses sensor data and agricultural big models to achieve data-driven risk warning and optimization. The cloud platform can monitor abnormal conditions in greenhouses in real time, such as high temperature, low humidity, and pest and disease risks, and send alarm information to farmers in a timely manner. Compared with traditional manual inspections, this solution can detect and respond to potential problems earlier, reduce crop losses, and improve the stability and reliability of agricultural production.
[0093] This solution integrates the functions of automated control and artificial intelligence dialogue interaction, integrating automated control and artificial intelligence dialogue interaction. As the core of the agricultural big model, AgriGPT can perform automated control and program decision-making based on real-time and historical data of greenhouses, such as adjusting parameters such as irrigation volume and ventilation speed. At the same time, farmers can communicate with AgriGPT to obtain professional advice on planting plans, pest and disease control methods, etc. This method of integrating automated control and artificial intelligence dialogue interaction enables farmers to more easily obtain professional knowledge and guidance and optimize the agricultural production process.
[0094] Introducing smart sensors and equipment management, this solution introduces smart sensors and actuators to achieve high-precision monitoring and control of environmental parameters in greenhouses. Through connection with the cloud platform, farmers can remotely monitor and control greenhouse equipment, such as irrigation systems, ventilation systems, and light regulation. At the same time, through equipment failure prediction and maintenance based on sensor data and machine learning algorithms, the impact of equipment failures on agricultural production can be reduced and the stability and reliability of greenhouses can be improved. This approach of introducing smart sensors and equipment management has greatly improved the degree of automation in greenhouses.
[0095] In summary, the solution of this application provides a comprehensive and efficient solution for the intelligent management of greenhouses through comprehensive data-driven intelligent decision-making, data-driven risk warning and optimization, integration of automated control and artificial intelligence dialogue interaction, and the introduction of innovative methods of intelligent sensors and equipment management. Compared with traditional greenhouse management, this solution can monitor in real time, optimize decisions, accurately control and respond to various risks early, and improve the efficiency and sustainable development level of agricultural production.
[0096] The greenhouse control method provided by the present invention is described below. The greenhouse control method described below and the greenhouse control system described above can be referenced to each other.
[0097] Figure 3 It is a flow chart of a greenhouse control method provided by an embodiment of the present invention.
[0098] like Figure 3 As shown, the greenhouse control method provided in this embodiment includes:
[0099] Step 301, collecting environmental data in the greenhouse;
[0100] Step 302: input the environmental data in the greenhouse into a pre-built large language model, and generate an intelligent control scheme; the large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determines the intelligent control scheme with the highest degree of matching with the user's needs among the plurality of intelligent control pre-selected schemes;
[0101] Step 303: Regulate the environmental data in the greenhouse based on the intelligent control scheme.
[0102] In an exemplary embodiment, the greenhouse control method also includes a method step of authenticating the user, which can verify whether the user has the right to access the greenhouse control system.
[0103] Figure 4 This is one of the flowcharts of the authentication method provided by the embodiment of the present invention.
[0104] like Figure 4 As shown, the user request first determines the interface through the address filter. If the interface does not exist, a "404" error is output. If the address is a private interface, the role filter is used to determine whether the user's account has access rights. If not, a "403" error is output. If there is access rights, the exception filter is used to determine whether the authentication program is abnormal. If the program is abnormal, a "403" error is output. If there is no abnormality, the program is executed normally and the authentication is determined to be successful. If the address is determined to be a shared interface through the address filter, the request counter is used to detect the number of requests. If the number of requests is too many, the address may have security issues and a "403" error is output. If the number of requests does not exceed the request number threshold, the program is executed normally and the authentication is determined to be successful.
[0105] In an exemplary embodiment, the greenhouse control method also includes the step of authenticating the EMQX server.
[0106] Figure 5 This is the second flowchart of the authentication method provided by the embodiment of the present invention.
[0107] like Figure 5 As shown in the figure, after the user requests JWTToken from the backend, it first verifies whether the user has the permission to use the device. If not, a "403" error is output. If yes, the authorization information is written to the authorization database. After that, the user can get the JWT Token. After that, the user can use the JWT Token to send a request to the EMQX server, and verify whether the clientID and username in the JWTPayload are consistent with the connection parameters. If they are consistent, it continues to determine whether the JWT Token is legal. If legal, the device information is written to the database.
[0108] Figure 6 It is a schematic diagram of the data storage process provided by an embodiment of the present invention.
[0109] like Figure 6 As shown, when the system backend receives the information sent by the device, it first performs a legitimacy check. If it is legal, the device information is stored in the receiving database, and the JSON is further analyzed, the information in it is read, and stored in the device 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] Figure 7 It is a schematic diagram of the data communication process provided by an embodiment of the present invention.
[0111] like Figure 7 As shown, in this embodiment, the server and the device communicate through the EMQX server, and EMQX is used as the message middleware. The server subscribes to a specific topic, such as "device / {mad_id}", to implement the process of monitoring the device data reporting information; the server sends a topic to a specific topic, and the device subscribes after startup to control specific instructions. The relevant control events are saved in the database, and the timing control instruction generation of the large language model is also generated based on this data as the context.
[0112] The specific implementation method of the greenhouse control method provided in this embodiment can be implemented with reference to the above embodiment and will not be repeated here.
[0113] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the greenhouse control method, which includes:
[0114] Collect environmental data in the greenhouse;
[0115] Inputting the environmental data in the greenhouse into a pre-built large language model, and generating an intelligent control scheme; the large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determining the intelligent control scheme with the highest degree of matching with the user's needs among the plurality of intelligent control pre-selected schemes;
[0116] The environmental data in the greenhouse is regulated based on the intelligent control scheme.
[0117] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk, etc. Various media that can store program codes.
[0118] On the other hand, the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the greenhouse control method provided by the above methods, and the method includes:
[0119] Collect environmental data in the greenhouse;
[0120] Inputting the environmental data in the greenhouse into a pre-built large language model, and generating an intelligent control scheme; the large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determining the intelligent control scheme with the highest degree of matching with the user's needs among the plurality of intelligent control pre-selected schemes;
[0121] The environmental data in the greenhouse is regulated based on the intelligent control scheme.
[0122] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the greenhouse control method provided by the above methods, the method comprising:
[0123] Collect environmental data in greenhouses;
[0124] Inputting the environmental data in the greenhouse into a pre-built large language model, and generating an intelligent control scheme; the large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determining the intelligent control scheme with the highest degree of matching with the user's needs among the plurality of intelligent control pre-selected schemes;
[0125] The environmental data in the greenhouse is regulated based on the intelligent control scheme.
[0126] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. Greenhouse control system, characterized in that: include: Data acquisition module, used to collect environmental data in the greenhouse; A data processing module, used to input the environmental data in the greenhouse into a pre-built large language model and generate an intelligent control plan; The large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determines the intelligent control scheme with the highest degree of matching with the user needs among the plurality of intelligent control pre-selected schemes; The greenhouse control module is used to control the environmental data in the greenhouse based on the intelligent control scheme.
2. The greenhouse control system according to claim 1, characterized in that: The data acquisition module is also used to obtain the environmental data after filtering the collected raw data in the greenhouse.
3. The greenhouse control system according to claim 1, characterized in that: The data processing module is a cloud platform.
4. The greenhouse control system according to claim 1, characterized in that: The large language model is also used to adjust the intelligent control scheme according to the real-time changes of the environmental data in the greenhouse after the greenhouse control module controls the environmental data in the greenhouse.
5. The greenhouse control system according to claim 1, characterized in that: The large language model is also used for training based on the environmental data of the greenhouse and the corresponding intelligent control scheme.
6. The greenhouse control system according to claim 1, characterized in that: It also includes a display module, which is used to call the large language model to answer the user's question when the user asks a question.
7. The greenhouse control system according to claim 1, characterized in that: It also includes an early warning module, which is used to trigger an alarm when the environmental data in the greenhouse meets the alarm condition.
8. The greenhouse control system according to claim 1, characterized in that: The greenhouse control module includes a light control unit, a temperature control unit, a ventilation control unit and an irrigation control unit; The light control unit is used to control the light conditions of the greenhouse; The temperature control unit is used to control the temperature condition of the greenhouse; The ventilation control unit is used to control the ventilation conditions of the greenhouse; The irrigation control unit is used to control the moisture condition of the greenhouse.
9. A greenhouse control method, characterized in that: include: Collect environmental data in greenhouses; Inputting the environmental data in the greenhouse into a pre-built large language model and generating an intelligent control plan; The large language model generates a plurality of intelligent control pre-selected schemes based on the environmental data in the greenhouse, and determines the intelligent control scheme with the highest degree of matching with the user needs among the plurality of intelligent control pre-selected schemes; The environmental data in the greenhouse is regulated based on the intelligent control scheme.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the greenhouse control method as described in claim 9 is implemented.
Citation Information
Cited By
Prompt word reconstruction model training and retrieval enhancement generation method, device and equipment
CN120723861A
Greenhouse environment control method and system based on AI algorithm
CN120993999A
Greenhouse management device and method based on sensor array and large model
CN121028629A