Edible mushroom cultivation environment monitoring and intelligent control method and system based on internet of things

By constructing spatial anomaly matrices, temporal anomaly matrices, and parameter correlation matrices, the problem of multi-dimensional monitoring and control of anomalies in edible fungi cultivation environment was solved, realizing systematic intelligent control, improving the synergy and foresight of environmental control, and ensuring the accuracy and stability of the cultivation environment.

CN122170951APending Publication Date: 2026-06-09SHANDONG UNIV OF TRADITIONAL CHINESE MEDICINE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG UNIV OF TRADITIONAL CHINESE MEDICINE
Filing Date
2026-03-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing edible fungi cultivation environment monitoring and control systems fail to effectively integrate the spatial distribution, temporal evolution patterns, and multi-parameter coupling relationships of abnormalities, resulting in a lack of spatial coordination and insufficient temporal prediction in regulation, making it difficult to achieve systematic and coordinated regulation.

Method used

By constructing a spatial anomaly matrix, a temporal anomaly matrix, and an anomaly parameter correlation matrix, and integrating spatial clustering features, temporal evolution features, and parameter correlation features, anomaly pattern description information is generated. Based on the global anomaly threshold, a temporal control instruction sequence is generated to achieve multi-dimensional anomaly perception and intelligent collaborative control.

Benefits of technology

It enhances the systematicness, coordination, and foresight of environmental regulation, enables comprehensive monitoring and early warning of anomalies, solves the problems of lag and local over-regulation in traditional single-point regulation, and ensures the accuracy and stability of the cultivation environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122170951A_ABST
    Figure CN122170951A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on edible mushroom cultivation environment monitoring and intelligent control method and system of Internet of Things, it is related to the field of intelligent monitoring of edible mushroom factory cultivation environment, comprising: by collecting each partition environment data and cultivation stage label, query dynamic target curve and calculate deviation to generate abnormal vector;Further in combination with spatial position, historical sequence and abnormal partition data, construct spatial anomaly matrix, time anomaly matrix and abnormal parameter correlation matrix;Fusion multidimensional matrix extracts spatial aggregation, time series evolution and parameter correlation characteristics, form abnormal mode description information;Finally based on abnormal degree, mode information and global threshold value generate global abnormal result, and accordingly produce time series control instruction to synergistic control environment equipment.The application realizes the systematic diagnosis and intelligent control of environmental anomaly, effectively improves the precision and overall stability of cultivation environment control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent monitoring technology for industrialized cultivation environment of edible fungi, and more specifically, this application relates to a method and system for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things. Background Technology

[0002] Factory cultivation of edible fungi has strict and dynamic requirements for environmental parameters (such as temperature, humidity, carbon dioxide concentration, and light), with significant differences in the required environmental conditions at different growth stages. Currently, most edible fungi cultivation workshops use IoT-based sensor networks to collect environmental data and achieve local environmental control through automated equipment (such as fans, humidifiers, and lighting devices).

[0003] However, existing environmental monitoring and control systems often rely solely on simple PID control based on real-time data deviations, failing to integrate the spatial distribution of anomalies, temporal evolution patterns, and multi-parameter coupling relationships, making it difficult to achieve an upgrade from "single-point control" to "systematic collaborative control."

[0004] Furthermore, while existing studies have incorporated machine learning algorithms to optimize control strategies, they largely focus on temporal prediction, lacking comprehensive analysis of anomalous spatial clustering effects, temporal transmission paths, and implicit correlations between parameters, resulting in a lack of spatial coordination in control commands. Therefore, this paper proposes an IoT-based method and system for monitoring and intelligently controlling the edible mushroom cultivation environment to address this issue. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method and system for monitoring and intelligently controlling the cultivation environment of edible fungi based on the Internet of Things (IoT). This technical solution resolves the issues raised in the background section.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows:

[0007] Firstly, this application introduces a method for monitoring and intelligently controlling the cultivation environment of edible fungi based on the Internet of Things, including:

[0008] Obtain environmental data vectors for each zone within the cultivation chamber and context label vectors representing the current cultivation stage;

[0009] For each partition, the dynamic target vector is obtained by querying the pre-stored dynamic target curve based on the context label vector, the environmental parameter deviation between the dynamic target vector and the environmental data vector is calculated, and the deviation is compared with the preset partition anomaly threshold to generate a partition anomaly identification vector and a partition anomaly degree vector.

[0010] Based on the partition anomaly degree vector and the pre-stored partition location information, the anomaly degree of each partition is mapped to a spatial anomaly matrix with a three-dimensional matrix structure, which is used to characterize the spatial topological features of the anomaly distribution.

[0011] Based on the historical sequence data of the partition anomaly degree vector, a time anomaly matrix is ​​organized according to the time dimension into a two-dimensional matrix structure to reflect the dynamic temporal change characteristics of anomalies.

[0012] Based on the environmental data vector and the partition anomaly identifier vector, the environmental parameter data corresponding to the abnormal partition is filtered, the statistical correlation between each environmental parameter data is calculated, and an anomaly parameter correlation matrix reflecting the correlation between different environmental parameters under abnormal conditions is constructed accordingly.

[0013] By fusing the spatial anomaly matrix, the temporal anomaly matrix, and the anomaly parameter correlation matrix, spatial clustering features, temporal evolution features, and parameter correlation features are extracted to generate anomaly pattern description information that describes the comprehensive features of the current anomaly.

[0014] Based on the partition anomaly degree vector, the anomaly pattern description information, and the preset global anomaly threshold, the proportion of abnormal partitions is statistically analyzed and a global anomaly result is generated. Based on the global anomaly result, a time-series control instruction sequence is generated to control the environmental control equipment in the cultivation room.

[0015] Secondly, this application provides an Internet of Things (IoT)-based edible mushroom cultivation environment monitoring and intelligent control system for implementing the aforementioned IoT-based edible mushroom cultivation environment monitoring and intelligent control method, including:

[0016] The data acquisition module is used to acquire environmental data vectors for each zone in the cultivation room and context label vectors representing the current cultivation stage.

[0017] The anomaly calculation module is used to query the pre-stored dynamic target curve based on the context label vector for each partition to obtain the dynamic target vector, calculate the environmental parameter deviation between it and the environmental data vector, and compare it with the preset partition anomaly threshold to generate a partition anomaly identification vector and a partition anomaly degree vector.

[0018] The spatial analysis module is used to map the anomaly degree of each partition to a spatial anomaly matrix with a three-dimensional matrix structure, which is used to characterize the spatial topological features of the anomaly distribution, based on the partition anomaly degree vector and pre-stored partition location information.

[0019] The time series analysis module is used to organize the historical sequence data of the partition anomaly degree vector into a time anomaly matrix with a two-dimensional matrix structure, which is used to reflect the dynamic time series change characteristics of the anomaly, according to the time dimension.

[0020] The parameter association module is used to filter environmental parameter data corresponding to abnormal partitions based on the environmental data vector and the partition anomaly identifier vector, calculate the statistical correlation degree between each environmental parameter data, and construct an anomaly parameter association matrix that reflects the correlation relationship of different environmental parameters under abnormal conditions.

[0021] An anomaly fusion module is used to fuse the spatial anomaly matrix, the temporal anomaly matrix, and the anomaly parameter correlation matrix, extract spatial clustering features, temporal evolution features, and parameter correlation features, and generate anomaly pattern description information describing the current comprehensive anomaly features.

[0022] The control instruction module is used to calculate the proportion of abnormal partitions and generate a global abnormal result based on the partition abnormality degree vector, the abnormality mode description information and the preset global abnormality threshold, and generate a time-series control instruction sequence based on the global abnormality result to control the environmental control equipment in the cultivation room.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0024] This application constructs a spatial anomaly matrix based on the partition anomaly degree vector and pre-stored location information, and constructs a temporal anomaly matrix using historical sequences. It integrates spatial clustering characteristics and temporal evolution characteristics to solve the shortcomings of isolated analysis of anomalies in spatial distribution and temporal evolution, and realizes comprehensive monitoring and early warning of anomaly propagation paths, clustering areas and development trends.

