CN117170706A - Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology - Google Patents

Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology Download PDF

Info

Publication number
CN117170706A
CN117170706A CN202311089583.5A CN202311089583A CN117170706A CN 117170706 A CN117170706 A CN 117170706A CN 202311089583 A CN202311089583 A CN 202311089583A CN 117170706 A CN117170706 A CN 117170706A
Authority
CN
China
Prior art keywords
ota
hong
upgrade
agricultural greenhouse
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311089583.5A
Other languages
Chinese (zh)
Inventor
熊正烨
罗玉海
王椿曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Ocean University
Original Assignee
Guangdong Ocean University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Ocean University filed Critical Guangdong Ocean University
Priority to CN202311089583.5A priority Critical patent/CN117170706A/en
Publication of CN117170706A publication Critical patent/CN117170706A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses an agricultural greenhouse measurement and control system based on a hong Mongolian system and an OTA technology, which belongs to the field of monitoring and controlling environmental data of agricultural greenhouses, and comprises the following components: a perception layer, a network layer and an application layer; the sensing layer is used for collecting environmental information data in the agricultural greenhouse and adding an OTA firmware upgrading function; the network layer is used for transmitting the environment information data to the application layer through a wireless network; the application layer is used for receiving the environment information data and forwarding the environment information data to the Web equipment management system, and interaction between a user and terminal equipment in the agricultural greenhouse is realized based on an OTA firmware upgrading function. According to the intelligent control system and the intelligent control method, an OTA firmware upgrading function is added in the greenhouse measurement and control system based on the hong Mongolian system, so that terminal system firmware is updated remotely through a network, the flexibility of system maintenance is improved, the maintenance cost of the Internet of things equipment is reduced, and the intelligent degree of the greenhouse is further improved.

