A method and device for IOT communication based on a honkong system
Patent Information
- Application Number
- CN202410810789.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-06-21
AI Technical Summary
[0004]本申请提供一种基于鸿蒙系统的物联网通信方法和设备,以解决当前的物联网的建立需要更换所有的物理设备和传感器更换的情况发生,造成现有的写字楼、厂房、实验室等区域的物联网构建成本高企的问题
[0019]本申请提供一种基于鸿蒙系统的物联网通信方法和设备,通过物联控制器接收来自传感器的检测信号,实现采用物联控制器对传感器的检测信号进行管理,实现了避免传感器直接将信号发送给终端,导致终端无法识别该检测信号的情况发生的有益效果。
Smart Images

Figure CN118381804B_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, and more particularly to an Internet of Things (IoT) communication method and device based on the HarmonyOS system. Background Technology
[0002] The Internet of Things (IoT) is a broad field of technology. Its core is to connect various physical devices, sensors, and other "things" through the Internet to achieve information collection, exchange, and intelligent management, thus promoting the deep integration of informatization, networking, and intelligence.
[0003] However, current IoT is usually built on a set of physical devices and sensors. Office buildings, factories, laboratories and other areas are already equipped with enough physical devices and sensors. However, the brands and models of these physical devices and sensors are not completely compatible, which makes it impossible for different brands and models of physical devices and sensors to communicate with each other. This leads to the need to replace all physical devices and sensors when building IoT in these areas, resulting in high construction costs for IoT in existing office buildings, factories, laboratories and other areas. Summary of the Invention
[0004] This application provides an IoT communication method and device based on the HarmonyOS system to solve the problem that the establishment of the current Internet of Things requires the replacement of all physical devices and sensors, resulting in high construction costs for the Internet of Things in existing office buildings, factories, laboratories and other areas.
[0005] Firstly, this application provides an IoT communication method based on the HarmonyOS system, including: The IoT controller receives a detection signal from a sensor; wherein the detection signal records at least one detection voltage of the sensor's detection area under an environmental condition; the types of environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance; the detection voltage is used to characterize the degree of an environmental condition at a point in time. The IoT controller calculates the detection voltage in the detection signal based on at least one sensing function corresponding to the detection signal to obtain a corrected detection voltage; wherein, the corrected detection voltage is a voltage value formed by correcting the detection voltage at at least one acquisition point. The IoT controller assigns an IP address to the calibration detection voltage based on the sensor's identity information; wherein, the IP address is used to characterize the control area where the sensor's detection area is located; the control area is the area where the terminal adjusts the environmental conditions; the control area includes at least one detection area; The IoT controller generates a control signal based on the calibration detection voltage and the IP address, and sends the control signal to the terminal; wherein, the control signal is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard; The IoT controller is equipped with the HarmonyOS system. The HarmonyOS system is used to calculate the detection voltage in the detection signal according to at least one sensing function corresponding to the detection signal to obtain a corrected detection voltage. The HarmonyOS system is also used to assign an IP address to the corrected detection voltage based on the identity information of the sensor. The HarmonyOS system is also used to generate a control signal according to the corrected detection voltage and the IP address, and send the control signal to the terminal.
[0006] In one possible implementation, the IoT controller calculates the detection voltage in the detection signal based on at least one sensing function corresponding to the detection signal to obtain a corrected detection voltage, including: The IoT controller retrieves at least one sensing function corresponding to the detection signal from a preset function library based on the type of environmental condition of the detection signal; wherein, the function library includes at least one sensing function; the at least one sensing function includes: mean function, median function, and variance function; The IoT controller calculates at least one detection voltage in the detection signal based on at least one sensing function obtained, to obtain the corrected detection voltage; The IoT controller assigns an IP address to the calibration detection voltage based on the sensor's identity information, including: The IoT controller acquires a region identifier for identity information and obtains an IP set corresponding to the region identifier; wherein, the region identifier represents the detection area of the sensor; the IP set includes at least one IP address; the IP set corresponds to the control area; If the IoT controller determines that there is at least one free IP address in the IP set, it will assign one of the at least one free IP address to the correction detection voltage.
[0007] In one possible implementation, the IoT controller generates a control signal based on the calibration detection voltage and the IP address, including: The IoT controller acquires the environmental standard corresponding to the detection area of the detection signal, and generates analysis information based on the corrected detection voltage and the environmental standard; wherein, the environmental standard defines the numerical range of each environmental condition for each detection area within the control area; the analysis information is used to characterize the numerical relationship between the environmental condition of the corrected detection voltage and the environmental standard; If the IoT controller determines that the analysis information exceeds the stability standard corresponding to the environmental standard, it generates control information; the control information is data used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to the preset environmental standard; the stability standard defines a threshold value in each detection area within the control area that can trigger the terminal to adjust the environmental conditions within the control area. The IoT controller acquires the rule set corresponding to the IP set, determines the terminal based on the type of environmental condition recorded in the detection signal, and sets the encoding rule of the determined terminal as the target encoding rule; The IoT controller encodes the control information, the IP address, and the area identifier according to the target encoding rules to obtain the control signal.
[0008] Secondly, this application provides an IoT communication method based on the HarmonyOS system, including: The sensor receives a start command from the IoT controller; The sensor generates a detection signal according to the start command and sends the detection signal to the IoT controller. The detection signal records at least one detection voltage of the sensor's detection area under an environmental condition. The environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance. The detection voltage characterizes the degree of an environmental condition at a given sampling point. The detection signal also instructs the IoT controller to perform calculations on the detection voltage in the detection signal according to the sensing function corresponding to the detection signal to obtain a corrected detection voltage. The IoT controller assigns an IP address to the corrected detection voltage based on the sensor's identity information. The IoT controller generates a control signal based on the corrected detection voltage and the IP address and sends the control signal to the terminal. The corrected detection voltage is a voltage value formed after correcting the detection voltage at at least one sampling point. The IP address characterizes the control area where the sensor's detection area is located. The control area is the area where the terminal adjusts the environmental conditions. The control area includes at least one detection area. The control signal is an electrical signal instructing the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard.
[0009] The sensor is equipped with the HarmonyOS system, which is used to generate a detection signal according to the start command and send the detection signal to the IoT controller.
[0010] In one possible implementation, the sensor generates a detection signal according to the activation command and sends the detection signal to the IoT controller, including: The sensor obtains the time span based on the current timestamp and the previous timestamp; wherein, the current timestamp is the time when the sensor receives the start command this time; and the previous timestamp is the time when the sensor last received the start command. If the sensor determines that the time span exceeds a preset time threshold, it activates the environmental conditions of the sensor's detection area to generate a detection signal and sends the generated detection signal to the IoT controller. If the sensor determines that the time span has not exceeded the time threshold, it will send the detection signal that the sensor previously sent to the IoT controller back to the IoT controller.
[0011] Thirdly, this application provides an IoT communication method based on the HarmonyOS system, including: The terminal receives a control signal from the IoT controller and adjusts the environmental conditions of the sensor's detection area to a preset environmental standard based on the control signal. The control signal is generated by the IoT controller receiving a detection signal from a sensor, calculating the detection voltage in the detection signal according to the corresponding sensing function, obtaining a corrected detection voltage, assigning an IP address to the corrected detection voltage based on the sensor's identity information, and generating the signal based on the corrected detection voltage and the IP address. The detection signal records at least one detection voltage of the sensor's detection area under a given environmental condition. The environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance. The detection voltage characterizes the degree of an environmental condition at a given sampling point. The corrected detection voltage is a voltage value formed by correcting the detection voltage at at least one sampling point. The IP address characterizes the control area where the sensor's detection area is located. The control area is the region where the terminal adjusts the environmental conditions. The control area includes at least one detection area. The control signal is an electrical signal instructing the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard. The terminal is equipped with the HarmonyOS system, which is used to receive control signals from the IoT controller and adjust the environmental conditions of the sensor's detection area to a preset environmental standard based on the control signals.
[0012] In one possible implementation, the terminal receives a control signal from the IoT controller and adjusts the environmental conditions of the sensor's detection area to a preset environmental standard based on the control signal, including: When the terminal receives the control signal, it extracts the area identifier and control information from the control signal. The terminal determines the execution end of each terminal based on the region identifier; The terminal determines its output parameters based on the control information and enables the terminal to operate according to the output parameters in order to adjust the environmental conditions of the sensor's detection area to a preset environmental standard.
[0013] Fourthly, this application provides an IoT controller, including: a first receiver, a first processor, and a first transmitter; The first receiver is used to receive a detection signal from a sensor; wherein the detection signal records at least one detection voltage of the sensor's detection area under an environmental condition; the types of environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance; the detection voltage is used to characterize the degree of an environmental condition at a point in time. The first processor is used to calculate the detection voltage in the detection signal according to the sensing function corresponding to the detection signal to obtain a corrected detection voltage; wherein, the corrected detection voltage is a voltage value formed by correcting the detection voltage at at least one acquisition point; The first processor is further configured to assign an IP address to the calibration detection voltage based on the sensor's identity information; wherein the IP address is used to characterize the control area where the sensor's detection area is located; the control area is the area where the terminal adjusts environmental conditions; the control area includes at least one detection area; The first processor is further configured to generate a control signal based on the calibration detection voltage and the IP address, and the first transmitter is configured to send the control signal to the terminal; wherein, the control signal is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard; The IoT controller is equipped with the HarmonyOS system. The HarmonyOS system is used to calculate the detection voltage in the detection signal according to at least one sensing function corresponding to the detection signal to obtain a corrected detection voltage. The HarmonyOS system is also used to assign an IP address to the corrected detection voltage based on the identity information of the sensor. The HarmonyOS system is also used to generate a control signal according to the corrected detection voltage and the IP address, and send the control signal to the terminal.
[0014] Fifthly, this application provides a sensor, including: a second receiver, a second processor, and a second transmitter; The second receiver is used to receive a start command from the IoT controller; The second processor is used to generate a detection signal according to the start command, and the second transmitter is used to send the detection signal to the IoT controller; wherein, the detection signal records at least one detection voltage of the sensor's detection area under an environmental condition; the types of environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance; the detection voltage is used to characterize the degree of an environmental condition at a collection point; the detection signal is also used to instruct the IoT controller to perform calculations on the detection voltage in the detection signal according to the sensing function corresponding to the detection signal to obtain a correction detection voltage; The IoT controller assigns an IP address to the calibration detection voltage based on the sensor's identity information; the IoT controller generates a control signal based on the calibration detection voltage and the IP address, and sends the control signal to the terminal; the calibration detection voltage is a voltage value formed after correcting the detection voltage at at least one acquisition point; the IP address is used to characterize the control area where the sensor's detection area is located; the control area is the area where the terminal adjusts the environmental conditions; the control area includes at least one detection area; the control signal is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard; The sensor is equipped with the HarmonyOS system, which is used to generate a detection signal according to the start command and send the detection signal to the IoT controller.
[0015] Sixthly, this application provides a terminal, including: a third receiver and a third transmitter; The third receiver is used to receive control signals from the IoT controller, and the third transmitter is used to adjust the environmental conditions of the sensor's detection area to a preset environmental standard according to the control signals. The control signal is generated by the IoT controller receiving a detection signal from a sensor, calculating the detection voltage in the detection signal according to the sensing function corresponding to the detection signal to obtain a corrected detection voltage, assigning an IP address to the corrected detection voltage based on the sensor's identity information, and generating the signal based on the corrected detection voltage and the IP address. The detection signal records at least one detection voltage of the sensor's detection area under an environmental condition. The types of environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance. The detection voltage characterizes the degree of an environmental condition at a given sampling point. The corrected detection voltage is a voltage value formed by correcting the detection voltage at at least one sampling point. The IP address characterizes the control area where the sensor's detection area is located. The control area is the area where the terminal adjusts the environmental conditions. The control area includes at least one detection area. The control signal is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard. The terminal is equipped with the HarmonyOS system, which is used to receive control signals from the IoT controller and adjust the environmental conditions of the sensor's detection area to a preset environmental standard based on the control signals.
[0016] In a seventh aspect, this application provides a computer program product, including program code, which, when executed by a computer, is used to perform any of the implementations of the first and second aspects above.
[0017] Eighthly, this application provides a computer-readable storage medium including the program of the seventh aspect.
[0018] A ninth aspect provides a communication system comprising: an IoT controller as described in the first aspect or any possible implementation thereof; the system further comprising: a sensor as described in the second aspect or any possible implementation thereof; and the system further comprising: at least one terminal as described in the third aspect or any possible implementation thereof.
[0019] This application provides an IoT communication method and device based on the HarmonyOS system. The method receives detection signals from sensors through an IoT controller, thereby managing the sensor detection signals using the IoT controller. This achieves the beneficial effect of avoiding the situation where the sensor directly sends the signal to the terminal, causing the terminal to be unable to recognize the detection signal.
[0020] By calculating the detection voltage in the detection signal using the sensing function corresponding to the detection signal, a method for verifying the detection voltage is obtained. This eliminates erroneous or significantly erroneous detection voltages detected by the detection sensor during the detection period, thereby achieving the beneficial effect of eliminating detection errors and obtaining a corrected detection voltage that reflects the most accurate environmental conditions of the detection area.
[0021] The IoT controller assigns IP addresses to the calibration detection power supply based on the sensor's identity information to determine the source of the calibration detection voltage. This allows for accurate identification of the corresponding terminal to adjust the environmental conditions of the detection area. The IoT controller generates a control signal based on the detection signal and its IP address, and sends this signal to the terminal corresponding to that IP address. This enables the terminal to adjust the environmental conditions of the detection area, ensuring it meets environmental standards and allowing the terminal to recognize the control signal.
[0022] The IoT controller enables the construction of an Internet of Things (IoT) network in office buildings, factories, laboratories, and other areas based on the existing physical devices and sensors, thereby reducing the cost of IoT construction. Attached Figure Description
[0023] Figure 1 A schematic diagram of the structure of the IoT controller, sensor, terminal, detection area, and control area involved in an IoT communication method based on the HarmonyOS system provided in an embodiment of this application; Figure 2 A signaling diagram of an IoT communication method based on the HarmonyOS system provided in this application embodiment; Figure 3 This application provides a schematic diagram of the structure of an IoT controller in an IoT communication method based on the HarmonyOS system, as shown in the embodiments of this application. Figure 4 A schematic block diagram of an IoT controller provided in an embodiment of this application; Figure 5 A schematic block diagram of a sensor structure provided in an embodiment of this application; Figure 6 This is a schematic block diagram of a terminal structure provided in an embodiment of this application. Detailed Implementation
[0024] This application applies to the HarmonyOS system. HarmonyOS enables rapid discovery, connection, hardware collaboration, and resource sharing of various smart terminals that consumers encounter in all aspects of daily life through intelligent interconnection, providing a suitable user experience. HarmonyOS features include intelligent interconnection, hardware collaboration, and resource sharing. The system supports seamless collaboration between various devices, such as mobile phones, watches, televisions, and speakers, achieving interconnection and interoperability. Furthermore, HarmonyOS supports one-time development and multi-device deployment. Developers, based on a distributed application framework, can write logic code once and then deploy it on multiple terminals. The following explanations of some terms used in this application are provided to facilitate understanding by those skilled in the art. It should be noted that when the solutions of this application are applied to the HarmonyOS system, existing systems, or other systems that may emerge in the future, the names of IoT controllers, sensors, and terminals may change, but this does not affect the implementation of the solutions in this application.
[0025] Figure 1 This application provides an embodiment of an IoT communication method based on the HarmonyOS system, which includes the communication connections between an IoT controller, sensors, and terminals, as well as the relationships between sensors and detection areas, terminals and control areas, and detection areas and control areas. Specifically, the IoT controller is communicatively connected to at least one sensor 11 and at least one terminal. One sensor 11 is used to detect an environmental condition within a detection area, and one terminal is used to control at least one environmental condition within a control area, encompassing at least one detection area. A control area includes at least one detection area. Figure 1 The control area A shown includes detection area A1 and detection area A2. At least one terminal includes: terminal A1, terminal A2, terminal A3, and terminal A4. Terminals A1, A2, A3, and A4 are used to adjust the environmental conditions of detection areas A1 and A2 in control area A, respectively.
[0026] Figure 2 A signaling diagram of an IoT communication method based on the HarmonyOS system provided in this application embodiment is shown below. Figure 2 As shown, the method includes: S201: The sensor receives a start command from the IoT controller.
[0027] In this example, the sensor detects the environmental conditions of the detection area according to the start command sent by the IoT controller, obtains the detection signal, and realizes the beneficial effect of the IoT controller controlling the sensor. This allows users to set the detection cycle of each sensor in the IoT controller according to their needs, ensuring that the environmental detection frequency of the sensor can be effectively controlled.
[0028] An IoT controller is a control unit used in the Internet of Things (IoT) to process and transmit signals from sensors and terminals. The Internet of Things (IoT) refers to connecting any object to a network through information sensing devices such as RFID, infrared sensors, GPS, and laser scanners, according to agreed-upon protocols, to exchange and communicate information, thereby achieving intelligent identification, positioning, tracking, and monitoring functions.
[0029] S202: The sensor generates a detection signal according to the start command and sends the detection signal to the IoT controller; the detection signal records an environmental condition of the sensor's detection area; the types of environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index and illuminance.
[0030] In this example, the sensor is equipped with the HarmonyOS system, which generates a detection signal according to the startup command and sends the detection signal to the IoT controller. Therefore, the detection signal generated by the sensor can be directly recognized and used by the IoT controller, improving the interaction efficiency between the sensor and the IoT controller.
[0031] Specifically, at least one sensor provided in this application includes: An air temperature sensor is used to measure the temperature of air. The conversion from temperature to an electrical signal is typically achieved using thermocouples, resistance temperature detectors (RTDs) such as platinum resistance thermometers, or semiconductor temperature sensing elements. At least one detection voltage in the detection signal sent by the air temperature sensor characterizes the air temperature of the detected area during the detection period.
[0032] An air humidity sensor is used to measure the relative humidity of the air. Common types include capacitive humidity sensors and resistive humidity sensors (such as lithium chloride hygrometers and polymer humidity sensors). At least one detection voltage in the detection signal sent by the air humidity sensor characterizes the air humidity of the detection area during the detection period.
[0033] An air velocity sensor is used to measure the speed of airflow. Common types include hot-wire anemometers, pitot tube anemometers, and ultrasonic anemometers. At least one detection voltage in the detection signal sent by the air velocity sensor characterizes the air velocity in the detection area during the detection period.
[0034] Toxic gas concentration sensors are used to detect the concentration of toxic gases in the air, such as carbon monoxide (CO), hydrogen sulfide (H2S), sulfur dioxide (SO2), and nitrogen dioxide (NO2). These sensors may operate based on principles such as electrochemistry, semiconductors, infrared absorption, or catalytic combustion. At least one detection voltage in the detection signal sent by the toxic gas concentration sensor characterizes the concentration of toxic gases in the detection area during the detection period.
[0035] Particulate matter index sensors (commonly known as PM sensors) are used to measure the concentration of particulate matter in the air, particularly PM2.5 (particulate matter with a diameter of 2.5 micrometers or less) and PM10 (particulate matter with a diameter of 10 micrometers or less). These sensors typically operate using laser scattering or optical counting principles. At least one detection voltage in the detection signal sent by the particulate matter index sensor characterizes the particulate matter concentration in the detection area during the detection period.
[0036] Illuminance sensors are used to measure the intensity or brightness of light. Common types include photoresistors (photodiodes or phototransistors), silicon photovoltaic cells, and lux meters. At least one detection voltage in the detection signal sent by the illuminance sensor characterizes the intensity or brightness of light in the detected area during the detection period.
[0037] In a preferred embodiment, the sensor generates a detection signal according to a start command and sends the detection signal to the IoT controller, including: The sensor obtains the time span based on the current timestamp and the previous timestamp; where the current timestamp is the time when the sensor received the start command this time; the previous timestamp is the time when the sensor last received the start command. If the sensor determines that the time span exceeds a preset time threshold, it will activate the environmental conditions of the sensor's detection area to generate a detection signal and send the generated detection signal to the IoT controller. If the sensor determines that the time span has not exceeded the time threshold, it will send the detection signal that the sensor previously sent to the IoT controller back to the IoT controller.
[0038] In this example, the IoT controller may malfunction or be frequently triggered by the user, causing the sensor to receive a large number of start commands. This results in the sensor frequently collecting environmental information in the detection area, leading to a reduction in the sensor's lifespan, as well as blockage of the communication line between the IoT controller and the sensor.
[0039] In this example, the sensor obtains the time span based on the current timestamp and the previous timestamp. If the sensor determines that the time span exceeds a preset time threshold, it detects the environmental conditions in the sensor's detection area to generate a detection signal and sends the generated detection signal to the IoT controller. The descendant of the two activation signals for time spans that do not exceed the time threshold is set as an abnormal activation signal, and the detection signal previously sent by the sensor to the IoT controller is sent to the IoT controller again. The two activation signals for time spans that exceed the time threshold are set as normal activation signals, and the environmental conditions in the sensor's detection area are then activated to generate a detection signal.
[0040] Furthermore, if the sensor determines that the time span has not exceeded the time threshold, it will resend the detection signal previously sent by the sensor to the IoT controller, including: If the sensor determines that the time span has not exceeded the time threshold, it will obtain the number of times the detection signal previously sent by the sensor to the IoT controller will be sent to the IoT controller again. If the sensor determines that the number of attempts has not exceeded the limit, it will send the detection signal that the sensor previously sent to the IoT controller to the IoT controller again. If the sensor determines that the number of attempts exceeds the limit, it will activate the environmental conditions of the sensor's detection area to generate a detection signal and send the generated detection signal to the IoT controller.
[0041] In this example, if the IoT controller frequently sends start commands to the sensor, the sensor will repeatedly send the previously sent detection signal back to the IoT controller, causing the IoT controller to be unable to obtain the true environmental conditions of the monitored area, thus leading to sensor failure. To address this, by determining the number of times the previously sent detection signal is sent to the IoT controller, the sensor is allowed to start normally and collect environmental data when the number of attempts exceeds a certain limit. This ensures that even if the IoT controller malfunctions or is misoperated, the sensor will still function normally and will not fail.
[0042] S203: The IoT controller calculates the detection voltage in the detection signal based on at least one sensing function corresponding to the detection signal to obtain a corrected detection voltage; wherein, the corrected detection voltage is a voltage value formed by correcting the detection voltage at at least one acquisition point.
[0043] In this example, the detection voltage in the detection signal is a voltage signal generated by a sensor that detects environmental conditions at at least one acquisition point within a preset detection period. The detection signal from the sensor is received by the IoT controller, which manages the sensor's detection signal and avoids the sensor directly sending the signal to the terminal, which would prevent the terminal from recognizing the detection signal.
[0044] The detection voltage in the detection signal is calculated by the sensing function corresponding to the detection signal to obtain a method for verifying the detection voltage. This method eliminates erroneous or large-error detection voltages detected by the detection sensor during the detection period, thereby eliminating detection errors and obtaining a corrected detection voltage that reflects the most accurate environmental conditions of the detection area.
[0045] In a preferred embodiment, the IoT controller performs calculations on the detection voltage in the detection signal based on at least one sensing function corresponding to the detection signal to obtain a corrected detection voltage, including: The IoT controller retrieves at least one sensing function corresponding to the detected signal from a pre-set function library based on the type of environmental condition of the detected signal; wherein, the function library includes at least one sensing function; the at least one sensing function includes: mean function, median function and variance function; The IoT controller performs calculations on at least one detection voltage in the detection signal based on at least one acquired sensing function to obtain a corrected detection voltage.
[0046] In this example, the mean function is used to calculate the average of a set of data, which is the sum of all data points divided by the number of data points.
[0047] The median function is used to find the median of a set of data, which is the middle value after sorting. If the number of data points is even, the median is the average of the two middle values.
[0048] The variance function measures the dispersion of data, that is, how much the data points deviate from the mean. Variance is the average of the squared deviations.
[0049] For example, when the environmental condition of the detected signal is air temperature, the corresponding sensing functions include a mean function and a variance function. The variance function is called to calculate the voltage variance of at least one detected voltage in the detected signal. If the voltage variance does not exceed a preset variance threshold, the mean function is called to calculate the voltage mean of at least one detected voltage, and this voltage mean is set as the calibration detection voltage. If the voltage variance exceeds the preset variance threshold, a start command is sent to the sensor again.
[0050] When the environmental condition of the detected signal is air humidity, the corresponding sensing functions include: a mean function and a variance function. The variance function is used to calculate the voltage variance of at least one detected voltage in the signal. If the voltage variance does not exceed a preset variance threshold, the mean function is used to calculate the voltage mean of at least one detected voltage, and this voltage mean is set as the calibration voltage. If the voltage variance exceeds the preset variance threshold, a start command is sent to the sensor again.
[0051] When the environmental condition detected is airflow velocity, the corresponding sensing functions include a mean function and a variance function. The variance function is used to calculate the voltage variance of at least one detected voltage in the signal. If the voltage variance does not exceed a preset variance threshold, the mean function is used to calculate the average voltage of at least one detected voltage, and this average voltage is set as the calibration voltage. If the voltage variance exceeds the preset variance threshold, a start command is sent to the sensor again.
[0052] When the environmental condition detected is a toxic gas content, the corresponding sensing functions include a median function and a variance function. The variance function is used to calculate the voltage variance of at least one detected voltage in the signal. If the voltage variance does not exceed a preset variance threshold, the median function is used to calculate the median voltage of at least one detected voltage, and this median voltage is set as the calibration detection voltage. If the voltage variance exceeds the preset variance threshold, a start command is sent to the sensor again.
[0053] When the environmental condition detected is particulate matter, the corresponding sensing functions include a median function and a variance function. The variance function is used to calculate the voltage variance of at least one detected voltage in the signal. If the voltage variance does not exceed a preset variance threshold, the median function is used to calculate the median voltage of at least one detected voltage, and this median voltage is set as the calibration voltage. If the voltage variance exceeds the preset variance threshold, a start command is sent to the sensor again.
[0054] When the environmental condition for detecting the signal is illuminance, the corresponding sensing function includes: a mean function. The mean function is called to calculate the average voltage of at least one detected voltage, and this average voltage is then set as the calibration voltage.
[0055] For details, please refer to Figure 1 and Figure 3The IoT controller 3 includes: a microcontroller 31, an input terminal block 32, an output terminal block 33, an RS-485 transmission chip 34, a network cable interface 35, a Bluetooth module 36, a WIFI module 37, and a DC2 module 38; the input terminal block 32 is used to connect to the sensor and to receive the detection signal sent by the sensor; the output terminal block 33 is used to connect to the terminal and to send control information to the terminal.
[0056] The microcontroller 31 is connected to the input terminal 32 and the output terminal 33; optionally, the microcontroller 31 is equipped with the HarmonyOS system.
[0057] The RS-485 transmission chip 34 is connected to the network cable interface 35, the Bluetooth module 36, and the WIFI module 37. The RS-485 transmission chip 34 is connected to the sensor through one or more of the network cable interface 35, the Bluetooth module 36, and the WIFI module 37 for configuring the sensor.
[0058] DC module 38 is connected to microcontroller 31 and RS-485 chip 34 respectively. DC module is used to connect to power supply to power IoT controller.
[0059] The process of configuring sensors through an IoT controller includes: The sensor will have its firmware downloaded internally before leaving the factory. The firmware includes the built-in HarmonyOS embedded operating system and web server.
[0060] At the project site, the sensor's software parameters and network communication can be configured via RS485 bus protocol or a web page (configuration can be modified via WIFI by default). The sensor's firmware can also be remotely upgraded and maintained online via wireless LAN.
[0061] Configure the sensor parameters using a laptop or handheld terminal device on site: (1) Configure the IP channel of WIFI; (2) Configure network security authentication (the AP manufacturer, Huawei, needs to provide a configuration and security authentication scheme). After the security authentication is passed, the sensor can communicate with the IoT controller through the on-site wireless AP device.
[0062] It's important to note that HarmonyOS achieves rapid discovery, connection, hardware collaboration, and resource sharing across various smart devices consumers encounter in all aspects of daily life through intelligent interconnection, providing a suitable user experience. HarmonyOS features include intelligent interconnection, hardware collaboration, and resource sharing. The system supports seamless collaboration between various devices, such as mobile phones, watches, TVs, and speakers, enabling interconnection and interoperability. Furthermore, HarmonyOS supports "develop once, deploy across multiple platforms," allowing developers to write the logic code once based on a distributed application framework and then deploy it on multiple terminals.
[0063] S204: The IoT controller assigns an IP address to the calibration detection voltage based on the sensor's identity information; wherein, the IP address is used to characterize the control area where the sensor's detection area is located; the control area is the area where the terminal adjusts the environmental conditions; the control area includes at least one detection area.
[0064] In this example, the IoT controller assigns IP addresses to the calibration detection voltage based on the sensor's identity information to determine the source of the calibration detection voltage, so that the corresponding terminal can be accurately located to adjust the environmental conditions of the detection area.
[0065] In a preferred embodiment, the IoT controller assigns an IP address to the calibration detection voltage based on the sensor's identity information, including: The IoT controller obtains the area identifier of the identity information and the IP set corresponding to the area identifier; wherein, the area identifier represents the detection area of the sensor; the IP set includes at least one IP address; the IP set corresponds to the control area; If the IoT controller determines that there is at least one free IP address in the IP set, it will assign one of the at least one free IP address to the correction detection voltage.
[0066] In this example, the IoT controller obtains the area identifier of the identity information and the set of IPs corresponding to the area identifier to ensure that the control area corresponding to the subsequently allocated IP address includes the detection area of the sensor.
[0067] If the IoT controller determines that there is at least one free IP address in the IP set, it will allocate one of the at least one free IP address to the calibration detection voltage. This will enable control over the processing volume of subsequent calibration detection voltages and prevent the IoT controller from becoming too complex due to excessive parallel processing of calibration detection voltages, which could lead to crashes or freezes.
[0068] Specifically, the area identifier is a character or string that represents the detection area of the sensor, for example: A1; A is to control area A, and 1 refers to detection area number 1 in the control area.
[0069] IP sets correspond to control regions. For example, IP set A corresponds to control region A.
[0070] The IP addresses in IP set A are used to assign detection messages to sensors in detection areas A1-A10 within control area A.
[0071] S205: The IoT controller generates a control signal based on the calibration detection voltage and IP address, and sends the control signal to the terminal; the control signal is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard.
[0072] In this example, the IoT controller generates a control signal based on the calibration detection voltage and IP address, and sends the control signal to the terminal corresponding to the IP address. This allows the terminal to adjust the environmental conditions of the detection area so that the environmental conditions of the detection area can meet the environmental standards. It also ensures that the terminal can recognize the control signal.
[0073] The IoT controller is equipped with the HarmonyOS system. The HarmonyOS system is used to calculate the detection voltage in the detection signal based on at least one sensing function corresponding to the detection signal, thereby obtaining a corrected detection voltage. The HarmonyOS system is also used to assign an IP address to the corrected detection voltage based on the sensor's identity information. Furthermore, the HarmonyOS system is used to generate a control signal based on the corrected detection voltage and the IP address, and send the control signal to the terminal. By installing the HarmonyOS system in the IoT controller, the IoT controller can directly identify the detection signal sent by the sensor without decoding, enabling seamless interaction and communication between each device in the Internet of Things.
[0074] In a preferred embodiment, the IoT controller generates a control signal based on the calibration detection voltage and the IP address, including: The IoT controller acquires the environmental standard corresponding to the detection area of the detection signal, and generates analysis information based on the calibration detection voltage and the environmental standard. The environmental standard defines the numerical range of each environmental condition for each detection area within the control area. The analysis information is used to characterize the numerical relationship between the environmental condition and the environmental standard for the calibration detection voltage. If the IoT controller determines that the analyzed information exceeds the stability standard corresponding to the environmental standard, it generates control information. The control information is data used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to the preset environmental standard. The stability standard defines the numerical threshold values in each detection area within the control area that can trigger the terminal to adjust the environmental conditions within the control area. The IoT controller obtains the rule set corresponding to the IP set, determines the terminal based on the type of environmental condition recorded in the detection signal, and sets the encoding rule of the determined terminal as the target encoding rule; The IoT controller encodes control information, IP address, and area identifier according to the target encoding rules to obtain control signals.
[0075] In this example, the IoT controller obtains the environmental standard corresponding to the detection area of the detection signal, and determines whether the environmental condition of the current detection area deviates from the user's predetermined environmental standard by generating analysis information based on the corrected detection voltage and environmental standard.
[0076] If the IoT controller determines that the analyzed information exceeds the corresponding stability standard of the environment, it will generate control information to activate the terminal only when the environmental conditions exceed the stability standard, thus avoiding the terminal being frequently started and stopped, which would cause energy waste.
[0077] Since there are many different types, models, and brands of terminals, each type, brand, and model of terminal may follow different encoding rules. Therefore, the IoT controller obtains the rule set corresponding to the IP set and determines the target encoding rule based on the detection signal to obtain the encoding rule of the terminal corresponding to the control area where the detection area is located, ensuring that the generated control signal can be recognized and used by the terminal.
[0078] For example, the rule set corresponding to the IP set has at least one terminal for controlling the environmental conditions of the control area A, such as: air conditioning equipment A, fresh air system A, air filtration system A, automatic curtain A; If the environmental conditions recorded in the detection signal are air temperature and air humidity, then the identified terminal is air conditioning device A. Therefore, the coding rule for air conditioning device A is set as the target coding rule. If the environmental conditions recorded in the detection signal are air velocity and toxic gas content, then the identified terminal is fresh air system A. Therefore, the coding rule for fresh air system A is set as the target coding rule. If the environmental condition recorded in the detection signal is a particulate matter index, then the identified terminal is air filtration system A. Therefore, the coding rule for air filtration system A is set as the target coding rule.
[0079] If the type of environmental condition recorded in the detection signal is illuminance, then the identified terminal is automatic curtain A. Therefore, the encoding rule for automatic curtain A is set as the target encoding rule.
[0080] Specifically, environmental standards are numerical ranges defined by users for each environmental condition in each detection area of each control area, according to their needs; for example: A1-temperature-[16℃-20℃], which represents the temperature of detection area 1 in control area A, controlled between 16℃ and 20℃.
[0081] The numerical relationships represented by the analysis information include: included in, greater than, and less than; among them, included in represents the environmental conditions of the correction detection voltage being within the corresponding environmental standard numerical range. For example, if the air temperature represented by the correction detection voltage is 18℃, then it will be included in A1-temperature-[16℃-20℃].
[0082] The environmental conditions that exceed the calibration test voltage are greater than the upper limit of the corresponding environmental standard's numerical range. For example, if the air temperature represented by the calibration test voltage is 23℃, then it will be 3℃ higher than the A1-temperature-[16℃-20℃] higher standard.
[0083] The environmental condition characterized by the calibration test voltage is less than the lower limit of the corresponding environmental standard value range. For example, if the air temperature characterized by the calibration test voltage is 13℃, then it will be 3℃ lower than the environmental standard A1-temperature-[16℃-20℃].
[0084] The stability standard defines the threshold values for each environmental condition within the control area that trigger the terminal to adjust the control area's environmental conditions. For example, based on the above example, the stability standard includes: A1 - Temperature - Upper limit threshold 2℃ and Lower limit threshold 5℃. If the air temperature represented by the calibration detection voltage is 23℃, then it is greater than the upper limit of A1 - Temperature [16℃-20℃] by 3℃. Since it is greater than the upper limit threshold, the terminal will be activated to control the temperature. If the air temperature represented by the calibration detection voltage is 13℃, then it is less than the lower limit of A1 - Temperature [16℃-20℃] by 3℃. Since it is less than the lower limit threshold, the terminal will not be activated. Similarly, there are calibration detection voltages, environmental standards, and stability standards for air temperature, air humidity, air velocity, toxic gas content, particulate matter, and illuminance.
[0085] Control information is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard. Therefore, the terminal can use at least one output rule to adjust the environmental conditions of each detection area within the control area. The output rule includes at least one out-of-limit indicator and output parameters corresponding to each out-of-limit indicator. The out-of-limit indicator represents the degree to which the environmental conditions of the correction detection voltage exceed the environmental standard. The output parameter refers to the parameter configuration used by the terminal to adjust the environmental conditions of the detection area within the control area to the environmental standard. For example, if the out-of-limit indicator exceeds the upper limit threshold of the stable standard by 1°C (e.g., 23°C), its output parameter is 2°C lower than the upper limit of the environmental standard (e.g., the output temperature of an air conditioner is 18°C); if the out-of-limit indicator exceeds the upper limit threshold of the stable standard by 2°C (e.g., 24°C), its output parameter is 3°C lower than the upper limit of the environmental standard (e.g., the output temperature of an air conditioner is 17°C).
[0086] Encoding rules are computer rules that encode information into different voltage levels or voltage variation patterns to transmit data via electrical signals. In this embodiment, the encoding rules include: NRZ (Non-Return-to-Zero) coding rule: Logic 0 and logic 1 are represented by two different voltage levels, which remain constant throughout the bit cycle. It is simple to implement, but prolonged high or low levels can lead to synchronization problems.
[0087] NRZ-I (Invert) rule: Logic 0 maintains the current voltage level, while logic 1 performs a level transition (high to low or low to high). Level changes provide clock synchronization information, reducing synchronization problems.
[0088] Return-to-Zero (RZ) encoding rule: The voltage signal of each bit returns to zero level within the bit cycle. Logic 0: low level to zero level. Logic 1: high level to zero level. Better clock synchronization, but requires higher bandwidth.
[0089] Manchester encoding rules: There is a level transition in the middle of each bit cycle. Logic 0: High to low transition. Logic 1: Low to high transition. It is self-synchronizing and has strong anti-interference capabilities, but has higher bandwidth requirements.
[0090] Differential Manchester encoding rules: There is a level transition at the center of each bit cycle. Logic 0: No transition at the beginning of the bit. Logic 1: Transition at the beginning of the bit. Similar to Manchester encoding, but more resistant to interference.
[0091] 4B / 5B encoding rule: Encode 4 bits of data into 5 bits of code to ensure at least one level change. This ensures sufficient level transitions for clock synchronization and is commonly used in Fast Ethernet.
[0092] PAM (Pulse Amplitude Modulation) rules: Different voltage levels represent different data values. For example, PAM-4 represents four voltage levels, each representing two bits. This increases the data rate but is more sensitive to signal noise and distortion.
[0093] MLT-3 (Multi-Level Transmit-3) encoding rules: Encoding is performed using three voltage levels (positive, neutral, and negative). The order of level changes is: 0 → + → 0 → - → 0. This reduces bandwidth requirements and is suitable for high-speed Ethernet (100BASE-TX).
[0094] Bi-phase code rules: Includes Manchester encoding and differential Manchester encoding, ensuring one level change in each bit. Self-synchronizing, suitable for high-speed communication.
[0095] Symbol Interval Coding rule: An interval (zero level) is inserted between symbols to provide clock information. Suitable for T1 / E1 line encoding, such as B8ZS and HDB3. It solves the problem of no voltage level change for extended periods and is suitable for long-distance transmission.
[0096] Symbol mapping rules map data to specific voltage symbols, such as QAM (Quadrature Amplitude Modulation). QAM uses a combination of phase and amplitude to represent data. It efficiently utilizes bandwidth and is suitable for modern high-speed communication systems.
[0097] The control signal includes: control information, IP address, and area identifier; the control information records the over-limit indicators and output parameters; the IP address is used to identify the receiving terminal of the control signal; the area identifier is used to inform the terminal of the detection area for adjusting environmental conditions.
[0098] The control information is also used to instruct the terminal to adjust the environmental conditions of the detection area corresponding to the area identifier according to the output parameters; for example, the control information instructs the air conditioning equipment in control area A to adjust the output direction to detection area A1 and output cold air at a temperature of 18°C to detection area A1.
[0099] S206: The terminal receives control signals from the IoT controller and adjusts the environmental conditions of the sensor's detection area to the preset environmental standards according to the control signals.
[0100] In this example, the terminal adjusts parameters and starts operation based on control signals sent by the IoT controller to adjust the environmental conditions of the sensor's detection area to the environmental standard, achieving dynamic adjustment of the environmental conditions. The terminal is equipped with the HarmonyOS system, which receives control signals from the IoT controller and adjusts the environmental conditions of the sensor's detection area to the preset environmental standard based on these signals. Therefore, by installing HarmonyOS in the terminal, the terminal can directly acquire and recognize the control signals sent by the IoT controller, thereby improving the efficiency of information interaction between the IoT controller and the terminal.
[0101] In this embodiment, at least one terminal device includes: Air Conditioning Equipment: Air conditioning equipment is mainly used to regulate the temperature, humidity, airflow speed, and air quality of indoor air to achieve the desired comfortable environment. Air conditioning equipment typically consists of a refrigeration system, heating system, air supply system, exhaust system, and control system. It can absorb indoor heat and discharge it outdoors, or heat indoor air to provide the required temperature. Air conditioning equipment includes: independent air conditioners and central air conditioning systems. The actuators of an independent air conditioner include: a refrigeration system, heating system, air supply system, exhaust system, and control system. The actuator of an independent air conditioner includes: an air supply vent; the air supply vent is a device used by an independent air conditioner to guide the airflow of the air supply system, enabling the independent air conditioner to deliver air to each monitored area within the controlled area. The actuators of a central air conditioning system include: a refrigeration system, heating system, air supply system, exhaust system, and control system. The actuator of a central air conditioning system includes: an air conditioning fan coil unit; the air conditioning fan coil unit is a device installed in each monitored area of the central air conditioning system for delivering air.
[0102] A fresh air system is primarily used to supply fresh air to indoor spaces and exhaust stale air, maintaining freshness and circulation. It typically includes air inlets, exhaust vents, a blower, ductwork, and a control system. A fresh air system can automatically adjust the exchange of indoor and outdoor air as needed to ensure indoor air quality meets human health requirements. Fresh air systems include independent fresh air systems and central fresh air systems. The actuators of an independent fresh air system include air inlets, exhaust vents, a blower, ductwork, and a control system. The actuator of an independent fresh air system includes a fresh air supply vent, which guides the airflow from the exhaust vent, enabling the independent fresh air system to supply air to each monitored area within the controlled area. The actuators of a central fresh air system include air inlets, exhaust vents, a blower, ductwork, and a control system. The actuator of a central fresh air system includes a fresh air distribution plate, which is a device installed in each monitored area of the central fresh air system for supplying air.
[0103] Air Filtration System: An air filtration system is primarily used to remove pollutants such as particulate matter, bacteria, viruses, pollen, and odors from the air, improving indoor air quality. It typically consists of air filters, a blower, ductwork, and a control system. Air filters come in various types, including mechanical filters, electronic filters, and activated carbon filters, which can capture and remove air pollutants of different sizes and types. Air filtration systems can be used independently or in conjunction with air conditioning equipment or a fresh air system to enhance the overall air purification effect. Air filtration systems include independent filtration systems and central filtration systems. The actuators of an independent filtration system include: an air filter, a blower, ductwork, and a control system. The actuator of an independent filtration system includes: a filter air outlet; the filter air outlet is used by the independent filtration system to guide the airflow from the blower, enabling the independent filtration system to deliver air to each detection area within the control zone. The actuators of a central filtration system include: an air filter, a blower, ductwork, and a control system. The actuator of a central filtration system includes: a filter coil; the filter coil is a device installed in each detection area of the central filtration system for delivering air.
[0104] Automatic curtains: An automatic curtain system is an intelligent curtain control system that uses technologies such as motor drive, sensor control, and remote user control to achieve automatic opening and closing of curtains. Automatic curtains consist of actuators and actuator ends. The actuators of automatic curtains include a motor drive and a control system. The core of the motor drive is the motor itself, which is responsible for driving the opening and closing motion of the curtains. Motors are divided into DC motors and AC motors, and are usually connected to the control system. After receiving control information, they execute the action of opening or closing the curtains. The control system is the "brain" of the automatic curtain system, responsible for coordinating the work of the sensors and the motor. The control system can be a standalone intelligent controller or a central control console connected to a smart home system. When the sensor detects specific conditions, the control system sends a signal to the motor, causing it to start or stop, thereby achieving automatic opening and closing of the curtains. The actuator end of the automatic curtain includes at least one curtain, which is installed on the window of a detection area to adjust the illuminance of the detection area.
[0105] In a preferred embodiment, the terminal receives a control signal from the IoT controller and adjusts the environmental conditions of the sensor's detection area to a preset environmental standard according to the control signal, including: When the terminal receives a control signal, it extracts the area identifier and control information from the control signal. The terminal determines the execution end of each terminal based on the region identifier; The terminal determines its output parameters based on the control information and enables the terminal to operate according to the output parameters in order to adjust the environmental conditions of the sensor's detection area to the preset environmental standards.
[0106] In this example, the terminal determines the execution end based on the control signal to lock the area where environmental conditions need to be adjusted. The terminal's output parameters are determined through control information, thereby achieving the beneficial effect of targeted adjustment of the environmental conditions of each detection area in the control area.
[0107] Figure 4 This is a schematic block diagram of an IoT controller provided as an embodiment of this application. Figure 4 As shown, the IoT controller includes: a first receiver 41, a first processor 42, and a first transmitter 43; The first receiver 41 is used to receive a detection signal from a sensor; wherein the detection signal records at least one detection voltage of the sensor's detection area under an environmental condition; the types of environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance; the detection voltage is used to characterize the degree of an environmental condition at a point in time. The first processor 42 is used to calculate the detection voltage in the detection signal according to the sensing function corresponding to the detection signal to obtain the corrected detection voltage; wherein, the corrected detection voltage is a voltage value formed after correcting the detection voltage at at least one acquisition point; The first processor 42 is also used to assign an IP address to the calibration detection voltage based on the sensor's identity information; wherein, the IP address is used to characterize the control area where the sensor's detection area is located; the control area is the area where the terminal adjusts the environmental conditions; the control area includes at least one detection area; The first processor 42 is also used to generate control information based on the calibration detection voltage and IP address, and the first transmitter 43 is used to send the control information to the terminal; wherein, the control information is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard.
[0108] The first receiver 41, the first processor 42, and the first transmitter are installed in the microprocessor of the IoT controller. The first receiver 41 is connected to the input terminal block, and the first transmitter is connected to the output terminal block.
[0109] The IoT controller is equipped with the HarmonyOS system. The HarmonyOS system is used to calculate the detection voltage in the detection signal according to at least one sensing function corresponding to the detection signal to obtain a corrected detection voltage. The HarmonyOS system is also used to assign an IP address to the corrected detection voltage based on the identity information of the sensor. The HarmonyOS system is also used to generate a control signal according to the corrected detection voltage and the IP address, and send the control signal to the terminal.
[0110] Figure 5 This is a schematic block diagram of a sensor structure provided in an embodiment of this application. Figure 5 As shown, the sensor includes: a second receiver 51, a second processor 52, and a second transmitter 53; The second receiver 51 is used to receive the start command from the IoT controller; The second processor 52 is used to generate a detection signal according to the start command, and the second transmitter 53 is used to send the detection signal to the IoT controller. The detection signal records at least one detection voltage of the sensor's detection area under an environmental condition. Environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance. The detection voltage characterizes the degree of an environmental condition at a given acquisition point. The detection signal also instructs the IoT controller to calculate the detection voltage in the detection signal according to the sensing function corresponding to the detection signal, obtaining a corrected detection voltage. The IoT controller assigns an IP address to the corrected detection voltage based on the sensor's identity information. The IoT controller generates control information based on the corrected detection voltage and the IP address, and sends the control information to the terminal. The corrected detection voltage is a voltage value formed after correcting the detection voltage at at least one acquisition point. The IP address characterizes the control area where the sensor's detection area is located. The control area is the area where the terminal adjusts the environmental conditions. The control area includes at least one detection area. The control information is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard. The sensor is equipped with the HarmonyOS system, which is used to generate a detection signal according to the start command and send the detection signal to the IoT controller.
[0111] Figure 6 This is a schematic block diagram of a terminal provided in an embodiment of this application. Figure 4 As shown, the terminal includes: a third receiver 61 and a third transmitter 62; The third receiver 61 is used to receive control information from the IoT controller, and the third transmitter 62 is used to adjust the environmental conditions of the sensor's detection area to a preset environmental standard according to the control information. The control information is the detection signal received by the IoT controller from a sensor. The IoT controller calculates the detection voltage in the detection signal according to the sensing function corresponding to the detection signal to obtain a corrected detection voltage. The IoT controller assigns an IP address to the corrected detection voltage based on the sensor's identity information. The detection signal records at least one detection voltage of the sensor's detection area under a certain environmental condition. Environmental conditions include: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance. The detection voltage characterizes the degree of an environmental condition at a given acquisition point. The corrected detection voltage is a voltage value formed by correcting the detection voltage at at least one acquisition point. The IP address characterizes the control area where the sensor's detection area is located. The control area is the area where the terminal adjusts the environmental conditions. The control area includes at least one detection area. The control information is an electrical signal used to instruct the terminal to adjust the environmental conditions of the sensor's detection area to a preset environmental standard.
[0112] The terminal is equipped with the HarmonyOS system, which is used to receive control signals from the IoT controller and adjust the environmental conditions of the sensor's detection area to a preset environmental standard based on the control signals.
[0113] This application provides a communication system, which includes... Figure 4 The IoT controller provided Figure 5 Provided sensors and Figure 6 The provided terminal.
[0114] This application provides a computer-readable storage medium, including instructions or programs, which, when executed on a computer, cause the computer to perform the above-described actions. Figure 2 Each step in the process of IoT controllers, sensors, and terminals.
[0115] This application provides a computer-readable storage medium, including instructions or programs, which, when executed on a computer, cause the computer to perform the above-described actions. Figure 2 Each step in the process of IoT controllers, sensors, and terminals.
[0116] This application provides a computer program product, including program code, which, when executed by a computer, performs the above-described... Figure 2 Each step in the process of IoT controllers, sensors, and terminals.
[0117] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs), etc.
[0118] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0119] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An IoT communication method based on the HarmonyOS system, characterized in that, include: The IoT controller receives detection signals from multiple sensors; wherein, the detection signals record the detection voltage of the sensor's detection area under various environmental conditions; the environmental conditions include six types of parameters: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance; the detection voltage is used to characterize the degree of an environmental condition at a certain point in time. The IoT controller selects a corresponding combination of sensing functions from a pre-set function library based on the type of environmental condition detected by the signal, wherein: Air temperature, air humidity, and air velocity correspond to mean and variance functions, respectively. The median function and variance function corresponding to the content of toxic gases and particulate matter; Illuminance corresponds to the mean function; The IoT controller uses a selected combination of sensing functions to calculate the detected voltage and obtain a corrected detected voltage. The IoT controller allocates free IP addresses to the calibration detection voltage from the IP set corresponding to the region identifier in the sensor's identity information, wherein the IP set corresponds one-to-one with the terminal control region; The IoT controller generates a control signal based on the calibration detection voltage and the assigned IP address, using encoding rules corresponding to the terminal type, and sends the control signal to the terminal. The IoT controller is equipped with the HarmonyOS system, which is used to perform the detection signal reception, sensing function selection, correction detection voltage calculation, IP address allocation, and control signal generation.
2. The method according to claim 1, characterized in that, The calculation of the detected voltage using the selected combination of sensing functions includes: Regarding air temperature, air humidity, and air velocity: The variance function is called to calculate the voltage variance. If the variance does not exceed the threshold, the mean function is called to calculate the voltage mean as the correction detection voltage. Regarding the content of toxic gases and particulate matter: The variance function is called to calculate the voltage variance. If the variance does not exceed the threshold, the median function is called to calculate the voltage median as the correction detection voltage. Regarding illuminance: The average voltage is calculated directly using the mean value function and used as the correction detection voltage.
3. The method according to claim 1, characterized in that, The generation control signal includes: Obtain the environmental standards corresponding to the detection area, wherein the environmental standards define the numerical ranges of various environmental parameters; Compare the calibration test voltage with environmental standards to generate analytical information; When the analyzed information exceeds the stability standard, control information is generated according to the preset output rules. The output rules include the over-limit index and the output parameters corresponding to the over-limit index. Select NRZ encoding, Manchester encoding, or differential Manchester encoding as the target encoding rule based on the terminal type; Control information, IP addresses, and area identifiers are encoded using target encoding rules to generate control signals.
4. An IoT controller, characterized in that, include: The first receiver is used to receive detection signals from multiple sensors, the detection signals including detection voltages of six types of environmental parameters: air temperature, air humidity, air velocity, toxic gas content, particulate matter index, and illuminance; the detection voltage is used to characterize the degree of an environmental condition at a certain point in time. The first processor is configured to select a corresponding combination of sensing functions from a pre-set function library based on the type of environmental condition of the detected signal, wherein: air temperature, air humidity, and air velocity correspond to mean and variance functions; toxic gas content and particulate matter index correspond to median and variance functions; and illuminance corresponds to a mean function; the selected combination of sensing functions is used to calculate the detected voltage to obtain a corrected detected voltage; based on the area identifier in the sensor's identity information, an idle IP address is allocated to the corrected detected voltage from the IP set corresponding to the area identifier, wherein the IP set corresponds one-to-one with the terminal control area; and a control signal is generated according to the corrected detected voltage and the allocated IP address, using encoding rules corresponding to the terminal type. The first transmitter is used to send control signals to the terminal; The IoT controller is equipped with the HarmonyOS system, which is used to perform the detection signal reception, sensing function selection, correction detection voltage calculation, IP address allocation, and control signal generation.
Citation Information
Patent Citations
Embedded Internet of things gateway-based agricultural greenhouse indoor environment monitoring system
CN105610900A