[0025] This application calculates the statistical correlation degree by screening environmental parameter data of abnormal zones, constructs an abnormal parameter correlation matrix, reveals the implicit coupling relationship of multiple parameters such as temperature, humidity, and carbon dioxide concentration under abnormal conditions, solves the blind spot of composite anomaly identification caused by traditional single parameter independent processing, and provides a quantitative basis for the diagnosis of multidimensional environmental imbalance.

[0026] This application integrates spatial anomaly matrix, temporal anomaly matrix, and anomaly parameter correlation matrix to extract multi-dimensional features such as spatial, temporal, and parameter correlation, generating anomaly pattern description information that comprehensively describes the anomaly's overall characteristics. Based on the global anomaly threshold and the proportion of anomaly partitions, it generates a temporal control instruction sequence, realizing closed-loop control from multi-dimensional anomaly perception to intelligent collaborative regulation, thereby improving the systematicness, coordination, and foresight of environmental regulation. Attached Figure Description

[0027] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:

[0028] Figure 1 The flowchart shows the method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things proposed in this invention.

[0029] Figure 2 This is a flowchart of the method for obtaining abnormal mode description information in this invention;

[0030] Figure 3 This is a schematic diagram of the Internet of Things-based edible fungi cultivation environment monitoring and intelligent control system of the present invention. Detailed Implementation

[0031] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0032] In traditional, existing environmental monitoring and control systems for industrialized edible mushroom cultivation, environmental control mechanisms generally rely on simple PID regulation based on real-time data deviations. The problem with this system is its failure to integrate the spatial distribution characteristics of anomalies, their temporal evolution patterns, and the coupling relationships between multiple parameters. When environmental anomalies are triggered by localized temperature and humidity imbalances within the cultivation workshop, these anomalies often exhibit spatial clustering effects and propagate along specific paths over time. Simultaneously, there are implicit interactions between different environmental parameters (such as carbon dioxide concentration and air velocity). At this point, the static, single-point control logic becomes disconnected from the actual dynamic changes in the workshop's environmental state. This disconnect directly leads to a discrepancy between the system's overall judgment of the anomaly and the actual environmental imbalance, resulting in delayed control responses or localized over-regulation. Especially during environmentally sensitive stages such as the fruiting period, the system cannot accurately identify anomaly patterns involving multi-regional and multi-parameter coupling effects.

[0033] For example, in the industrialized cultivation of silver ear fungus, a humidifier malfunction in one cultivation zone caused the relative humidity to remain below the set value, while the carbon dioxide concentration in that area gradually increased due to insufficient ventilation. Temperature and humidity sensors detected a humidity deviation of -15% in this zone, and the carbon dioxide sensor showed a concentration 200 ppm higher than the set value. Furthermore, the humidity in adjacent zones also began to decrease. Traditional systems still only perform PID control based on the independent deviations of each sensor, failing to identify the spatial diffusion tendency of the anomaly or consider the coupling relationship between temperature, humidity, and carbon dioxide concentration at this production stage. The single-point control command only activates humidification for the faulty zone, while in the actual environment, the anomaly has formed a complex state of "low humidity - high carbon dioxide - diffusion."

[0034] If the aforementioned problems are not addressed, the regulatory mechanism will struggle to capture the abnormal evolution processes involving multiple interconnected regions and intertwined parameters, causing the environment to miss the optimal regulatory window for recovery. When local anomalies spread spatially, accumulate over time, and trigger negative coupling between parameters, the cultivation environment may have already deviated from its optimal range, resulting in hindered mycelial development, uneven primordia formation, and even increased contamination rates. Simultaneously, after partial recovery of environmental parameters, the system may oscillate repeatedly due to a lack of coordinated regulatory commands, leading to increased energy consumption and physiological stress on the mycelium. This mismatch between single-point criteria and dynamic, multi-dimensional environmental changes severely restricts the efficiency and stability of industrialized cultivation systems in precision agriculture.

[0035] Faced with the aforementioned problems, this application first analyzes the reasons for the failure of traditional single-point control mechanisms, finding that it lies in the failure to comprehensively consider the dynamic impact of the spatial clustering, temporal transitivity, and inter-parameter correlation of anomalies on the control strategy. To address this, this application attempts to map the degree of anomaly in each region to a three-dimensional matrix structure and construct a spatial anomaly matrix reflecting the distribution characteristics of anomalies; further, it constructs a temporal anomaly matrix based on historical anomaly data to extract the evolution patterns of anomalies; simultaneously, it constructs an anomaly parameter correlation matrix by analyzing the statistical correlations between multiple environmental parameters under anomaly conditions. Through the fusion analysis of multi-dimensional anomaly characteristics, descriptive information capable of describing the comprehensive anomaly pattern is finally formed, and a control command sequence with spatiotemporal coordination is generated based on the proportion of anomaly regions and a global threshold, achieving an improvement from "single-point response" to "systematic intelligent control."

[0036] Example 1:

[0037] like Figure 1 As shown, this application introduces a method for monitoring and intelligently controlling the cultivation environment of edible fungi based on the Internet of Things, including:

[0038] S1. Obtain the environmental data vectors of each zone in the cultivation room and the context label vectors representing the current cultivation stage;

[0039] S2. For each partition, the dynamic target vector is obtained by querying the pre-stored dynamic target curve based on the context label vector, and the environmental parameter deviation between it and the environmental data vector is calculated. The deviation is then compared with the preset partition anomaly threshold to generate a partition anomaly identification vector and a partition anomaly degree vector.

[0040] The process of obtaining the partition anomaly identifier vector and the partition anomaly severity vector specifically includes:

[0041] For each partition, the environmental parameter deviation between the environmental data vector and the corresponding environmental parameter values ​​in the dynamic target vector is calculated and compared with the partition anomaly threshold to obtain the preliminary anomaly result for that partition.

[0042] Based on the preliminary anomaly assessment results of all partitions, generate partition anomaly identifier vectors;

[0043] Based on the environmental parameter deviations of all partitions, a partition anomaly degree vector is generated through normalization processing. Each element of the partition anomaly identification vector and the partition anomaly degree vector corresponds to a partition.

[0044] The construction process of the dynamic target curve library specifically includes:

[0045] Obtain historical environmental data vector sequences under various known cultivation scenarios, as well as scenario label vectors and historical cultivation effectiveness evaluation data corresponding to the historical environmental data vector sequences;

[0046] Cluster analysis was performed on the historical environmental data vector sequence based on the context label vector to classify multiple cultivation context categories with similar environmental parameter change patterns.

[0047] For each cultivation scenario category, based on its corresponding historical environmental data vector sequence and historical cultivation effectiveness evaluation data, a dynamic target curve representing the optimal change trajectory of each environmental parameter under that scenario is generated through data fitting and optimization algorithms.

[0048] The generated dynamic target curve is associated and bound with one or more specific context label vectors to form a mapping relationship;

[0049] Store all dynamic target curves and their mapping relationship with context label vectors, and build and output a dynamic target curve library.

[0050] Regarding steps S1-S2, the following are included:

[0051] Obtain the environmental data vectors and current context label vectors for each zone within the cultivation chamber:

[0052] The cultivation room is divided into K zones, each equipped with sensors for temperature, humidity, and carbon dioxide concentration. The system collects data from each zone's sensors in real time to construct an environmental data vector. :

[0053] ;

[0054] Where k is the partition index and K is the maximum number of partitions. This represents the set of environmental parameters for the k-th partition at time t, for example... , This represents the temperature parameter value of the k-th partition at time t. This represents the humidity parameter value of the k-th partition at time t. This represents the carbon dioxide parameter value of the k-th partition at time t.

[0055] Context label vector Used to characterize the current cultivation stage and conditions, for example:

[0056] ;

[0057] Query the dynamic target curve and generate a partition anomaly identifier vector and a partition anomaly severity vector:

[0058] (1) Construction process of dynamic target curve library:

[0059] The system acquires environmental data sequences under various cultivation scenarios, along with their corresponding scenario labels and cultivation effectiveness evaluations. Based on the scenario labels and environmental change patterns, it categorizes cultivation scenarios. For each scenario, based on historical data and effectiveness evaluations, it fits and generates the optimal change trajectory curves for each environmental parameter. The curves are then bound to the corresponding scenario labels and stored.

[0060] (2) Anomaly detection and vector generation:

[0061] Execute at time t:

[0062] Based on context label vectors Query the dynamic target curve library to obtain the dynamic target vector at the current time. .

[0063] For each partition k, calculate the environmental parameter deviations for each environmental parameter. , Represents environmental data vectors The environmental parameters p in the k-th partition at time t, Represents the dynamic target vector The environmental parameter p in the k-th partition at time t.

[0064] Set the partition anomaly threshold θp (e.g., temperature) =2.0℃). If any environmental parameter deviates... If the partition anomaly threshold θp is reached, the partition is considered abnormal; otherwise, it is normal.

[0065] Generate partition anomaly identifier vector The element is either 0 (normal) or 1 (abnormal).

[0066] The deviations of each partition are normalized to generate a vector of partition anomaly degree. The element value range is [0, 1].

[0067] Example: Suppose the cultivation room is divided into 4 zones, and the temperature data is as follows:

[0068] partition Actual temperature (°C) Target temperature (°C) deviation threshold Anomaly indicator 1 22.5 23.0 0.5 2.0 0 2 25.8 23.0 2.8 2.0 1 3 22.0 23.0 1.0 2.0 0 4 20.5 23.0 2.5 2.0 1

[0069] Example: such as a partition anomaly identifier vector: =[0, 1, 0, 1]; Partition anomaly vector (after normalization): =[0.18, 1.0, 0.36, 0.89].

[0070] Through the above technical solution, this application solves the problem of insufficient adaptability of abnormal detection caused by static threshold standards in the existing environmental monitoring of cultivation rooms. It dynamically generates environmental target curves for different cultivation stages and zones, which not only realizes the accurate identification and quantitative assessment of abnormal situations, but also ensures that the monitoring standards are consistent with the actual cultivation needs through a contextualized dynamic target library. At the same time, the target curve library built based on clustering and optimization algorithms effectively improves the scientificity and reliability of environmental management.

[0071] S3. Based on the partition anomaly degree vector and the pre-stored partition location information, map the anomaly degree of each partition to a spatial anomaly matrix with a three-dimensional matrix structure that is used to characterize the spatial topological features of the anomaly distribution.

[0072] The process of constructing the spatial anomaly matrix specifically includes:

[0073] Based on the partition location information, a three-dimensional matrix structure that can characterize the overall spatial layout of the cultivation room is determined. The abnormality degree value of each partition in the partition abnormality degree vector is mapped and filled into the corresponding unit position of the three-dimensional matrix structure according to its corresponding partition location information. For the unit position not covered by the partition, a preset default value is filled in, thereby generating a spatial distribution matrix. Each element value of the spatial abnormality matrix represents the comprehensive abnormality degree of the corresponding spatial position. Its overall structure reflects the spatial aggregation and distribution characteristics of spatial abnormalities in the cultivation room.

[0074] Regarding step S3, it includes:

[0075] Input partition anomaly vector ,in ∈[0,1] indicates the degree of anomaly in the k-th partition.

[0076] Retrieve pre-stored partition location information, including the three-dimensional coordinates of each partition. .

[0077] Constructing a three-dimensional matrix structure:

[0078] The dimensions (Lx, Ly, Lz) of the three-dimensional matrix M are determined based on all partition coordinates, so that it covers the entire cultivation chamber space.

[0079] Initialize matrix M, assigning all elements the default value of -1 (indicating no partition coverage).

[0080] Mapping anomaly level value:

[0081] Iterate through each partition k (k is between 1 and K):

[0082] According to coordinates Determine the corresponding position (i, j, l) in matrix M.

[0083] Will Assign the value to M[i,j,l].

[0084] Positions in the matrix that are not covered by partitions are kept at -1.

[0085] Output spatial anomaly matrix:

[0086] Normalize and spatially interpolate the matrix M (e.g., neighbor interpolation) to generate the final spatial anomaly matrix. .

[0087] Each element value represents the degree of anomaly at the corresponding spatial location, and the overall value reflects the spatial clustering and distribution characteristics of the anomalies.

[0088] Example: Suppose the cultivation room is divided into 4 zones, and their coordinates and anomalies are as follows:

[0089] partition Coordinates (x, y, z) abnormality 1 (1,1,1) 0.18 2 (3,2,1) 1.00 3 (1,3,2) 0.36 4 (2,1,3) 0.89

[0090] Construct a 3D matrix M (3×3×3), map some positions and assign values, leaving the rest as -1. Output the matrix after interpolation and normalization. This is used for subsequent analysis.

[0091] Through the above technical solution, this application solves the problem of lack of spatial correlation of environmental anomalies under the existing zoned monitoring mode. By mapping the degree of anomaly in each zone to a three-dimensional matrix structure, discrete anomaly data are integrated into a continuous spatial distribution view, thereby intuitively revealing the aggregation area and diffusion trend of anomalies in the cultivation room, providing a key basis for accurately locating the source of the problem and formulating spatial coordinated control strategies.

[0092] S4. Based on the historical sequence data of the partition anomaly degree vector, organize it into a time anomaly matrix with a two-dimensional matrix structure to reflect the dynamic temporal change characteristics of anomalies.

[0093] The process of constructing the time anomaly matrix specifically includes:

[0094] Obtain the historical sequence of the partition anomaly degree vector and its corresponding timestamp;

[0095] The historical sequence is sorted chronologically, and a two-dimensional matrix structure is constructed with timestamps as the row dimension and each zone in the cultivation room as the column dimension.

[0096] The element values ​​of the anomaly degree vector of each historical partition are filled into the corresponding row and column positions of the two-dimensional matrix structure according to their timestamps and partition numbers, thereby generating a time anomaly matrix. Each row of the time anomaly matrix represents the distribution of anomaly degree of all partitions at a certain moment, and each column represents the sequence of anomaly degree changes of a certain partition within a continuous time window. Overall, it reflects the evolution trend and periodic characteristics of anomalies in time series.

[0097] Regarding step S4, it includes:

[0098] Obtain the partition anomaly vector at the current time t. in ∈[0,1] indicates the degree of anomaly in the k-th partition.

[0099] Obtain the vector sequence of historical partition anomalies within a predefined time window length W (e.g., 24 hours). } and its corresponding timestamp.

[0100] Constructing a time anomaly matrix:

[0101] Arrange the historical sequence in order of timestamp (from early to late).

[0102] Construct a two-dimensional matrix structure T with time points as the row dimension (W-1 rows in total) and K partitions as the column dimension, with dimensions (W-1)×K.

[0103] Fill matrix elements:

[0104] Traverse each history vector The row index of a given element in matrix T is determined by its chronological order.

[0105] Elements in each vector Fill the corresponding row (time point) and column (partition k) positions in matrix T.

[0106] Output the final matrix:

[0107] Perform data integrity checks on matrix T, and if missing values ​​exist, use interpolation methods to handle them.

[0108] Output the final time anomaly matrix ,in:

[0109] Each row represents the distribution of anomalies across all partitions at a given time.

[0110] Each list represents a sequence of anomalies in a given partition within a continuous time window;

[0111] It reflects the evolution trend and periodic characteristics of the anomaly over time.

[0112] Example: Given K=4, W=5 hours, the historical sequence is as follows:

[0113] time S-vector (abnormality level of partitions 1-4) t-4 [0.1,0.3,0.0,0.2] t-3 [0.2,0.5,0.1,0.3] t-2 [0.3,0.7,0.2,0.4] t-1 [0.4,0.9,0.3,0.5]

[0114] Construct a matrix in chronological order (4 rows × 4 columns), with rows and columns corresponding to time points and partitions respectively, for subsequent time series analysis.

[0115] Through the above technical solution, this application solves the problem of difficulty in trend judgment caused by focusing only on instantaneous state and ignoring temporal correlation in existing environmental monitoring. By constructing historical abnormal data into a time series matrix, it realizes continuous tracking and overall analysis of the abnormal evolution process of each zone. It can reveal the path and periodic pattern of abnormal propagation, and provide key data support for predicting future risks and formulating long-term control strategies.

[0116] S5. Based on the environmental data vector and the partition anomaly identifier vector, filter the environmental parameter data corresponding to the abnormal partition, calculate the statistical correlation between the parameters, and construct an anomaly parameter correlation matrix that reflects the correlation between different environmental parameters under abnormal conditions.