Description

Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology
Technical Field
The application belongs to the technical field of monitoring and controlling environmental data of an agricultural greenhouse, and particularly relates to an agricultural greenhouse measurement and control system based on a hong Mongolian system and an OTA technology.
Background
The growth of crops needs a proper environment, and the proper growth conditions of different crops can be different, so that the real-time monitoring of environmental parameters by the agricultural Internet of things equipment deployed in the agricultural greenhouse is an important way for solving the problems. The technical scheme of the existing intelligent agricultural greenhouse has a certain result in the aspects of collecting and regulating environmental parameters of crop growth, but rarely relates to the OTA firmware upgrading function of agricultural Internet of things equipment, and has the problems of low flexibility, high maintenance cost and the like of the firmware upgrading of the Internet of things terminal.
When the agricultural Internet of things scheme is deployed, the Internet of things equipment needs to run custom system software to collect or execute data. However, as the requirements change, the system software may also need to be updated and improved, including software bug fixes, new functionality additions, and system security enhancements, among others. Generally, a large-area agricultural greenhouse planting base needs to be distributed with a plurality of pieces of Internet of things equipment, if the equipment needs to be maintained and upgraded, the equipment needs to be recovered and upgraded manually to the site, or the Internet of things technician needs to be upgraded to the site, so that the maintenance cost of the equipment is high, and the upgrading difficulty is high.
Disclosure of Invention
The application provides an agricultural greenhouse measurement and control system based on a hong Mongolian system and an OTA technology, which aims to solve the problems of low firmware upgrading flexibility, high maintenance cost, low intelligent monitoring degree in the environment of a greenhouse and the like of an agricultural greenhouse Internet of things terminal in the prior art.
In order to achieve the above purpose, the application provides an agricultural greenhouse measurement and control system based on a hong Monte system and an OTA technology, comprising: a perception layer, a network layer and an application layer;
the sensing layer is used for collecting environmental information data in the agricultural greenhouse and adding an OTA firmware upgrading function;
the network layer is used for transmitting the environment information data to the application layer through a wireless network;
the application layer is used for receiving the environment information data and forwarding the environment information data to the Web equipment management system, and interaction between a user and terminal equipment in the agricultural greenhouse is realized based on an OTA firmware upgrading function.
Preferably, the terminal device is a plurality of sensors.
Preferably, the sensing layer includes: a main program and a sensor acquisition subprogram;
the main program is used for establishing wireless network connection, reporting the sensor measurement data and processing remote control commands through a wireless network;
the sensor acquisition subprogram is used for reading and updating the sensor measurement data;
the perception layer adopts Hi3861 hardware to carry a hong Monte system.
Preferably, the application layer adopts an MQTT server, and the MQTT server is configured to send an OTA upgrade request to a terminal device.
Preferably, an OTA firmware upgrading function is added to the main program, and the OTA firmware upgrading function is used for upgrading the OTA firmware of the terminal device through a wireless network based on the OTA upgrading request, generating an OTA file, and calling an upgrading interface of the hong Monte system based on the OTA file to complete upgrading.
Preferably, in the function of upgrading the OTA firmware, a terminal device end is used as a client end, an OTA server end is used as a server end, a client/server architecture is adopted, and information transmission and data interaction are realized through a socket.
Preferably, the method further comprises: and the upgrade file signature verification is used for generating a signed OTA file based on an RSA algorithm and verifying the signature successfully.
Compared with the prior art, the application has the following advantages and technical effects:
the application provides an agricultural greenhouse measurement and control system based on a hong Mongolian system and an OTA technology, which collects environmental information data in an agricultural greenhouse through a sensing layer; transmitting the environmental information data to an application layer by adopting a wireless network through a network layer; and the application layer receives the environmental information data and forwards the environmental information data to the Web equipment management system, so that interaction between the user and terminal equipment in the agricultural greenhouse is realized.
According to the intelligent control system and the intelligent control method, an OTA firmware upgrading function is added in the greenhouse measurement and control system based on the hong Mongolian system, and the terminal system firmware is updated remotely through the network, so that the flexibility of system maintenance is improved, the maintenance cost of the Internet of things equipment is reduced, and the intelligent degree of the greenhouse is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
FIG. 1 is a schematic diagram of a system hierarchy in accordance with an embodiment of the present application;
FIG. 2 is a flowchart of a main process according to an embodiment of the present application;
FIG. 3 is a signature flow of an OTA file according to an embodiment of the present application;
fig. 4 is a signature verification process of an OTA file according to an embodiment of the present application;
fig. 5 is a flowchart of an OTA firmware upgrade according to an embodiment of the application.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
Example 1
As shown in fig. 1, in this embodiment, an agricultural greenhouse measurement and control system based on a hong Mongolian system and an OTA technology is provided, and in this embodiment, MQTT (Message Queuing Telemetry Transport, message queue telemetry transmission) is used as a transmission protocol, and the agricultural greenhouse measurement and control system is logically divided into three layers, namely, a perception layer, a network layer and an application layer from bottom to top.
The perception layer adopts Hi3861 hardware to carry a hong Meng system and is responsible for collecting environmental parameters of a greenhouse, such as environmental information data of air temperature and humidity, illumination intensity, carbon dioxide concentration and the like, and then the environmental information data is transmitted to an application layer MQTT server through a network layer WiFi wireless network, and then the information is forwarded to a Web equipment management system by the MQTT server. The Web equipment management system provides Web services, and a user can interact with terminal equipment in the agricultural greenhouse through a browser.
1. Device side programming
In this embodiment, hi3861 hardware is adopted to mount a hong Mongolian system based on OpenHarmony3.0 source code, and a program customized by a device developer is implanted in the hong Mongolian system. After the equipment is powered on, initializing a hong Monte system, and then entering a self-defined program comprising a main program and a sensor acquisition subprogram. The main program is used for establishing network connection, reporting sensor measurement data and processing remote control commands; the sensor acquisition subroutine is used to read and update sensor data. The main program flow is shown in fig. 2.
Initializing an MQTT client after initializing WiFi and establishing network connection, setting a message callback function address, establishing connection with the MQTT client according to the IP address and port number of the MQTT server, and subscribing the MQTT message of a specified theme; after that, the sensor data is updated regularly and whether uploading is needed is judged, if so, the sensor data is packaged in a JSON (JavaScript ObjectNotation, javaScript object representation) format and information is reported through an MQTT; if a message from the MQTT server is received, the system executes a message callback function. When the MQTT message is processed, the content of the message is analyzed to obtain a remote instruction type, and then related operations are executed according to the instruction type. If the instruction type is the equipment control instruction, further analyzing instruction parameters of equipment control, and controlling the state of the LED or the motor according to the parameters. If the instruction type is an OTA upgrade instruction, further analyzing the instruction parameters to obtain an IP address and a port number of the OTA server, connecting the OTA server according to the IP address and the port number, requesting and downloading an upgrade file, carrying out signature verification on the upgrade file, and calling an upgrade interface of the Hi3861 system to upgrade after the verification is passed.
OTA file signature and signature verification scheme design
In order to ensure the legality of the OTA file, the embodiment self-defines a file signature and signature verification method based on an RSA algorithm, and signs and verifies the OTA file in the upgrading process of OTA firmware so as to ensure the integrity and the security of OTA file data. The OTA file signature and signature verification method has certain universality and can be used for signature of other files.
The self-defined file signature format is:
(1) Signature file = original file + signature information
(2) Signature information = signature header information (44 bytes) +signature data (256 bytes)
(3) Signature header information = magic word (4 bytes) +key fingerprint (16 bytes) +signature time (7 bytes) +reserved (17 bytes); the magic word is defined as 0x3C4D5E6F as a signature mark, and can be used for quickly judging whether the file contains a signature or not; the key fingerprint is an MD5 value based on public key data; the signature time is the signature time of the file; the reserved field is reserved for future expansion.
Signature principle of file:
carrying out SHA-256 operation on the original file to obtain a hash value; filling the hash value into 256 bytes of data blocks using the PKCS #1 (v 1.5) standard; performing RSA encryption operation on the filled data block by using an RSA private key to obtain 256 bytes of signature data; generating signature information according to a self-defined signature format, and adding the signature information to the tail part of the original file to obtain a final signature file. The signature flow of the OTA file is shown in fig. 3.
The signature verification principle of files:
reading signature information from the tail part of the file, judging whether a signature mark exists or not, if the signature mark does not exist, the signature verification fails, and if the signature mark exists, the signature verification process is continued; taking out 256 bytes of ciphertext signature data, using an RSA public key to carry out RSA decryption operation, if decryption fails, checking the signature fails, and if decryption succeeds, continuing the signature checking flow; taking out a HASH value HASH1 of 32 bytes from the decrypted plaintext data; carrying out SHA-256 operation on the file content with the signature information removed by using the same method as the signature flow to obtain a HASH value HASH2; and comparing HASH1 with HASH2, if the signature verification fails, and if the signature verification fails, the signature verification is successful. The signing process of the OTA file is shown in fig. 4.
Method for realizing OTA firmware upgrading function
OTA (Over the Air) upgrade, i.e. over-the-air upgrade, provides the capability to upgrade the device remotely, helps hardware devices to update and expand functions quickly, and is essentially a system firmware upgrade through a network. The OTA firmware upgrading function of the embodiment is completed by the cooperation of the agricultural greenhouse Internet of things equipment end and the OTA server end, wherein an OTA server end program is embedded in a Web equipment management system developed based on Django, a user can log in the system through a browser to check greenhouse weather environment data, the greenhouse facilities can be correspondingly controlled, and the OTA firmware upgrading can be performed on the terminal equipment. By adopting a client/server (C/S) architecture, the equipment end is used as a client, the OTA server end is used as a server, and communication between two processes is realized through a socket, so that information transmission and data interaction are realized. The OTA firmware upgrade flow is shown in fig. 5.
The user enters an OTA upgrading page of the Web equipment management system through a Web browser, inputs an IP address and a port number of an OTA server end, selects an OTA file version to be upgraded, and initiates an upgrading request through HTTP. The Web equipment management system analyzes the parameters of the HTTP request, encapsulates the upgrade parameters in a JSON data format, and sends an OTA upgrade request to the equipment through the MQTT. After receiving the upgrade request, the device receives the message to obtain the IP address and port number of the OTA server, establishes socket connection with the OTA server, and then requests the OTA server to download the upgrade file. After receiving the socket request, the OTA server selects the OTA file with the signed corresponding version according to the request parameter, reads the OTA file data and sends the OTA file data to the equipment end. After the equipment downloads the upgrade file, signature verification is carried out on the file, the upgrade interface of the system is called to upgrade after verification is passed, and finally the equipment is restarted to finish upgrading.
The beneficial effects of the embodiment are that:
according to the embodiment, the OTA firmware upgrading function is added in the greenhouse measurement and control system based on the hong Mongolian system, and the terminal system firmware is updated remotely through the network, so that the flexibility of system maintenance is improved, the maintenance cost of the Internet of things equipment is reduced, and the intelligent degree of the greenhouse is improved.
Meanwhile, the embodiment self-defines a file signing and signing verification method based on an RSA algorithm, and the OTA file is signed and verified in the OTA firmware upgrading process, so that the integrity and legality of OTA file data are ensured, and the security of the system is enhanced. The file signing and signing checking method has certain universality and can be used for signing other files.
The present application is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present application are intended to be included in the scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (7)

