Disclosure of Invention
The present application aims to provide an early warning method and system for an intelligent gateway, so as to solve or alleviate the problems existing in the prior art.
In order to achieve the above purpose, the present application provides the following technical solutions:
the application provides an early warning method of an intelligent gateway, wherein an intelligent early warning model based on a fuzzy neural network algorithm is deployed in the intelligent gateway, and the early warning method comprises the following steps: step S101, based on the trained intelligent early warning model, obtaining a state evaluation predicted value of a monitoring object at the next moment according to a fuzzy subset, a preset fuzzy rule corresponding to the fuzzy subset and an obtained input data set of the monitoring object; the state evaluation predicted value is used for representing the running state of the monitored object at the next moment; the fuzzy subset is obtained by dividing a pre-acquired training set through a clustering method; the training set is used for training the intelligent early warning model, the input data set comprises time sequence data of the current time and a plurality of previous times, and each time sequence data comprises a time sequence value of the monitored object and the state evaluation value corresponding to the time sequence value; and S102, comparing the state evaluation predicted value with a preset state threshold value, and responding to the situation that the state evaluation predicted value is larger than the preset state threshold value to early warn the running state of the monitored object at the next moment.
Preferably, step S101 includes: step S111, calculating a membership function value of each time sequence data and the corresponding fuzzy subset according to a membership function model of the fuzzy subset corresponding to the acquired input data set of the monitoring object; step S121, calculating the fitness of each fuzzy subset and the corresponding fuzzy rule according to the membership function value of each time series data and the corresponding fuzzy subset; step S131, carrying out normalization processing on the fitness of each fuzzy subset to obtain the weight of each fuzzy subset; step S141, predicting a result according to a state of each fuzzy subset and a weight of each fuzzy subset, according to a formula:
obtaining a state evaluation predicted value of the monitoring object at the next moment; wherein, according to the independent prediction model:
obtaining the state prediction result of each fuzzy subset to the next moment of the monitoring object; in the formula, y
k+1Representing a state evaluation prediction value at the (k +1) th time of the monitoring object, m representing the number of the fuzzy subsets,
weights representing the jth of said fuzzy subsets, j ∈ [1, m]The k time is the current time, and n represents n continuous times before the current time;
represents the state prediction result of the jth fuzzy subset to the (k +1) th time of the monitored object, theta
j、p
jiOptimized parameters, x ', for the independent prediction model'
iRepresents the ith time series value, y'
iThe state evaluation value corresponding to the ith time series value is represented.
Preferably, the membership function model is:
wherein,
respectively representing membership function values of a kth time and a (k-1) th time, the ith time series data in the input data set and the jth fuzzy subset corresponding to the ith time series data; x represents the time series value and the state evaluation value of the current time and a plurality of previous times;
are all the optimization parameters of the membership function model.
Preferably, in step S121, according to the formula:
calculating the fitness of each fuzzy subset and the corresponding fuzzy rule;wherein, w
jIndicating the fitness of the jth fuzzy subset to which the time-series data belongs and the corresponding fuzzy rule, (2n +2) indicating (n +1) time-series values of the input data set corresponding to the fuzzy subset and the corresponding (n +1) state evaluation values thereof,
and representing the membership function value of the ith time sequence data and the jth fuzzy subset corresponding to the ith time sequence data, wherein the values of i, j and n are natural numbers.
Preferably, in step S131, according to the formula:
and carrying out normalization processing on the fitness of each fuzzy subset to obtain the weight of each fuzzy subset.
Preferably, the early warning method of the intelligent gateway further includes: training an intelligent early warning model based on a fuzzy neural network algorithm based on an adam optimization algorithm according to a pre-obtained training set, the fuzzy subset and the fuzzy rule to obtain the intelligent early warning model after training, wherein the method specifically comprises the following steps: based on a K-means method, acquiring a clustering center of the training set so as to divide the training set into a plurality of fuzzy subsets; each fuzzy subset corresponds to a preset fuzzy rule; and optimizing parameters of the intelligent early warning model according to the clustering center of the training set, the fuzzy subset and the fuzzy rule based on an adam optimization algorithm to obtain the intelligent early warning model after training.
Preferably, the obtaining the clustering center of the training set based on the K-means method to divide the training set into a plurality of fuzzy subsets includes: randomly selecting m time sequence data from the training set as an initial clustering center of the training set; wherein m is a natural number; the training set comprises a plurality of sample time sequence data, each sample time sequence data comprises a sample time sequence value of the monitored object and a sample state evaluation value corresponding to the sample time sequence value, and the sample state evaluation value is obtained by manual labeling; dividing the training set into m classes according to the distance from each sample time sequence data in the training set to m initial clustering centers respectively, and according to a formula:
calculating the clustering center of each type; in the formula, ctRepresenting the clustering center of the t-th class, t is belonged to (0, m), and x' represents the sample time sequence data; according to each sample time sequence data in the training set to the clustering center ctRe-dividing the training set into m classes; performing loop iteration on the division of the training set until the clustering center ctAnd no longer changing, and obtaining m fuzzy subsets.
Preferably, the adam-based optimization algorithm optimizes parameters of the intelligent early warning model according to the clustering center of the training set, the fuzzy subset and the fuzzy rule to obtain the intelligent early warning model after training, and specifically comprises: an AdamaOptizer optimizer based on a TensorFlow calculation framework performs iterative optimization on parameters of the intelligent early warning model according to the training set, the fuzzy subset and the fuzzy rule and a preset objective function to obtain the intelligent early warning model after training; wherein the objective function is:
of formula (II) to (III)'
k+1Representing the sample state evaluation predicted value at the (k +1) th time of the monitored object,
and the expected predicted value of the sample at the (k +1) th time of the monitored object is shown.
The embodiment of the present application further provides an early warning system for an intelligent gateway, where an intelligent early warning model based on a fuzzy neural network algorithm is deployed in the intelligent gateway, and the early warning system includes: the evaluation unit is configured to obtain a state evaluation predicted value of the monitoring object at the next moment according to a fuzzy subset, a preset fuzzy rule corresponding to the fuzzy subset and an acquired input data set of the monitoring object based on the trained intelligent early warning model; the state evaluation predicted value is used for representing the prediction of the running state of the monitored object at the next moment; the fuzzy subset is obtained by dividing a pre-acquired training set through a clustering method; the training set is used for training the intelligent early warning model, the input data set comprises time sequence data of the current time and a plurality of previous times, and each time sequence data comprises a time sequence value of the monitored object and the state evaluation value corresponding to the time sequence value; and the early warning unit is configured to compare the state evaluation predicted value with a preset state threshold value, and respond to the state evaluation predicted value being greater than the preset threshold value to early warn the running state of the monitored object at the next moment.
Preferably, the evaluation unit includes: the membership subunit is configured to calculate a membership function value of each time series data and the corresponding fuzzy subset according to a membership function of the fuzzy subset corresponding to the acquired input data set of the monitoring object; the fitness subunit is configured to calculate the fitness of each fuzzy subset and the corresponding fuzzy rule according to the membership function value of each time series data and the corresponding fuzzy subset; the normalization subunit is configured to perform normalization processing on the fitness of each fuzzy subset to obtain the weight of each fuzzy subset; a predictor unit configured to predict a result based on a state of each of the fuzzy subsets and a weight of each of the fuzzy subsets according to a formula:
obtaining a state evaluation predicted value of the monitoring object at the next moment; wherein, according to the independent prediction model:
obtaining the state prediction result of each fuzzy subset to the next moment of the monitoring object; in the formula, y
k+1Representing a state evaluation prediction value at the (k +1) th time of the monitoring object, m representing the number of the fuzzy subsets,
weights representing the jth of said fuzzy subsets, j ∈ [1, m]The k time is the current time, and n represents n continuous times before the current time;
represents the state prediction result of the jth fuzzy subset to the (k +1) th time of the monitored object, theta
j、p
jiOptimized parameters, x ', for the independent prediction model'
iRepresents the ith time series value, y'
iThe state evaluation value corresponding to the ith time series value is represented.
Compared with the closest prior art, the technical scheme of the embodiment of the application has the following beneficial effects:
in the technical scheme provided by the application, based on an intelligent early warning model deployed in an intelligent gateway, the running state of a monitoring object at the next moment is predicted according to time sequence data of the monitoring object, which is obtained by acquiring data of a plurality of monitoring objects by a plurality of data acquisition modules deployed in a distributed manner in the intelligent gateway, so that the state evaluation predicted value of the monitoring object at the next moment is obtained; then, the state evaluation predicted value of the monitoring object at the next moment is compared with a preset state threshold value, so that the running state of the monitoring object at the next moment is early warned; and when the state evaluation predicted value is larger than a preset state threshold value, early warning is carried out on the running state of the monitored object at the next moment. Therefore, the fault condition of the monitored object is actively predicted, and the fault is avoided in time.
Detailed Description
The present application will be described in detail below with reference to the embodiments with reference to the attached drawings. The various examples are provided by way of explanation of the application and are not limiting of the application. In fact, it will be apparent to those skilled in the art that modifications and variations can be made in the present application without departing from the scope or spirit of the application. For instance, features illustrated or described as part of one embodiment, can be used with another embodiment to yield a still further embodiment. It is therefore intended that the present application cover the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents.
Fig. 1 is a schematic structural diagram of a distributed industrial data acquisition and early warning intelligent gateway provided according to some embodiments of the present application; FIG. 2 is a block diagram of a core data processing unit according to some embodiments of the present disclosure; FIG. 3 is a schematic diagram of a data acquisition unit according to some embodiments of the present application; as shown in fig. 1 to fig. 3, the distributed intelligent gateway for industrial data collection and early warning includes: the monitoring system comprises a plurality of data acquisition modules 200 and a core data processing module 100, wherein the data acquisition modules 200 are distributed, each data acquisition module 200 can acquire time sequence data of a monitoring object 300, the monitoring objects 300 are multiple, the monitoring objects 300 correspond to the data acquisition modules 200, and the monitoring objects 300 have different data transmission protocols; the data acquisition module 200 is internally provided with a multi-protocol analysis submodule which can analyze the industrial data transmission protocol of the monitored object 300 so as to analyze the acquired time sequence data into a transmission marking data format to be measured of a message queue; the core data processing module 100 is in communication connection with each data acquisition module 200 through a radio technology, and analyzes time series data in a telemetry transmission standard data format in a message queue analyzed by the received data acquisition module 200 based on a preset intelligent early warning module to determine whether to generate early warning information.
In the embodiment of the present application, the data collection module 200 can collect time series data of the monitoring objects 300, and the plurality of monitoring objects 300 correspond to the plurality of data collection modules 200. The plurality of data acquisition modules 200 may be in a one-to-one or one-to-many relationship with the plurality of monitoring objects 300, that is, one data acquisition module 200 may monitor one monitoring object 300, or may monitor a plurality of monitoring objects 300 simultaneously.
In this embodiment, a distributed deployment manner of one master and multiple slaves is adopted between the multiple data acquisition modules 200 and the core data processing module 100, a multi-protocol analysis sub-module built in the data acquisition module 200 analyzes an industrial data transmission protocol of the monitoring object 300, analyzes the acquired time sequence data of the monitoring object 300 into a Message Queue Telemetry Transport (MQTT) standard data format, and sends the data format to the core data transmission module, so that unified access of multiple different monitoring objects 300 is realized, and data islands between different monitoring objects 300 are eliminated.
In the embodiment of the present application, the multi-protocol analysis sub-module may be configured to analyze common industrial data transmission protocols such as modbus, opuca, profinet, and the like, and the data acquisition module 200 performs uplink and downlink communication on the analyzed time-series data with the core data processing module 100 in the standard data format of MQTT. Specifically, the data acquisition module 200 and the core data processing module 100 are both provided with a Long Range Radio (Long Range Radio, Long ra for short) communication sub-module, so as to realize uplink and downlink communication between the data acquisition module 200 and the core data processing module 100, and ensure ultra-Long-distance and high-sensitivity communication between the data acquisition module 200 and the core data processing module 100. Further, the distance for communication between the core data processing module 100 and the data acquisition module 200 through the radio technology is more than 11.5 kilometers; the communication sensitivity between the core data processing module 100 and the data acquisition module 200 is not lower than-140 decibel hawk (dbm).
In the embodiment of the present application, the data acquisition module 200 is provided with a plurality of communication standard interfaces, and the communication standard interfaces can be connected with sensors, wherein the sensors are used for acquiring time sequence data of the monitored object 300. Further, the data acquisition module 200 performs data communication with the core data processing module 100 through an LoRa network, and the data acquisition module 200 is provided with a plurality of ethernet interfaces; specifically, the data acquisition module 200 includes 2 ethernet interfaces and 2 RS485/RS232 communication standard interfaces, wherein the communication between the data acquisition module 200 and other programmable logic controllers, sensors, and the like can be realized through the communication standard interfaces (ethernet interfaces, RS485/RS232) so as to extend the distributed industrial data acquisition and early warning intelligent gateway.
In this embodiment, the core data processing module 100 is provided with a remote communication sub-module 103, and the remote communication sub-module 103 can transmit the time series data in the message queue telemetry transmission standard data format and the warning information to the target terminal 400, so that the target terminal 400 displays the time series data in the message queue telemetry transmission standard data format and the warning information in real time. Therefore, the time sequence data acquired by the data acquisition unit and the generated early warning information can be effectively sent to the target terminal 400, and the target terminal 400 can take accurate measures in time.
Further, a wireless communication unit is built in the remote communication sub-module 103, and the wireless communication unit can send the time sequence data of the message queue telemetering transmission standard data format of the target terminal 400 and the early warning information to the target user in a short message form in real time so as to be checked by the target user. Therefore, the real-time performance of time sequence data and early warning information of different monitored objects 300 is further improved, so that a target user can timely and accurately master the working state of each monitored object 300, different adjustments can be conveniently carried out on different monitored objects 300, and the efficient and safe work of each monitored object 300 is ensured.
In this application implementation, distributed industrial data gathers early warning intelligent gateway still includes: and the power supply module is respectively and electrically connected with the data acquisition module 200 and the core data module. Further, distributed industrial data gathers early warning intelligent gateway still includes: the storage module 104 is in communication connection with the core data processing module 100, so as to store the time sequence data and the early warning information of the message queue telemetering transmission standard data format; and the memory module 104 is electrically connected to the power module. Therefore, efficient and safe work of the data acquisition unit, the core data processing unit and the storage unit is effectively guaranteed, and the reliability of the distributed industrial data acquisition early warning intelligent gateway is improved.
In the embodiment of the present application, the wireless communication sleep current between the data acquisition module 200 and the core data processing module 100 is less than 1.8 microamperes. Therefore, the energy consumption can be effectively reduced.
In the embodiment of the present application, the core data processing unit is provided with a first microcontroller 101, a first LoRa communication sub-module 102, a remote communication sub-module 103, a storage module 104, and a first power module 105; the data acquisition unit is provided with a second microcontroller 201, a second LoRa communication submodule 202, a standard interface module 203 and a second power module 204. The first power module 105 and the second power module 204 may be the same power module, and provide DC — 12V voltage for the core data processing unit and the data acquisition unit.
In this embodiment, the standard interface module 203 includes 2 ethernet interfaces (RJ45) and 2 RS485/RS232 communication standard interfaces, and is connected to the sensor through the RS485/RS232 communication standard interface, and the sensor collects the time sequence data of the monitored object 300.
An intelligent early warning model is preset in the first microcontroller 101, and the received time series data of the message queue telemetering transmission standard data format analyzed by the data acquisition module 200 is analyzed to determine whether early warning information is generated or not; a multi-protocol analysis submodule is preset in the second microcontroller 201, and the multi-protocol analysis submodule can analyze the industrial data transmission protocol of the monitored object 300 so as to analyze the acquired time sequence data into a message queue telemetry transmission standard data format.
The first loRa communication submodule 102 is in communication connection with the second loRa communication submodule 202, so that the core data processing unit plays a role of a loRa gateway, receives/issues data to the data acquisition module 200, and ensures remote and high-sensitivity communication between the first microcontroller 101 and the second microcontroller 201.
The remote communication sub-module 103 is connected with the first microcontroller 101, is internally provided with a wireless communication unit, and sends the time sequence data of the message queue telemetering transmission standard data format of the target terminal 400 and the early warning information to a target user in a short message form in real time so as to be checked by the target user; the remote communication sub-module 103 is further provided with an ethernet interface, so that the data transmission and communication capability between the data acquisition module 200 and other distributed devices such as programmable logic controllers and sensors is enhanced by connecting with the ethernet interface in the data acquisition module 200.
The storage module 104 is connected to the first microcontroller 101, and is capable of storing the time series data and the early warning information in the message queue telemetry transmission standard data format.
In the embodiment of the application, the
first microcontroller 101 adopts an intel Hassell Soc architecture chip, and is matched with an ultra-low voltage Core i3-4010U processor, the processor carries a powerful Graphics HD 5000 graphic chip, the design power consumption is only 15 watts, and the excellent balance of performance, power consumption and volume is achieved. The Core i3-4010U processor mainboard size is 120mm x 120mm Nano-ITX, fan-free passive heat dissipation is achieved, wide-temperature operation can be achieved, the working temperature is-20-70 ℃, the mechanical vibration applicable frequency is 10 Hz-150 Hz, and the acceleration amplitude is 24 m/s. The
second microcontroller 201 is made of black radiation-resistant electrolytic lead-free galvanized Steel plate (Steel, electrolytic, Cold, common, abbreviated as SECC), including
STM32 microprocessor.
In the embodiment of the application, the first microcontroller 101, the second microcontroller 201 and the LoRa wireless networking all adopt low power consumption, the power consumption of the first microcontroller 101 and the second microcontroller 201 is not more than 15W, the LoRa sleep current is less than 1.8 μ a, and the system energy consumption is optimized to the maximum extent.
In this application implementation, sensor to multiple agreement through the data acquisition unit, monitoring object 300 carries out data acquisition, and standardize to MQTT protocol format, upload to core data processing unit through the LoRa network, core data processing unit also can be assigned control command with MQTT protocol format through the LoRa network and reach data acquisition module 200, carry out data protocol conversion by data acquisition module 200, assign control command to field sensor and controller through standard interface module 203, the realization is to monitoring object 300 or the monitoring and the control of production process.
The core data processing unit analyzes the data uploaded by the data acquisition unit through the fuzzy neural network anomaly prediction model, judges the abnormal condition and the variation trend of time sequence data, and performs early warning on necessary abnormal conditions, so that the problems of one-sidedness, hysteresis and false alarm caused by a conventional threshold value warning mode are avoided. Specifically, based on the intelligent early warning model of the fuzzy neural network algorithm, the time series data in the message queue telemetry transmission standard data format analyzed by the received data acquisition module 200 is analyzed to determine whether to produce early warning information, so as to realize intelligent early warning of abnormal data. The early warning information flow and the collected data flow can be uploaded to a central server platform through a built-in wireless module U8300w of the core data processing unit, and the early warning information can be sent to related personnel through a short message sending function of the wireless module U8300 w. The wireless module U8300w is compatible with 2G, 3G and 4G networks.
In the embodiment of the application, an intelligent early warning model based on a fuzzy neural network algorithm and a plurality of data acquisition modules 200 are deployed in a distributed manner in an intelligent gateway, the plurality of data acquisition modules 200 are deployed in the intelligent gateway in a distributed manner and are used for acquiring data of a plurality of monitoring objects 300 to obtain a plurality of time sequence data of the plurality of monitoring objects 300, and the intelligent early warning model is used for predicting the operation state of the monitoring objects 300 according to the time sequence data.
In the embodiment of the present application, the time-series data set (i.e., the input data set) of a certain monitoring variable of the monitoring object 300 acquired by the data acquisition module 200 is D { (x'1,y′1),(x′2,y′2),(x′3,y′3)…(x′n,y′n) Where (x ', y ') represents time-series data of the monitoring object 300 acquired by the data acquisition module 200, x ' represents a time-series value of the time-series data, and y ' represents a state evaluation value corresponding to the time-series value x '; y is’∈[0,1]Where 0 indicates that the numerical value is normal, the operating state of the monitoring target 300 is normal, and the closer the value of y is to 1, the more serious the degree of abnormality of the operating state of the monitoring target 300 becomes.
In the embodiments of the present application, X ═ X 'is defined'1,x′2,x′3…x′nDenotes a time series value at the time from 1 to n of the monitor variable, and defines Y ═ Y'1,y′2,y′3…y′nDenotes a time series value X ═ X 'at time 1 to n of the monitored variable'1,x′2,x′3…x′nThe corresponding state evaluation value;
as shown in fig. 4, the early warning method of the intelligent gateway includes:
step S101, based on the trained intelligent early warning model, obtaining a state evaluation predicted value of the monitoring object 300 at the next moment according to the fuzzy subset, a preset fuzzy rule corresponding to the fuzzy subset and the acquired input data set of the monitoring object 300; the state evaluation predicted value is used for representing the prediction of the operation state of the monitoring object 300 at the next moment; the fuzzy subset is obtained by dividing a pre-acquired training set through a clustering method; the training set is used for training the intelligent early warning model, the input data set comprises time sequence data of the current moment and a plurality of previous moments, and each time sequence data comprises a time sequence value of a monitored object and a state evaluation value corresponding to the time sequence value;
specifically, a pre-acquired training set is divided based on a K-means method to obtain fuzzy subsets.
In the embodiment of the present application, the data collection module 200 can collect time series data of the monitoring objects 300, and the plurality of monitoring objects 300 correspond to the plurality of data collection modules 200. The plurality of data acquisition modules 200 may be in a one-to-one or one-to-many relationship with the plurality of monitoring objects 300, that is, one data acquisition module 200 may monitor one monitoring object 300, or may monitor a plurality of monitoring objects 300 simultaneously. It should be noted that, the data acquisition module 200 acquires data of the monitored object 300 to obtain a time series value of the monitored object 300, a state monitoring value corresponding to the time series value at the current time is obtained by predicting through the trained intelligent early warning model, and when a state evaluation value at the next time of the monitored object is predicted, a state evaluation predicted value corresponding to the current time is the state evaluation value at the current time.
A multi-protocol analysis sub-module is built in the data acquisition module 200, and is configured to analyze industrial data transmission protocols of a plurality of monitoring objects 300 having different data transmission protocols, and analyze the acquired time sequence data of the monitoring objects 300 into a Message Queue Telemetry Transport (MQTT) standard data format, so as to implement uniform access of a plurality of different monitoring objects 300 and eliminate data islands between different monitoring objects 300.
In some optional embodiments, the obtaining of the fuzzy subset by dividing the pre-acquired training set through the K-means method specifically includes: and acquiring the clustering center of the training set based on a K-means method so as to divide the training set into a plurality of fuzzy subsets.
In the embodiment of the present application, first, m (m is a natural number) sample time series data are randomly selected from a training set obtained by performing time series data acquisition on a monitoring object 300 by a data acquisition module 200 as an initial clustering center of the training set; and calculating the distance from each sample time sequence data in the training set to m initial clustering centers, dividing the training set into m classes according to the distance from each sample time sequence data in the training set to the m initial clustering centers, and calculating the clustering center of each class according to a formula (1). Equation (1) is as follows:
in the formula, ctRepresents the cluster center of the t-th class, t ∈ (0, m), and x "represents the sample time series data. Here, it should be noted that each sample time-series data is a vector whose elements are the sample time-series sequence value and the sample state evaluation value of the sample time-series data, that is, the vector is available (sample time)Ordinal column value, sample state evaluation value).
In the embodiment of the present application, each sample time series data includes a sample time series value of the monitoring object and a sample state evaluation value corresponding to the sample time series value, and the sample state evaluation value is obtained by manual labeling. For the training set divided into m classes, recalculating each sample time sequence data in the training set to the clustering center ctRe-dividing the sample time series data set into m classes; in turn, the division of the training set is iterated cyclically until the clustering center ctNo longer changing, m fuzzy subsets are obtained.
Fig. 5 is a schematic flowchart of step S101 in an early warning method for an intelligent gateway according to some embodiments of the present application; as shown in fig. 5, obtaining the state evaluation prediction value of the monitoring object 300 at the next time based on the trained intelligent early warning model according to the fuzzy subset, the preset fuzzy rule corresponding to the fuzzy subset, and the acquired input data set of the monitoring object 300 includes:
step S111, calculating a membership function value of each time sequence data and the corresponding fuzzy subset according to the membership function model of the fuzzy subset corresponding to the acquired input data set of the monitoring object;
in the embodiment of the present application, each fuzzy subset corresponding to each input time series data component (time series value or state evaluation value) has a membership function, and the membership function value of each time series data and its corresponding fuzzy subset is calculated according to the corresponding membership function. Here, the membership degree function value represents a degree of similarity between a component (time series value or state evaluation value) of the input time series data and its corresponding fuzzy subset.
Specifically, the membership function model is shown in formula (2):
in the formula,
respectively representing membership function values of the kth time, the (k-1) th time, the ith time sequence data and the corresponding jth fuzzy subset; x represents the time series value and the state evaluation value of the current time and a plurality of previous times;
are all optimization parameters of a membership function model. In this case, the amount of the solvent to be used,
and the parameters are all optimized parameters in the membership function obtained after the training of the intelligent early warning model based on the fuzzy neural network is completed. Wherein,
to represent
The feedback coefficient of (a) is,
during training
Is 0.
Step S121, calculating the fitness of each fuzzy subset and the corresponding fuzzy rule according to a formula (3) according to the membership function value of each time series data and the corresponding fuzzy subset; equation (3) is as follows:
wherein, w
jIndicating the fitness of the jth fuzzy subset to which the time series data belongs and its corresponding fuzzy rule, (2n +2) indicating the (n +1) time series values of the input data set to which the fuzzy subset corresponds and its corresponding (n +1) state evaluation values,
and (3) representing the membership function value of the ith time sequence data and the jth fuzzy subset corresponding to the ith time sequence data, wherein the values of i, j and n are natural numbers.
In the embodiment of the present application, the fitness of each fuzzy subset and its corresponding fuzzy rule characterizes the similarity degree of the input time series data and the corresponding fuzzy rule. The higher the fitness, the higher the similarity of the input time series data and the fuzzy rule.
S131, normalizing the fitness of each fuzzy subset to obtain the weight of each fuzzy subset;
specifically, the fitness of each fuzzy subset is normalized according to the formula (4), and the weight of each fuzzy subset is obtained. Equation (4) is as follows:
in the formula,
weights representing the jth fuzzy subset, j ∈ [1, m]。
In the embodiment of the present application, the weight of each fuzzy subset represents the specific gravity of the fuzzy subset when the operation state of the monitored object 300 at the next time is predicted by the intelligent early warning model.
Step S141, calculating a state evaluation predicted value of the monitoring object 300 at the next moment according to a formula (5) according to the state prediction result of each fuzzy subset and the weight of each fuzzy subset; equation (5) is as follows:
wherein, according to the independent prediction model (as shown in formula (6)):
and obtaining the state prediction result of each fuzzy subset on the
monitoring object 300 at the next moment. In the formula, y
k+1Represents the state evaluation prediction value at the (k +1) th time of the
monitoring object 300, m represents the number of fuzzy subsets,
weights representing the jth fuzzy subset, j ∈ [1, m]The k time is the current time, and n represents n continuous times before the current time;
represents the state prediction result of the j-th fuzzy subset on the (k +1) -th time of the monitored
object 300, theta
j、p
jiOptimized parameters, x ', for the independent prediction model'
iDenotes the ith time-series value, y'
iIndicating the state evaluation value corresponding to the ith time series value.
In the embodiment of the application, the intelligent early warning model is composed of a front piece and a back piece, wherein the front piece is composed of an input layer, a linguistic variable layer, a fitness calculation layer and a normalization operation layer, and the back piece is composed of m sub-networks (independent prediction models)
) And (4) parallel composition. Receiving the acquired time series data of the
monitoring object 300 at the input layer; calculating the membership function values of the components of the time sequence data input in the input layer and the corresponding fuzzy subsets by adopting a recursive network structure in the language variable layer; in the fitness calculation layer, each node represents a fuzzy rule, and the fitness of each rule is calculated through a formula (3), namely the fitness of each fuzzy subset and the corresponding fuzzy rule; at the normalization operation layer, the weight of each fuzzy subset is calculated. And deploying an independent prediction model in the back-end part, calculating the state prediction result of each fuzzy subset on the
monitoring object 300 at the next moment, and then performing weighted summation on the state prediction result of each fuzzy subset on the
monitoring object 300 at the next moment according to the weight of the corresponding fuzzy subset, so as to obtain the state evaluation prediction value of the
monitoring object 300 at the next moment.
In the embodiment of the present application, the node in the linguistic variable layer is a calculation unit of fitness of each fuzzy subset, and the expression of the fuzzy rule is as follows:
and S102, comparing the state evaluation predicted value with a preset state threshold value, and responding to the situation that the state evaluation predicted value is larger than the preset state threshold value, and early warning the running state of the monitored object 300 at the next moment.
In this embodiment of the application, the preset state threshold is 0.5, and when the state estimation predicted value of the monitoring object 300 at the next time is greater than or equal to 0.5, the running state of the monitoring object 300 at the next time is pre-warned.
In the embodiment of the application, based on an intelligent early warning model deployed in an intelligent gateway, according to time sequence data of the monitoring object 300, which is obtained by acquiring data of a plurality of monitoring objects 300 by a plurality of data acquisition modules 200 deployed in a distributed manner in the intelligent gateway, the running state of the monitoring object 300 at the next moment is predicted, and a state evaluation predicted value of the monitoring object 300 at the next moment is obtained; then, the state evaluation predicted value of the monitoring object 300 at the next moment is compared with a preset state threshold value, so that the running state of the monitoring object 300 at the next moment is early warned; and when the state evaluation prediction value is larger than the preset state threshold value, early warning is carried out on the running state of the monitored object 300 at the next moment. Therefore, the fault condition of the monitored object 300 is actively predicted, and the fault is avoided in time.
In some optional embodiments, the early warning method of the intelligent gateway further includes: according to a pre-obtained training set, a fuzzy subset and a fuzzy rule, training an intelligent early warning model based on a fuzzy neural network algorithm based on an adam optimization algorithm to obtain a trained intelligent early warning model, specifically:
firstly, acquiring a clustering center of a training set based on a K-means method so as to divide the training set into a plurality of fuzzy subsets; each fuzzy subset corresponds to a preset fuzzy rule;
in the embodiment of the application, m sample time sequence data are randomly selected from a training set to serve as an initial clustering center of the training set; wherein m is a natural number; the training set comprises a plurality of sample time sequence data; dividing the training set into m classes according to the distance from each sample time sequence data in the training set to m initial clustering centers respectively, and calculating the clustering center of each class according to a formula (1); according to the time sequence data of each sample in the training set to the clustering center ctThe training set is subdivided into m classes; performing loop iteration on the division of the training set until the clustering center ctNo longer changing, m fuzzy subsets are obtained.
Secondly, an AdamaOptizer optimizer based on a TensorFlow calculation framework performs iterative optimization on parameters of the intelligent early warning model according to a training set, a fuzzy subset and a fuzzy rule and a preset objective function to obtain a trained intelligent early warning model; wherein, the objective function (as shown in formula (7)) is:
of formula (II) to (III)'
k+1Represents the sample state estimation predicted value at the (k +1) th time of the monitored
object 300,
this indicates the expected predicted value of the sample at the (k +1) th time of the
monitoring target 300. Wherein, y'
k+1Can be obtained from the above equation (5).
In the embodiment of the application, the parameters of the intelligent early warning model are iterated according to the objective functionThe generation optimization refers to that parameters v, c and b in the membership function model and a parameter theta in the independent prediction model are continuously optimized through training of the intelligent early warning model
j、p
jiUntil the value of the objective function E (k +1) approaches 0, obtain
θ
j、p
jiAnd (4) finishing the training of the intelligent early warning model.
In the embodiment of the application, in the training process of the intelligent early warning model,
θ
j、p
jithe initial value of (a) is a random value, and an AdamaOptimizer optimizer adopting a TensorFlow calculation framework is repeatedly called in the iteration process for iterative optimization. The maximum number of iterative optimization is 1000, that is, after the intelligent early warning model iterates 1000 times in a circulating manner, the value of the objective function E (k +1) still does not approach to 0, and then the parameter value of the last sequential iteration is determined as the parameter value of the last sequential iteration
θ
j、p
jiThe optimum value of (c).
Fig. 6 is a schematic structural diagram of an early warning system of an intelligent gateway according to some embodiments of the present application; as shown in fig. 6, the intelligent early warning model early warning system deployed in the intelligent gateway and based on the fuzzy neural network algorithm includes: an evaluation unit 301 and an early warning unit 302. The evaluation unit 301 is configured to obtain a state evaluation prediction value of the monitoring object 300 at the next moment according to the fuzzy subset, a preset fuzzy rule corresponding to the fuzzy subset and the acquired input data set of the monitoring object 300 based on the trained intelligent early warning model; the state evaluation predicted value is used for representing the prediction of the operation state of the monitoring object 300 at the next moment; the fuzzy subset is obtained by dividing a pre-acquired training set through a clustering method; the training set is used for training an intelligent early warning model, the input data set comprises time sequence data of the current time and a plurality of previous times, and each time sequence data comprises a time sequence value of the monitored object and the state evaluation value corresponding to the time sequence value; the early warning unit 302 is configured to compare the state estimation prediction value with a preset state threshold, and in response to the state estimation prediction value being greater than the preset threshold, early warn the operation state of the monitored object 300 at the next moment.
In this embodiment, a plurality of data acquisition modules 200 are deployed in a distributed manner in an intelligent gateway, and the data acquisition modules 200 are configured to acquire data of a plurality of monitoring objects 300 to obtain a plurality of time series data of the plurality of monitoring objects 300.
FIG. 7 is a schematic diagram of a structure of an evaluation unit provided in accordance with some embodiments of the present application; as shown in fig. 7, the evaluation unit 301 includes: membership subunit 311, fitness subunit 322, normalization subunit 331, and predictor subunit 341. The membership degree subunit 311 is configured to calculate a membership degree function value of each time series data and the corresponding fuzzy subset according to the membership degree function of the fuzzy subset corresponding to the acquired input data set of the monitoring object; a fitness subunit 322, configured to calculate the fitness of each fuzzy subset and its corresponding fuzzy rule according to the membership function value of each time series data and its corresponding fuzzy subset; a normalization subunit 331 configured to perform normalization processing on the fitness of each fuzzy subset to obtain a weight of each fuzzy subset; a predictor unit 341 configured to predict a result based on the state of each fuzzy subset and the weight of each fuzzy subset, according to the formula:
obtaining a state evaluation predicted value of the monitoring object 300 at the next moment; wherein, according to the independent prediction model:
obtain each fuzzy subset pair under the monitored object 300A state prediction result at a time; in the formula, y
k+1Represents the state evaluation prediction value at the (k +1) th time of the
monitoring object 300, m represents the number of fuzzy subsets,
weights representing the jth fuzzy subset, j ∈ [1, m]The k time is the current time, and n represents n continuous times before the current time;
represents the state prediction result of the j-th fuzzy subset on the (k +1) -th time of the monitored
object 300, theta
j、p
jiOptimized parameters, x ', for the independent prediction model'
iDenotes the ith time-series value, y'
iIndicating the state evaluation value corresponding to the ith time series value.
The intelligent gateway early warning system provided by the embodiment of the application can realize the flow and the steps of the intelligent gateway early warning method of any embodiment, and achieve the same beneficial effects, which are not repeated herein.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.