[0117] The process of constructing the correlation matrix of abnormal parameters specifically includes:

[0118] Obtain environmental data vectors, partition anomaly identifier vectors, and a predefined list of environmental parameters to be analyzed;

[0119] Based on the partition anomaly identifier vector, all partitions identified as being in an abnormal state are identified and filtered out. The values ​​of various environmental parameters corresponding to the filtered abnormal partitions are extracted from the environmental data vector to generate an abnormal environmental parameter dataset.

[0120] Based on the abnormal environment parameter dataset, for each pair of parameters in the list of environmental parameters to be analyzed, the statistical correlation degree between the values ​​of the pair of parameters under abnormal conditions is calculated, and the correlation degree value is generated.

[0121] A two-dimensional square matrix structure is constructed using the parameters in the list of environmental parameters to be analyzed as rows and columns.

[0122] Fill the corresponding row and column intersection positions of the two-dimensional square matrix structure with the calculated correlation values ​​between each pair of parameters.

[0123] Generate and output an anomaly parameter correlation matrix, where the diagonal elements of the anomaly parameter correlation matrix represent the correlation degree of the parameters themselves, and the off-diagonal elements represent the strength and direction of the mutual correlation of different environmental parameters under anomaly conditions.

[0124] Regarding step S5, it includes:

[0125] Input environment data vector (dimension K×P, containing P types of environment parameter values ​​for K partitions).

[0126] Input partition anomaly identifier vector ,in =1 indicates a partition error.

[0127] Input a predefined list of parameters for the environment to be analyzed. (M≤P).

[0128] Filtering abnormal partition data:

[0129] Based on partition anomaly identifier vector Filter all Partitions with a value of 1 constitute the abnormal partition set A.

[0130] Extract the values ​​of each environmental parameter corresponding to all partitions in the abnormal partition set A from the environmental data vector, and generate the abnormal environmental parameter dataset Da (dimension |A|×P).

[0131] Calculate the statistical correlation between parameters:

[0132] For each pair of parameters (pᵢ, pⱼ) in the list of environmental parameters to be analyzed L, extract their numerical sequences in all abnormal partitions from the abnormal environmental parameter dataset Da.

[0133] Calculate the statistical correlation rᵢⱼ (e.g., Pearson correlation coefficient) between the two numerical sequences to obtain the correlation set R={rᵢⱼ}.

[0134] Construct and output the matrix:

[0135] Construct an M×M two-dimensional square matrix C using the M parameters in list L as rows and columns.

[0136] Fill each rᵢⱼ into the i-th row and j-th column of matrix C (set the diagonal rᵢᵢ to 1).

[0137] Output abnormal parameter correlation matrix Its off-diagonal element values ​​characterize the correlation strength and direction of different parameters under abnormal conditions.

[0138] Example: Suppose that the environmental data vector contains temperature (T), humidity (H), and CO2 concentration (C) for 4 zones; =[1, 0, 1, 0]; L = [T, H, C].

[0139] Extracting data from outlier partitions 1 and 3 yields Da, which is then used to calculate the correlation coefficient, resulting in a matrix. (3×3), with rows and columns corresponding to T, H, and C, and element values ​​being the Pearson correlation coefficients between parameters.

[0140] Through the above technical solution, this application solves the problem of neglecting the interaction between parameters in the existing environmental monitoring due to the isolated analysis of single parameter anomalies. By focusing on environmental data under abnormal conditions and calculating its statistical correlation, a correlation matrix that can quantitatively characterize the linkage relationship between parameters is constructed, thereby revealing the key parameter combinations and potential transmission paths that lead to anomalies. This provides a data-driven decision-making basis for in-depth analysis of the root causes of anomalies and the formulation of coordinated control strategies.

[0141] S6. By fusing the spatial anomaly matrix, temporal anomaly matrix, and anomaly parameter correlation matrix, spatial clustering features, temporal evolution features, and parameter correlation features are extracted to generate anomaly pattern description information that describes the comprehensive features of the current anomaly.

[0142] like Figure 2 As shown, the process of obtaining abnormal mode description information is introduced, which specifically includes:

[0143] Process the spatial anomaly matrix to identify continuous regions whose anomaly values ​​exceed a preset spatial aggregation threshold;

[0144] Based on the identified continuous regions, a list of spatial clustered regions is generated, and the spatial center coordinates, coverage area, and average anomaly intensity of each spatial clustered region are recorded as spatial distribution characteristics.

[0145] The time anomaly processing matrix determines the consecutive time points in the recent preset duration where the anomaly level value exceeds a preset duration threshold for each partition's corresponding column sequence.

[0146] Based on continuous time points, the start time, duration and slope of abnormal states in each partition are extracted to generate time-series evolution features.

[0147] Process the abnormal parameter association matrix and identify parameter pairs in which the absolute value of the off-diagonal elements exceeds a preset association strength threshold;

[0148] Based on the parameter pairs, a list of parameter association pairs is generated, and the association strength and direction between each parameter pair are recorded as parameter association features;

[0149] Integrating spatial distribution characteristics, temporal evolution characteristics, and parameter correlation characteristics;

[0150] Determine whether there is an abnormal pattern that meets the following composite conditions: In at least one region in the list of spatial clustering regions, there is a partition whose corresponding temporal evolution characteristics show that the duration of the abnormal state exceeds a preset threshold, and the parameter association pair list includes at least one pair of environmental parameters related to the abnormality of that region.

[0151] Based on the judgment results, corresponding anomaly pattern description information is generated. The anomaly pattern description information includes anomaly pattern identifier, the spatial clustering area involved, the core period of anomaly duration, and the combination of environmental parameters that play a dominant role.

[0152] Regarding step S6, it includes:

[0153] Input space anomaly matrix Time anomaly matrix , Abnormal parameter correlation matrix .

[0154] Get preset thresholds: spatial aggregation threshold, persistence threshold, association strength threshold, and preset duration.

[0155] Extracting spatial distribution features: scanning It identifies continuous regions where the anomaly level exceeds the spatial clustering threshold; calculates the spatial center coordinates, coverage area, and average anomaly intensity of each region; and outputs a list of spatially clustered regions.

[0156] Extracting temporal evolution features: for For each column (corresponding to a partition), extract the most recent sequence with a preset duration; identify time periods in the sequence that continuously exceed a duration threshold; calculate the start time, duration, and slope of change for each time period; and output a list of time series evolution features.

[0157] Extracting parameter-related features: scanning For off-diagonal elements, filter parameter pairs whose absolute values ​​exceed the association strength threshold; record the association strength and direction of each parameter pair; output a list of parameter association pairs.

[0158] Identify abnormal patterns: Traverse each region in the list of spatial clustering regions. For each region, find the sub-regions within the region and obtain their temporal features from the list of temporal evolution features.

[0159] Determine whether an abnormal pattern exists that simultaneously meets the following conditions: (1) the duration of the abnormal state of at least one partition exceeds a preset duration threshold; (2) the parameter association pair list contains at least one pair of environmental parameters related to the abnormality of that area. If the conditions are met, an abnormal pattern is determined to exist.

[0160] Generate anomaly mode description information:

[0161] For each identified abnormal pattern: assign a unique identifier; record the spatial clustering area involved, the core period of the abnormality's duration (take the start and end time of the longest-lasting partition), and the dominant combination of environmental parameters (select the parameter pair with the strongest correlation from the parameter correlation pair list).

[0162] Example: Let Region R1 was identified, and its internal partition 5 is located within it. The system displays anomalies for 3 consecutive hours (duration > 2-hour threshold), and If the correlation coefficient between temperature and humidity exceeds 0.9, an anomaly pattern description is generated: identifier P001, region R1, core time period t-3 to t, and dominant correlation parameter combination [temperature, humidity].

[0163] Through the above technical solution, this application solves the problem of one-sided and inefficient anomaly pattern recognition caused by the fragmentation of spatial, temporal and parameter correlation information in existing environmental monitoring systems. By multi-dimensional feature fusion and composite condition judgment, it realizes the collaborative analysis and comprehensive diagnosis of the spatial clustering, temporal persistence and parameter linkage of abnormal states, thereby generating a comprehensive and structured description of anomaly patterns, providing a reliable basis for accurate early warning and root cause tracing.

