Disclosure of Invention
The invention aims to provide a device-based method for detecting abnormal states of an Internet of things and correcting and processing false alarm rates of faults, which can effectively solve the false alarm problems of IP (Internet of things) type and 485 connection of large-scale commercial complexes, residential areas, industrial parks and the electromechanical devices connected by can buses, and solve the problems in the background technology.
In order to achieve the above purpose, the invention adopts the following technical scheme:
the error rate correction processing method based on the abnormal state detection and the failure error rate correction of the equipment Internet of things comprises the following steps:
s1, importing an Internet of things system into an equipment model for adaptation, and enabling equipment of the Internet of things to gather and equipment of the same Internet of things topological structure to form a group of intelligent agent groups;
s2, training a container by using the equipment state model: each type of equipment establishes a state model training container based on the data precipitation of the same type of equipment, periodically collects the data of the equipment, fuses the data actively reported to perform state model training, and links the internet of things channel judging module and the equipment intelligent body group module to perform auxiliary detection;
s3, a device inference model: the model updating control module controls the model trained by the equipment state model training container to be updated into a corresponding equipment inference model periodically;
s4, a data acquisition and reporting management module: supporting the instruction classification management and the data reporting control management of the gateway for actively inquiring the equipment data;
s5, an Internet of things passage judgment model: whether the equipment connection network is normal or not is judged, the module is started under the condition that the equipment connection fails, and whether a network access is normal or not is judged;
s6, auxiliary judging models of the equipment intelligent agent groups: correction detection is carried out through the associated equipment in the collection agent group; under the condition that the equipment fails, the network access is normal, and the module is started to perform auxiliary verification on whether the alarm equipment fails or not and the specific position and the generated reason of the failure.
Preferably, the intelligent agent group comprises a plurality of electromechanical devices, and the electromechanical devices are electrically connected through an internet of things channel.
Preferably, when the Internet of things system is used for leading in equipment models for adaptation, an equipment model is designed firstly, then the Internet of things system and the equipment model are integrated, then the Internet of things equipment is connected into the Internet of things system, equipment collection is achieved, the collected Internet of things equipment is formed into a group of intelligent agent groups according to an Internet of things topological structure, and finally the intelligent agent groups are cooperated through the Internet of things system, wherein the equipment model uses a standard Internet of things equipment model or the equipment model is customized according to specific application scenes, and the definition of the equipment model comprises attributes, functions and interfaces.
Preferably, in step S2, the step of establishing the state model training container is as follows:
a1, data collection: the data of the same type of device needs to be collected, so that enough data samples are collected to comprehensively reflect the state and the behavior of the device, wherein the data comprise sensor data, operation logs and fault records of the device;
a2, data cleaning and pretreatment: cleaning and preprocessing the collected data to ensure the quality and consistency of the data so as to improve the accuracy and stability of the model, wherein the cleaning and preprocessing comprises the steps of removing abnormal values, processing missing values and normalizing the data;
a3, extracting features: extracting meaningful features from the cleaned data, and ensuring that the selected features can accurately reflect the state and behavior of the equipment, wherein the meaningful features comprise key indexes, statistical features and frequency domain features of the equipment;
a4, data marking: labeling the data samples, and distributing correct labels to each data sample according to the state and the behavior of the equipment;
a5, model training: training a state model by using the marked data sample, and enabling the state model to learn the state and the behavior mode of the equipment from the equipment data by training the model;
a6, model evaluation and optimization: evaluating and optimizing the model obtained by training, verifying the model by using a test data set, evaluating the accuracy and generalization capability of the model, and adjusting and optimizing the model according to the evaluation result to improve the performance and effect of the model;
a7, creating a state model training container: the trained state model is deployed into a container, which is configured as one of a virtual environment, cloud platform, and edge device, to ensure that the container can provide stable computing resources and environments to support training and running of the state model.
Preferably, when the data of the device are periodically collected, the type and the frequency of the data of the device to be collected need to be determined, the time interval and the triggering condition of the data collection are determined, a development data collection program is obtained, and the data of the device are obtained according to the development data collection program and stored in a local or cloud database.
Preferably, the internet of things channel judging module judges whether the equipment is normally networked and whether the communication is normal by detecting the network connection and the communication quality index between the equipment; the intelligent equipment group module monitors, analyzes and predicts the equipment data in real time, provides intelligent decision support, helps equipment to realize main control and optimal operation, realizes the judgment of monitoring the Internet of things access and the intelligent management of the equipment state by the linkage of the Internet of things access judgment module and the intelligent equipment group module, monitors and predicts the equipment state in real time by collecting the equipment data and combining the actively reported data for state model training, timely discovers equipment faults or abnormal conditions, and meanwhile, the intelligent equipment group module and the intelligent equipment group module are linked to provide auxiliary detection and optimal decision by judging the Internet of things access state and analyzing the equipment state, so that the normal operation and performance optimization of the equipment are ensured.
Preferably, in step S3, when the model update control module trains the model trained by the container by controlling the device state model, the model update control module includes the following steps:
b1, training strategy setting: the model updating control module needs to set a set of proper training strategies, and adjusts and optimizes according to the characteristics and the requirements of the equipment, wherein the training strategies comprise training periods, training data amounts and training algorithms;
b2, data acquisition and pretreatment: the model updating control module is responsible for periodically collecting data of the equipment and carrying out preprocessing so as to facilitate subsequent model training, wherein the preprocessing comprises data cleaning and feature extraction;
b3, model training: according to the set training strategy and the preprocessed data, the model updating control module inputs the data into the equipment state model training container to perform model training, wherein the training process adopts a machine learning or deep learning algorithm to perform model training according to specific conditions;
and B4, model evaluation and selection: after model training is completed, the model updating control module evaluates and selects the model obtained through training to determine whether the requirement of equipment inference is met; the evaluation index comprises an accuracy rate, a recall rate and an F1 value, and is selected according to a specific scene.
And B5, model updating judgment: the model updating control module judges whether the model is required to be updated according to the set updating strategy and the evaluation result; the updating strategy is set based on factors of time, data quantity and model performance;
b6, updating a model: when the model updating is judged to be needed, the model updating control module triggers a model updating operation; the updating operation comprises the steps of updating model parameters, modifying a model structure and retraining a model;
and B7, generating and updating an inference model: after the model update is complete, the model update control module generates and updates the corresponding device inference model to the device for inference and decision-making on the device.
Preferably, in step S4, the data collection and reporting management module performs active query and reporting control on the device data through instruction classification management and data reporting control management, where the instruction classification management is used to manage and analyze an instruction sent by the device, and when the gateway receives the instruction sent by the device, the data collection and reporting management module analyzes and classifies the instruction according to a predefined instruction format, identifies the type of the instruction and related data content through the analysis instruction, and the gateway sends the data to a corresponding processing module according to the type of the instruction for further processing;
the data reporting control management is used for controlling the reporting of the equipment data, the gateway determines whether to report the equipment data according to a preset strategy, and the data acquisition and reporting management module can filter, compress and encrypt the equipment data according to requirements; by defining a proper reporting strategy, the reporting frequency and mode of the equipment data are controlled so as to avoid excessive reporting of the data or unnecessary data transmission.
Preferably, the data acquisition and reporting management module comprises an equipment instruction receiving unit, an instruction analyzing and classifying unit, a data processing and storing unit, a reporting control unit and a data reporting unit, wherein the equipment instruction receiving unit is used for receiving an instruction sent by equipment through a gateway establishing communication connection with the equipment; the instruction analyzing and classifying unit analyzes and classifies the received instruction, identifies the type of the instruction and related data content, the data processing and storing unit sends related data to a corresponding processing module according to the type of the instruction to perform data analysis, data storage and further processing of data forwarding, the reporting control unit decides whether to report the data of the equipment according to a preset strategy, bandwidth and resource consumption are saved by controlling the frequency and mode of data reporting, and the data reporting unit sends the processed data to a cloud platform or other target positions when deciding to report the data.
Preferably, when the auxiliary judging model of the equipment intelligent body group is used for correcting and detecting, the associated equipment in the intelligent body group is firstly determined, then the equipment data is classified, then the equipment data collected to the central data collecting point is processed and analyzed, the correcting and detecting is carried out by using a correcting algorithm, the correcting and detecting result is analyzed and judged according to the correcting and detecting result, and finally the correcting operation is carried out on the equipment through a controller or an actuator in the intelligent body group according to the correcting and detecting result and feedback.
Compared with the prior art, the method for detecting the abnormal state of the internet of things and correcting the false alarm rate of the faults based on the equipment has the following advantages:
according to the invention, an average value clustering algorithm and a real-time data processing algorithm in a big data analysis algorithm are utilized to construct an error rate correction algorithm of the fault of the Internet of things equipment, a sample correction algorithm of the error rate of the fault of the Internet of things equipment and a training container of the error rate correction algorithm are constructed, data of the equipment are collected regularly, and actively reported data are fused to perform state model training, and the Internet of things channel judgment module and the equipment intelligent body group module can be linked to perform auxiliary detection; correction detection is carried out through the associated equipment in the collection agent group; under the condition that equipment fails, a network access is normal, the module is started to carry out auxiliary checking on whether the alarm equipment fails or not and the specific position and the generation reason of the failure, the problem that the failure false alarm rate of the IP type, 485 connection and can bus connection electromechanical equipment in a large commercial complex, a residential area, an industrial park and an industrial park is high is solved, an error alarm rate correction algorithm for the mechanical equipment and surrounding environment situation building Internet of things equipment is carried out, and correction detection is carried out through the associated equipment in the collection intelligent body group; under the condition that equipment fails, a network access is normal, the module is started, whether the alarm equipment fails or not and the specific position and the generated reason of the failure are checked in an auxiliary mode, the false alarm rate of the internet of things equipment is reduced, accurate equipment failure pushing is provided for operation and maintenance in time, and loss caused by the failure is reduced.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The specific embodiments described herein are merely illustrative of the invention and are not intended to limit 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.
The invention provides a device-based method for detecting abnormal states of an internet of things and correcting fault false alarm rate, which is shown in fig. 1-5, and comprises the following steps:
s1, importing an Internet of things system into an equipment model for adaptation, and enabling equipment of the Internet of things to gather and equipment of the same Internet of things topological structure to form a group of intelligent agent groups;
the intelligent agent group comprises a plurality of electromechanical devices, and the electromechanical devices are electrically connected through an Internet of things channel; when the Internet of things system is used for leading in equipment models for adaptation, an equipment model is designed firstly, then the Internet of things system and the equipment model are integrated, then the Internet of things equipment is connected into the Internet of things system to realize equipment collection, (various communication protocols and interfaces such as Wi-fi, bluetooth and Zigbee can be used for connecting the Internet of things equipment and the Internet of things system), the collected Internet of things equipment forms a group of intelligent agent groups according to an Internet of things topological structure, and finally the intelligent agent groups are cooperated through the Internet of things system, wherein the equipment model uses a standard Internet of things equipment model or a custom equipment model according to a specific application scene, the standard Internet of things equipment model is an Internet of things open protocol, and the definition of the equipment model comprises attributes, functions and interfaces. In the process of realizing the adaptation of the device model imported by the Internet of things system, the safety and privacy protection of the device are required to be considered, the technical means of identity, data encryption and authority control can be adopted, the safety of the device and the data is ensured, and in addition, related regulations and standards are required to be followed, so that the privacy and personal information of a user are protected.
S2, training a container by using the equipment state model: each type of equipment establishes a state model training container based on the data precipitation of the same type of equipment, periodically collects the data of the equipment, fuses the data actively reported to perform state model training, and links the internet of things channel judging module and the equipment intelligent body group module to perform auxiliary detection;
as shown in fig. 2, the state model training container is built as follows:
a1, data collection: the data of the same type of device needs to be collected, so that enough data samples are collected to comprehensively reflect the state and the behavior of the device, wherein the data comprise sensor data, operation logs and fault records of the device;
a2, data cleaning and pretreatment: cleaning and preprocessing the collected data to ensure the quality and consistency of the data so as to improve the accuracy and stability of the model, wherein the cleaning and preprocessing comprises the steps of removing abnormal values, processing missing values and normalizing the data;
a3, extracting features: extracting meaningful features from the cleaned data, and ensuring that the selected features can accurately reflect the state and behavior of the equipment, wherein the meaningful features comprise key indexes, statistical features and frequency domain features of the equipment;
a4, data marking: labeling the data samples, and distributing correct labels to each data sample according to the state and the behavior of the equipment; for example, a label such as failure classification, device status classification, or the like may be used;
a5, model training: training a state model by using the marked data sample, and enabling the state model to learn the state and the behavior mode of the equipment from the equipment data by training the model; suitable machine learning algorithms or deep learning models, such as Support Vector Machines (SVMs), random Forest (Random Forest), convolutional Neural Networks (CNNs), etc., may be selected.
A6, model evaluation and optimization: evaluating and optimizing the model obtained by training, verifying the model by using a test data set, evaluating the accuracy and generalization capability of the model, and adjusting and optimizing the model according to the evaluation result to improve the performance and effect of the model;
a7, creating a state model training container: the trained state model is deployed into a container, which is configured as one of a virtual environment, cloud platform, and edge device, to ensure that the container can provide stable computing resources and environments to support training and running of the state model.
Through the steps A1 to A7 above, a state model training container can be precipitated and created based on the same type of device data, which can be used for real-time monitoring, predicting device states, fault detection, etc. applications. At the same time, models need to be updated and optimized continuously to accommodate changes in the device and new data samples.
When the data of the equipment are periodically acquired, the type and the frequency of the data of the equipment to be acquired are required to be determined, the time interval and the triggering condition of the data acquisition are determined, a development data acquisition program is obtained, and the data of the equipment are acquired according to the development data acquisition program and are stored in a local or cloud database.
The internet of things access judging module judges whether the equipment is normally connected with the internet and whether the communication is normal by detecting the network connection and the communication quality index between the equipment; the equipment intelligent body group module monitors, analyzes and predicts the equipment data in real time, provides intelligent decision support, helps equipment to realize main control and optimal operation, judges the monitoring of the Internet of things access by the linkage of the Internet of things access judging module and the equipment intelligent body group module, and intelligently manages the equipment state, monitors and predicts the equipment state in real time by collecting the equipment data and combining the actively reported data for state model training, and timely discovers equipment faults or abnormal conditions.
S3, a device inference model: the model updating control module controls the model trained by the equipment state model training container to be updated into a corresponding equipment inference model periodically;
the model update control module, when controlling the device state model training container training model, as shown in fig. 3, includes the following steps:
b1, training strategy setting: the model updating control module needs to set a set of proper training strategies, and adjusts and optimizes according to the characteristics and the requirements of the equipment, wherein the training strategies comprise training periods, training data amounts and training algorithms;
b2, data acquisition and pretreatment: the model updating control module is responsible for periodically collecting data of the equipment and carrying out preprocessing so as to facilitate subsequent model training, wherein the preprocessing comprises data cleaning and feature extraction;
b3, model training: according to the set training strategy and the preprocessed data, the model updating control module inputs the data into the equipment state model training container to perform model training, wherein the training process adopts a machine learning or deep learning algorithm to perform model training according to specific conditions;
and B4, model evaluation and selection: after model training is completed, the model updating control module evaluates and selects the model obtained through training to determine whether the requirement of equipment inference is met; the evaluation index comprises an accuracy rate, a recall rate and an F1 value, and is selected according to a specific scene.
And B5, model updating judgment: the model updating control module judges whether the model is required to be updated according to the set updating strategy and the evaluation result; the updating strategy is set based on factors of time, data quantity and model performance;
b6, updating a model: when the model updating is judged to be needed, the model updating control module triggers a model updating operation; the updating operation comprises the steps of updating model parameters, modifying a model structure and retraining a model;
and B7, generating and updating an inference model: after the model update is complete, the model update control module generates and updates the corresponding device inference model to the device for inference and decision-making on the device.
S4, a data acquisition and reporting management module: supporting the instruction classification management and the data reporting control management of the gateway for actively inquiring the equipment data;
the data acquisition and reporting management module realizes active inquiry and reporting control of equipment data through instruction classification management and data reporting control management, wherein the instruction classification management is used for managing and analyzing instructions sent by equipment, when a gateway receives the instructions sent by the equipment, the data acquisition and reporting management module analyzes and classifies the instructions according to a predefined instruction format, the type of the instructions and related data content are identified through analyzing the instructions, and the gateway sends the data to a corresponding processing module for further processing according to the type of the instructions;
the data reporting control management is used for controlling the reporting of the equipment data, the gateway determines whether to report the equipment data according to a preset strategy, and the data acquisition and reporting management module can filter, compress and encrypt the equipment data according to requirements; by defining a proper reporting strategy, the reporting frequency and mode of the equipment data are controlled so as to avoid excessive reporting of the data or unnecessary data transmission.
The data acquisition and reporting management module comprises an equipment instruction receiving unit, an instruction analysis and classification unit, a data processing and storage unit, a reporting control unit and a data reporting unit, wherein the equipment instruction receiving unit is used for receiving an instruction sent by equipment through a gateway establishing communication connection with the equipment; the instruction analysis and classification unit analyzes and classifies the received instruction, identifies the type of the instruction and the content of related data, the data processing and storage unit sends the related data to the corresponding processing module according to the type of the instruction to perform data analysis, data storage and further processing of data forwarding, the reporting control unit decides whether to report the data of the equipment according to a preset strategy, bandwidth and resource consumption are saved by controlling the frequency and mode of data reporting, and the data reporting unit sends the processed data to the cloud platform or other target positions when deciding to report the data.
S5, an Internet of things passage judgment model: whether the equipment connection network is normal or not is judged, the module is started under the condition that the equipment connection fails, and whether a network access is normal or not is judged;
to achieve the determination of whether the device connection network is normal, the following steps may be used:
c1, monitoring equipment connection state: by monitoring the connection status of the device, it can be determined whether the device is successfully connected to the network. The connection state of the device may be detected using a heartbeat mechanism or a timed send instruction. The decision module may be activated if the device is not normally connected to the network.
And C2, starting a network path judging module: and when the equipment fails to be connected, starting a network path judging module. The module may be a stand-alone program or a software module embedded in the device or gateway.
And C3, selecting a network path judging method: and selecting a proper network path judging method to judge whether the network path is normal or not. Common methods include Pi ng test, HTTP request, socket connection, etc. And selecting the most suitable method for judging according to the network environment and the requirements.
And C4, performing network path judgment: according to the selected method, a network path determination operation is performed. For example, send Pi ng request or HTTP request to the target server, or establish Socket connection. Whether the network path is normal or not is judged by judging whether the response time of the request, the return result or the connection is successful or not.
And C5, feedback of a judgment result: and feeding back the judging result to the equipment or the gateway according to the judging result. The decision may be notified to the relevant person or system by sending a notification, alarm, log record, etc.
And C6, processing network path abnormality: if the network path judging result shows that the network path is abnormal, corresponding processing measures can be adopted. Such as reconnecting the network, restarting the device, checking the network configuration, etc. Taking proper measures to restore the normal state of the network path according to specific conditions
S6, auxiliary judging models of the equipment intelligent agent groups: correction detection is carried out through the associated equipment in the collection agent group; under the condition that the equipment fails, the network access is normal, and the module is started to perform auxiliary verification on whether the alarm equipment fails or not and the specific position and the generated reason of the failure.
When the correction detection is carried out on the auxiliary judgment model of the equipment intelligent agent group, firstly, the associated equipment in the intelligent agent group is determined, then the equipment data is classified, then the equipment data collected to the central data collection point is processed and analyzed, correction detection is carried out by using a correction algorithm, then the correction detection result is analyzed and judged according to the correction algorithm result, and finally, the correction operation is carried out on the equipment through a controller or an actuator in the intelligent agent group according to the correction detection result and feedback.
In summary, an average value clustering algorithm and a real-time data processing algorithm in a big data analysis algorithm are utilized to construct an Internet of things equipment fault false alarm rate correction algorithm, an Internet of things equipment fault false alarm rate sample correction algorithm and a false alarm rate correction algorithm training container are constructed, data of equipment are collected regularly, actively reported data are fused, state model training is carried out, and an Internet of things channel judging module and an equipment intelligent body group module can be linked to carry out auxiliary detection; correction detection is carried out through the associated equipment in the collection agent group; under the condition that equipment fails, a network access is normal, the module is started to carry out auxiliary checking on whether the alarm equipment fails or not and the specific position and the generation reason of the failure, the problem that the failure false alarm rate of the IP type, 485 connection and can bus connection electromechanical equipment in a large commercial complex, a residential area, an industrial park and an industrial park is high is solved, an error alarm rate correction algorithm for the mechanical equipment and surrounding environment situation building Internet of things equipment is carried out, and correction detection is carried out through the associated equipment in the collection intelligent body group; under the condition that equipment fails, a network access is normal, the module is started, whether the alarm equipment fails or not and the specific position and the generated reason of the failure are checked in an auxiliary mode, the false alarm rate of the internet of things equipment is reduced, accurate equipment failure pushing is provided for operation and maintenance in time, and loss caused by the failure is reduced.
Finally, it should be noted that: the foregoing description is only illustrative of the preferred embodiments of the present invention, and although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described, or equivalents may be substituted for elements thereof, and any modifications, equivalents, improvements or changes may be made without departing from the spirit and principles of the present invention.