Intelligent agriculture Internet of Things data acquisition and control system based on big data
By performing node clustering and data fusion in the agricultural Internet of Things system, combining outlier processing, and establishing an agricultural production environment model, the problems of data integration and refined management are solved, and the level of automation and intelligence of agricultural production is improved.
Patent Information
- Application Number
- CN202411151519.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing agricultural IoT systems lack effective data fusion mechanisms and cannot integrate scattered node data, resulting in insufficient data mining, and it is difficult to achieve refined management of irrigation, fertilization, lighting and other links, and sensors are easily disturbed and caused by data. Quality issues.
Adopt a smart agricultural IoT data acquisition and control system based on big data, and use the data acquisition module, area division module, main node selection module and fusion module to cluster and data fusion, and combine outlier value detection and processing mechanisms to establish agricultural production Environmental model to achieve intelligent prediction and control.
It realizes efficient integration and processing of node data, improves data quality and automation and intelligence level of agricultural production, avoids resource waste, and improves agricultural product output and production efficiency.
Smart Images

Figure CN119045355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data acquisition and control technology, and more specifically, to a smart agriculture Internet of Things data acquisition and control system based on big data. Background Art
[0002] The patent with application publication number CN115866446A discloses a LoRa-based agricultural environment monitoring and control method, including the steps of collecting agricultural environment data, forwarding the agricultural environment data to the background management center, retrieving agricultural environment data within a period of time for preprocessing, deriving features and reducing features to form training sets and test sets, using the CART algorithm to establish a decision tree model for training and testing, retrieving agricultural environment data within a recent period of time and inputting it into the decision tree model to form control instructions, and the background management center sends the control instructions to the data collection and control sub-nodes for control; using the decision tree model and environmental monitoring data to automatically generate control instructions to effectively control the agricultural environment.
[0003] However, for the agricultural Internet of Things, nodes collect a large amount of environmental data and operation data, but the existing system lacks an effective data fusion mechanism and is unable to integrate and comprehensively utilize the scattered node data, resulting in difficulty in fully tapping the value of the data; secondly, with the continuous increase in the number of Internet of Things nodes, the existing system is difficult to reasonably manage and coordinate a large number of nodes, and is unable to dynamically adjust the node roles and tasks according to the actual status of the nodes, resulting in idle waste of node resources; then, the agricultural production process is affected by a variety of environmental factors, and the existing system is unable to comprehensively evaluate and intelligently control the production environment based on multi-source heterogeneous data collected in real time, and it is difficult to achieve refined management of key links such as irrigation, fertilization, and lighting; finally, the agricultural production environment is complex and changeable, and sensors are susceptible to interference, resulting in quality problems such as outliers and noise in the collected data; the existing system lacks an effective abnormal data detection and processing mechanism, and the poor data quality affects the accuracy of subsequent analysis and decision-making.
[0004] In view of this, the present invention proposes a smart agricultural Internet of Things data acquisition and control system based on big data to solve the above problems. Summary of the invention
[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions: A data acquisition and control system for smart agricultural Internet of Things based on big data, comprising: a data acquisition module for acquiring environmental data and operating data of each node in the agricultural Internet of Things;
[0006] A region division module is used to cluster the nodes in the agricultural Internet of Things according to the environmental data and the operation data to obtain n node clustering regions;
[0007] A master node selection module is used to select m nodes from n node clustering areas as their respective corresponding master nodes;
[0008] The fusion module fuses the environmental data and the operation data based on the master node in each node cluster area to obtain the fused data of each node cluster area;
[0009] The storage analysis execution module is used to store and analyze the fused data of each node clustering area to obtain cloud analysis results; according to the cloud analysis results, control instructions are issued to the execution devices in the agricultural Internet of Things; each module is connected by wired and / or wireless means.
[0010] Furthermore, the environmental data includes temperature, humidity, light intensity and soil pH, and the operating data includes node energy consumption, computing load and communication traffic.
[0011] Furthermore, the method of clustering nodes in the agricultural Internet of Things includes:
[0012] Preprocess the environmental data and operating data, including removing outliers and standardizing, and constructing a node data matrix, where each row represents a node and each column represents an environmental data or operating data;
[0013] Set clustering parameters, including population size, maximum number of iterations, crossover probability, and mutation probability;
[0014] Initialize the population. Each individual in the population uses an integer encoding method to represent the mapping relationship from nodes to clusters. And define the clustering fitness function Fit.
[0015] Calculate the value of the clustering fitness function of each individual, recorded as the fitness value; divide the population into M regions; based on the size of the fitness value, select V individuals in each region, and perform roulette selection among the selected V individuals; obtain excellent individuals as parent individuals;
[0016] The method of dividing the population into M regions includes:
[0017] Define the adaptive distance function FH(r,t)=∑(R_I×|x_rI-x_tI|); where R_I represents the weight of the I-th data; x_rI is the value of the r-th individual on the I-th data, and x_tI is the value of the t-th individual on the I-th data;
[0018] Wherein, B_I is the correlation coefficient of the Ith data, B_J is the correlation coefficient of the Jth data, and C is a constant;
[0019] Among them, mean(I) represents the mean of the I-th data in the entire population;
[0020] Based on the distance between individuals calculated by the adaptive distance function, the population is divided into regions using the density clustering method to obtain M regions;
[0021] Perform a crossover operation on the selected parent individuals based on the crossover probability to generate new offspring individuals; and perform a mutation operation on the offspring individuals based on the mutation probability until the maximum number of iterations is reached;
[0022] Until the maximum number of iterations is reached; in each generation, the best individual is selected according to the fitness value and retained to the next generation; the individual with the best fitness is selected from the final population and decoded to obtain the final clustering scheme; according to the final clustering scheme, the nodes are divided into n node clustering areas.
[0023] Furthermore, the method of removing outliers includes:
[0024] The data collected at each time point in the environmental data and the operating data are taken as a corresponding data point;
[0025] Different types of data points are clustered by data density, and the density neighborhood radius K and the minimum number of points Pt in the dense area are defined;
[0026] Construct different types of data points into data sets and build a ball tree;
[0027] For each data point p, traverse the constructed ball tree and calculate its distance to the Kth nearest neighbor, recorded as K distance;
[0028] For each data point p, obtain the number of data points in its K-distance neighborhood, denoted as N(p);
[0029] Based on N(p), the reachable density re(p,q)=max(dis(q),d(p,q)) is calculated; where d(p,q) represents the Euclidean distance between data point p and data point q; dis(q) is the distance from data point q to its Kth nearest neighbor, and q is a data point in the K-distance neighborhood of data point p;
[0030] For each data point p, calculate the local reachability density of all data points in its K-distance neighborhood, denoted as lrd(p);
[0031] Among them, α1, β and γ are density adjustable parameters; Δt is the time difference between the acquisition time of two data points p and q, and Δs is the distance between the two data points p and q in space;
[0032] For each data point p, calculate its local outlier factor
[0033] The outlier threshold is preset. If LOF(p) is greater than the outlier threshold, the data point p is marked as an outlier. All data points are traversed, and for the data points marked as outliers, deletion or interpolation estimation is adopted to process them, thus completing the removal of outliers.
[0034] Furthermore, the ball tree is constructed in the following manner:
[0035] Define an initial ball tree, starting from the entire data set, and recursively divide the data points into tree subnodes of the ball tree;
[0036] Take the entire data set D as the data point set of the root node, calculate the centroid of all data points in D, as the center point c of the root node, calculate the distance from all data points in D to c, and select the median of the distance d as the radius r of the root node;
[0037] Recursively construct tree child nodes. For the current tree node N, based on the data point set S and the center point it contains, if the number of data points in the data point set S is less than or equal to the preset maximum leaf node data volume, then N is a leaf node, and the process of constructing the tree child node ends. Otherwise, S is divided into two tree child nodes N1 and N2, and the distance d' from all data points in S to the center point c is calculated, and the median of the distance is selected as the segmentation radius r'; N1 contains all data points whose distance c is less than or equal to r', and N2 contains all data points whose distance c is greater than r'. The center points c1 and c2 of N1 and N2, as well as the radii r1 and r2 are calculated, and the tree child nodes of N1 and N2 are recursively constructed; until the number of data points in the data point set S is less than or equal to the preset maximum leaf node data volume, the ball tree construction is completed;
[0038] Set the basic parameters of the ball tree, including the maximum leaf node data volume and the ball coverage rate of each tree node;
[0039] The sphere coverage of each tree node is set in the following ways:
[0040] Define the sphere coverage of tree node N Where V(N) is the volume of data points covered by tree node N, and V(S) is the total volume of data point set S;
[0041] Calculate the density ρ(x) of each data point x in the data point set S;
[0042] Where y is the data point within the density neighborhood radius K of x, h0 is the initial bandwidth parameter, N(x) is the number of data points within the density neighborhood radius K centered on x, d is the dimension of the data point, and N' is the total number of data points;
[0043] Based on the density ρ(x) of each data point x, calculate the average density avg(S) and the density standard deviation std(S);
[0044] If co(N) is greater than the preset first threshold t1 and the average density of the tree node N is greater than the upper limit of the average density threshold TU=avg(S)+α×std(S), then the sphere coverage of the tree child nodes is increased by L times;
[0045] If co(N) is greater than the preset second threshold t2 and the average density of the tree node N is less than the average density threshold lower limit TX=avg(S)-α×std(S), then the sphere coverage of the tree child nodes is reduced by L times; where α is an adjustable parameter.
[0046] Furthermore, the clustering fitness function Fit is defined as:
[0047] Fit=w1×WS(C_i)+w2×MC(C_i)+w3×CS(C_i); where w1, w2 and w3 are the weights of the three objective functions; WS(C_i) is the intra-cluster balance objective function, C_i is the cluster of the i-th cluster, MC(C_i) is the cluster coverage objective function, and CS(C_i) is the inter-cluster discrete objective function;
[0048] WS(C_i)=∑w_j×(x_j-μ_i) 2 ; Where μ_i is the centroid vector of cluster C_i, x_j is the jth node, and w_j is the weight of the jth node;
[0049] MC(C_i)=max(d(x_j,x_k)×f(t_jk)); where d(x_j,x_k) is the distance between node x_j and node x_k, t_jk is the time difference between node x_j and node x_k, and x_k is the kth node;
[0050] Among them, σ(x_j,x_k) is the adaptive function of node x_j and node x_k; g(e_j,e_k) is the environment-related function; e_j is the environment state of the jth node, and e_k is the environment state of the kth node;
[0051] σ(x_j,x_k)=σ_0×(1+α2×imp(x_j)+β2×imp(x_k)); where σ_0 is the reference variance, imp(x_j) is the importance weight of node x_j, imp(x_k) is the importance weight of node x_k, and α2 and β2 are weight adjustment parameters;
[0052] g(e_j,e_k)=(1-|norm(e_j)-norm(e_k)|) γ1 ×∏ i U_i {|e_ji-e_ki|} ;in,
[0053] norm(e_j) is the normalization of the environmental state e_j, norm(e_k) is the normalization of the environmental state e_k, γ1 is the exponential parameter of the environmental relevance; U_i is the environmental indicator weight of the i-th cluster, e_ji represents the environmental state or measurement value of node j on the environmental indicator weight of the i-th cluster, and e_ki represents the environmental state or measurement value of node k on the environmental indicator weight of the i-th cluster;
[0054] CS(C_i) = min(d(μ_i,μ_l)×g(s_il)), where d(μ_i,μ_j) is the distance between μ_i and μ_j, μ_l is the centroid vector of the l-th cluster, s_il is the spatial distance between the i-th cluster and the l-th cluster, and g(s_il) is the spatial attenuation function;
[0055] g(s_il)=exp(-F(s_il)×s_il)×h(t_il,s_il); where F(s_il) is the adaptive decay rate function, h(t_il,s_il) is the spatiotemporal correlation function, and t_il represents the maximum time difference between the nodes in the ith cluster and the lth cluster for collecting data.
[0056] F(s_il)=F_0×(1+δ×exp(-θ×(s_il-s_ref))); where F_0 is the reference attenuation rate, δ and θ are adjustable parameters of the attenuation rate, and s_ref is the reference distance;
[0057] Among them, ω and θ are control parameters.
[0058] Furthermore, the master node selection method includes:
[0059] For each node in the node clustering area, define the evaluation index set UL = {u_f}, where u_f represents the fth evaluation index;
[0060] Construct a comment set UR of the evaluation index. For each evaluation index u_f, set f' comment levels, then the comment set UR = {v_ff'}, where v_ff' represents the f'th comment level;
[0061] For node O, its actual value under the evaluation index u_f is u_f(O), then its membership on v_ff' Among them, d_ff' is the distance between the comment level v_ff' corresponding to the evaluation index u_f and the optimal comment level, δ1 is the distance adjustment parameter, u_f_std is the standard deviation of u_f in the set of all nodes in the node clustering area, and m_ff' is the statistical characteristic function;
[0062] Among them, u_f_avg is the average value of u_f in the set composed of all nodes in the node clustering area, u_f_max is the maximum value of u_f in the set composed of all nodes in the node clustering area, and u_f_min is the minimum value of u_f in the set composed of all nodes in the node clustering area;
[0063] For node O, under the evaluation index u_f, its membership vector is LR_f(O) = [u_ff'(O)];
[0064] The membership vectors of all nodes in the node clustering area are the elements of the fuzzy evaluation matrix;
[0065] A fuzzy evaluation matrix is constructed for the nodes in each node clustering area; a comprehensive evaluation is performed on each node based on the fuzzy evaluation matrix to obtain its membership value;
[0066] For the nodes in each node clustering area, sort them from large to small according to their membership values, and select the first m nodes as the main nodes.
[0067] Furthermore, the method for acquiring the fusion data includes:
[0068] The environmental data and the operation data are combined into a state vector X_(P); a state space model is constructed based on the state vector X_(P);
[0069] The state space model includes the state equation and the observation equation; define N2 particles and assign the same initial weight to each particle g
[0070] For each particle, sampling is performed according to the state equation at time P-1 to generate a new state particle X at time P g _(P)~q(X_(P)|X g _(P-1),Z_(P)), where X g _(P) is the particle g at the Pth moment; X g _(P-1) is the particle g at the P-1th moment, and q(·) is the importance function;
[0071] Calculate the weight w_g_(P) of each particle g at the Pth moment according to the observation equation;
[0072] Among them, p(·) is the likelihood function; w_g_(P-1) is the weight of particle g at the P-1th moment;
[0073] Normalize the weights of all particles, calculate the effective number of particles Neff, and preset the number threshold. If Neff is less than the number threshold, resample to eliminate particles with weights less than the preset lower limit of the weight threshold, and copy particles with weights greater than the preset upper limit of the weight threshold;
[0074] The optimal state is obtained by using the weighted mean calculation of the weights and state vectors of all particles, and the optimal state of the node clustering area is obtained as the fusion data.
[0075] Furthermore, the state equation is:
[0076] X_(P)=FL_P×X_(P-1)+BL_P×v_(P-1); where FL_P is the state transfer matrix at the Pth moment, and P represents the time index; X_(P-1) is the state vector at the P-1 moment, and BL_P is the control input matrix at the Pth moment; v_(P-1) is the process noise at the P-1 moment;
[0077] The observation equation is: Z_(P)=H_(P)×X_(P)+n_(P); where Z_(P) is the observation value obtained at the Pth moment, H_(P) is the observation matrix at the Pth moment, and n_(P) is the observation noise at the Pth moment.
[0078] Furthermore, the method of storing and analyzing the fusion data of each node clustering area includes:
[0079] The fused data of each node clustering area is transmitted to the cloud server through the network, and a big data storage system is established in the cloud;
[0080] Collect fusion data of M3 areas in the agricultural Internet of Things within a fixed historical period, record it as historical fusion data, and use machine learning algorithms to establish a data model of the agricultural production environment based on the historical fusion data;
[0081] Based on the real-time fusion data, the data model is used to make a comprehensive prediction of the agricultural production environment and obtain the optimal control parameters of the production environment;
[0082] According to the optimal control parameters, control instructions for the execution devices in the agricultural Internet of Things are generated, and the control instructions are sent to the corresponding execution devices through the network.
[0083] The technical effects and advantages of the invention are as follows:
[0084] The present invention realizes efficient fusion processing of node data by reasonably clustering agricultural Internet of Things nodes and selecting master nodes, and fully explores the value of agricultural big data; the fused data can comprehensively reflect the dynamic changes of the agricultural production environment, and provide accurate and reliable data support for subsequent decision-making; an effective abnormal data detection and processing mechanism is proposed to identify abnormal values and adopt strategies for processing, which fundamentally ensures data quality and lays a solid foundation for subsequent analysis and decision-making; the established agricultural production environment model can intelligently predict and optimize the production environment based on real-time fused data, and realize fine-grained regulation of irrigation, fertilization, lighting and other links; this precise regulation greatly improves the automation and intelligence level of agricultural production, avoids waste of resources, and improves the output and quality of agricultural products as well as agricultural production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 This is a schematic diagram of a data collection and control system for smart agricultural Internet of Things based on big data of the present invention;
[0086] Figure 2 It is a schematic diagram of a data collection and control method of smart agricultural Internet of Things based on big data of the present invention. DETAILED DESCRIPTION
[0087] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0088] Example 1
[0089] See also Figure 1 As shown, the smart agricultural Internet of Things data collection and control system based on big data described in this embodiment includes:
[0090] Data acquisition module, used to obtain environmental data and operation data of each node in the agricultural Internet of Things;
[0091] A region division module is used to cluster the nodes in the agricultural Internet of Things according to the environmental data and the operation data to obtain n node clustering regions;
[0092] A master node selection module is used to select m nodes from n node clustering areas as their respective corresponding master nodes;
[0093] The fusion module fuses the environmental data and the operation data based on the master node in each node cluster area to obtain the fused data of each node cluster area;
[0094] The storage analysis execution module is used to store and analyze the fused data of each node clustering area to obtain cloud analysis results; according to the cloud analysis results, control instructions are issued to the execution devices in the agricultural Internet of Things; each module is connected by wired and / or wireless means to realize data transmission between modules; and realize refined regulation of the agricultural production environment.
[0095] Furthermore, the environmental data include temperature, humidity, light intensity and soil pH, and the operating data include node energy consumption (energy detection circuit or energy management unit monitors its real-time energy consumption), computing load (monitoring the node's own CPU utilization, memory occupancy, etc., reflecting the current computing load level) and communication traffic (the communication module of each node (such as ZigBee, LoRa, etc.) can count the number of data packets and bytes of inbound and outbound traffic, reflecting the communication traffic).
[0096] Furthermore, the method of clustering nodes in the agricultural Internet of Things includes:
[0097] The environmental data and operation data are preprocessed, and the preprocessing methods include removing outliers and standardizing to ensure the quality and consistency of the data.
[0098] The method of removing outliers includes:
[0099] Different types of data in environmental data and operating data are composed of several data points, and the data collected at each time point is regarded as a corresponding data point.
[0100] Different types of data points are clustered separately by data density, and the density neighborhood radius K and the minimum number of points Pt in the dense area are defined. The density neighborhood radius K considers the K nearest neighbors of each data point; and the area below the minimum number of points Pt is regarded as an outlier area.
[0101] Different types of data points are constructed into data sets respectively, and a ball tree is constructed. An initial ball tree is defined, starting from the entire data set, and the data points are recursively divided into tree subnodes of the ball tree.
[0102] Take the entire data set D as the data point set of the root node, calculate the centroid of all data points in D, as the center point c of the root node, calculate the distance from all data points in D to c, and select the median of the distance d as the radius r of the root node.
[0103] Recursively construct tree subnodes. For the current tree node N, based on the data point set S and the center point it contains, if the number of data points in the data point set S is less than or equal to the preset maximum leaf node data amount, then N is a leaf node, and the process of constructing the tree subnode ends. Otherwise, S is divided into two tree subnodes N1 and N2, and the distance d' from all data points in S to the center point c is calculated, and the median distance is selected as the segmentation radius r'; N1 contains all data points whose distance c is less than or equal to r', and N2 contains all data points whose distance c is greater than r'. Calculate the center points c1 and c2 of N1 and N2, as well as the radii r1 and r2 and recursively construct the tree subnodes of N1 and N2; until the number of data points in the data point set S is less than or equal to the preset maximum leaf node data amount, the ball tree construction is completed.
[0104] Set the basic parameters of the ball tree, including the maximum leaf node data volume and the sphere coverage rate of each tree node; the maximum leaf node data volume is used to control the maximum data volume of the leaf node, usually set to 10-100; the sphere coverage rate is used to control the coverage degree of the sphere, and the value range is [0, 1].
[0105] The sphere coverage of each tree node is set in the following ways:
[0106] Define the sphere coverage of tree node N Where V(N) is the volume of data points covered by the tree node N, and V(S) is the total volume of the data point set S. It should be noted that the total volume of the data point set refers to the volume of the smallest multidimensional hypersphere that surrounds all data points as points in a multidimensional space. The volume of data points covered by a tree node refers to the process of building a spherical tree. When the data point set is divided into tree sub-nodes, each tree sub-node uses a multidimensional hypersphere to surround its corresponding data point subset. The volume of this hypersphere is the volume of data points covered by the tree node.
[0107] Calculate the density ρ(x) of each data point x in the data point set S;
[0108] Where y is the data point within the density neighborhood radius K of x, h0 is the initial bandwidth parameter that controls the smoothness of the density calculation, N(x) is the number of data points within the density neighborhood radius K centered on x, d is the dimension of the data point, and N' is the total number of data points.
[0109] Based on the density ρ(x) of each data point x, calculate the average density avg(S) and the density standard deviation std(S);
[0110] If co(N) is greater than the preset first threshold t1 and the average density of the tree node N is greater than the upper limit of the average density threshold TU=avg(S)+α×std(S), then the sphere coverage rate of the tree child nodes is increased by L times; in this case, the area density covered by the tree nodes is relatively high, and the coverage rate needs to be increased to reduce repeated coverage.
[0111] If co(N) is greater than the preset second threshold t2 and the average density of the tree node N is less than the lower limit of the average density threshold TX=avg(S)-α×std(S), then the sphere coverage rate of the tree child nodes is reduced by L times; in this case, the density of the area covered by the nodes is low, and the coverage rate needs to be reduced to avoid over-segmentation; where α is an adjustable parameter that controls the looseness of the density threshold. Usually, t1 is 0.7 and t2 is 0.9.
[0112] According to the characteristics of agricultural Internet of Things data, the construction parameters are adjusted to obtain a ball tree data structure with reasonable shape and high search efficiency, which provides efficient support for subsequent nearest neighbor search and outlier detection.
[0113] For each data point p, traverse the constructed ball tree and calculate its distance to the Kth nearest neighbor (the distances are sorted from small to large, and the data point corresponding to the smallest distance is the nearest neighbor of p), which is recorded as K distance; K distance defines the neighborhood range with p as the center and a radius of K distance.
[0114] For each data point p, obtain the number of data points in its K-distance neighborhood, denoted as N(p);
[0115] Based on N(p), the reachable density re(p,q)=max(dis(q),d(p,q)) is calculated; where d(p,q) represents the Euclidean distance between data point p and data point q; dis(q) is the distance from data point q to its Kth nearest neighbor, and q is a data point in the K-distance neighborhood of data point p.
[0116] For each data point p, calculate the local reachability density of all data points in its K-distance neighborhood, denoted as lrd(p);
[0117] Among them, α1, β and γ are adjustable density parameters that balance the influence of time and space factors; Δt is the time difference between the acquisition time of two data points p and q, and Δs is the distance between the two data points p and q in space.
[0118] For each data point p, calculate its local outlier factor
[0119] The outlier threshold is preset. If LOF(p) is greater than the outlier threshold, the data point p is marked as an outlier. All data points are traversed, and for the data points marked as outliers, strategies such as deletion and interpolation estimation are adopted to process them, thus completing the removal of outliers.
[0120] The processed data is standardized, that is, data of different dimensions are converted to the same numerical range.
[0121] Construct a node data matrix, where each row represents a node and each column represents an environmental data or operation data;
[0122] Set clustering parameters, including population size, maximum number of iterations, crossover probability, and mutation probability.
[0123] Initialize the population. Each individual in the population uses an integer encoding method to represent the mapping relationship from nodes to clusters. For example, the encoding [0, 0, 1, 1, 2, 2] means dividing 6 nodes into 3 clusters {0, 1}, {2, 3}, {4, 5}. The initial population is randomly generated.
[0124] Define the clustering fitness function Fit;
[0125] Fit=w1×WS(C_i)+w2×MC(C_i)+w3×CS(C_i); where w1, w2 and w3 are the weights of the three objective functions, which are adjusted according to specific needs; WS(C_i) is the intra-cluster balance objective function, C_i is the cluster of the i-th cluster, MC(C_i) is the cluster coverage objective function, and CS(C_i) is the inter-cluster discrete objective function.
[0126] WS(C_i)=∑w_j×(x_j-μ_i) 2 ; Where μ_i is the centroid vector of cluster C_i, x_j is the jth node, and w_j is the weight of the jth node, which is manually defined according to the specific space of the node;
[0127] MC(C_i)=max(d(x_j,x_k)×f(t_jk)); where d(x_j,x_k) is the distance between node x_j and node x_k, t_jk is the time difference between node x_j and node x_k (there is a difference in the time of collecting data), and x_k is the kth node.
[0128] Among them, σ(x_j,x_k) is the adaptive function of node x_j and node x_k; g(e_j,e_k) is the environment-related function; e_j is the environment state of the j-th node, and e_k is the environment state of the k-th node.
[0129] σ(x_j,x_k)=σ_0×(1+α2×imp(x_j)+β2×imp(x_k)); where σ_0 is the benchmark variance (a pre-set variance value used to measure the degree of discreteness of the node), imp(x_j) is the importance weight of node x_j, imp(x_k) is the importance weight of node x_k, α2 and β2 are weight adjustment parameters that control the influence of importance on variance; the importance weight of the node is manually defined according to the specific space and time of the node; for example, the node located in the center of the farmland and in the high-frequency collection stage may have a higher weight because its data can better reflect the situation of the entire farmland.
[0130] g(e_j,e_k)=(1-|norm(e_j)-norm(e_k)|) γ1 ×∏ i U_i {|e_ji-e_ki|} ;in,
[0131] norm(e_j) is the normalization processing of the environmental state e_j, norm(e_k) is the normalization processing of the environmental state e_k, γ1 is the exponential parameter of the environmental correlation, which is used to adjust the influence of environmental similarity on the weight; U_i is the environmental indicator weight of the i-th cluster (such as temperature, humidity, etc.), e_ji represents the environmental state or measurement value of node j on the environmental indicator weight of the i-th cluster, and e_ki represents the environmental state or measurement value of node k on the environmental indicator weight of the i-th cluster.
[0132] It should be noted that the setting methods of environmental indicator weights include:
[0133] List all environmental indicators that need to be considered, such as temperature, humidity, light intensity, etc.
[0134] For the i-th cluster, it is necessary to determine the relative importance of these multiple environmental indicators in the cluster. Based on historical data, score the importance of each environmental indicator in the i-th cluster to obtain a score between 0 and 1; normalize these multiple scores so that their sum is 1, that is, obtain the weights of multiple environmental indicators in the i-th cluster.
[0135] For example, for a vegetable greenhouse cluster, temperature and humidity may have higher weights and light may have lower weights; while for an open field cluster, light and soil moisture may have higher weights.
[0136] CS(C_i)=min(d(μ_i,μ_l)×g(s_il)), where d(μ_i,μ_j) is the distance between μ_i and μ_j, μ_l is the centroid vector of the l-th cluster, s_il is the spatial distance between the i-th cluster and the l-th cluster, and g(s_il) is the spatial attenuation function.
[0137] g(s_il)=exp(-F(s_il)×s_il)×h(t_il,s_il); where F(s_il) is the adaptive attenuation rate function, h(t_il,s_il) is the spatiotemporal correlation function, and t_il represents the maximum time difference between the nodes in the i-th cluster and the l-th cluster for collecting data.
[0138] F(s_il)=F_0×(1+δ×exp(-θ×(s_il-s_ref))); where F_0 is the baseline attenuation rate (a pre-set constant value used to indicate the baseline level of influence of spatial distance on inter-cluster separation), δ and θ are adjustable parameters of the attenuation rate, and s_ref is the reference distance (distance value used for comparison with the actual distance between clusters); this can avoid over-emphasizing or ignoring the influence of spatial distance.
[0139] Among them, ω and θ are control parameters, which are used to adjust the influence of time difference and spatial distance on the function value.
[0140] Taking into account the spatiotemporal correlation of agricultural IoT node data, for clusters that are far apart, the spatial distance between them has a greater impact on the separation between clusters; while for clusters that are close to each other, the time difference between them has a more important impact on the separation.
[0141] Calculate the value of the clustering fitness function of each individual, recorded as the fitness value; according to the fitness value, use the roulette wheel selection to select excellent individuals from the current population; specifically, divide the population into M regions; based on the size of the fitness value, select V individuals in each region (the size of the fitness value is from large to small), and perform roulette wheel selection among the selected V individuals; obtain the excellent individuals as the parent individuals.
[0142] Ways to divide the population into M regions include:
[0143] Define the adaptive distance function FH(r,t)=∑(R_I×|x_rI-x_tI|); where R_I represents the weight of the I-th type of data, and the same weight value can be initially assigned, such as 1 / 7 (7 is the total number of data types); x_rI is the value of the r-th individual on the I-th type of data, and x_tI is the value of the t-th individual on the I-th type of data.
[0144] Among them, B_I is the correlation coefficient of the I-th data, B_J is the correlation coefficient of the J-th data, and C is a very small constant to prevent the denominator from being zero.
[0145] Among them, mean(I) represents the mean of the I-th type of data in the entire population.
[0146] Based on the distance between individuals calculated by the adaptive distance function, the population is divided into regions using the density clustering method to obtain M regions. Specifically, the density of each individual is calculated to determine whether it belongs to a density region. For individuals in a density region (an area where individuals are densely distributed and the density of internal data points is greater than a certain threshold), it is further checked whether they are density-connected. Density-connected density regions are classified as the same region, and individuals that do not belong to any region are marked as noise.
[0147] Based on the crossover probability, the selected parent individuals are crossovered to generate new offspring individuals; commonly used crossover methods include partial mapping crossover (PMX) and sequential crossover (OX).
[0148] The offspring individuals are mutated according to the mutation probability until the maximum number of iterations is reached to increase population diversity. Common mutation operations include insertion mutation, exchange mutation, etc.
[0149] Until the maximum number of iterations is reached; in each generation, the best individual is selected according to the fitness value and retained to the next generation; the individual with the best fitness is selected from the final population, and the final clustering scheme (the mapping relationship from nodes to clusters) is decoded; according to the final clustering scheme, the nodes are divided into n node clustering areas.
[0150] Furthermore, the master node selection method includes:
[0151] For each node in the node clustering area, a fuzzy evaluation matrix is constructed according to the node energy consumption, computing load and communication traffic of the node.
[0152] Specifically, an evaluation index set UL = {u_f} is defined, where u_f represents the fth evaluation index (such as remaining energy, CPU utilization, memory utilization, communication capability, etc.), which is calculated based on the operation data;
[0153] Construct a comment set UR of the evaluation index. For each evaluation index u_f, set f' comment levels, then the comment set UR = {v_ff'}, where v_ff' represents the f'th comment level. Usually f' takes 3-5 levels, such as high, medium and low.
[0154] For node O, its actual value under the evaluation index u_f is u_f(O), then its membership on v_ff' Among them, d_ff' is the distance between the comment level v_ff' corresponding to the evaluation index u_f and the optimal comment level (each comment level is assigned a serial number, the smaller the serial number value, the better the level, and the distance is the absolute value of the difference between the serial number values), δ1 is a distance adjustment parameter greater than 0, u_f_std is the standard deviation of u_f in the set of all nodes in the node clustering area, and m_ff' is the statistical characteristic function.
[0155] Among them, u_f_avg is the average value of u_f in the set composed of all nodes in the node clustering area, u_f_max is the maximum value of u_f in the set composed of all nodes in the node clustering area, and u_f_min is the minimum value of u_f in the set composed of all nodes in the node clustering area.
[0156] For node O, under the evaluation index u_f, its membership vector is LR_f(O) = [u_ff'(O)];
[0157] The membership vectors of all nodes in the node clustering area are the elements of the fuzzy evaluation matrix;
[0158] The nodes in each node clustering area construct a fuzzy evaluation matrix to prepare for the subsequent fuzzy comprehensive evaluation.
[0159] Comprehensively evaluate each node based on the fuzzy evaluation matrix to obtain its membership value (convert the membership vector into a value, i.e. multiply it by a constant);
[0160] For the nodes in each node clustering area, they are sorted from large to small according to their membership values, and the first m nodes are selected as master nodes.
[0161] Furthermore, the method for acquiring the fusion data includes:
[0162] The environmental data and the operating data are combined into a state vector X_(P), for example, X_(P) is [temperature P, humidity P, light P, energy consumption P, ...]; a state space model is constructed based on the state vector X_(P).
[0163] The state space model includes the state equation and the observation equation;
[0164] The state equation is: X_(P)=FL_P×X_(P-1)+BL_P×v_(P-1); where FL_P is the state transfer matrix at the Pth moment (describing how the current state of the system is transferred from the state at the previous moment P-1 at moment P, and describing the natural evolution law of the state vector without external intervention), P represents discrete time, that is, the moment index, such as P=1,2,3,... represents the first moment, the second moment, the third moment, etc.; X_(P-1) is the state vector at moment P-1, BL_P is the control input matrix at moment P (describing how the external control input acts on the internal state of the system at moment P, and describing how to change the system state through control means); v_(P-1) is the process noise at moment P-1, which obeys a known distribution, such as a Gaussian distribution.
[0165] Utilizing a large amount of historical observation data, the parameter values of the state transfer matrix and the control input matrix are estimated through system identification methods; system identification methods include least squares method, subspace state estimation, etc.
[0166] The observation equation is: Z_(P)=H_(P)×X_(P)+n_(P); where Z_(P) is the observation value obtained at the Pth moment, H_(P) is the observation matrix at the Pth moment, and n_(P) is the observation noise at the Pth moment, which reflects the uncertainty in the observation process, such as sensor error, quantization error, etc.; it usually obeys a known distribution, such as Gaussian distribution.
[0167] Define N2 particles, each particle represents a possible state value, and give each particle g the same initial weight
[0168] For each particle, sampling is performed according to the state equation at time P-1 to generate a new state particle X at time P g _(P)~q(X_(P)|X g _(P-1),Z_(P)), where X g _(P) is the particle g at the Pth moment; X g _(P-1) is the particle g at the P-1th moment, q(·) is the importance function, and takes the probability density of state transition.
[0169] Calculate the weight w_g_(P) of each particle g at the Pth moment according to the observation equation;
[0170] Among them, p(·) is the likelihood function, which reflects the degree of fit between the particle and the actual observation value; w_g_(P-1) is the weight of particle g at the P-1th moment.
[0171] The weights of all particles are normalized, and the effective number of particles Neff (the inverse of the sum of the squares of the normalized weights of all particles) is calculated. A number threshold is preset, usually the total number of particles M4 multiplied by (0.2 to 0.5); if Neff is less than the number threshold, resampling is performed to eliminate particles whose weights are less than the preset lower limit of the weight threshold, and to copy particles whose weights are greater than the preset upper limit of the weight threshold, so that the weights are infinitely close to a uniform distribution.
[0172] The lower weight threshold is usually set to Among them, C' is a constant greater than 1, such as C' is equal to 10 or greater; this can filter out obviously abnormal low-weight particles.
[0173] The upper weight threshold is usually set to Where c' is a constant greater than 1, such as c' is equal to 2 or 3; some high-weight particles can be appropriately replicated.
[0174] The optimal state is obtained by using the weighted mean calculation of the weights and state vectors of all particles, and the optimal state of the node clustering area is obtained as the fusion data.
[0175] Furthermore, the method of storing and analyzing the fusion data of each node clustering area includes:
[0176] The fused data of each node clustering area is transmitted to the cloud server through the network, and a big data storage system is established in the cloud, such as the Hadoop distributed file system (HDFS) or object storage system, for persistent storage of the fused data.
[0177] The fused data of M3 areas in the agricultural Internet of Things are collected within a fixed historical time period and recorded as historical fused data. Based on the historical fused data, a data model of the agricultural production environment (the relationship model between environmental factors such as temperature, humidity, and light and the growth conditions of crops) is established using a machine learning algorithm. The machine learning algorithm can be a neural network algorithm, a support vector machine, a Bayesian network, etc.
[0178] Based on the real-time fusion data, the data model is used to make a comprehensive prediction of the agricultural production environment to obtain the optimal control parameters of the production environment (such as irrigation time, fertilizer application amount, lighting conditions, etc.).
[0179] According to the optimal control parameters, control instructions for the execution devices (such as irrigation systems, lighting systems, etc.) in the agricultural Internet of Things are generated, and the control instructions are sent to the corresponding execution devices through the network. The ways to send control instructions to the corresponding execution devices include:
[0180] The cloud server transmits the generated control instructions to the gateway device or edge computing node in the agricultural Internet of Things through the Internet or a dedicated network; the gateway device or edge computing node parses the received control instructions and forwards the control instructions to the corresponding execution device through various communication protocols (such as ZigBee, LoRa and other low-power wide area network protocols) according to the target device address of the instructions; after receiving the control instructions, the execution device adjusts its own working parameters and operating status according to the content of the instructions, such as adjusting the switching time and flow of the irrigation system, adjusting the brightness and working time of the lighting system, etc., thereby realizing fine-grained regulation of the agricultural production environment.
[0181] The execution device feeds back the adjusted operating status data to the gateway device or edge computing node, and finally uploads it to the cloud server to form a closed-loop control and provide data support for the next round of analysis and control.
[0182] In this embodiment, by reasonably clustering the agricultural Internet of Things nodes and selecting the main node, efficient fusion processing of node data is achieved, and the value of agricultural big data is fully excavated; the fused data can fully reflect the dynamic changes of the agricultural production environment, and provide accurate and reliable data support for subsequent decision-making; an effective abnormal data detection and processing mechanism is proposed to identify abnormal values and adopt strategies for processing, which fundamentally ensures data quality and lays a solid foundation for subsequent analysis and decision-making; the established agricultural production environment model can intelligently predict and optimize the production environment based on real-time fused data, and realize fine-grained control of irrigation, fertilization, lighting and other links; this precise control has greatly improved the automation and intelligence level of agricultural production, avoided waste of resources, and increased the output and quality of agricultural products as well as agricultural production efficiency.
[0183] Example 2
[0184] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, which provides a data collection and control method for smart agricultural Internet of Things based on big data, including:
[0185] S1. Obtain environmental data and operation data of each node in the agricultural Internet of Things;
[0186] S2. Clustering the nodes in the agricultural Internet of Things according to the environmental data and the operation data to obtain n node clustering areas;
[0187] S3, select m nodes from the n node clustering areas as their respective corresponding master nodes;
[0188] S4, based on the master node in each node clustering area, the environment data and the operation data are fused to obtain the fused data of each node clustering area;
[0189] S5. Store and analyze the fused data of each node clustering area to obtain cloud analysis results; based on the cloud analysis results, issue control instructions to the execution devices in the agricultural Internet of Things.
[0190] Example 3
[0191] This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the above-mentioned method for data collection and control of smart agricultural Internet of Things based on big data is implemented.
[0192] Since the electronic device introduced in this embodiment is an electronic device used to implement a smart agriculture Internet of Things data collection and control method based on big data in the embodiment of this application, based on the smart agriculture Internet of Things data collection and control method based on big data introduced in the embodiment of this application, the technical personnel of this field can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not introduced in detail here. As long as the technical personnel of this field implement the electronic device used in the smart agriculture Internet of Things data collection and control method based on big data in the embodiment of this application, it belongs to the scope of protection of this application.
[0193] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0194] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A smart agricultural Internet of Things data acquisition and control system based on big data, characterized in that: include: Data acquisition module, used to obtain environmental data and operation data of each node in the agricultural Internet of Things; A region division module is used to cluster the nodes in the agricultural Internet of Things according to the environmental data and the operation data to obtain n node clustering regions; A master node selection module is used to select m nodes from n node clustering areas as their respective corresponding master nodes; The fusion module fuses the environmental data and the operation data based on the master node in each node cluster area to obtain the fused data of each node cluster area; The storage analysis execution module is used to store and analyze the fused data of each node clustering area to obtain cloud analysis results; according to the cloud analysis results, control instructions are issued to the execution devices in the agricultural Internet of Things; each module is connected by wired and / or wireless means.
2. According to a big data-based smart agriculture Internet of Things data acquisition and control system according to claim 1, it is characterized in that: The environmental data includes temperature, humidity, light intensity and soil pH, and the operating data includes node energy consumption, computing load and communication traffic.
3. According to a big data-based smart agriculture Internet of Things data acquisition and control system according to claim 2, it is characterized in that: The method of clustering nodes in the agricultural Internet of Things includes: Preprocess the environmental data and operating data, including removing outliers and standardizing, and constructing a node data matrix, where each row represents a node and each column represents an environmental data or operating data; Set clustering parameters, including population size, maximum number of iterations, crossover probability, and mutation probability; Initialize the population. Each individual in the population uses an integer encoding method to represent the mapping relationship from nodes to clusters. And define the clustering fitness function Fit. Calculate the value of the clustering fitness function of each individual, recorded as the fitness value; divide the population into M regions; based on the size of the fitness value, select V individuals in each region, and perform roulette selection among the selected V individuals; obtain excellent individuals as parent individuals; The method of dividing the population into M regions includes: Define the adaptive distance function FH(r,t)=∑(R_I×|x_rI-x_tI|); where R_I represents the weight of the I-th data; x_rI is the value of the r-th individual on the I-th data, and x_tI is the value of the t-th individual on the I-th data; Wherein, B_I is the correlation coefficient of the Ith data, B_J is the correlation coefficient of the Jth data, and C is a constant; Among them, mean(I) represents the mean of the I-th data in the entire population; Based on the distance between individuals calculated by the adaptive distance function, the population is divided into regions using the density clustering method to obtain M regions; Perform a crossover operation on the selected parent individuals based on the crossover probability to generate new offspring individuals; and perform a mutation operation on the offspring individuals based on the mutation probability until the maximum number of iterations is reached; Until the maximum number of iterations is reached; in each generation, the best individual is selected according to the fitness value and retained to the next generation; the individual with the best fitness is selected from the final population and decoded to obtain the final clustering scheme; according to the final clustering scheme, the nodes are divided into n node clustering areas.
4. According to a big data-based smart agriculture Internet of Things data acquisition and control system according to claim 3, it is characterized in that: The method of removing outliers includes: The data collected at each time point in the environmental data and the operating data are taken as a corresponding data point; Different types of data points are clustered by data density, and the density neighborhood radius K and the minimum number of points Pt in the dense area are defined; Construct different types of data points into data sets and build a ball tree; For each data point p, traverse the constructed ball tree and calculate its distance to the Kth nearest neighbor, recorded as K distance; For each data point p, obtain the number of data points in its K-distance neighborhood, denoted as N(p); Based on N(p), the reachable density re(p,q)=max(dis(q),d(p,q)) is calculated; where d(p,q) represents the Euclidean distance between data point p and data point q; dis(q) is the distance from data point q to its Kth nearest neighbor, and q is a data point in the K-distance neighborhood of data point p; For each data point p, calculate the local reachability density of all data points in its K-distance neighborhood, denoted as lrd(p); Among them, α1, β and γ are density adjustable parameters; Δt is the time difference between the acquisition time of two data points p and q, and Δs is the distance between the two data points p and q in space; For each data point p, calculate its local outlier factor The outlier threshold is preset. If LOF(p) is greater than the outlier threshold, the data point p is marked as an outlier. All data points are traversed, and for the data points marked as outliers, deletion or interpolation estimation is adopted to process them, thus completing the removal of outliers.
5. According to a big data-based smart agriculture Internet of Things data acquisition and control system according to claim 4, it is characterized in that: The ball tree is constructed in the following manner: Define an initial ball tree, starting from the entire data set, and recursively divide the data points into tree subnodes of the ball tree; Take the entire data set D as the data point set of the root node, calculate the centroid of all data points in D, as the center point c of the root node, calculate the distance from all data points in D to c, and select the median of the distance d as the radius r of the root node; Recursively construct tree child nodes. For the current tree node N, based on the data point set S and the center point it contains, if the number of data points in the data point set S is less than or equal to the preset maximum leaf node data volume, then N is a leaf node, and the process of constructing the tree child node ends. Otherwise, S is divided into two tree child nodes N1 and N2, and the distance d' from all data points in S to the center point c is calculated, and the median of the distance is selected as the segmentation radius r'; N1 contains all data points whose distance c is less than or equal to r', and N2 contains all data points whose distance c is greater than r'. The center points c1 and c2 of N1 and N2, as well as the radii r1 and r2 are calculated, and the tree child nodes of N1 and N2 are recursively constructed; until the number of data points in the data point set S is less than or equal to the preset maximum leaf node data volume, the ball tree construction is completed; Set the basic parameters of the ball tree, including the maximum leaf node data volume and the ball coverage rate of each tree node; The sphere coverage of each tree node is set in the following ways: Define the sphere coverage of tree node N Where V(N) is the volume of data points covered by tree node N, and V(S) is the total volume of data point set S; Calculate the density ρ(x) of each data point x in the data point set S; Where y is the data point within the density neighborhood radius K of x, h0 is the initial bandwidth parameter, N(x) is the number of data points within the density neighborhood radius K centered on x, d is the dimension of the data point, and N' is the total number of data points; Based on the density ρ(x) of each data point x, calculate the average density avg(S) and the density standard deviation std(S); If co(N) is greater than the preset first threshold t1 and the average density of the tree node N is greater than the upper limit of the average density threshold TU=avg(S)+α×std(S), then the sphere coverage of the tree child nodes is increased by L times; If co(N) is greater than the preset second threshold t2 and the average density of the tree node N is less than the average density threshold lower limit TX=avg(S)-α×std(S), then the sphere coverage of the tree child nodes is reduced by L times; where α is an adjustable parameter.
6. According to the big data-based smart agriculture Internet of Things data acquisition and control system of claim 5, it is characterized in that: The clustering fitness function Fit is defined as: Fit=w1×WS(C_i)+w2×MC(C_i)+w3×CS(C_i); where w1, w2 and w3 are the weights of the three objective functions; WS(C_i) is the intra-cluster balance objective function, C_i is the cluster of the i-th cluster, MC(C_i) is the cluster coverage objective function, and CS(C_i) is the inter-cluster discrete objective function; WS(C_i)=∑w_j×(x_j-μ_i) 2 ; Where μ_i is the centroid vector of cluster C_i, x_j is the jth node, and w_j is the weight of the jth node; MC(C_i)=max(d(x_j,x_k)×f(t_jk)); where d(x_j,x_k) is the distance between node x_j and node x_k, t_jk is the time difference between node x_j and node x_k, and x_k is the kth node; Among them, σ(x_j,x_k) is the adaptive function of node x_j and node x_k; g(e_j,e_k) is the environment-related function; e_j is the environment state of the jth node, and e_k is the environment state of the kth node; σ(x_j,x_k)=σ_0×(1+α2×imp(x_j)+β2×imp(x_k)); where σ_0 is the reference variance, imp(x_j) is the importance weight of node x_j, imp(x_k) is the importance weight of node x_k, and α2 and β2 are weight adjustment parameters; g(e_j,e_k)=(1-|norm(e_j)-norm(e_k)|) γ1 ×∏ i U_i {|e_ji-e_ki|} ;in, norm(e_j) is the normalization of the environmental state e_j, norm(e_k) is the normalization of the environmental state e_k, γ1 is the exponential parameter of the environmental relevance; U_i is the environmental indicator weight of the i-th cluster, e_ji represents the environmental state or measurement value of node j on the environmental indicator weight of the i-th cluster, and e_ki represents the environmental state or measurement value of node k on the environmental indicator weight of the i-th cluster; CS(C_i) = min(d(μ_i,μ_l)×g(s_il)), where d(μ_i,μ_j) is the distance between μ_i and μ_j, μ_l is the centroid vector of the l-th cluster, s_il is the spatial distance between the i-th cluster and the l-th cluster, and g(s_il) is the spatial attenuation function; g(s_il)=exp(-F(s_il)×s_il)×h(t_il,s_il); where F(s_il) is the adaptive decay rate function, h(t_il,s_il) is the spatiotemporal correlation function, and t_il represents the maximum time difference between the nodes in the ith cluster and the lth cluster for collecting data. F(s_il)=F_0×(1+δ×exp(-θ×(s_il-s_ref))); where F_0 is the reference attenuation rate, δ and θ are adjustable parameters of the attenuation rate, and s_ref is the reference distance; Among them, ω and θ are control parameters.
7. According to the big data-based smart agriculture Internet of Things data acquisition and control system of claim 6, it is characterized in that: The master node selection method includes: For each node in the node clustering area, define the evaluation index set UL = {u_f}, where u_f represents the fth evaluation index; Construct a comment set UR of the evaluation index. For each evaluation index u_f, set f' comment levels, then the comment set UR = {v_ff'}, where v_ff' represents the f'th comment level; For node O, its actual value under the evaluation index u_f is u_f(O), then its membership on v_ff' Among them, d_ff' is the distance between the comment level v_ff' corresponding to the evaluation index u_f and the optimal comment level, δ1 is the distance adjustment parameter, u_f_std is the standard deviation of u_f in the set of all nodes in the node clustering area, and m_ff' is the statistical characteristic function; Among them, u_f_avg is the average value of u_f in the set composed of all nodes in the node clustering area, u_f_max is the maximum value of u_f in the set composed of all nodes in the node clustering area, and u_f_min is the minimum value of u_f in the set composed of all nodes in the node clustering area; For node O, under the evaluation index u_f, its membership vector is LR_f(O) = [u_ff'(O)]; The membership vectors of all nodes in the node clustering area are the elements of the fuzzy evaluation matrix; A fuzzy evaluation matrix is constructed for the nodes in each node clustering area; a comprehensive evaluation is performed on each node based on the fuzzy evaluation matrix to obtain its membership value; For the nodes in each node clustering area, they are sorted from large to small according to their membership values, and the first m nodes are selected as master nodes.
8. According to the big data-based smart agriculture Internet of Things data acquisition and control system of claim 7, it is characterized in that: The method for obtaining the fusion data includes: The environmental data and the operation data are combined into a state vector X_(P); a state space model is constructed based on the state vector X_(P); The state space model includes the state equation and the observation equation; define N2 particles and assign the same initial weight to each particle g For each particle, sampling is performed according to the state equation at time P-1 to generate a new state particle X at time P g _(P)~q(X_(P)|X g _(P-1),Z_(P)), where X g _(P) is the particle g at the Pth moment; X g _(P-1) is the particle g at the P-1th moment, and q(·) is the importance function; Calculate the weight w_g_(P) of each particle g at the Pth moment according to the observation equation; Where p(·) is the likelihood function; w_g_(P-1) is the weight of particle g at the P-1th moment; Normalize the weights of all particles, calculate the effective number of particles Neff, and preset the number threshold. If Neff is less than the number threshold, resample to eliminate particles with weights less than the preset lower limit of the weight threshold, and copy particles with weights greater than the preset upper limit of the weight threshold; The optimal state is obtained by using the weighted mean calculation of the weights and state vectors of all particles, and the optimal state of the node clustering area is obtained as the fusion data.
9. According to the big data-based smart agriculture Internet of Things data acquisition and control system of claim 8, it is characterized in that: The state equation is: X_(P)=FL_P×X_(P-1)+BL_P×v_(P-1); where FL_P is the state transfer matrix at the Pth moment, and P represents the time index; X_(P-1) is the state vector at the P-1 moment, and BL_P is the control input matrix at the Pth moment; v_(P-1) is the process noise at the P-1 moment; The observation equation is: Z_(P)=H_(P)×X_(P)+n_(P); where Z_(P) is the observation value obtained at the Pth moment, H_(P) is the observation matrix at the Pth moment, and n_(P) is the observation noise at the Pth moment.
10. The data acquisition and control system of smart agriculture Internet of Things based on big data according to claim 9 is characterized in that: The method of storing and analyzing the fusion data of each node clustering area includes: The fused data of each node clustering area is transmitted to the cloud server through the network, and a big data storage system is established in the cloud; Collect fusion data of M3 areas in the agricultural Internet of Things within a fixed historical period, record it as historical fusion data, and use machine learning algorithms to establish a data model of the agricultural production environment based on the historical fusion data; Based on the real-time fusion data, the data model is used to make a comprehensive prediction of the agricultural production environment and obtain the optimal control parameters of the production environment; According to the optimal control parameters, control instructions for the execution devices in the agricultural Internet of Things are generated, and the control instructions are sent to the corresponding execution devices through the network.
Citation Information
Cited By
Self-organizing communication method and device for intelligent equipment in urban simulation field
CN119255201A
Evaluation method for ecological restoration effect of open mining mine based on wireless sensor
CN119477100A
Method, system and device for clustering analysis of crowd based on spatio-temporal data
CN119513636A
Crop planting space layout method and device, computer equipment and storage medium
CN119782943A
Data optimization storage method and system for smart agriculture
CN120196636A