[0164] S7. Based on the partition anomaly degree vector, anomaly pattern description information and preset global anomaly threshold, calculate the proportion of abnormal partitions and generate global anomaly results. Then, based on the global anomaly results, generate a time-series control instruction sequence to control the environmental control equipment in the cultivation room.

[0165] The process of obtaining global exception results specifically includes:

[0166] Based on the partition anomaly degree vector, the number of partitions whose element values ​​exceed the global anomaly threshold is counted, and the proportion of abnormal partitions is calculated.

[0167] A preliminary anomaly level is generated based on the proportion of abnormal partitions;

[0168] Based on the abnormal pattern description information, determine whether the abnormal pattern identifier belongs to the preset abnormal pattern type that needs to be focused on.

[0169] If it is, the initial anomaly level will be increased according to the preset rules, and the anomaly level after the generation mode enhancement will be generated.

[0170] The enhanced anomaly level, spatial clustering areas in the anomaly mode description information, and the combination of environmental parameters that dominate the correlation are used to generate a global anomaly result. The global anomaly result includes a global anomaly level, anomaly mode identifier, a list of major affected areas, and a list of associated anomaly parameters.

[0171] Regarding step S7, it includes:

[0172] Input partition anomaly vector ( ∈[0,1]), abnormal mode description information (if present), including its identifier, the list of involved partitions and the dominant associated parameter combination, the current global abnormal threshold and the preset list of key abnormal mode types.

[0173] Calculate the percentage of abnormal partitions: Statistics China satisfies The global anomaly threshold is calculated by determining the percentage of abnormal partitions: number of partitions / K.

[0174] Determine the preliminary anomaly level: Based on the preset percentage-level mapping rule, the preliminary anomaly level is determined by the percentage of the anomaly zone. For example, if the percentage is below 5%, the danger level is 1; if the percentage is 5%-10%, the danger level is 2; if the percentage is 10%-20%, the danger level is 3; and if the percentage is above 20%, the danger level is 4.

[0175] Perform pattern enhancement judgment: If there is abnormal pattern description information and its identifier belongs to the list of key attention types, then adjust the initial abnormality level to the pattern-enhanced global abnormality level according to preset rules (such as upgrading by one level); otherwise, the global abnormality level = the initial abnormality level.

[0176] Generate and output global anomaly results: Extract the list of major affected areas (partition number list) and the list of associated anomaly parameters (dominant associated parameter combinations) from the anomaly pattern description information; if they do not exist, the list will be empty.

[0177] Output global anomaly results, including: global anomaly level, anomaly pattern identifier (if present), list of main affected areas, and list of associated anomaly parameters.

[0178] Example: Let Length K=10, global anomaly threshold=0.5, with 4 partitions. Since the value is greater than 0.5, the percentage of abnormal zones is 0.4, resulting in an initial anomaly level of 4. The current anomaly pattern identifier P001 belongs to the key concern type; after the level is increased, the global anomaly level is 5. The anomaly pattern description information indicates that the affected zones are [2, 3, 5, 7], and the dominant correlation parameters are [temperature, humidity]. Therefore, the output global anomaly result is: Level 4, Identifier P001, Affected Areas [2, 3, 5, 7], Correlation Parameters [Temperature, Humidity].

[0179] Through the above technical solution, this application solves the problem that the response strategy of the existing environmental control system is crude and lacks comprehensive judgment due to its isolated reliance on threshold alarms. By integrating the regional anomaly statistics and high-order anomaly pattern information, it realizes the accurate quantification and dynamic correction of the overall anomaly level, and generates a control instruction sequence that combines spatial targeting, temporal priority, and parameter coordination, thereby ensuring that the environmental control action is highly matched with the actual severity, diffusion pattern, and root cause correlation of the anomaly.

[0180] This application further proposes, after obtaining global anomaly results, to also include correcting the timing control instruction sequence using historical control experience data, specifically including:

[0181] Obtain the global anomaly results, the environmental data vector, and historical regulation experience data;

[0182] Based on the abnormal pattern identifier, one or more historical control strategies that match the current abnormal pattern are queried and extracted from the historical control experience data.

[0183] Based on the global anomaly level and the list of major affected areas, the extracted historical control strategies are prioritized and corrected to generate the current set of candidate control strategies.

[0184] By combining the environmental data vector with the list of associated abnormal parameters, the initial target value for regulatory intervention is calculated;

[0185] Based on the candidate control strategy set, a time-series control instruction sequence is generated for control devices in different environments;

[0186] The timing control instruction sequence is arranged according to preset timing logic and coordination rules to generate a modified timing control instruction sequence.

[0187] Specifically, the input includes global anomaly results (including global anomaly level, anomaly pattern identifier, list of major affected areas, and list of associated anomaly parameters), environmental data vectors, and historical control experience data (including anomaly pattern identifiers, historical control strategies, and their effectiveness evaluations) retrieved from a pre-stored knowledge base of contextualized control effects.

[0188] The process of constructing a knowledge base for contextualized regulation effects specifically includes:

[0189] Obtain historical environmental data vector sequences, historical control command sequences, and context label vectors and historical cultivation effectiveness evaluation data corresponding to each historical sequence under various known cultivation scenarios;

[0190] Based on historical environmental data vector sequences, historical control command sequences, and historical cultivation effectiveness evaluation data, analysis and processing are performed to determine and extract the control effect of historical control command sequences on historical environmental data vector sequences under different context label vectors, as well as the correspondence between the control effect and the final historical cultivation effectiveness evaluation data, and to generate control experience items.

[0191] The generated regulatory experience entries are associated and mapped with one or more specific context label vectors to form contextualized regulatory knowledge units;

[0192] Integrate all regulatory knowledge units under all cultivation scenarios to construct and output a knowledge base of contextualized regulatory effects; among which, regulatory experience data includes recommended combinations of regulatory instructions to be adopted under specific cultivation scenarios, expected environmental parameter change trajectories, and historical application effectiveness evaluations.

[0193] Matching and extracting historical control strategies: If an anomaly pattern identifier exists, relevant historical control strategies are matched and extracted from historical control experience data to form an initial strategy set. If no anomaly pattern identifier exists, the general control strategy corresponding to the global anomaly level is extracted as the initial strategy set.

[0194] Generate a candidate policy control strategy set: Sort the policies in the initial policy set according to their historical effectiveness based on the global anomaly level. Adjust the regional applicability of the sorted policies based on the list of major affected regions. Output the candidate policy control strategy set.

[0195] Calculate the initial target value for regulatory intervention: Extract the current values ​​of parameters corresponding to the list of associated abnormal parameters from the environmental data vector. Combine this with the adjustment effects of relevant strategies in historical regulatory experience data to calculate the initial target value for regulation.

[0196] Generate a sequence of time-series control instructions: Based on the strategies in the candidate control strategy set, the list of major affected areas, and the initial control target value, generate a set of time-series control instructions for each environmental control device. Each instruction includes the device, action, target value, and execution area.

[0197] Arrange the initial instruction sequence: Arrange the instructions in the timing control instruction sequence set according to the preset timing logic and device coordination rules. Generate an initial timing control instruction sequence.

[0198] Verification of timing logic and coordination rules: The preliminary timing control instruction sequence that passes the verification is used as the final timing control instruction sequence.

[0199] Output the final timing control command sequence to the corresponding environmental control equipment for execution.

[0200] Example: Suppose a global anomaly result indicates an anomaly mode P001, with an affected area of ​​[2, 3, 5, 7] and associated parameters [temperature, humidity]. Control strategies for P001 are matched from historical experience data and, after sorting and correction, a set of candidate control strategies is obtained. Based on the current temperature of 25℃, humidity of 85%, and historical effects, the initial target values ​​for control are calculated to be 23℃ and 80%. After generating basic instructions, a preliminary time-series control instruction sequence is compiled, and after verification, the final time-series control instruction sequence is output for execution.

[0201] The preset timing logic and device coordination rules include:

[0202] Obtain the rule data and current instruction information required for orchestration and verification:

[0203] Control priority rule data: Defines the execution priority order of various environmental control devices under different abnormal modes. This data is in list structure, and each record contains "Abnormal Mode Identifier", "Device Type", and "Priority Level".

[0204] Device dependency data: Based on predefined device physical and control logic, this data describes the start / stop dependencies between devices (e.g., starting a humidifier requires starting the circulating fan first). This data is a directed graph structure.

[0205] Timing interval constraint data: Defines the minimum time interval between commands (e.g., the interval between two start commands for the same device must be more than 5 minutes) to prevent frequent device operation. This data is a list of constraints.

[0206] Input instruction data: Obtain the "sequence set of timing control instructions" to be programmed. Each instruction includes "target device", "action", "target value", "execution area" and initial "planned execution time".

[0207] Data processing and instruction orchestration: sorting and timing basic instructions.

[0208] Enter the "sequence control instruction sequence set", "device dependency data", and "control priority rule data" applicable to the current abnormal mode identifier.

[0209] Constructing a device dependency graph: Based on the device list and device dependency data involved in the "Time-sequenced control instruction sequence set", generate the "device control dependency graph" for this control, and clarify the sequential constraints of device actions.

[0210] Instruction sorting: Dependency sorting: Topologically sort the "Equipment Control Dependency Graph" to obtain a "Equipment Execution Order List" that satisfies physical dependencies; Priority sorting: Based on the dependency order, finely sort instructions for the same device or region according to the "Control Priority Rule Data"; Timestamp allocation: Reallocate the "Adjusted Planned Execution Time" to the sorted instructions, and check and adjust according to the "Time Sequence Interval Constraint Data" to ensure that the minimum interval requirement is met. Generate the "Arranged Time Sequence Control Instruction Sequence".

[0211] Rule validation and conflict resolution: Perform logical and coordination validation on the arranged sequence.

[0212] Input the “arranged timing control instruction sequence”, “timing interval constraint data”, “environmental data vector”, and “associated abnormal parameter list”.

[0213] Data processing and judgment:

[0214] Timing logic verification: Traverse the instruction sequence, check whether adjacent instructions violate the "timing interval constraint data", and determine whether the continuous actions of the same device are reasonable (such as avoiding "turning on" immediately after "turning off"). If a violation occurs, it is recorded as a "timing conflict".

[0215] Device Coordination Verification: Checks whether there are physical contradictions in the "target values" of instructions acting on the same area. A simplified simulation of the impact of instruction execution on "associated abnormal parameters" is used to determine if there are situations where the effects of different device instructions cancel each other out. If so, it is recorded as a "coordination conflict".

[0216] Data output and processing:

[0217] If both the "Timing Conflict List" and the "Coordination Conflict List" are empty, the "Arranged Timing Control Instruction Sequence" will be directly output as the "Final Timing Control Instruction Sequence".

[0218] If a conflict exists, the resolution logic is initiated: adjust or delay lower-priority instructions according to the "priority control rule data"; time-shift conflicting instructions; and attempt to merge instructions with offsetting effects. After resolution, re-verification is performed until the conflict is eliminated or the maximum number of iterations is reached (at which point an alarm is triggered).

[0219] The final output is the verified "final timing control instruction sequence" and adjustment log.

[0220] Through the above technical solution, this application solves the problem of rigid and inefficient instruction generation caused by the lack of experience learning and closed-loop verification capabilities in existing control systems. By introducing a historical control experience database for strategy matching and priority correction, and by performing forward-looking optimization of instruction sequences based on simulation verification, a closed-loop decision-making process from anomaly diagnosis to precise control is realized, thereby improving the effectiveness, adaptability and execution reliability of the control strategy.

[0221] This application further proposes a process for adjusting the global anomaly threshold, specifically including:

[0222] Obtain the current anomaly pattern description information, the current global anomaly threshold, and historical anomaly records. The historical anomaly records include the anomaly pattern description information, historical global anomaly threshold, and corresponding historical global anomaly results for each historical anomaly.

[0223] The abnormal pattern description information is matched with the historical abnormal pattern description information in the historical abnormal records, the matching degree is calculated, and one or more historical records with a similarity to the current abnormal pattern description information exceeding the preset matching threshold are selected from the historical abnormal records.

[0224] Based on the selected historical records, extract the corresponding historical global anomaly results, and calculate the proportion of those judged as global anomalies as the historical anomaly confirmation rate.

[0225] When the historical anomaly confirmation rate is lower than the preset downward adjustment threshold, it is determined that the judgment strictness needs to be increased, and the threshold increment for upward adjustment is calculated.

[0226] When the historical anomaly confirmation rate is higher than the preset upward adjustment threshold, it is necessary to reduce the judgment strictness and calculate the threshold reduction for downward adjustment.

[0227] The current global anomaly threshold is updated based on the threshold increment or threshold decrement to generate an adjusted global anomaly threshold.

[0228] Specifically, input the current anomaly pattern description information (if it exists, it includes the identifier, the area involved, the core time period, and the combination of dominant parameters), the current global anomaly threshold, and the set of historical anomaly records. Each record includes: historical anomaly pattern description information, historical threshold, and historical global anomaly judgment results.

[0229] Match similar historical records and calculate the confirmation rate:

[0230] If an anomaly pattern description exists, it is matched with the historical description information of each record in the historical anomaly record set using cosine similarity or Euclidean distance calculations between vectors. Records with similarity exceeding a preset matching threshold are selected to form a historical record set. The proportion of historical records in the historical record set that are identified as global anomalies is calculated to obtain the historical anomaly confirmation rate.

[0231] Determine the adjustment direction and calculate the new threshold: If the historical anomaly confirmation rate is less than the lower threshold, then the stringency needs to be increased: Calculate the increment Δ = α(lower threshold - historical anomaly confirmation rate), where α is a preset adjustment weight, and set the updated global anomaly threshold = current global anomaly threshold + increment Δ. If the historical anomaly confirmation rate is greater than the upper threshold, then the stringency needs to be decreased: Calculate the decrement Δ = α(historical anomaly confirmation rate - upper threshold), and set the updated global anomaly threshold = current global anomaly threshold - Δ. If the lower threshold ≤ historical anomaly confirmation rate ≤ upper threshold, then keep the updated global anomaly threshold = current global anomaly threshold.

[0232] Ensure that the updated global anomaly threshold is within a preset reasonable range (e.g., [0.2, 0.8]).

[0233] Example: Suppose the current anomaly pattern matches 5 historical records, one of which was previously identified as a global anomaly, so the historical anomaly confirmation rate R = 0.2. The preset lowering threshold is 0.3, α = 0.05, and the current global anomaly threshold is 0.5. Since the historical anomaly confirmation rate is less than the lowering threshold, the increment Δ = 0.005 is calculated, resulting in an updated global anomaly threshold of 0.505.

[0234] Through the above technical solution, this application solves the problem of the difficulty in balancing the false alarm rate and the false negative rate caused by the static fixation of the global anomaly threshold in the existing environmental monitoring system. By introducing historical anomaly records for pattern matching and confirmation rate statistics, dynamic and adaptive optimization of the global anomaly threshold is achieved. Thus, the judgment criteria are continuously calibrated according to the evolution of the actual anomaly pattern, which effectively improves the overall accuracy and environmental adaptability of the anomaly identification system.

[0235] This application further proposes an adaptive update of the partition anomaly threshold and dynamic target curve based on historical anomaly records and historical control experience data, specifically including:

[0236] Acquire historical anomaly records and historical regulation experience data. The historical regulation experience data includes historical environmental data vectors, historical anomaly pattern description information, historical time-series regulation command sequences, and historical regulation effect scores. The historical regulation effect scores are obtained by calculating the rate of change of the Euclidean distance between the historical partition anomaly degree vectors at two consecutive times after historical regulation.

[0237] Based on the anomaly pattern identifier in the historical anomaly pattern description information, the historical anomaly frequency corresponding to each anomaly pattern identifier is counted. If the historical anomaly frequency exceeds the preset frequency threshold, the historical average environmental parameter deviation between the historical environmental data vector corresponding to the anomaly pattern identifier and the dynamic target vector is calculated.

