CN117520933B - Environment monitoring method and system based on machine learning - Google Patents

Environment monitoring method and system based on machine learning Download PDF

Info

Publication number
CN117520933B
CN117520933B CN202311842106.1A CN202311842106A CN117520933B CN 117520933 B CN117520933 B CN 117520933B CN 202311842106 A CN202311842106 A CN 202311842106A CN 117520933 B CN117520933 B CN 117520933B
Authority
CN
China
Prior art keywords
function
data
model
representing
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311842106.1A
Other languages
Chinese (zh)
Other versions
CN117520933A (en
Inventor
张梅
韩东亮
费龙
边倩倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changchun Normal University
Original Assignee
Changchun Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changchun Normal University filed Critical Changchun Normal University
Priority to CN202311842106.1A priority Critical patent/CN117520933B/en
Publication of CN117520933A publication Critical patent/CN117520933A/en
Application granted granted Critical
Publication of CN117520933B publication Critical patent/CN117520933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Medical Informatics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an environment monitoring method and system based on machine learning. The invention belongs to the technical field of environmental monitoring, in particular to an environmental monitoring method and system based on machine learning, wherein the scheme realizes the optimization processing of data through self-adaptive filtering, local binary processing and wavelet transformation; and searching the optimal parameters of the model by designing an adaptive search position function based on inertial weight value optimization, and designing a boundary backtracking function to backtrack and adjust the search direction.

Description

Environment monitoring method and system based on machine learning
Technical Field
The invention relates to the technical field of environmental monitoring, in particular to an environmental monitoring method and system based on machine learning.
Background
The environment monitoring method and system based on machine learning is to process and analyze environment monitoring data by utilizing machine learning and data processing technology and provide accurate and real-time environment monitoring result. However, the traditional environment monitoring model has the problems of low classification accuracy, weak model learning ability and high model complexity; the conventional search algorithm has a problem of low search efficiency caused by weak global search capability and adaptation capability.
Disclosure of Invention
Aiming at the problems of low classification accuracy, weak model learning capacity and high model complexity of a traditional environment monitoring model, the method and the system realize the optimization processing of data through self-adaptive filtering, local binary processing and partial wavelet transformation based on an optimized data processing algorithm, enhance the accuracy, stability and reliability of the model and reduce the complexity of the model; aiming at the problem of low searching efficiency caused by weak global searching capability and self-adaptive capability of the traditional searching algorithm, the method searches model parameters by designing the self-adaptive searching position function based on inertia weight value optimization, and designs a boundary backtracking function to backtrack and adjust the searching direction, so that the searching adaptability, searching speed and later searching capability are improved, and the searching efficiency is further improved.
The technical scheme adopted by the invention is as follows: the invention provides a machine learning-based environment monitoring method and a system, wherein the method comprises the following steps:
step S1: collecting data;
step S2: preprocessing data;
step S3: establishing an environment monitoring model;
step S4: searching optimal parameters of the model;
step S5: and (5) running in real time.
Further, in step S1, the data acquisition is to acquire ecologically complete forest image data and label the image, where the labeling type includes normal ecology environment and abnormal ecology environment.
Further, in step S2, the data preprocessing, extracting feature information from the environmental information image by using DLBP model and wavelet transform, and selecting feature data useful for model prediction by combining the correlation coefficient, specifically includes the following steps:
step S21: the adaptive filter denoising function is designed, and the formula is as follows:
wherein,representing the position of adaptive median filteringThe new value obtained after the processing, N represents a median filter and is used for calculating the pixel value after the filtering; n is the iteration number of smoothing, j represents the index of the center pixel in the sub-window;representing pixel values of pixel j in the sub-window at the n-1 th iteration; p represents the set of pixels in the sub-window;
step S22: the iterative discriminant function is designed using the following formula:
wherein,the filtering result of pixel j in the nth iteration,representing the median filtering result of the pixel point j in the n-1 th iteration;representing the filtering result of the pixel point j in the n-1 th iteration;representing the activation state of the pixel point j in the nth iteration, wherein the value of the activation state is 1 or 0, and when the filtering result of the nth iteration is the same as that of the last iteration, namelyWhen the method is kept in the last activation state, the next iteration is not performed; otherwise the first set of parameters is selected,setting to 1, which indicates that the next iteration is required;representing the activation state of the pixel point j in the n-1 th iteration;
step S23: the local binary pattern estimation function is designed by the following formula:
wherein,representing a local binary pattern function, D being a set of pixels surrounding the central pixel, D being a pixel value in set D; q (-) is a quantization function, and the final local binary pattern code is obtained through accumulation of quantized difference values, and the local binary pattern code can describe local texture characteristics of an image; i.e c And i d Respectively the gray value of the center pixel and the d-th adjacent pixel;
step S24: the gray level average function is designed using the following formula:
wherein mu 0 Representing an average value of pixels whose gray level is equal to or less than a threshold value; mu (mu) 1 Representing the average value of pixels having a gray level greater than the threshold value,a gray value representing the e-th pixel; t represents a threshold value;
step S25: the minimum residual error function of the local binary is designed, and the following formula is used:
wherein,representing the minimum residual error, and finding an optimal threshold value by calculating the minimum residual error; n represents the total number of pixels;
step S26: the basis function of the wavelet transform is designed using the following formula:
wherein,andrepresenting the basis functions during translation and binary expansion, respectively; y represents a spatially variable; f (f) m And h m Respectively representing high-pass and low-pass filter coefficients; l represents translation and expansion parameters; m represents a scale parameter of the wavelet;
step S27: the wavelet transform function is designed using the following formula:
wherein,representing a wavelet transform function; c (C) m And b m0 Respectively representing an approximate expansion coefficient and a wavelet coefficient of an original signal; t is t 1 Representing the number of summation iterations;
step S28: the characteristic selection is carried out by using a correlation coefficient method, and if the correlation coefficient is close to 1 or-1, a strong linear relation exists between the characteristic vectors; if the correlation coefficient is close to 0, no linear relation exists between the variables; the relevant feature vectors are selected through the correlation coefficients, and information useful for model prediction in the original data is obtained, wherein the following formula is used:
wherein R is a correlation coefficient, V is a feature vector set to be selected, and x and y respectively represent two feature vectors in the feature vector set to be selected;is the covariance of x and y, σx and σy are the standard deviations of x and y, respectively.
Further, in step S3, the building of the environmental monitoring model, the creation of the nonlinear model, the feature mapping, the finding of the hyperplane and the classification prediction by designing the decision function and the kernel function, specifically include the following steps:
step S31: designing a nonlinear model, and modeling a binary classifier problem as an optimization problem;
step S32: feature mapping, mapping data into a high-dimensional space by using a kernel function;
step S33: the hyperplane is calculated using the formula:
wherein f (·) is a classification function, sign (·) is a sign discriminant function, a i Is the Lagrangian multiplier, y, corresponding to the support vector i The label is a training sample, K (x, y) is expressed as a kernel function in a feature space, and b is a deviation; searching a hyperplane in a high-dimensional space, so that the distance from each data point to the hyperplane is the largest, and taking the distance as a maximized classification boundary;
step S34: prediction of classification tasks: the model is used to make a classification prediction for the sample data.
Further, in step S4, the method includes designing an adaptive search position function optimized based on an inertia weight value by setting a parameter range of a model, designing an fitness function, designing a normalization vector, setting a parameter candidate space, designing a boundary backtracking function to backtrack a search direction, updating iteration, and finding a global optimal parameter, and specifically includes the following steps:
step S41: setting a search space, wherein the parameter space comprises a C parameter space and a gamma parameter space; the C parameter controls punishment items of error classification; the gamma parameter controls the influence range of a single training sample;
step S42: initializing a search cluster, and improving the search quality through multi-position concurrent search;
step S43: the fitness function is designed by the following formula:
wherein,representing a fitness function; y is the accuracy of the classification result; ζ represents the error value presented in the classification; k is the dimension of the parameter; m is M e Representing the total amount of data extracted from the feature extraction stage, M d Representing the total amount of data in a given dataset;
step S44: the normalized random vector of the parameter search direction is designed by the following formula:
wherein,representing a normalized random vector, rand (·) being a random function;
step S45: the candidate search space is designed as follows:
wherein,the candidate position coordinates to the right of the vector at the ith iteration,for candidate position coordinates to the left of the vector at the ith iteration, y i For candidate centroid coordinates between the two vectors at the ith iteration, b is the distance between the two vectors,representing a normalized random vector;
step S46: the search location function of the inertia weight value is designed, and the following formula is used:
wherein w represents the optimization weight of the design, w max And w min Respectively representing the maximum value and the minimum value of the inertia weight; i represents the number of iterations; i.e max The maximum iteration number;is the step factor in the ith iteration; sign (·) is a sign discriminant function;representing a normalized random vector;
step S47: the adaptively optimized search agent location is designed using the following formula:
wherein,the location of the search agent, i being the number of iterations,to arbitrarily select from the current global search pointsThe selected search agent point is selected to be the point of the search agent,for the ith search agent location, k 1 、k 2 、k 3 、k 4 And r is an independent random number in (0, 1);in order to perform the current optimal position at the ith iteration, hv is an upper boundary and Dv is a lower boundary;
step S48: the boundary backtracking function is designed by the following formula:
wherein,to trace back the location, i.e. cancel the move operation after the search agent has exceeded the allowed boundary, return to the last search location, y max Is the upper search limit, y min Is the search lower limit;
step S49: searching the optimal parameters of the model, carrying out position updating and iteration, globally searching the positions of the parameters, calculating an fitness value, comparing the fitness value with a preset fitness threshold, stopping iteration if the fitness value of the searched position is larger than the fitness threshold, and selecting the position parameter as the optimal model parameter; if the maximum iteration times are reached and the fitness value larger than the threshold value is not found yet, carrying out position initialization again and iterating again; and if the maximum iteration number is not reached and the fitness value larger than the threshold value is not found, continuing iteration.
Further, in step S5, the real-time operation is to collect environmental information data, build an environmental monitoring model based on the optimal parameters searched in step S4 to realize monitoring of environmental quality states, that is, the image data of the environment is collected in real time, input into the built environmental monitoring model to classify the environmental states, if the environment is a normal ecological environment, the system is kept in a normal state, if the environment is an abnormal ecological environment, the system is in an alarm state, alarm information is sent, and the environment is monitored in real time.
The invention provides an environment monitoring system based on machine learning, which comprises a data acquisition module, a data preprocessing module, an environment monitoring model building module, a model optimal parameter searching module and a real-time operation module, wherein the data acquisition module is used for acquiring data of a user;
the data acquisition module acquires data and sends the data to the data preprocessing module;
the data preprocessing module is used for preprocessing the acquired data, extracting characteristic information from the environment information image by adopting a DLBP model and wavelet transformation, selecting characteristic data useful for model prediction by combining a correlation coefficient, and transmitting the data to the environment monitoring model building module;
the environment monitoring model building module creates a nonlinear model, performs feature mapping by designing a decision function and a kernel function, finds out a hyperplane, performs classification prediction, and sends data to the model optimal parameter searching module;
the model optimal parameter searching module designs an adaptive searching position function based on inertia weight value optimization by setting a parameter range of a model, designing an adaptability function, designing a normalization vector and setting a parameter candidate space, designs a boundary backtracking function to backtrack and adjust a searching direction, updates iteration, finds a global optimal parameter and sends data to the real-time operation module;
the real-time operation module collects environment information image data in real time, an environment monitoring model is built based on the optimal parameters searched by the optimal parameter searching module to monitor the environment quality state, namely the environment state is classified by collecting the image data of the environment in real time and inputting the image data of the environment into the built environment monitoring model, if the environment is a normal ecological environment, the system is kept in a normal state, if the environment is an abnormal ecological environment, the system is in an alarm state, alarm information is sent, and the environment is monitored in real time.
By adopting the scheme, the beneficial effects obtained by the invention are as follows:
(1) Aiming at the problems of low classification accuracy, weak model learning capability and high model complexity of the traditional environment monitoring model, the method is based on an optimized data processing algorithm, and realizes the optimized processing of data through self-adaptive filtering, local binary processing and partial wavelet transformation, thereby enhancing the accuracy, stability and reliability of the model and reducing the complexity of the model.
(2) Aiming at the problem of low searching efficiency caused by weak global searching capability and self-adaptive capability of the traditional searching algorithm, the scheme designs the self-adaptive searching position function based on inertia weight value optimization, designs the boundary backtracking function to carry out backtracking adjustment on the searching direction, improves the searching adaptability, searching speed and later searching capability, and further improves the searching efficiency.
Drawings
FIG. 1 is a flow chart of a machine learning based environmental monitoring method provided by the invention;
FIG. 2 is a schematic diagram of a machine learning based environmental monitoring system provided by the present invention;
FIG. 3 is a flow chart of step S2;
fig. 4 is a flow chart of step S4.
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention; all other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be understood that the terms "upper," "lower," "front," "rear," "left," "right," "top," "bottom," "inner," "outer," and the like indicate orientation or positional relationships based on those shown in the drawings, merely to facilitate description of the invention and simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the invention.
Referring to fig. 1, the machine learning-based environment monitoring method provided by the present invention includes the following steps:
step S1: collecting data;
step S2: data preprocessing, namely extracting characteristic information from an environment information image by adopting a DLBP model and wavelet transformation, and selecting characteristic data useful for model prediction by combining a correlation coefficient;
step S3: establishing an environment monitoring model, establishing a nonlinear model, performing feature mapping by designing a decision function and a kernel function, finding out a hyperplane and performing classification prediction;
step S4: searching optimal parameters of a model, designing an adaptive position function based on inertia weight optimization by setting a parameter range of the model, designing an adaptive function, designing a normalized vector and setting a parameter candidate space, and designing a boundary backtracking function to backtrack and adjust a search direction, update and iterate, so as to find global optimal parameters;
step S5: and (5) running in real time.
In the second embodiment, referring to fig. 1, the embodiment is based on the foregoing embodiment, and in step S1, the data acquisition is to acquire ecologically complete forest image data and label the image, where the labeling type includes a normal ecological environment and an abnormal ecological environment.
An embodiment three, referring to fig. 1 and 3, based on the above embodiment, in step S2, the data preprocessing, extracting feature information from an environmental information image by using DLBP model and wavelet transform, and selecting feature data useful for model prediction by combining correlation coefficients, specifically includes the following steps:
step S21: the adaptive filter denoising function is designed, and the formula is as follows:
wherein,representing a new value obtained after the self-adaptive median filtering treatment, and N represents a median filter for calculating a filtered pixel value; n is the iteration number of smoothing, j represents the index of the center pixel in the sub-window;representing pixel values of pixel j in the sub-window at the n-1 th iteration; p represents the set of pixels in the sub-window;
step S22: the iterative discriminant function is designed using the following formula:
wherein,the filtering result of pixel j in the nth iteration,representing the median filtering result of the pixel point j in the n-1 th iteration;representing the filtering result of the pixel point j in the n-1 th iteration;representing the activation state of the pixel point j in the nth iteration, wherein the value of the activation state is 1 or 0, and when the filtering result of the nth iteration is the same as that of the last iteration, namelyWhen the method is kept in the last activation state, the next iteration is not performed; otherwise the first set of parameters is selected,setting to 1, which indicates that the next iteration is required;representing the activation state of the pixel point j in the n-1 th iteration;
step S23: the local binary pattern estimation function is designed by the following formula:
wherein,representing a local binary pattern function, D being a set of pixels surrounding the central pixel, D being a pixel value in set D; q (-) is a quantization function, and the final local binary pattern code is obtained through accumulation of quantized difference values, and the local binary pattern code can describe local texture characteristics of an image; i.e c And i d Respectively the gray value of the center pixel and the d-th adjacent pixel;
step S24: the gray level average function is designed using the following formula:
wherein mu 0 Representing an average value of pixels whose gray level is equal to or less than a threshold value; mu (mu) 1 Representing the average value of pixels having a gray level greater than the threshold value,a gray value representing the e-th pixel; t represents a threshold value;
step S25: the minimum residual error function of the local binary is designed, and the following formula is used:
wherein,representing the minimum residual error, and finding an optimal threshold value by calculating the minimum residual error; n represents the total number of pixels;
step S26: the basis function of the wavelet transform is designed using the following formula:
wherein,andrepresenting the basis functions during translation and binary expansion, respectively; y represents a spatially variable; f (f) m And h m Respectively representing high-pass and low-pass filter coefficients; l represents translation and expansion parameters; m represents a scale parameter of the wavelet;
step S27: the wavelet transform function is designed using the following formula:
wherein,representing a wavelet transform function; c (C) m And b m0 Respectively representing an approximate expansion coefficient and a wavelet coefficient of an original signal; t is t 1 Representing the number of summation iterations;
step S28: the characteristic selection is carried out by using a correlation coefficient method, and if the correlation coefficient is close to 1 or-1, a strong linear relation exists between the characteristic vectors; if the correlation coefficient is close to 0, no linear relation exists between the variables; the relevant feature vectors are selected through the correlation coefficients, and information useful for model prediction in the original data is obtained, wherein the following formula is used:
wherein R is a correlation coefficient, V is a feature vector set to be selected, and x and y respectively represent two feature vectors in the feature vector set to be selected;is the covariance of x and y, σx and σy are the standard deviations of x and y, respectively.
By executing the operation, the problems of low classification accuracy, weak model learning capability and high model complexity of the traditional environment monitoring model are solved, the scheme is based on an optimized data processing algorithm, and the data optimization processing is realized through self-adaptive filtering, local binary processing and wavelet partial transformation, so that the model accuracy, stability and reliability are enhanced, and the model complexity is reduced.
In step S3, the building an environment monitoring model, creating a nonlinear model, performing feature mapping by designing a decision function and a kernel function, finding a hyperplane, and performing classification prediction, which is based on the above embodiment, specifically includes the following steps:
step S31: designing a nonlinear model, and modeling a binary classifier problem as an optimization problem;
step S32: feature mapping, mapping data into a high-dimensional space by using a kernel function;
step S33: the hyperplane is calculated using the formula:
wherein f (·) is a classification function, sign (·) is a sign discriminant function, a i Is a pull corresponding to the support vectorGelangerhan multiplier, y i The label is a training sample, K (x, y) is expressed as a kernel function in a feature space, and b is a deviation; searching a hyperplane in a high-dimensional space, so that the distance from each data point to the hyperplane is the largest, and taking the distance as a maximized classification boundary;
step S34: prediction of classification tasks: the model is used to make a classification prediction for the sample data.
In step S4, by setting a parameter range of a model, designing an fitness function, designing a normalized vector, setting a parameter candidate space, designing an adaptive search position function optimized based on an inertia weight value, designing a boundary backtracking function to backtrack a search direction, updating an iteration, and finding a global optimal parameter, referring to fig. 1 and 4, the embodiment specifically includes the following steps:
step S41: setting a search space, wherein the parameter space comprises a C parameter space and a gamma parameter space; the C parameter controls punishment items of error classification; the gamma parameter controls the influence range of a single training sample;
step S42: initializing a search cluster, and improving the search quality through multi-position concurrent search;
step S43: the fitness function is designed by the following formula:
wherein,representing a fitness function; y is the accuracy of the classification result; ζ represents the error value presented in the classification; k is the dimension of the parameter; m is M e Representing the total amount of data extracted from the feature extraction stage, M d Representing the total amount of data in a given dataset;
step S44: the normalized random vector of the parameter search direction is designed by the following formula:
wherein,representing a normalized random vector, rand (·) being a random function;
step S45: the candidate search space is designed as follows:
wherein,the candidate position coordinates to the right of the vector at the ith iteration,for candidate position coordinates to the left of the vector at the ith iteration, y i For candidate centroid coordinates between the two vectors at the ith iteration, b is the distance between the two vectors,representing a normalized random vector;
step S46: the search location function of the inertia weight value is designed, and the following formula is used:
wherein w represents the optimization weight of the design, w max And w min Respectively representing the maximum value and the minimum value of the inertia weight; i represents the number of iterations; i.e max The maximum iteration number;is the step factor in the ith iteration; sign (·) is a sign discriminant function;representing a normalized random vector;
step S47: the adaptively optimized search agent location is designed using the following formula:
wherein,the location of the search agent, i being the number of iterations,to arbitrarily select a search agent point from the current overall search points,for the ith search agent location, k 1 、k 2 、k 3 、k 4 And r is an independent random number in (0, 1);in order to perform the current optimal position at the ith iteration, hv is an upper boundary and Dv is a lower boundary;
step S48: the boundary backtracking function is designed by the following formula:
wherein,to trace back the location, i.e. cancel the move operation after the search agent has exceeded the allowed boundary, return to the last search location, y max Is the upper search limit, y min Is the search lower limit;
step S49: searching the optimal parameters of the model, carrying out position updating and iteration, globally searching the positions of the parameters, calculating an fitness value, comparing the fitness value with a preset fitness threshold, stopping iteration if the fitness value of the searched position is larger than the fitness threshold, and selecting the position parameter as the optimal model parameter; if the maximum iteration times are reached and the fitness value larger than the threshold value is not found yet, carrying out position initialization again and iterating again; and if the maximum iteration number is not reached and the fitness value larger than the threshold value is not found, continuing iteration.
By executing the operation, the problem of low searching efficiency caused by weak global searching capability and self-adaptive capability of the traditional searching algorithm is solved, and the searching direction is adjusted retrospectively by designing the self-adaptive searching position function based on inertia weight value optimization and designing the boundary retrospective function, so that the searching adaptability is improved, the searching is more accurate and comprehensive, and the searching efficiency is further improved.
In a sixth embodiment, referring to fig. 1, the embodiment is based on the above embodiment, where the real-time operation is to collect environmental information data, and establish an environmental monitoring model based on the optimal parameters searched in step S4 to monitor the environmental quality state, that is, by collecting image data of the environment in real time, inputting the image data into the established environmental monitoring model, classifying the environmental state, if the environment is a normal ecological environment, the system remains in a normal state, if the environment is an abnormal ecological environment, the system enters an alarm state, sends alarm information, and monitors the environment in real time.
An embodiment seven, referring to fig. 2, based on the above embodiment, the environment monitoring system based on machine learning provided by the invention includes a data acquisition module, a data preprocessing module, an environment monitoring model building module, a model optimal parameter searching module and a real-time operation module;
the data acquisition module acquires data and sends the data to the data preprocessing module;
the data preprocessing module is used for preprocessing the acquired data, extracting characteristic information from the environment information image by adopting a DLBP model and wavelet transformation, selecting characteristic data useful for model prediction by combining a correlation coefficient, and transmitting the data to the environment monitoring model building module;
the environment monitoring model building module creates a nonlinear model, performs feature mapping by designing a decision function and a kernel function, finds out a hyperplane, performs classification prediction, and sends data to the model optimal parameter searching module;
the model optimal parameter searching module designs an adaptive searching position function based on inertia weight value optimization by setting a parameter range of a model, designing an adaptability function, designing a normalization vector and setting a parameter candidate space, designs a boundary backtracking function to backtrack and adjust a searching direction, updates iteration, finds a global optimal parameter and sends data to the real-time operation module;
the real-time operation module collects environment information image data in real time, an environment monitoring model is built based on the optimal parameters searched by the optimal parameter searching module to monitor the environment quality state, namely the environment state is classified by collecting the image data of the environment in real time and inputting the image data of the environment into the built environment monitoring model, if the environment is a normal ecological environment, the system is kept in a normal state, if the environment is an abnormal ecological environment, the system is in an alarm state, alarm information is sent, and the environment is monitored in real time.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
The invention and its embodiments have been described above with no limitation, and the actual construction is not limited to the embodiments of the invention as shown in the drawings. In summary, if one of ordinary skill in the art is informed by this disclosure, a structural manner and an embodiment similar to the technical solution should not be creatively devised without departing from the gist of the present invention.

Claims (4)

1. The environment monitoring method based on machine learning is characterized by comprising the following steps of: the method comprises the following steps:
step S1: collecting data;
step S2: preprocessing data;
step S3: establishing an environment monitoring model;
step S4: searching optimal parameters of the model;
step S5: operating in real time;
in step S4, the optimal parameters of the search model are obtained by setting a parameter range of the model, designing an adaptability function, designing a normalization vector, setting a parameter candidate space, designing an adaptive search position function optimized based on an inertia weight value, designing a boundary backtracking function to backtrack and adjust a search direction, updating and iterating, and finding global optimal parameters, and the method specifically comprises the following steps:
step S41: setting a search space, wherein the parameter space comprises a C parameter space and a gamma parameter space; the C parameter controls punishment items of error classification; the gamma parameter controls the influence range of a single training sample;
step S42: initializing a search cluster, and improving the search quality through multi-position concurrent search;
step S43: the fitness function is designed by the following formula:
wherein,representing a fitness function; y is the accuracy of the classification result; ζ represents the error value presented in the classification; k is the dimension of the parameter; m is M e Representing the total amount of data extracted from the feature extraction stage, M d Representing the total amount of data in a given dataset;
step S44: the normalized random vector of the parameter search direction is designed by the following formula:
wherein,representing a normalized random vector, rand (·) being a random function;
step S45: the candidate search space is designed as follows:
wherein,for candidate position coordinates to the right of the vector at the ith iteration, is>For candidate position coordinates to the left of the vector at the ith iteration, y i For candidate centroid coordinates between the two vectors at the ith iteration, b is the distance between the two vectors, +.>Representing a normalized random vector;
step S46: the search location function of the inertia weight value is designed, and the following formula is used:
wherein w represents the optimization weight of the design, w max And w min Respectively representing the maximum value and the minimum value of the inertia weight; i represents the number of iterations; i.e max The maximum iteration number;is the step factor in the ith iteration; sign (·) is a sign discriminant function; />Representing a normalized random vector;
step S47: the adaptively optimized search agent location is designed using the following formula:
wherein,search agent location optimized for adaptation, i is iteration number,/is +.>For a search agent point arbitrarily selected from the current global search points,/>For the ith search agent location, k 1 、k 2 、k 3 、k 4 And r is an independent random number in (0, 1); />In order to perform the current optimal position at the ith iteration, hv is an upper boundary and Dv is a lower boundary;
step S48: the boundary backtracking function is designed by the following formula:
wherein,to trace back the location, i.e. cancel the move operation after the search agent has exceeded the allowed boundary, return to the last search location, y max Is the upper search limit, y min Is the search lower limit;
step S49: searching the optimal parameters of the model, carrying out position updating and iteration, globally searching the positions of the parameters, calculating an fitness value, comparing the fitness value with a preset fitness threshold, stopping iteration if the fitness value of the searched position is larger than the fitness threshold, and selecting the position parameter as the optimal model parameter; if the maximum iteration times are reached and the fitness value larger than the threshold value is not found yet, carrying out position initialization again and iterating again; if the maximum iteration times are not reached and the fitness value larger than the threshold value is not found, continuing iteration;
in the step S1, the data acquisition is to acquire ecologically complete forest image data and label the image, wherein the labeling type comprises a normal ecological environment and an abnormal ecological environment;
in step S5, the real-time operation is to collect environmental information data, establish an environmental monitoring model based on the optimal parameters searched in step S4 to monitor the environmental quality state, that is, by collecting the image data of the environment in real time, inputting the image data into the established environmental monitoring model, classifying the environmental state, if the environment is a normal ecological environment, the system keeps the normal state, if the environment is an abnormal ecological environment, the system enters an alarm state, and sends alarm information to monitor the environment in real time.
2. The machine learning based environmental monitoring method of claim 1, wherein: in step S2, the data preprocessing, feature extraction, feature selection, extracting feature information from an environmental information image by using DLBP model and wavelet transformation, and selecting feature data useful for model prediction by combining correlation coefficients, specifically comprising the following steps:
step S21: the adaptive filter denoising function is designed, and the formula is as follows:
wherein,representing a new value obtained after the self-adaptive median filtering treatment, and N represents a median filter for calculating a filtered pixel value; n is the iteration number of smoothing, j represents the index of the center pixel in the sub-window; />Representing pixel values of pixel j in the sub-window at the n-1 th iteration; p represents the set of pixels in the sub-window;
step S22: the iterative discriminant function is designed using the following formula:
wherein,filtering result of pixel j in nth iteration,/->Representing the median filtering result of the pixel point j in the n-1 th iteration; />Represents the n-1 th iterationFiltering results of the middle pixel point j; />Representing the activation state of the pixel point j in the nth iteration, wherein the value of the activation state is 1 or 0, and when the filtering result of the nth iteration is the same as that of the last iteration, namely +.>When the method is kept in the last activation state, the next iteration is not performed; otherwise, go (L)>Setting to 1, which indicates that the next iteration is required; />Representing the activation state of the pixel point j in the n-1 th iteration;
step S23: the local binary pattern estimation function is designed by the following formula:
wherein,representing a local binary pattern function, D being a set of pixels surrounding the central pixel, D being a pixel value in set D; q (-) is a quantization function, and the final local binary pattern code is obtained through accumulation of quantized difference values, and the local binary pattern code can describe local texture characteristics of an image; i.e c And i d Respectively the gray value of the center pixel and the d-th adjacent pixel;
step S24: the gray level average function is designed using the following formula:
wherein mu 0 Representing an average value of pixels whose gray level is equal to or less than a threshold value; mu (mu) 1 Representing the average value of pixels having a gray level greater than the threshold value,a gray value representing the e-th pixel; t represents a threshold value;
step S25: the minimum residual error function of the local binary is designed, and the following formula is used:
wherein,representing the minimum residual error, and finding an optimal threshold value by calculating the minimum residual error; n represents the total number of pixels;
step S26: the basis function of the wavelet transform is designed using the following formula:
wherein,and->Representing the basis functions during translation and binary expansion, respectively; y represents a spatially variable; f (f) m And h m Respectively representing high-pass and low-pass filter coefficients; l represents translation and expansion parameters; m represents a scale parameter of the wavelet;
step S27: the wavelet transform function is designed using the following formula:
wherein,representing a wavelet transform function; c (C) m And b m0 Respectively representing an approximate expansion coefficient and a wavelet coefficient of an original signal; t is t 1 Representing the number of summation iterations;
step S28: the characteristic selection is carried out by using a correlation coefficient method, and if the correlation coefficient is close to 1 or-1, a strong linear relation exists between the characteristic vectors; if the correlation coefficient is close to 0, no linear relation exists between the variables; the relevant feature vectors are selected through the correlation coefficients, and information useful for model prediction in the original data is obtained, wherein the following formula is used:
wherein R is a correlation coefficient, V is a feature vector set to be selected, and x and y respectively represent two feature vectors in the feature vector set to be selected;is the covariance of x and y, σx and σy are the standard deviations of x and y, respectively.
3. The machine learning based environmental monitoring method of claim 1, wherein: in step S3, the environment monitoring model is built, a nonlinear model is created, feature mapping is performed by designing decision functions and kernel functions, hyperplanes are found and classification prediction is performed, and the method specifically comprises the following steps:
step S31: designing a nonlinear model, and modeling a binary classifier problem as an optimization problem;
step S32: feature mapping, mapping data into a high-dimensional space by using a kernel function;
step S33: the hyperplane is calculated using the formula:
wherein f (·) is a classification function, sign (·) is a sign discriminant function, a i Is the Lagrangian multiplier, y, corresponding to the support vector i The label is a training sample, K (x, y) is expressed as a kernel function in a feature space, and b is a deviation; searching a hyperplane in a high-dimensional space, so that the distance from each data point to the hyperplane is the largest, and taking the distance as a maximized classification boundary;
step S34: prediction of classification tasks: the model is used to make a classification prediction for the sample data.
4. Machine learning based environmental monitoring system for implementing a machine learning based environmental monitoring method according to any of claims 1-3, characterized in that: the system comprises a data acquisition module, a data preprocessing module, an environment monitoring model building module, a model optimal parameter searching module and a real-time operation module;
the data acquisition module performs data acquisition, data labeling and sends the data to the data preprocessing module;
the data preprocessing module is used for preprocessing the acquired data, extracting characteristic information from the environment information image by adopting a DLBP model and wavelet transformation, selecting characteristic data useful for model prediction by combining a correlation coefficient, and transmitting the data to the environment monitoring model building module;
the environment monitoring model building module creates a nonlinear model, performs feature mapping by designing a decision function and a kernel function, finds out a hyperplane, performs classification prediction, and sends data to the model optimal parameter searching module;
the model optimal parameter searching module designs an adaptive searching position function based on inertia weight value optimization by setting a parameter range of a model, designing an adaptability function, designing a normalization vector and setting a parameter candidate space, designs a boundary backtracking function to backtrack and adjust a searching direction, updates iteration, finds a global optimal parameter and sends data to the real-time operation module;
the real-time operation module collects environment information image data in real time, an environment monitoring model is built based on the optimal parameters searched by the optimal parameter searching module to monitor the environment quality state, namely the environment state is classified by collecting the image data of the environment in real time and inputting the image data of the environment into the built environment monitoring model, if the environment is a normal ecological environment, the system is kept in a normal state, if the environment is an abnormal ecological environment, the system is in an alarm state, alarm information is sent, and the environment is monitored in real time.
CN202311842106.1A 2023-12-29 2023-12-29 Environment monitoring method and system based on machine learning Active CN117520933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311842106.1A CN117520933B (en) 2023-12-29 2023-12-29 Environment monitoring method and system based on machine learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311842106.1A CN117520933B (en) 2023-12-29 2023-12-29 Environment monitoring method and system based on machine learning

Publications (2)

Publication Number Publication Date
CN117520933A CN117520933A (en) 2024-02-06
CN117520933B true CN117520933B (en) 2024-03-19

Family

ID=89749665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311842106.1A Active CN117520933B (en) 2023-12-29 2023-12-29 Environment monitoring method and system based on machine learning

Country Status (1)

Country Link
CN (1) CN117520933B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117851922A (en) * 2024-03-08 2024-04-09 山东新泽仪器有限公司 Operation monitoring method of air concentration monitoring instrument

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881512A (en) * 2015-04-13 2015-09-02 中国矿业大学 Particle swarm optimization-based automatic design method of ripple-free deadbeat controller
CN114579777A (en) * 2022-03-01 2022-06-03 广州大学 Improved symbol optimization anti-attack method
CN114818809A (en) * 2022-04-27 2022-07-29 合肥工业大学 Fault diagnosis method for SCA-SVM motor rolling bearing based on cross wavelets
CN115840369A (en) * 2023-02-20 2023-03-24 南昌大学 Track optimization method, device and equipment based on improved whale optimization algorithm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881512A (en) * 2015-04-13 2015-09-02 中国矿业大学 Particle swarm optimization-based automatic design method of ripple-free deadbeat controller
CN114579777A (en) * 2022-03-01 2022-06-03 广州大学 Improved symbol optimization anti-attack method
CN114818809A (en) * 2022-04-27 2022-07-29 合肥工业大学 Fault diagnosis method for SCA-SVM motor rolling bearing based on cross wavelets
CN115840369A (en) * 2023-02-20 2023-03-24 南昌大学 Track optimization method, device and equipment based on improved whale optimization algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"一种改进惯性权重的粒子群优化算法";薛文;《现代信息科技》;20231025;第7卷(第20期);第88-91页 *

Also Published As

Publication number Publication date
CN117520933A (en) 2024-02-06

Similar Documents

Publication Publication Date Title
CN117520933B (en) Environment monitoring method and system based on machine learning
CN107038448B (en) Target detection model construction method
Kwon et al. Highly nonrigid object tracking via patch-based dynamic appearance modeling
Bhanu et al. Adaptive integrated image segmentation and object recognition
CN106845510B (en) Chinese traditional visual culture symbol recognition method based on depth level feature fusion
Zhao et al. Where are you heading? dynamic trajectory prediction with expert goal examples
CN107403426B (en) Target object detection method and device
CN107369166B (en) Target tracking method and system based on multi-resolution neural network
KR102138657B1 (en) Apparatus and method for robust face recognition via hierarchical collaborative representation
CN113435509B (en) Small sample scene classification and identification method and system based on meta-learning
JP6620882B2 (en) Pattern recognition apparatus, method and program using domain adaptation
CN111931654A (en) Intelligent monitoring method, system and device for personnel tracking
CN111091101A (en) High-precision pedestrian detection method, system and device based on one-step method
Mocanu et al. Single object tracking using offline trained deep regression networks
CN112115780A (en) Semi-supervised pedestrian re-identification method based on deep multi-model cooperation
CN115564983A (en) Target detection method and device, electronic equipment, storage medium and application thereof
CN112528730A (en) Cost matrix optimization method based on space constraint under Hungary algorithm
Dou et al. Background subtraction based on circulant matrix
CN108257148B (en) Target suggestion window generation method of specific object and application of target suggestion window generation method in target tracking
Singh et al. Unusual activity detection for video surveillance
CN116862893A (en) Industrial part anomaly detection method and system based on dynamic feature center
Wang et al. AMBER: Adapting multi-resolution background extractor
CN106851106A (en) A kind of enhancing AR follows the trail of the electronic image stabilization method of stability
CN111681264A (en) Real-time multi-target tracking method for monitoring scene
CN116342653A (en) Target tracking method, system, equipment and medium based on correlation filter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant