Disclosure of Invention
The embodiment of the invention provides an automatic watering method for an intelligent community, computer equipment and a readable storage medium, and aims to solve the problems of low efficiency and low accuracy of plant watering.
An automatic watering method for a smart community, comprising:
acquiring a plant identifier of a target plant, wherein the plant identifier uniquely identifies the target plant;
acquiring pre-collected bottom target water content, middle target water content and top target water content of the target plant with the unique plant identification under the normal growth of the target plant in the soil according to the plant identification;
according to the plant identification, acquiring the bottom current water content, the middle current water content and the top current water content of the soil where the target plant is located, wherein the soil where the target plant is located is divided into target bottom soil, target middle soil and target top soil;
if the current water content at the bottom is smaller than the target water content at the bottom, the current water content at the middle is smaller than the target water content at the middle and the current water content at the top is smaller than the target water content at the top, acquiring a target hydrogen ion concentration index and a target water temperature of target water, which is suitable for the growth of the target plant and is identified by the plant identification, according to the plant identification, and simultaneously sending a preset first watering quantity, the target hydrogen ion concentration index and the target water temperature to a client, so that the client can water the target bottom soil, the target middle soil and the target top soil where the target plant is located by adopting the target water of the target hydrogen ion concentration index of the target water temperature of the first watering quantity;
if the current water content at the bottom is larger than or equal to the target water content at the bottom, the current water content at the middle is smaller than the target water content at the middle, and the current water content at the top is smaller than the target water content at the top, acquiring a target hydrogen ion concentration index and a target water temperature of target water, which is suitable for the growth of the target plant with the unique plant identifier, according to the plant identifier, and simultaneously sending a preset second watering amount, the target hydrogen ion concentration index and the target water temperature to a client, so that the client can water the target bottom soil, the target middle soil and the target top soil where the target plant is located by adopting the target water with the target hydrogen ion concentration index of the target water temperature of the second watering amount;
if the current water content at the bottom is larger than or equal to the target water content at the bottom, the current water content at the middle is larger than or equal to the target water content at the middle and the current water content at the top is smaller than the target water content at the top, acquiring a target hydrogen ion concentration index and a target water temperature of target water, which is suitable for the growth of the target plant with the unique plant identifier, according to the plant identifier, and simultaneously sending a preset third watering amount, the target hydrogen ion concentration index and the target water temperature to a client side so that the client side waters the target water with the target hydrogen ion concentration index of the target water temperature of the third watering amount to the target bottom soil, the target middle soil and the target top soil where the target plant is located, wherein the first watering amount is larger than the second watering amount, the second watering amount is greater than the third watering amount.
A computer device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, said processor implementing the steps of the above-mentioned automatic watering method for a smart community when executing said computer program.
A computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above-described automatic watering method for a smart community.
The automatic watering method for the intelligent community, the computer equipment and the readable storage medium, the plant identification of the target plant is obtained firstly, then the pre-collected bottom target water content of the target plant with the unique plant identification under the normal growth in the soil is obtained, the middle target water content and the top target water content are obtained, then the bottom current water content in the soil where the target plant with the unique plant identification is located is obtained accurately according to the plant identification, the middle current water content and the top current water content are obtained, wherein the soil where the target plant is located is divided into the target bottom soil, the target middle soil and top soil, then the bottom current water content is smaller than the bottom target water content, the middle current water content is smaller than the middle target water content and the top current water content is smaller than the top target water content, or the bottom current water content is larger than or equal to the bottom target water content, the top, The current water content of the middle part is less than the target water content of the middle part, the current water content of the top part is less than the target water content of the top part, or if the current water content of the bottom part is greater than or equal to the target water content of the bottom part, the current water content of the middle part is greater than or equal to the target water content of the middle part and the current water content of the top part is less than the target water content of the top part, the target hydrogen ion concentration index of the target water suitable for the growth of the target plant with the unique plant identification and the target water temperature of the target water suitable for the growth of the target plant with the unique plant identification are obtained, and finally the target hydrogen ion concentration index and the target water temperature are sent to the client side so that the client side can adopt the accurate target water temperature and the accurate target water of the target hydrogen ion concentration, the obtained current water content at the bottom, the current water content at the middle part and the current water content at the top accurately reflect the current actual condition of the soil where the target plant is located, and meanwhile, the target water of the target hydrogen ion concentration index of the target water temperature suitable for the growth of the target plant is adopted to water the target bottom soil, the target middle soil and the target top soil where the target plant is located, so that the target plant is accurately watered according to the actual condition, and the accuracy of plant watering is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The automatic watering method for the intelligent community can be applied to the application environment shown in fig. 1, wherein the application environment comprises a server and a client, and the client communicates with the server through a wired network or a wireless network. Among other things, the client may be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of a plurality of servers. The client is used for collecting the current water content of the target soil where the target plant is located, and the server is used for receiving and analyzing the current water content.
In one embodiment, as shown in fig. 2, an automatic watering method for an intelligent community is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s101, obtaining a plant identification of the target plant, wherein the plant identification uniquely identifies the target plant.
Specifically, in the wisdom community, establish the corresponding relation with the region that each target plant planted and plant identification in advance, the server needs establish the corresponding relation according to the region that each target plant planted and plant identification in order to obtain the current water content of the target soil that target plant belongs to, acquires the plant identification of each target plant.
Wherein the plant identifier uniquely identifies the target plant. The target soil includes a target bottom soil, a target middle soil and a target top soil, and the current water content includes a bottom current water content, a middle current water content and a top current water content.
The target bottom soil is the soil at the bottom of the target soil where the target plant is located, the target middle soil is the soil in the middle of the target soil where the target plant is located, and the target top soil is the soil at the top of the target soil where the target plant is located. The specific content of the plant identifier may be set according to practical applications, and is not limited herein.
S102, acquiring the pre-collected bottom target water content, middle target water content and top target water content of the target plant with the unique plant identification under the normal growth in soil according to the plant identification.
Specifically, the server side obtains a storage path of pre-collected bottom target water content, middle target water content and top target water content values of the target plant with the unique plant identification under normal growth in soil according to the plant identification, and then extracts the bottom target water content, the middle target water content and the top target water content according to the storage path.
The bottom target water content refers to the water content of the bottom soil of the target plant, the middle target water content refers to the water content of the middle soil of the target plant, and the top target water content refers to the water content of the top soil of the target plant.
S103, according to the plant identification, the current water content of the bottom, the current water content of the middle part and the current water content of the top of the soil where the target plant with the unique plant identification is located are obtained, wherein the soil where the target plant is located is divided into target bottom soil, target middle soil and target top soil.
Specifically, the client acquires the bottom current water content, the middle current water content and the top current water content in the soil where the target plant is located by adopting a soil water content detector, wherein the soil where the target plant is located is divided into target bottom soil, target middle soil and target top soil, and the acquired bottom current water content, middle current water content and top current water content are sent to the server, the server receives the bottom current water content, middle current water content and top current water content of the target plant uniquely identified by the plant identifier in real time or within a preset time period, namely, the bottom current water content in the target bottom soil where the target plant uniquely identified by the plant identifier is located is acquired according to the plant identifier, and the middle current water content in the target middle soil where the target plant uniquely identified by the plant identifier is located is acquired according to the plant identifier, and acquiring the current top water content of the target top soil where the target plant with the unique plant identification is located according to the plant identification.
Further, after obtaining the current water content of the bottom in the soil at the bottom of the target where the target plant with the unique plant identifier is located, the current water content of the middle in the soil at the middle of the target, and the current water content of the top in the soil at the top of the target according to the plant identifier, the method further comprises the following steps: and judging whether the current water content at the bottom is less than the target water content at the bottom, whether the current water content at the middle is less than the target water content at the middle or whether the current water content at the top is less than the target water content at the top.
S104, if the current water content at the bottom is smaller than the target water content at the bottom, the current water content at the middle is smaller than the target water content at the middle, and the current water content at the top is smaller than the target water content at the top, according to the plant identification, the target hydrogen ion concentration index and the target water temperature of the target water suitable for the growth of the target plant with the unique plant identification are obtained, meanwhile, the preset first watering amount, the target hydrogen ion concentration index and the target water temperature are sent to the client side, the target water of the target hydrogen ion concentration index of the target water temperature with the first watering amount is adopted by the client side, and the target bottom soil, the target middle soil and the target top soil where the target plant.
Specifically, because different plants have different requirements on the hydrogen ion concentration index of water and different plants have different requirements on the temperature of water, in order to water the plants with target water with a proper hydrogen ion concentration index, if the current water content at the bottom is less than the target water content at the bottom, the current water content at the middle is less than the target water content at the middle and the current water content at the top is less than the target water content at the top, the target hydrogen ion concentration index and the target water temperature of the target water suitable for the growth of the target plants with unique plant identification are obtained according to the plant identification, and meanwhile, the preset first watering quantity, the target hydrogen ion concentration index and the target water temperature are sent to the client, when the client receives the preset first watering quantity, the target hydrogen ion concentration index and the target water temperature, the target water with the target hydrogen ion concentration index of the target water temperature of the first watering quantity is adopted, and watering the target bottom soil, the target middle soil and the target top soil where the target plant is located, and meanwhile, returning and executing by the server to judge whether the current water content at the bottom is smaller than the target water content at the bottom, whether the current water content at the middle is smaller than the target water content at the middle or whether the current water content at the top is smaller than the target water content at the top.
S105, if the current water content of the bottom is larger than or equal to the target water content of the bottom, the current water content of the middle is smaller than the target water content of the middle, and the current water content of the top is smaller than the target water content of the top, according to the plant identification, the target hydrogen ion concentration index and the target water temperature of the target water, which is suitable for the growth of the target plant with the unique plant identification, are obtained, meanwhile, the preset second watering amount, the target hydrogen ion concentration index and the target water temperature are sent to the client side, the target water of the target hydrogen ion concentration index of the target water temperature with the second watering amount is adopted by the client side, and the target bottom soil, the target middle soil and the target top.
Specifically, because different plants have different requirements on the hydrogen ion concentration index of water and different plants have different requirements on the temperature of water, in order to water the plants with target water with a proper hydrogen ion concentration index, if the current water content at the bottom is greater than or equal to the target water content at the bottom, the current water content at the middle is less than the target water content at the middle, and the current water content at the top is less than the target water content at the top, according to the plant identification, the target hydrogen ion concentration index and the target water temperature of the target water suitable for the growth of the target plants with unique plant identification are obtained, and meanwhile, the preset second watering quantity, the target hydrogen ion concentration index and the target water temperature are sent to the client, and when the client receives the preset second watering quantity, the target hydrogen ion concentration index and the target water temperature, the target water with the target hydrogen ion concentration index of the target water temperature of the second watering quantity, and watering the target bottom soil, the target middle soil and the target top soil where the target plant is located, and meanwhile, returning and executing by the server to judge whether the current water content at the bottom is smaller than the target water content at the bottom, whether the current water content at the middle is smaller than the target water content at the middle or whether the current water content at the top is smaller than the target water content at the top.
It should be noted that the first watering amount is larger than the second watering amount, and different watering amounts are adopted to water the target plant according to different water contents, so that the accuracy of plant watering is improved.
S106, if the current water content of the bottom is larger than or equal to the target water content of the bottom, the current water content of the middle is larger than or equal to the target water content of the middle and the current water content of the top is smaller than the target water content of the top, according to the plant identification, the target hydrogen ion concentration index and the target water temperature of the target water, which is suitable for the growth of the target plant with the unique plant identification, are obtained, meanwhile, the preset third watering amount, the target hydrogen ion concentration index and the target water temperature are sent to the client side so that the client side can adopt the target water of the target hydrogen ion concentration index of the target water temperature of the third watering amount, the target bottom soil where the target plant is located, the target middle soil and the target top soil are watered, and the second.
Specifically, because different plants have different requirements on the hydrogen ion concentration index of water and different plants have different requirements on the temperature of water, in order to water the plants with target water with a proper hydrogen ion concentration index, if the current water content at the bottom is greater than or equal to the target water content at the bottom, the current water content at the middle is greater than or equal to the target water content at the middle and the current water content at the top is less than the target water content at the top, according to the plant identification, the target hydrogen ion concentration index and the target water temperature of the target water suitable for the growth of the target plants with unique plant identification are obtained, meanwhile, the preset third watering amount, the target hydrogen ion concentration index and the target water temperature are sent to the client, and when the client receives the preset third watering amount, the target hydrogen ion concentration index and the target water temperature, the client uses the target water with the target hydrogen ion concentration index of the target water temperature of the third watering, and watering the target bottom soil, the target middle soil and the target top soil where the target plant is located, and meanwhile, returning and executing by the server to judge whether the current water content at the bottom is smaller than the target water content at the bottom, whether the current water content at the middle is smaller than the target water content at the middle or whether the current water content at the top is smaller than the target water content at the top. Wherein the second watering amount is greater than the third watering amount.
And further, if the current water content at the bottom is less than the target water content at the bottom, the current water content at the middle is equal to or greater than the target water content at the middle, and the current water content at the top is less than the target water content at the top, outputting a first water content error prompt message.
And further, if the current water content at the bottom is less than the target water content at the bottom, the current water content at the middle is equal to or greater than the target water content at the middle, and the current water content at the top is equal to or greater than the target water content at the top, outputting a second water content error prompt message.
And further, if the current water content at the bottom is greater than or equal to the target water content at the bottom, the current water content at the middle is less than the target water content at the middle, and the current water content at the top is equal to or greater than the target water content at the top, outputting a third error prompt message of water content.
Further, if the current water content of the bottom is greater than or equal to the target water content of the bottom, the current water content of the middle is greater than or equal to the target water content of the middle, and the current water content of the top is equal to or greater than the target water content of the top, the drainage instruction is sent to the client, so that the client performs drainage processing on target bottom soil where a target plant is located, target middle soil and target top soil based on the drainage instruction, returns to execute to judge whether the current water content of the bottom is less than the target water content of the bottom, whether the current water content of the middle is less than the target water content of the middle or whether the current water content of the top is less than the target water content of the top, receives raining information sent by a raining detection sensor, for example, an infrared detector is adopted to; acquiring a rain shielding instruction corresponding to rain information based on a preset information rain shielding corresponding relation, wherein the rain information is the size of rainfall; will keep off rain instruction and send to the system of keeping off the rain to supply the system of keeping off the rain to keep off the rain based on the instruction of keeping off the rain, to target bottom soil, target middle part soil and target top soil carry out the processing of keeping off the rain, for example, adopt the tent of keeping off the rain to shelter from the rainwater and handle, when the rainfall is big, adopt thick tent of keeping off the rain to shelter from the rainwater, when the rainfall is hour, adopt thin tent of keeping off the rain to shelter from the rainwater and handle, the suggestion message that the target plant does not lack of water is exported simultaneously, thereby guarantee that the plant is not watered excessively.
It should be noted that specific contents of the first water content error prompt message, the second water content error prompt message, the third water content error prompt message, and the prompt message that the target plant is not lack of water may be set according to practical applications, and are not limited herein.
It should be noted that the first watering amount is determined according to a first comparison result between the bottom current water content and the bottom target water content, a second comparison result between the middle current water content and the middle target water content, and a third comparison result between the top current water content and the top target water content. And the second watering amount is determined according to a second comparison result between the middle current water content and the middle target water content and a third comparison result between the top current water content and the top target water content. The third watering amount is determined according to a third comparison result between the current top water content and the target top water content.
In the embodiment corresponding to fig. 2, the plant identifier of the target plant is obtained first, then the pre-collected bottom target water content, middle target water content and top target water content of the target plant with the unique plant identifier under normal growth in soil are obtained, next, the bottom current water content, middle current water content and top current water content of the soil with the unique plant identifier are obtained according to the plant identifier, wherein the soil with the target plant is divided into target bottom soil, target middle soil and target top soil, then, if the bottom current water content is less than the bottom target water content, the middle current water content is less than the middle target water content and the top current water content is less than the top target water content, or if the bottom current water content is greater than or equal to the bottom target water content, the top current water content is less than the top target water content, or if the, The current water content of the middle part is less than the target water content of the middle part, the current water content of the top part is less than the target water content of the top part, or if the current water content of the bottom part is greater than or equal to the target water content of the bottom part, the current water content of the middle part is greater than or equal to the target water content of the middle part and the current water content of the top part is less than the target water content of the top part, the target hydrogen ion concentration index of the target water suitable for the growth of the target plant with the unique plant identification and the target water temperature of the target water suitable for the growth of the target plant with the unique plant identification are obtained, and finally the target hydrogen ion concentration index and the target water temperature are sent to the client side so that the client side can adopt the accurate target water temperature and the accurate target water of the target hydrogen ion concentration, the obtained current water content at the bottom, the current water content at the middle part and the current water content at the top accurately reflect the current actual condition of the soil where the target plant is located, and meanwhile, the target water of the target hydrogen ion concentration index of the target water temperature suitable for the growth of the target plant is adopted to water the target bottom soil, the target middle soil and the target top soil where the target plant is located, so that the target plant is accurately watered according to the actual condition, and the accuracy of plant watering is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile readable storage medium, an internal memory. The non-transitory readable storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile readable storage medium. The database of the computer equipment is used for storing data related to an automatic watering method of the intelligent community. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an automatic watering method for a smart community.
In one embodiment, a computer device is provided, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the automatic watering method for a smart community of the above-mentioned embodiments, such as steps S101 to S106 shown in fig. 2.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, the computer program when executed by a processor implementing the automatic watering method for a smart community in the above method embodiments. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.