[0238] The partition anomaly threshold is adjusted based on the historical average environmental parameter deviation. If the historical average environmental parameter deviation is greater than the preset upper limit of deviation, the partition anomaly threshold is increased by a first preset amount. If the historical average environmental parameter deviation is less than the preset lower limit of deviation, the partition anomaly threshold is decreased by a second preset amount.

[0239] Extract historical environmental data vectors from historical control experience data where the historical control effect score is higher than the preset score threshold, calculate the weighted average of each environmental parameter in the historical environmental data vector, and use it as the updated target parameter value;

[0240] The updated target parameter values ​​are used to replace the original target parameter values ​​of the corresponding context label vectors in the dynamic target curve, generating the updated dynamic target curve.

[0241] Specifically, retrieve historical anomaly records (including anomaly pattern identifiers and judgment results).

[0242] Input historical regulation experience data (including historical environmental data vectors, abnormal pattern identifiers, regulation command sequences and regulation effect scores), current zonal abnormal threshold vectors, and current dynamic target curve library.

[0243] Statistically analyze the historical occurrence frequency of each abnormal pattern identifier, and filter out the set of high-frequency abnormal identifiers whose frequency exceeds a preset frequency threshold.

[0244] For each identifier in the set of high-frequency anomaly identifiers, calculate the average deviation of each corresponding environmental parameter from historical data.

[0245] For each parameter p: if the average deviation of the environmental parameters > the preset upper limit, then increase the partition anomaly threshold vector by a preset amount α1. If the average deviation of the environmental parameters < the preset lower limit, then decrease the partition anomaly threshold vector by a preset amount α2. Ensure that the adjusted partition anomaly threshold vector is within the effective range.

[0246] From historical data on regulation experience, we select high-efficiency regulation records where the regulation effect score is higher than the preset score threshold.

[0247] These records are grouped according to their context label vector and the time of occurrence (hour).

[0248] For each set of data, calculate the weighted average of each environmental parameter (weighted by the control effect score), and use this as the updated target parameter value. Replace the original target value for the corresponding scenario and time in the dynamic target curve library with the updated target parameter value to complete the curve update.

[0249] Example: If the frequency of anomaly pattern P001 is too high, and its historical average temperature deviation is 2.5℃, exceeding the upper limit of 2.0℃, then the partition anomaly threshold vector [temperature] is increased by 0.1. Simultaneously, if the average temperature recorded by efficient regulation at 10:00 in the scenario "Fruit body development period - winter" is 22.48℃, then the corresponding target value in the dynamic target curve is updated to this value.

[0250] Through the above technical solution, this application solves the problem of adaptive degradation caused by the long-term fixed zoning anomaly threshold and dynamic target curve in existing environmental monitoring systems. By establishing an adaptive closed-loop feedback mechanism based on historical anomaly frequency and control effect data, dynamic and continuous calibration of anomaly judgment criteria and optimal environmental targets is achieved, thereby ensuring the long-term stability and self-optimization of system monitoring accuracy and management efficiency.

[0251] Example 2:

[0252] like Figure 3As shown, this application provides an Internet of Things (IoT)-based edible mushroom cultivation environment monitoring and intelligent control system for implementing the aforementioned IoT-based edible mushroom cultivation environment monitoring and intelligent control method, including:

[0253] The data acquisition module is used to acquire environmental data vectors for each zone in the cultivation room and context label vectors representing the current cultivation stage.

[0254] The anomaly calculation module is used to query the pre-stored dynamic target curve based on the context label vector to obtain the dynamic target vector, calculate the environmental parameter deviation between it and the environmental data vector, compare it with the preset partition anomaly threshold, and generate a partition anomaly identification vector and a partition anomaly degree vector.

[0255] The spatial analysis module is used to map the anomaly degree of each partition to a spatial anomaly matrix with a three-dimensional matrix structure, which is used to characterize the spatial topological features of the anomaly distribution, based on the partition anomaly degree vector and pre-stored partition location information.

[0256] The time series analysis module is used to organize the historical sequence data of the partition anomaly degree vector into a time anomaly matrix with a two-dimensional matrix structure, which is used to reflect the dynamic time series change characteristics of the anomaly, according to the time dimension.

[0257] The parameter association module is used to filter environmental parameter data corresponding to abnormal partitions based on environmental data vectors and partition anomaly identifier vectors, calculate the statistical correlation degree between parameters, and construct an anomaly parameter association matrix that reflects the correlation relationship between different environmental parameters under abnormal conditions.

[0258] The anomaly fusion module is used to fuse the spatial anomaly matrix, the temporal anomaly matrix, and the anomaly parameter correlation matrix, extract spatial clustering features, temporal evolution features, and parameter correlation features, and generate anomaly pattern description information that describes the comprehensive features of the current anomaly.

[0259] The control instruction module is used to calculate the proportion of abnormal zones and generate global abnormal results based on the abnormality degree vector of the partition, the abnormality pattern description information and the preset global abnormality threshold, and generate a time-series control instruction sequence based on the global abnormality results to control the environmental control equipment in the cultivation room.

[0260] This embodiment and the above-mentioned embodiment of the method for monitoring and intelligent control of edible fungi cultivation environment based on Internet of Things belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above-mentioned embodiment, and this embodiment has the same beneficial effects as the above-mentioned embodiment.

[0261] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things, characterized in that, include: Obtain environmental data vectors for each zone within the cultivation chamber and context label vectors representing the current cultivation stage; For each partition, the dynamic target vector is obtained by querying the pre-stored dynamic target curve based on the context label vector, the environmental parameter deviation between the dynamic target vector and the environmental data vector is calculated, and the deviation is compared with the preset partition anomaly threshold to generate a partition anomaly identification vector and a partition anomaly degree vector. Based on the partition anomaly degree vector and the pre-stored partition location information, the anomaly degree of each partition is mapped to a spatial anomaly matrix with a three-dimensional matrix structure, which is used to characterize the spatial topological features of the anomaly distribution. Based on the historical sequence data of the partition anomaly degree vector, a time anomaly matrix is ​​organized according to the time dimension into a two-dimensional matrix structure to reflect the dynamic temporal change characteristics of anomalies. Based on the environmental data vector and the partition anomaly identifier vector, the environmental parameter data corresponding to the abnormal partition is filtered, the statistical correlation between each environmental parameter data is calculated, and an anomaly parameter correlation matrix reflecting the correlation between different environmental parameters under abnormal conditions is constructed accordingly. By fusing the spatial anomaly matrix, the temporal anomaly matrix, and the anomaly parameter correlation matrix, spatial clustering features, temporal evolution features, and parameter correlation features are extracted to generate anomaly pattern description information that describes the comprehensive features of the current anomaly. Based on the partition anomaly degree vector, the anomaly pattern description information, and the preset global anomaly threshold, the proportion of abnormal partitions is statistically analyzed and a global anomaly result is generated. Based on the global anomaly result, a time-series control instruction sequence is generated to control the environmental control equipment in the cultivation room.

2. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 1, characterized in that, Generating the partition anomaly identifier vector and the partition anomaly severity vector specifically includes: For each partition, the deviation between the environmental data vector and the corresponding environmental parameter data values ​​in the dynamic target vector is calculated as the environmental parameter deviation, and compared with the partition anomaly threshold to obtain the preliminary anomaly result for that partition. Based on the preliminary anomaly assessment results of all partitions, generate partition anomaly identifier vectors; Based on the environmental parameter deviations of all partitions, a partition anomaly degree vector is generated through normalization processing. Each element of the partition anomaly identification vector and the partition anomaly degree vector corresponds to a partition.

3. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 2, characterized in that, The process of constructing the spatial anomaly matrix specifically includes: Based on the partition location information, a three-dimensional matrix structure that can characterize the overall spatial layout of the cultivation room is determined. The abnormality value of each partition in the partition abnormality vector is mapped and filled into the corresponding unit position of the three-dimensional matrix structure according to its corresponding partition location information. For the unit position not covered by the partition, a preset default value is filled in, thereby generating a spatial abnormality matrix. Each element of the spatial anomaly matrix represents the comprehensive anomaly degree of the corresponding spatial location, and its overall structure reflects the spatial aggregation and distribution characteristics of spatial anomalies in the cultivation room.

4. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 3, characterized in that, The process of constructing the aforementioned time anomaly matrix specifically includes: Obtain the historical sequence of the partition anomaly degree vector and its corresponding timestamp; The historical sequence is sorted in chronological order, and a two-dimensional matrix structure is constructed with the timestamp as the row dimension and each partition of the cultivation room as the column dimension. The element values ​​of each historical partition anomaly degree vector are filled into the corresponding row and column positions of the two-dimensional matrix structure according to their timestamps and partition numbers, thereby generating a time anomaly matrix. Each row of the time anomaly matrix represents the distribution of anomaly degree of all partitions at a certain moment, and each column represents the sequence of anomaly degree changes of a certain partition within a continuous time window. Overall, it reflects the evolution trend and periodic characteristics of anomalies in time series.

5. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 4, characterized in that, The process of constructing the correlation matrix of the abnormal parameters specifically includes: Obtain the environmental data vector, the partition anomaly identifier vector, and a predefined list of environmental parameters to be analyzed; Based on the partition anomaly identifier vector, all partitions identified as being in an abnormal state are determined and filtered out. The values ​​of various environmental parameter data corresponding to the filtered abnormal partitions are extracted from the environmental data vector to generate an abnormal environmental parameter dataset. Based on the abnormal environment parameter dataset, for each pair of parameters in the list of environmental parameters to be analyzed, the statistical correlation degree between the values ​​of the pair of parameters under abnormal conditions is calculated, and the correlation degree value is generated. A two-dimensional matrix structure is constructed using the parameters in the list of environmental parameters to be analyzed as rows and columns; Fill the corresponding row and column intersection positions of the two-dimensional square matrix structure with the calculated correlation values ​​between each pair of parameters. Generate and output an anomaly parameter correlation matrix, where the diagonal elements of the anomaly parameter correlation matrix represent the correlation degree of the parameters themselves, and the off-diagonal elements represent the strength and direction of the mutual correlation of different environmental parameters under anomaly conditions.

6. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 5, characterized in that, The process of obtaining the abnormal mode description information specifically includes: Process the spatial anomaly matrix to identify continuous regions where the anomaly level exceeds a preset spatial aggregation threshold; Based on the identified continuous regions, a list of spatial clustered regions is generated, and the spatial center coordinates, coverage area, and average anomaly intensity of each spatial clustered region are recorded as spatial distribution characteristics. Process the time anomaly matrix, and for each partition's corresponding column sequence, determine the consecutive time points in the recent preset duration where the anomaly level value exceeds a preset duration threshold. Based on the continuous time points, the start time, duration and slope of the abnormal state of each partition are extracted to generate time series evolution features. Process the abnormal parameter correlation matrix to identify parameter pairs in which the absolute value of the off-diagonal elements exceeds a preset correlation strength threshold; Based on the parameter pairs, a list of parameter association pairs is generated, and the association strength and direction between each parameter pair are recorded as parameter association features; The spatial distribution characteristics, the temporal evolution characteristics, and the parameter correlation characteristics are integrated; Determine whether there is an abnormal pattern that meets the following combined conditions: in at least one region in the list of spatial clustering regions, there is a partition whose corresponding temporal evolution characteristics show that the duration of the abnormal state exceeds a preset threshold, and the parameter association pair list includes at least one pair of environmental parameters related to the abnormality of the region. Based on the judgment result, corresponding abnormal pattern description information is generated. The abnormal pattern description information includes an abnormal pattern identifier, the spatial clustering area involved, the core period of the abnormality, and the combination of environmental parameters that play a dominant role.

7. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 6, characterized in that, The process of obtaining the global anomaly result specifically includes: Based on the partition anomaly degree vector, the number of partitions whose element values ​​exceed the global anomaly threshold is counted, and the proportion of abnormal partitions is calculated. Based on the percentage of abnormal partitions, a preliminary abnormality level is generated; Based on the abnormal pattern description information, determine whether the abnormal pattern identifier belongs to a preset abnormal pattern type that requires special attention; If it is, the initial anomaly level will be increased according to the preset rules, and the anomaly level after the generation mode enhancement will be generated. The enhanced anomaly level, spatial clustering areas in the anomaly mode description information, and environmental parameters that dominate the correlation are combined to generate a global anomaly result. The global anomaly result includes a global anomaly level, anomaly mode identifier, a list of major affected areas, and a list of associated anomaly parameters.

8. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 7, characterized in that, After obtaining the timing control command sequence, the method further includes correcting it using historical control experience data, specifically including: Obtain the global anomaly results, the environmental data vector, and historical regulation experience data; Based on the abnormal pattern identifier, one or more historical control strategies that match the current abnormal pattern are queried and extracted from the historical control experience data. Based on the global anomaly level and the list of major affected areas, the extracted historical control strategies are prioritized and corrected to generate the current set of candidate control strategies. By combining the environmental data vector with the list of associated abnormal parameters, the initial target value for regulatory intervention is calculated; Based on the candidate control strategy set, a time-series control instruction sequence is generated for control devices in different environments; The timing control instruction sequence is arranged according to preset timing logic and coordination rules to generate a corrected timing control instruction sequence.

9. The method for monitoring and intelligent control of edible fungi cultivation environment based on the Internet of Things according to claim 1, characterized in that, The process of dynamically adjusting the global anomaly threshold specifically includes: Obtain the current anomaly pattern description information, the current global anomaly threshold, and historical anomaly records, wherein the historical anomaly records include the historical anomaly pattern description information, the historical global anomaly threshold, and the corresponding historical global anomaly results for each historical anomaly. The abnormal pattern description information is matched with the historical abnormal pattern description information in the historical abnormal records, the matching degree is calculated, and one or more historical records with a similarity to the current abnormal pattern description information exceeding the preset matching threshold are selected from the historical abnormal records. Based on the selected historical records, extract the corresponding historical global anomaly results, and calculate the proportion of those judged as global anomalies as the historical anomaly confirmation rate. When the historical anomaly confirmation rate is lower than the preset downward adjustment threshold, it is determined that the judgment strictness needs to be increased, and the threshold increment for upward adjustment is calculated. When the historical anomaly confirmation rate is higher than the preset upward adjustment threshold, it is necessary to reduce the judgment strictness and calculate the threshold reduction for downward adjustment. The current global anomaly threshold is updated based on the threshold increment or threshold decrement to generate an adjusted global anomaly threshold.

10. An Internet of Things-based monitoring and intelligent control system for edible fungi cultivation environment, characterized in that: The method for monitoring and intelligent control of the edible fungi cultivation environment based on the Internet of Things as described in any one of claims 1-9 includes: The data acquisition module is used to acquire environmental data vectors for each zone in the cultivation room and context label vectors representing the current cultivation stage. The anomaly calculation module is used to query the pre-stored dynamic target curve based on the context label vector for each partition to obtain the dynamic target vector, calculate the environmental parameter deviation between it and the environmental data vector, and compare it with the preset partition anomaly threshold to generate a partition anomaly identification vector and a partition anomaly degree vector. The spatial analysis module is used to map the anomaly degree of each partition to a spatial anomaly matrix with a three-dimensional matrix structure, which is used to characterize the spatial topological features of the anomaly distribution, based on the partition anomaly degree vector and pre-stored partition location information. The time series analysis module is used to organize the historical sequence data of the partition anomaly degree vector into a time anomaly matrix with a two-dimensional matrix structure, which is used to reflect the dynamic time series change characteristics of the anomaly, according to the time dimension. The parameter association module is used to filter environmental parameter data corresponding to abnormal partitions based on the environmental data vector and the partition anomaly identifier vector, calculate the statistical correlation degree between each environmental parameter data, and construct an anomaly parameter association matrix that reflects the correlation relationship of different environmental parameters under abnormal conditions. An anomaly fusion module is used to fuse the spatial anomaly matrix, the temporal anomaly matrix, and the anomaly parameter correlation matrix, extract spatial clustering features, temporal evolution features, and parameter correlation features, and generate anomaly pattern description information describing the current comprehensive anomaly features. The control instruction module is used to calculate the proportion of abnormal partitions and generate a global abnormal result based on the partition abnormality degree vector, the abnormality mode description information and the preset global abnormality threshold, and generate a time-series control instruction sequence based on the global abnormality result to control the environmental control equipment in the cultivation room.