1. An agricultural greenhouse measurement and control system based on a hong Mongolian system and an OTA technology is characterized by comprising: a perception layer, a network layer and an application layer;
the sensing layer is used for collecting environmental information data in the agricultural greenhouse;
the network layer is used for transmitting the environment information data to the application layer through a wireless network;
the application layer is used for receiving the environment information data and forwarding the environment information data to the Web equipment management system, wherein the Web equipment management system comprises an OTA server, and OTA firmware upgrading is carried out on terminal equipment in the agricultural greenhouse based on the OTA server.
2. The system for measuring and controlling agricultural greenhouses based on the hong Monte-and-go technology as recited in claim 1, wherein the terminal device comprises a plurality of sensors.
3. The agricultural greenhouse measurement and control system based on the hong Monte-and-go technology of claim 2, wherein the sensing layer comprises: a main program and a sensor acquisition subprogram;
the main program is configured to establish a wireless network connection, report the sensor measurement data through the wireless network, and process a remote control command, where the remote control command includes: a device control instruction and an OTA upgrade instruction;
the sensor acquisition subprogram is used for reading and updating the sensor measurement data;
the perception layer adopts Hi3861 hardware to carry a hong Monte system.
4. The agricultural greenhouse measurement and control system based on the hong Monte-Monte system and the OTA technology according to claim 3, wherein the application layer adopts an MQTT server, the MQTT server receives the environmental information data and forwards the environmental information data to a Web equipment management system, an upgrade parameter is selected on an OTA upgrade page of the Web equipment management system, and the MQTT server sends an OTA upgrade instruction to a terminal equipment based on the upgrade parameter.
5. The system according to claim 4, wherein in the process of upgrading the OTA firmware, the device terminal receives the OTA upgrading instruction and then analyzes the OTA upgrading instruction to obtain an IP address and a port number of the OTA server, requests the OTA server to download an upgrade file based on the IP address and the port number, downloads the upgrade file by the OTA server, then sends the upgrade file to the device terminal, and invokes an upgrade interface of the hong Monte system at the device terminal to complete the upgrade.
6. The system for measuring and controlling agricultural greenhouse based on hong Mongolian system and OTA technology as claimed in claim 5, wherein in the OTA firmware upgrading function, a terminal device end is used as a client end, an OTA server end is used as a server end, a client/server architecture is adopted, and information transmission and data interaction are realized through a socket.
7. The system for measuring and controlling agricultural greenhouse based on hong Monte-go system and OTA technology as set forth in claim 1, wherein the OTA server further comprises after downloading the upgrade file: and the upgrade file signature verification is used for signing the OTA file based on an RSA private key and is also used for verifying the signature mark of the OTA file based on an RSA public key.
CN202311089583.5A 2023-08-28 2023-08-28 Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology Pending CN117170706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311089583.5A CN117170706A (en) 2023-08-28 2023-08-28 Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311089583.5A CN117170706A (en) 2023-08-28 2023-08-28 Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology

Publications (1)

Publication Number Publication Date
CN117170706A true CN117170706A (en) 2023-12-05

Family

ID=88940431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311089583.5A Pending CN117170706A (en) 2023-08-28 2023-08-28 Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology

Country Status (1)

Country Link
CN (1) CN117170706A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150160937A1 (en) * 2012-06-04 2015-06-11 Oracle International Corporation System and method for supporting in-band/side-band firmware upgrade of input/output (i/o) devices in a middleware machine environment
CN105933150A (en) * 2016-04-20 2016-09-07 努比亚技术有限公司 OTA upgrade method, device and system
CN110362328A (en) * 2019-07-17 2019-10-22 腾讯科技(深圳)有限公司 The method, apparatus and computer equipment of OTA upgrading
CN111240925A (en) * 2019-12-30 2020-06-05 昆明尚禾农业科技有限公司 Agricultural automation equipment monitoring operation and maintenance system
CN114371746A (en) * 2021-11-16 2022-04-19 江苏巨门星智能科技有限公司 Greenhouse planting remote monitoring management system based on internet of things technology

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150160937A1 (en) * 2012-06-04 2015-06-11 Oracle International Corporation System and method for supporting in-band/side-band firmware upgrade of input/output (i/o) devices in a middleware machine environment
CN105933150A (en) * 2016-04-20 2016-09-07 努比亚技术有限公司 OTA upgrade method, device and system
CN110362328A (en) * 2019-07-17 2019-10-22 腾讯科技(深圳)有限公司 The method, apparatus and computer equipment of OTA upgrading
CN111240925A (en) * 2019-12-30 2020-06-05 昆明尚禾农业科技有限公司 Agricultural automation equipment monitoring operation and maintenance system
CN114371746A (en) * 2021-11-16 2022-04-19 江苏巨门星智能科技有限公司 Greenhouse planting remote monitoring management system based on internet of things technology

