Control device and method for multi-layer soil temperature and humidity sampling in intelligent agriculture

By constructing a temporary storage mode and key optimization mechanism for multiple types of parameters, the problem of excessive retrieval time of multi-layer soil temperature and humidity sensors is solved, the efficiency of temperature and humidity sampling is improved, and efficient management of multiple sensors is achieved.

CN119104109AInactive Publication Date: 2024-12-10WUFENG INTELLIGENT TECHNOLOGY (NANTONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411210552.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the randomness of the channel structure sequence between the multi-layer soil temperature and humidity sensor and the controller leads to excessive search time, affecting the efficiency of temperature and humidity sampling.

Method used

By constructing a temporary storage mode of multiple parameters, sensor messages are evaluated and stored in advance, combined with the preferred search mechanism of high and low criticality, the search time of sensor sequences is reduced, and the temperature and humidity interaction process is optimized through compression methods.

Benefits of technology

It effectively reduces the search time of sensor sequence and equipment queue, improves the temperature and humidity sampling efficiency of the controller for multiple soil temperature and humidity sensors, and overcomes the defect of excessive temperature and humidity sampling time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119104109A_ABST
    Figure CN119104109A_ABST
Patent Text Reader

Abstract

The invention discloses a control device and method for multi-layer soil temperature and humidity sampling in intelligent agriculture, and the method comprises the steps: employing a constructed multi-class parameter as a temporary storage mode, achieving the advanced evaluation and storage of a sensor message to be configured after one time, and reducing the searching time of a sensor sequence; in addition, soil temperature and humidity sensor identification can be executed according to the criticality, corresponding optimal searching can be executed, and the searching time of an equipment queue can be shortened. The temperature and humidity sampling efficiency of the controller on the plurality of soil temperature and humidity sensors can be improved, so that the defect that the temperature and humidity sampling time is too high is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart agriculture, and specifically relates to a control device and method for multi-layer soil temperature and humidity sampling in smart agriculture. Background Art

[0002] Smart agriculture is the smart economy in agriculture, and it is the specific manifestation of the smart economy in agriculture. Smart agriculture is an important part of the smart economy.

[0003] In smart agriculture, the existing technical solution in the patent publication number "CN213067717U" is often used to achieve the sampling of multi-layer soil temperature and humidity in smart agriculture. Generally, multiple soil temperature and humidity sensors are respectively arranged in the multiple layers of soil. The multiple soil temperature and humidity sensors are all connected to the controller. The soil temperature and humidity sensors are used to construct a communication channel with the controller to transmit the sampled soil temperature and humidity to the controller.

[0004] Multiple soil temperature and humidity sensors (P in total, with sensor serial codes ranging from 1 to P), the multiple soil temperature and humidity sensors can establish a channel structure with a controller and respond to the temperature and humidity sampling messages of the controller through them.

[0005] At present, the configuration method for performing temperature and humidity sampling on a soil temperature and humidity sensor is: each time the search is performed in the same sequence to determine whether the soil temperature and humidity sensor exists. Since the sequence of P soil temperature and humidity sensors and the controller channel structure is random, the controller search time is often too high. For example, if the soil temperature and humidity sensor with the sensor sequence code 1 is the last one in the sequence of its structure with the controller channel (that is, the structure sequence code is P), the controller will search through the soil temperature and humidity sensor with the structure sequence code 1, thereby causing the search time to be too high. Similarly, when collecting data from other soil temperature and humidity sensors, the search time will also be too high. Summary of the invention

[0006] In order to solve the defects in the prior art, the present invention proposes a control device and method for multi-layer soil temperature and humidity sampling for smart agriculture. By using multiple types of parameters as temporary storage mode, the sensor information of the next configuration can be evaluated in advance and stored, which can reduce the time required to find the sensor sequence; it can also perform soil temperature and humidity sensor identification based on the criticality, and perform corresponding optimal search, which can also reduce the time required to find the equipment queue. The present invention can improve the efficiency of the controller in performing temperature and humidity sampling on multiple soil temperature and humidity sensors, thereby overcoming the defect of excessively high time required for temperature and humidity sampling.

[0007] The present invention utilizes the following technical solutions.

[0008] A control method for multi-layer soil temperature and humidity sampling for smart agriculture, comprising:

[0009] The soil temperature and humidity sensor and the controller construct a communication channel to transmit the sampled soil temperature and humidity to the controller, which includes:

[0010] S1: In the set current time period U, pre-process P soil temperature and humidity sensors, controllers, temperature and humidity sampling task modules, and obtain corresponding indicators;

[0011] S2: The temperature and humidity sampling task module waits for the controller to transmit the receiving message;

[0012] If the temperature and humidity sampling task module receives the receiving message, it will execute S3; otherwise, it will continue to wait;

[0013] S3: The temperature and humidity sampling task module determines whether the sensor information in the received message is the same as the DVSSFOU;

[0014] If they are the same, it means that the sensor information received by the secondary is DVSSFOU; in this case, first replace u p 、e p The values ​​of are increased by one, and then S6 is executed;

[0015] If they are different, it means that DVSSFOU cannot be used, so S4 is executed;

[0016] S4: The temperature and humidity sampling task module determines whether the sensor information in the received message is the same as OFYU;

[0017] If they are the same, the value of ε is 1, indicating that the scheduled collection is executed; the value of OFYU is first regarded as the value of DVSSFOU, and then u p 、e p The values ​​of are increased by one respectively, and then the criticality of the starting sensor sequence is calculated, and the value of the sensor message of the soil temperature and moisture sensor with the lowest criticality is regarded as the value of OFYU, and then S6 is executed;

[0018] If they are different, the value of ε is zero, which means that the collection is performed immediately. The criticality of the starting sensor sequence is calculated, and the sequence from low to high criticality is used to find whether there is E p ;

[0019] If there is E p , then execute S5;

[0020] If there is no E p , can be constructed as follows: the temperature and humidity sampling task module registers an error message, and forms it into a response message, and then executes S7;

[0021] S5: First process u according to the pre-set mode p 、e p 、jp ,j,UFNQ,OFYU, then execute S6;

[0022] S6: Temperature and humidity sampling task module and E p Accomplish temperature and humidity interaction according to the compression method to obtain a response message, and then execute S7;

[0023] S7: The temperature and humidity sampling task module sends the response message back to the controller.

[0024] Preferably, in S1, P soil temperature and humidity sensors and controllers are all connected to the temperature and humidity sampling task module; the sensor sequence code is p soil temperature and humidity sensor, p∈[1,P].

[0025] Preferably, in S1, the corresponding indicators include: guiding parameter ε, sequence parameter j, current sensor parameter DVSSFOU, next sensor parameter OFYU, temporary parameter UFNQ, E p The total reading frequency u p 、E p Reading frequency of the set time period p 、E p The reading structure sequence code j of the setting period p , start sensor sequence.

[0026] Preferably, in S1, the acquisition mode of the corresponding indicator is:

[0027] S1-1: In U, the temperature and humidity sampling task module preprocesses the guiding parameter ε, the sequence parameter j, the current sensor parameter DVSSFOU, the next sensor parameter OFYU, and the temporary parameter UFNQ;

[0028] S1-2: In U, E p When the temperature and humidity sampling task module is connected for the first time, the temperature and humidity sampling task module obtains E p The total reading frequency u p , and the reading frequency e of the setting period of preprocessing Dn p , set the reading time structure sequence code j p ;

[0029] S1-3: In U, P soil temperature and humidity sensors form a starting sensor sequence according to the order of the first connected temperature and humidity sampling task modules.

[0030] Preferably, in S1-1, ε and j are preprocessed to zero; DVSSFOU, OFYU, and UFNQ are preprocessed to NULL.

[0031] Preferably, in S1-2, e p 、j p are pre-processed to zero.

[0032] Preferably, in the face of criticality calculations, there are two aspects to consider:

[0033] 1. Immediate collection, i.e. ε = 0;

[0034] Face E p For E p The time point for the first connected temperature and humidity sampling task module is the previous first connected time point. p When the temperature and humidity sampling task module is connected for the first time, the temperature and humidity sampling task module registers that the time point is the current time point, and the temperature and humidity sampling task module obtains the previous first connected time point, and calculates the number of hours q between the current time point and the previous first connected time point p ;

[0035] Put E p In q p The average reading frequency in each hour is set as: Synchronous Also as an E in advance evaluation in U p The current hourly assessment reads the frequency, and in U E p The frequency read is e p ,then Represents the E estimated in advance p Residual read frequency in U;

[0036] That is The higher it is, the greater the probability that it is the soil temperature and humidity sensor reading this time;

[0037] 2. Regular collection, that is, ε = 1;

[0038]

[0039] Here, J p Representatives collect criticality on a regular basis; Represents the time before each collection period in U p The reading frequency of the set time period; zd Represents the reading frequency of the lowest set period of the sensor sequence before each collection timing period in U;

[0040] Based on this, the guiding parameter ε is one or zero, which is used to indicate whether the message is received at a scheduled time or immediately. p Replace with: That is, when collecting immediately, As r p ; When collecting regularly, put J p As r p .

[0041] Preferably, in S5, the pre-set mode includes:

[0042] First put u p 、e p The values ​​of are increased by one, and then j is determined p Is it zero?

[0043] Here, if j p If it is zero, the value of j is incremented by one to perform a refresh, and then the refreshed value of j is used as j p .

[0044] Preferably, in S5, the pre-set mode further includes:

[0045] If j p If it is non-zero, j will not be refreshed, nor will j be moved to p Give value;

[0046] Then determine whether UFNQ is NULL;

[0047] Here, if UFNQ is NULL, first set j p =1 is regarded as UFNQ, and then the value of UFNQ is regarded as OFYU;

[0048] If UFNQ is non-NULL, the value of TEMP is taken to be OFYU.

[0049] Preferably, in S6, the method for obtaining the response message includes:

[0050] The temperature and humidity sampling task module p The corresponding pre-set compression method is transmitted to E p Execute temperature and humidity messages;

[0051] E p According to the temperature and humidity information, the compressed temperature and humidity are transmitted to the temperature and humidity sampling task module;

[0052] The temperature and humidity sampling task module converts the compressed temperature and humidity returned according to E p The decompression method associated with the corresponding compression method decompresses and forms a pre-set response message.

[0053] A control device for multi-layer soil temperature and humidity sampling for smart agriculture, comprising:

[0054] Multiple soil temperature and humidity sensors are respectively arranged in the multiple layers of soil, and the multiple soil temperature and humidity sensors are all connected to the controller. The soil temperature and humidity sensors are used to construct a communication channel with the controller to transmit the sampled soil temperature and humidity to the controller;

[0055] The control device for multi-layer soil temperature and humidity sampling for smart agriculture also includes:

[0056] A preprocessing module, which is used to preprocess P soil temperature and humidity sensors, controllers, and temperature and humidity sampling task modules in a set current time period U, and obtain corresponding indicators;

[0057] A transmission module, which is used for the temperature and humidity sampling task module to wait for the controller to transmit and receive messages;

[0058] Determination module 1, which is used in the temperature and humidity sampling task module to determine whether the sensor information in the received message is the same as the DVSSFOU;

[0059] Determination module 2, which is used in the temperature and humidity sampling task module to determine whether the sensor information in the received message is the same as OFYU;

[0060] The processing module is used to process u according to a pre-set mode p 、e p 、j p ,j,UFNQ,OFYU;

[0061] Compression module, which is used for temperature and humidity sampling task module and E p Achieve temperature and humidity interaction based on compression method to obtain response message;

[0062] The feedback module is used by the temperature and humidity sampling task module to return the response message to the controller.

[0063] The beneficial effects of the present invention are that, compared with the prior art, the technical effects of the present invention include:

[0064] By using multiple parameters as temporary storage mode, the sensor information of the next configuration can be pre-evaluated and stored, which can reduce the time of searching the sensor sequence; it can also be used to identify the soil temperature and humidity sensors according to the criticality, and perform the corresponding optimal search, which can also reduce the time of searching the device queue. The present invention can improve the efficiency of the controller in performing temperature and humidity sampling on multiple soil temperature and humidity sensors, thereby overcoming the defect of too high time of temperature and humidity sampling. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 It is a schematic diagram of the architecture of the control device for multi-layer soil temperature and humidity sampling for smart agriculture described in the present invention. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely expressed in combination with the drawings in the embodiments of the present invention. The embodiments expressed in this application are only part of the embodiments of the present invention, not all of them. According to the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative labor are all within the protection scope of the present invention.

[0067] The present invention provides a control method for multi-layer soil temperature and humidity sampling for smart agriculture, comprising:

[0068] The soil temperature and humidity sensor and the controller construct a communication channel to transmit the sampled soil temperature and humidity to the controller, which includes:

[0069] P soil temperature and humidity sensors, a controller, and a temperature and humidity sampling task module running on the controller.

[0070] P soil temperature and humidity sensors are used to sample the soil temperature and humidity of P layers of soil respectively. The soil temperature and humidity sensors can achieve duplex communication and are easy to explain. p To represent the soil temperature and humidity sensor whose sensor sequence code is p, p∈[1,P]; the sensor sequence code is the sequence code set for the soil temperature and humidity sensor according to the set sequence.

[0071] The controller is used to perform timing or real-time collection of the soil temperature and humidity sampled by the soil temperature and humidity sensor, and the controller can achieve duplex communication.

[0072] The temperature and humidity sampling task module is used to perform duplex communication with P soil temperature and humidity sensors and controllers.

[0073] The method of constructing a communication channel between the soil temperature and humidity sensor and the controller to transmit the sampled soil temperature and humidity to the controller specifically includes:

[0074] S1: In the set current time period U, pre-process P soil temperature and humidity sensors, controllers, temperature and humidity sampling task modules, and obtain corresponding indicators;

[0075] In a preferred but non-limiting embodiment of the present invention, in S1, P soil temperature and humidity sensors and controllers are connected to the temperature and humidity sampling task module, and smooth duplex communication is guaranteed; the sensor sequence code is p soil temperature and humidity sensor, p∈[1,P].

[0076] In a preferred but non-limiting embodiment of the present invention, in S1, the corresponding indicators include: guiding parameter ε, sequence parameter j, current sensor parameter DVSSFOU, next sensor parameter OFYU, temporary parameter UFNQ, E p The total reading frequency u p、E p Reading frequency of the set time period p 、E p The reading structure sequence code j of the setting period p , start sensor sequence.

[0077] In a preferred but non-limiting embodiment of the present invention, in S1, the acquisition mode of the corresponding indicator is:

[0078] S1-1: In U, the temperature and humidity sampling task module preprocesses the guiding parameter ε, the sequence parameter j, the current sensor parameter DVSSFOU, the next sensor parameter OFYU, and the temporary parameter UFNQ;

[0079] In a preferred but non-restrictive embodiment of the present invention, in S1-1, when the temperature and humidity sampling task module is enabled, it executes the preprocessing tasks of ε, j, DVSSFOU, OFYU, and UFNQ, where ε and j are preprocessed to zero; DVSSFOU, OFYU, and UFNQ are preprocessed to NULL.

[0080] S1-2: In U, E p When the temperature and humidity sampling task module is connected for the first time, the temperature and humidity sampling task module obtains E p The total reading frequency u p , and the reading frequency e of the setting period of preprocessing Dn p , set the reading time structure sequence code j p ;

[0081] In a preferred but non-limiting embodiment of the present invention, in S1-2, e p 、j p are pre-processed to zero.

[0082] S1-3: In U, P soil temperature and humidity sensors form a starting sensor sequence according to the order of the first connected temperature and humidity sampling task module. Connecting temperature and humidity sampling task modules is to construct a channel between the same temperature and humidity sampling task modules.

[0083] The purpose of S1 is to perform preprocessing and ensure smooth duplex communication.

[0084] S2: The temperature and humidity sampling task module waits for the controller to transmit the receiving message;

[0085] If the temperature and humidity sampling task module receives the receiving message, it will execute S3; otherwise, it will continue to wait;

[0086] The purpose of S2 is to determine whether the controller has sent a receiving message.

[0087] S3: The temperature and humidity sampling task module determines whether the sensor information in the received message is the same as DVSSFOU; here, the received message is received E p The value in the E p Therefore, the received message contains E p Sensor messages.

[0088] If they are the same, it means that the sensor information received by the secondary is DVSSFOU, and you can directly use the value of DVSSFOU without further time-consuming search; in this case, first replace u p 、e p The values ​​of are increased by one, and then S6 is executed;

[0089] If they are different, it means that DVSSFOU cannot be used, so S4 is executed;

[0090] S4: The temperature and humidity sampling task module determines whether the sensor information in the received message is the same as OFYU;

[0091] If they are the same, the value of ε is 1, indicating that the scheduled collection is executed; the value of OFYU is first regarded as the value of DVSSFOU, and then u p 、e p The values ​​of are increased by one respectively, and then the criticality of the starting sensor sequence is calculated, and the value of the sensor message of the soil temperature and moisture sensor with the lowest criticality is regarded as the value of OFYU, and then S6 is executed;

[0092] Based on the convenience of identification, after the criticality calculation, the starting sensor sequence can be rearranged in order from low to high criticality to obtain a rearranged sensor sequence; thus, the sensor message of the soil temperature and humidity sensor with the lowest criticality is the first value of the rearranged sensor sequence, that is, the first value of the rearranged sensor sequence is regarded as the value of OFYU;

[0093] Alternatively, the initial sensor sequence can be rearranged in descending order of criticality to obtain a rearranged sensor sequence; accordingly, the sensor message of the soil temperature and moisture sensor with the lowest criticality is the last value of the rearranged sensor sequence, that is, the last value of the rearranged sensor sequence is regarded as the value of OFYU.

[0094] Here, the value of OFYU is taken as DVSSFOU, and the value of the sensor message of the soil temperature and humidity sensor with the lowest criticality is taken as the value of OFYU. That is, the temperature and humidity transmitted by the soil temperature and humidity sensor for the last time are stored through the parameters as temporary storage, so as to reduce the time for searching the sensor sequence.

[0095] If they are different, the value of ε is zero, which means that the collection is performed immediately. The criticality of the starting sensor sequence is calculated, and the sequence from low to high criticality is used to find whether there is E p If the rearrangement from low to high is performed, the sequence of the rearranged sensor sequence can be used to find out whether there is E p If the rearrangement from high to low is performed, the sensor sequence can be reversed to find out whether there is E in the rearranged sensor sequence. p .

[0096] If there is E p , then execute S5;

[0097] If there is no E p , can be constructed as follows: the temperature and humidity sampling task module registers an error message, and forms it into a response message, and then executes S7;

[0098] In a preferred but non-limiting embodiment of the present invention, the calculation of criticality includes two aspects:

[0099] 1. Immediate collection (not scheduled collection), that is, ε = 0;

[0100] Face E p For E p The time point for registering the first connection of the temperature and humidity sampling task module is the first connection time point in the past. p When the temperature and humidity sampling task module is connected for the first time, the temperature and humidity sampling task module registers that the time point is the current time point, and the temperature and humidity sampling task module obtains the previous first connected time point, and calculates the number of hours q between the current time point and the previous first connected time point p ;

[0101] Put E p In q p The average reading frequency in each hour is set as: Synchronous Also as an early evaluation of E in U p The current hourly assessment reads the frequency, and in U E p The frequency read is e p ,then Represents the E estimated in advance p Residual read frequency in U;

[0102] That is The higher it is, the greater the probability that it is regarded as the soil temperature and humidity sensor for this reading;

[0103] 2. Regular collection, that is, ε = 1;

[0104] The timed collection mode is:

[0105] A: It does not involve the function of immediate collection. The higher the reading frequency of the set time period, the later it will be.

[0106] B: It does not involve the function of real-time collection. When the reading frequency of the set time period is the same, the lower the sensor serial number, the closer it is.

[0107] There are:

[0108] Here, J p Representatives collect criticality on a regular basis; Represents the time before each collection period in U p The reading frequency of the set time period; zd Represents the reading frequency of the lowest set period of the sensor sequence before each collection timing period in U;

[0109] That is J p The lower it is, the greater the chance that it is the soil temperature and moisture sensor being read.

[0110] Based on this, the guiding parameter ε is one or zero, which is used to indicate whether the message is received at a scheduled time or immediately. p Replace with: That is, when collecting immediately, As r p ; When collecting regularly, put J p As r p .

[0111] S5: First process u according to the pre-set mode p 、e p 、j p ,j,UFNQ,OFYU, then execute S6;

[0112] The purpose of S5 is to prepare for the next collection.

[0113] In a preferred but non-limiting embodiment of the present invention, in S5, the pre-set mode includes:

[0114] First put u p 、e p The values ​​of are increased by one, and then j is determined p Is it zero?

[0115] Here, if j p If it is zero, the value of j is incremented by one to perform a refresh (i.e., j=j+1), and then the refreshed value of j is used as j p .

[0116] In a preferred but non-limiting embodiment of the present invention, in S5, the pre-set mode further includes:

[0117] If j p If it is non-zero, j will not be refreshed, nor will j be moved to p Give value;

[0118] Then determine whether UFNQ is NULL;

[0119] Here, if UFNQ is NULL, first set j p =1 is regarded as UFNQ, and then the value of UFNQ is regarded as OFYU;

[0120] If UFNQ is non-NULL, the value of TEMP is taken to be OFYU.

[0121] And first put u p 、e p The values ​​of are increased by one, and then according to j p Is it zero to determine whether to refresh j p , are all prepared for the key operations that are often performed in the next collection; then, according to whether UFNQ is zero, determine how to refresh UFNQ and OFYU; here, UFNQ stores j p = 1 sensor information, which can prevent multiple searches when revising sensor information p =1 sensor message status, thereby reducing the time.

[0122] S6: Temperature and humidity sampling task module and E p Accomplish temperature and humidity interaction according to the compression method to obtain a response message, and then execute S7;

[0123] S7 is to perform temperature and humidity sampling on the found soil temperature and humidity sensor.

[0124] In a preferred but non-limiting embodiment of the present invention, in S6, the method for obtaining the response message includes:

[0125] The temperature and humidity sampling task module p The corresponding pre-set compression method is transmitted to E p Execute temperature and humidity messages; the compression method can be various compression algorithms in the prior art.

[0126] E p According to the temperature and humidity information, the compressed temperature and humidity are transmitted to the temperature and humidity sampling task module;

[0127] The temperature and humidity sampling task module converts the compressed temperature and humidity returned according to E p The decompression method associated with the corresponding compression method decompresses and forms a pre-set response message.

[0128] S7: The temperature and humidity sampling task module sends the response message back to the controller.

[0129] The response message sent back to the controller in S7 may be obtained by S6 or S4.

[0130] like Figure 1 As shown, the control device for multi-layer soil temperature and humidity sampling for smart agriculture according to the present invention comprises:

[0131] Multiple soil temperature and humidity sensors are respectively arranged in the multiple layers of soil, and the multiple soil temperature and humidity sensors are all connected to the controller. The soil temperature and humidity sensors are used to construct a communication channel with the controller to transmit the sampled soil temperature and humidity to the controller;

[0132] The control device for multi-layer soil temperature and humidity sampling for smart agriculture also includes:

[0133] A preprocessing module, which is used to preprocess P soil temperature and humidity sensors, controllers, and temperature and humidity sampling task modules in a set current time period U, and obtain corresponding indicators;

[0134] A transmission module, which is used for the temperature and humidity sampling task module to wait for the controller to transmit and receive messages;

[0135] Determination module 1, which is used in the temperature and humidity sampling task module to determine whether the sensor information in the received message is the same as the DVSSFOU;

[0136] Determination module 2, which is used in the temperature and humidity sampling task module to determine whether the sensor information in the received message is the same as OFYU;

[0137] The processing module is used to process u according to a pre-set mode p 、e p 、j p ,j,UFNQ,OFYU;

[0138] Compression module, which is used for temperature and humidity sampling task module and E p Achieve temperature and humidity interaction based on compression method to obtain response message;

[0139] The feedback module is used by the temperature and humidity sampling task module to return the response message to the controller.

[0140] The beneficial effects of the present invention are that, compared with the prior art, the technical effects of the present invention include:

[0141] By using multiple parameters as temporary storage mode, the sensor information of the next configuration can be pre-evaluated and stored, which can reduce the time of searching the sensor sequence; it can also be used to identify the soil temperature and humidity sensors according to the criticality, and perform the corresponding optimal search, which can also reduce the time of searching the device queue. The present invention can improve the efficiency of the controller in performing temperature and humidity sampling on multiple soil temperature and humidity sensors, thereby overcoming the defect of too high time of temperature and humidity sampling.

[0142] The present disclosure can be a system, a method and / or a computer program product. The computer program product can include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0143] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (such as a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0144] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0145] The computer program instructions for performing the operations of the present disclosure can be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine corresponding instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as 'C' language or similar programming languages. The computer-readable program instructions can be executed entirely on the controller computer, partially on the controller computer, as a separate software package, partially on the controller computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the controller computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (such as using an Internet service provider to connect through the Internet). In some embodiments, the electronic circuit is personalized by using the state information of the computer-readable program instructions, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), and the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present disclosure.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be edited or replaced by equivalents, and any editing or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A control method for multi-layer soil temperature and humidity sampling for smart agriculture, It is characterized in that include: The soil temperature and humidity sensor and the controller construct a communication channel to transmit the sampled soil temperature and humidity to the controller, which includes: S1: In the set current time period U, pre-process P soil temperature and humidity sensors, controllers, temperature and humidity sampling task modules, and obtain corresponding indicators; S2: The temperature and humidity sampling task module waits for the controller to transmit the receiving message; If the temperature and humidity sampling task module receives the receiving message, it will execute S3; otherwise, it will continue to wait; S3: The temperature and humidity sampling task module determines whether the sensor information in the received message is the same as the DVSSFOU; If they are the same, it means that the sensor information received by the secondary is DVSSFOU; in this case, first replace u p 、e p The values ​​of are increased by one, and then S6 is executed; If they are different, it means that DVSSFOU cannot be used, so S4 is executed; S4: The temperature and humidity sampling task module determines whether the sensor information in the received message is the same as OFYU; If they are the same, the value of ε is 1, indicating that the scheduled collection is executed; the value of OFYU is first regarded as the value of DVSSFOU, and then u p 、e p The values ​​of are increased by one respectively, and then the criticality of the starting sensor sequence is calculated, and the value of the sensor message of the soil temperature and moisture sensor with the lowest criticality is regarded as the value of OFYU, and then S6 is executed; If they are different, the value of ε is zero, which means that the collection is performed immediately. The criticality of the starting sensor sequence is calculated, and the sequence from low to high criticality is used to find whether there is E p ; If there is E p , then execute S5; If there is no E p , can be constructed as follows: the temperature and humidity sampling task module registers an error message, and forms it into a response message, and then executes S7; S5: First process u according to the pre-set mode p 、e p 、j p ,j,UFNQ,OFYU, then execute S6; S6: Temperature and humidity sampling task module and E p Accomplish temperature and humidity interaction according to the compression method to obtain a response message, and then execute S7; S7: The temperature and humidity sampling task module sends the response message back to the controller.

2. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 1, It is characterized in that In S1, P soil temperature and humidity sensors and controllers are connected to the temperature and humidity sampling task module; the sensor sequence code is p soil temperature and humidity sensor, p∈[1,P].

3. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 2, It is characterized in that In S1, the corresponding indicators include: guiding parameter ε, sequence parameter j, current sensor parameter DVSSFOU, next sensor parameter OFYU, temporary parameter UFNQ, E p The total reading frequency u p 、E p Reading frequency of the set time period p 、E p The reading structure sequence code j of the setting period p , start sensor sequence.

4. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 3, It is characterized in that In S1, the acquisition mode of the corresponding indicators is: S1-1: In U, the temperature and humidity sampling task module preprocesses the guiding parameter ε, the sequence parameter j, the current sensor parameter DVSSFOU, the next sensor parameter OFYU, and the temporary parameter UFNQ; S1-2: In U, E p When the temperature and humidity sampling task module is connected for the first time, the temperature and humidity sampling task module obtains E p The total reading frequency u p , and the reading frequency e of the setting period of preprocessing Dn p , set the reading time structure sequence code j p ; S1-3: In U, P soil temperature and humidity sensors form a starting sensor sequence according to the order of the first connected temperature and humidity sampling task modules.

5. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 4, It is characterized in that In S1-1, ε and j are preprocessed to zero; DVSSFOU, OFYU, and UFNQ are preprocessed to NULL; In S1-2, e p 、j p are pre-processed to zero.

6. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 5, It is characterized in that When calculating the criticality, there are two aspects to consider:

1. Immediate collection, i.e. ε = 0; Face E p For E p The time point for registering the first connection of the temperature and humidity sampling task module is the first connection time point in the past. p When the temperature and humidity sampling task module is connected for the first time, the temperature and humidity sampling task module registers that the time point is the current time point, and the temperature and humidity sampling task module obtains the previous first connected time point, and calculates the number of hours q between the current time point and the previous first connected time point p ; Put E p In q p The average reading frequency in each hour is set as: Synchronous Also as an early evaluation of E in U p The current hourly assessment reads the frequency, and in U E p The frequency read is e p ,then Represents the E estimated in advance p Residual read frequency in U; That is The higher it is, the greater the probability that it is regarded as the soil temperature and humidity sensor for this reading; 2. Regular collection, that is, ε = 1; Here, J p Representatives collect criticality on a regular basis; Represents the time before each collection period in U p The reading frequency of the set time period; zd Represents the reading frequency of the lowest set period of the sensor sequence before each collection timing period in U; Based on this, the guiding parameter ε is one or zero, which is used to indicate whether the message is received at a scheduled time or immediately. p Replace with: That is, when collecting immediately, As r p ; When collecting regularly, put J p As r p .

7. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 6, It is characterized in that In S5, the pre-set modes include: First put u p 、e p The values ​​of are increased by one, and then j is determined p Is it zero? Here, if j p If it is zero, the value of j is incremented by one to perform a refresh, and then the refreshed value of j is used as j p .

8. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 7, It is characterized in that In S5, the pre-set modes also include: If j p If it is non-zero, j will not be refreshed, nor will j be moved to p Give value; Then determine whether UFNQ is NULL; Here, if UFNQ is NULL, first set j p =1 is regarded as UFNQ, and then the value of UFNQ is regarded as OFYU; If UFNQ is non-NULL, the value of TEMP is taken to be OFYU.

9. The control method for multi-layer soil temperature and humidity sampling for smart agriculture according to claim 8, It is characterized in that In S6, the method for obtaining the response message includes: The temperature and humidity sampling task module p The corresponding pre-set compression method is transmitted to E p Execute temperature and humidity messages; E p According to the temperature and humidity information, the compressed temperature and humidity are transmitted to the temperature and humidity sampling task module; The temperature and humidity sampling task module converts the compressed temperature and humidity returned according to E p The decompression method associated with the corresponding compression method decompresses and forms a pre-set response message.

10. A control device for multi-layer soil temperature and humidity sampling for smart agriculture. It is characterized in that include: Multiple soil temperature and humidity sensors are respectively arranged in the multiple layers of soil, and the multiple soil temperature and humidity sensors are all connected to the controller. The soil temperature and humidity sensors are used to construct a communication channel with the controller to transmit the sampled soil temperature and humidity to the controller; The control device for multi-layer soil temperature and humidity sampling for smart agriculture also includes: A preprocessing module, which is used to preprocess P soil temperature and humidity sensors, controllers, and temperature and humidity sampling task modules in a set current time period U, and obtain corresponding indicators; A transmission module, which is used for the temperature and humidity sampling task module to wait for the controller to transmit and receive messages; Determination module 1, which is used in the temperature and humidity sampling task module to determine whether the sensor information in the received message is the same as the DVSSFOU; Determination module 2, which is used in the temperature and humidity sampling task module to determine whether the sensor information in the received message is the same as OFYU; The processing module is used to process u according to a pre-set mode p 、e p 、j p ,j,UFNQ,OFYU; Compression module, which is used for temperature and humidity sampling task module and E p Achieve temperature and humidity interaction based on compression method to obtain response message; The feedback module is used by the temperature and humidity sampling task module to return the response message to the controller.