Similar Documents

Publication Publication Date Title
US11974204B2 (en) Method for sharing application between terminals, and terminal
CN109561118B (en) Software upgrading method, device, system, storage medium, electronic equipment and vehicle
CN107239288B (en) Version upgrading method and device for mobile terminal
WO2018236507A1 (en) Device with embedded certificate authority
RU2008144691A (en) SYSTEM AND METHOD FOR UPDATING THE PROGRAM FOR MOBILE TERMINAL WITH OTA SUPPORT
KR101281825B1 (en) Apparatus and method that enhance security using virtual interface in cloud system
CN112912847B (en) Method and related device for over-the-air upgrading
CN107332932B (en) Robot system remote upgrading method based on FOTA
CN111064720B (en) Method and device for converting configuration gateway data protocol
BRPI0611788A2 (en) Equipment and Methods for Managing Firmware Verification on a Wireless Device
US20050149923A1 (en) System update protocol
CN108280341B (en) Channel number adding and installation package checking method and device
GB2527465A (en) Air conditioning system
CN105072398B (en) A kind of device updating method and device
CN112104501A (en) Remote software upgrading method for agricultural machinery subsoiling Internet of things terminal equipment
EP3809259A1 (en) Network node firmware update
US20170280641A1 (en) Controlling Water Installation Devices
CN115134684A (en) Remote upgrading method, system and device for water meter centralized reading equipment
CN117170706A (en) Agricultural greenhouse measurement and control system based on hong Mongolian system and OTA technology
KR102034427B1 (en) IoT Device and It's Firmware Update Method
US20140371533A1 (en) Endoscope device and endoscope system
US10073675B2 (en) Control unit for a motor vehicle, programming unit, and programming system
CN115878144A (en) Terminal equipment program upgrading system and method
CN108989428A (en) Bluetooth terminal upgrade method, server, computer readable storage medium and system
CN114115943A (en) Version updating method, system, medium and equipment supporting breakpoint continuous transmission

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination