Intelligent gateway equipment remote management and control method based on swan mongolian system
By adopting the distributed architecture and machine learning algorithm of the Hongmeng system on intelligent gateway devices, real-time data monitoring and fault prediction of gateway devices are realized, solving the problems of equipment monitoring delay and fault detection in the existing technology, and improving the stability and response speed of the system.
Patent Information
- Application Number
- CN202411710183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-21
AI Technical Summary
The isolated architecture of existing intelligent gateway devices leads to data sharing and transmission delays, making it difficult to realize real-time device monitoring and management, and fault detection relies on manual inspection or simple threshold alarms, making it impossible to predict potential fault risks.
Based on the distributed architecture of Hongmeng system, it realizes the close connection and data sharing between gateway equipment and system. It collects device status data in real time through a unified device management platform, and combines machine learning algorithms to train fault prediction models to predict potential fault risks and maintenance cycles, and automatically generates control instructions for remote management and control.
Real-time data monitoring and fault prediction of gateway equipment are realized, equipment response speed and system stability are improved, and downtime and maintenance costs are reduced caused by passive maintenance.
Smart Images

Figure CN119676097A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of gateway device management technology, and specifically to a method for remote management and control of intelligent gateway devices based on the Hongmeng system. Background Art
[0002] As a key node connecting various sensors with the cloud or local control center, the stability and reliability of smart gateway devices are crucial to the normal operation of the entire IoT system.
[0003] Existing intelligent gateway devices usually adopt an isolated architecture, and the connection with the back-end management system is not tight enough, resulting in delays in data sharing and transmission, making it difficult to achieve real-time equipment monitoring and management. This isolation not only affects the response speed of the equipment, but also increases the risk of data loss or errors, reducing the overall reliability of the system. Moreover, the existing gateway equipment fault detection mainly relies on manual inspections or simple threshold alarm mechanisms, which cannot effectively predict the potential failure risks of the equipment. Before the equipment fails, there is a lack of sufficient data support and intelligent analysis methods to identify signs of failure in advance, resulting in passive maintenance after the failure occurs, which not only affects the continuous operation of the system, but also increases maintenance costs and downtime. Summary of the invention
[0004] The purpose of the present invention is to provide a remote management and control method for intelligent gateway devices based on the Hongmeng system to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a remote management and control method for intelligent gateway devices based on the Hongmeng system, the method comprising:
[0006] Utilize the distributed architecture of Hongmeng system to realize the connection and data sharing between gateway devices and Hongmeng system, and collect the real-time working status data of gateway devices and their connected sensors through the unified device management platform of Hongmeng system, including working temperature, current, voltage, network connection status, data transmission rate and environmental parameters output by sensors;
[0007] In combination with a machine learning algorithm, a fault prediction model is trained to predict the potential fault risk and maintenance cycle of the gateway device based on the real-time working status data of the gateway device; the fault prediction model includes the probability, type, level and time node of the predicted potential fault;
[0008] Deploy the trained fault prediction model on the edge computing node of the Hongmeng system, analyze and process the collected data in real time through the system's message transmission mechanism, predict equipment failures, and automatically generate corresponding control instructions based on preset fault handling strategies and rules when potential failures are predicted;
[0009] The generated control instructions are sent to the gateway device in real time to realize remote management and control of the equipment; and the notification service of the Hongmeng system is used to send early warning information to maintenance personnel.
[0010] Preferably, the connection and data sharing between the gateway device and the Hongmeng system are realized through the following specific steps, and the real-time working status data of the gateway device and its connected sensors are collected through the unified device management platform of the Hongmeng system:
[0011] Step 1: Use the device discovery and connection mechanism of Hongmeng system to realize automatic discovery and connection between gateway devices and Hongmeng system based on unified device description files and device protocols;
[0012] Step 2: Utilize the distributed data management function of Hongmeng system and define data sharing strategies to realize data sharing between gateway devices and Hongmeng system;
[0013] Step 3: Through the unified device management platform of Hongmeng system, the data collection function of the gateway device and its connected sensors is integrated, and the API interface provided by the device management platform is used to collect the working temperature, current, voltage, network connection status, data transmission rate of the gateway device, and the environmental parameters output by the sensor in real time; during the data collection process, a time synchronization algorithm is used to ensure that the collected data has a unified timestamp;
[0014] Among them, the device discovery and connection mechanism is based on the distributed soft bus technology of the Hongmeng system; the data sharing strategy adopts an attribute-based access control model.
[0015] Preferably, the step of training the fault prediction model includes:
[0016] S1: Collect the status data of the gateway device during operation, including: collecting the device's operating temperature, operating current, voltage, network connection status, data transmission rate, and various environmental parameters output by the sensor from the gateway device and its connected sensors; at the same time, record all historical device failures, including the time, location, type, and confirmed cause of the failure;
[0017] Summarize and organize the status data of the gateway equipment during operation and the corresponding fault conditions to form a complete fault history record;
[0018] S2: Standardize the fault history record data collected in S1 so that the data with different dimensions and units are converted into a unified format and range;
[0019] S3: Extract key features from the data processed by S2, identify the characteristic parameters that have a key impact on equipment failure prediction by analyzing the correlation between the data, and form a training data set; and divide the training data set into a training set, a validation set, and a test set;
[0020] S4: Build a machine learning model, use the training data set formed in step 3, and combine it with the linear regression algorithm to train the fault prediction model; the linear regression algorithm formula is as follows:
[0021] y=β0+β1x1+β2x2+...+β n x n +∈
[0022] Among them, y is the target variable, representing the probability of transmission failure of the gateway device, x1, x2, ..., x n is the input variable, representing the real-time working status data of the gateway device; β1, β2, ..., β n is the regression coefficient, which is determined by model training; β0 is the intercept term, which represents the basic value of the target variable when there is no environmental influence; ∈ is the error term; the purpose of model training is to estimate the regression coefficients β0, β1, β1, β2, ..., β n , so that the error between the predicted value and the true value is minimized;
[0023] S5: Set initial parameters for the model, for each feature x in the linear regression model i The corresponding parameter β i Assign an initial value, which is set to a random number close to 0, and also assign an initial value to the intercept term β0; these initial parameter values will serve as the starting point for model training and will be continuously optimized and adjusted through subsequent training processes;
[0024] S6: Use the training set to train the parameter adjustment prediction model, and continuously adjust the model parameters through the optimization algorithm to minimize the gap between the predicted setting parameters and the actual setting parameters; use the validation set to verify the trained model, and adjust the model parameters or structure according to the verification results; use the test set to comprehensively evaluate the optimized model through the set evaluation indicators to ensure that the model performance meets the expected standards;
[0025] S7: Save the trained and verified fault prediction model.
[0026] Preferably, in step S2, a Z-score standardization method is used to subtract the mean of each eigenvalue and divide it by its standard deviation, so that the processed data conforms to the standard normal distribution. The formula for standardization is: Among them, X is the original data, μ is the mean of the original data, σ is the standard deviation of the original data, and Z is the standardized data.
[0027] Preferably, in step S3, a filtering method is used to extract features, and the importance of features is evaluated by calculating the correlation between each feature and the probability of failure occurrence;
[0028] The Pearson correlation coefficient is used to measure the linear correlation between each feature and the probability of failure. The calculation formula of the Pearson correlation coefficient is:
[0029]
[0030] Among them, r represents the correlation coefficient, n represents the number of data points, x represents the eigenvalue, and y represents the probability of failure.
[0031] Preferably, the preset fault handling strategy and rules are implemented as follows:
[0032] Define fault levels and thresholds: Define different fault levels based on the importance of the gateway device and the impact of the fault on the system, and set corresponding thresholds for each level;
[0033] Formulate fault handling strategies: Develop corresponding fault handling strategies for each fault level, including restarting the device, adjusting device parameters, switching to backup devices, or notifying maintenance personnel to handle the problem on site;
[0034] Design rule engine: Design rule engine based on defined fault levels, thresholds and fault handling strategies. The rule engine uses conditional judgment and logical operations to trigger corresponding fault handling rules based on the data results of real-time analysis and processing.
[0035] The algorithm formula of the rule engine can be expressed as:
[0036]
[0037] Among them, data represents the real-time data value, threshold represents the preset threshold, fault_level represents the current fault level, predefined_level represents the predetermined fault level, and execute_strategy represents the execution of the corresponding fault handling strategy; that is, if the real-time data value is greater than the threshold and the fault level is equal to the predetermined level, the corresponding fault handling strategy is executed.
[0038] Preferably, the collected real-time working status data of the gateway device and the sensors connected thereto are cleaned, including:
[0039] For missing values, linear interpolation algorithm is used to fill them;
[0040] For outliers, the threshold judgment method is used to regard data points that exceed the preset threshold range as outliers and replace them with the mean of their neighboring points.
[0041] Preferably, the logging and auditing functions of the Hongmeng system are used to track and record the entire remote management and control process of the gateway device.
[0042] Preferably, the generated control instruction includes the operation type, parameter setting and execution time; and provides the maintenance personnel with an instruction execution approval function to further verify the correctness and executability of the control instruction.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] By utilizing the distributed architecture of Hongmeng system, the present invention realizes the close connection and data sharing between the gateway device and Hongmeng system, so that the back-end management system can obtain the comprehensive working status data of the gateway device and its connected sensors in real time, including working temperature, current, voltage, network connection status, data transmission rate and environmental parameters output by the sensor, etc. This real-time data monitoring capability greatly improves the response speed of the device and ensures the stable operation of the Internet of Things system.
[0045] Combined with machine learning algorithms, the present invention trains a fault prediction model for predicting the potential fault risks and maintenance cycles of gateway devices. The model can accurately predict the probability, type, level and time node of potential faults, providing sufficient data support and intelligent analysis methods for operation and maintenance personnel, so that operation and maintenance personnel can take preventive measures before faults occur, avoiding system downtime and increased maintenance costs caused by passive maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic diagram of the overall operation of the present invention;
[0047] Figure 2 This is a schematic diagram of the connection between the gateway device and the Hongmeng system;
[0048] Figure 3 A step-by-step diagram of the fault handling strategy and rules. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] See also Figure 1-3The present invention provides a technical solution: a remote management and control method for intelligent gateway devices based on the Hongmeng system, refer to the attached Figure 1 , the method comprising:
[0051] Utilize the distributed architecture of Hongmeng system to connect smart gateway devices to Hongmeng system. As a unified operating system platform, Hongmeng system can support the access of multiple types of devices, including smart gateway devices. Through the device management module of Hongmeng system, seamless connection and data sharing between gateway devices and systems are achieved. During the connection process, ensure that the communication protocols between the gateway device and Hongmeng system are compatible so that data can be transmitted smoothly. At the same time, through the unified device management platform of Hongmeng system, the gateway device and its connected sensors are uniformly managed and configured to ensure the accuracy and consistency of the data.
[0052] Through the unified device management platform of the Hongmeng system, the working status data of the gateway device and the sensors connected to it are collected in real time. The working status data includes but is not limited to working temperature, current, voltage, network connection status, data transmission rate, and environmental parameters of sensor output.
[0053] Combined with machine learning algorithms, the collected working status data of gateway devices is used to train a fault prediction model for predicting potential fault risks and maintenance cycles. During the training process, appropriate algorithms and parameters are selected to ensure the accuracy and reliability of the model. The fault prediction model includes information such as the probability, type, level, and time node of the predicted potential fault. Through the prediction results of the model, operation and maintenance personnel can understand the potential failure risks of the equipment in advance and take corresponding preventive measures.
[0054] The trained fault prediction model is deployed on the edge computing node of the Hongmeng system. As part of the Hongmeng system, the edge computing node has efficient data processing and analysis capabilities. Through the system's message passing mechanism, the collected data is analyzed and processed in real time, and equipment failures are predicted. When a potential fault is predicted, the corresponding control instructions are automatically generated according to the preset fault handling strategies and rules. The control instructions can be operations such as adjusting device parameters, restarting the device, switching to backup devices, etc. to ensure stable operation of the device and rapid recovery from faults.
[0055] The generated control instructions are sent to the gateway device in real time to achieve remote management and control of the device. The Hongmeng system provides remote control interfaces and protocols, allowing operation and maintenance personnel to operate and manage gateway devices anytime and anywhere. At the same time, the notification service of the Hongmeng system is used to send early warning information to maintenance personnel. When the system predicts potential faults or finds equipment abnormalities, it promptly notifies maintenance personnel to handle them, ensuring timely detection and rapid response to faults.
[0056] The present invention will be further described below in conjunction with Examples 1 to 4:
[0057] Embodiment 1:
[0058] This embodiment aims to achieve the connection and data sharing between the gateway device and the Hongmeng system through the following specific steps, and collect the real-time working status data of the gateway device and its connected sensors through the unified device management platform of the Hongmeng system. The following is a detailed implementation method:
[0059] Step 1: Use the device discovery and connection mechanism of Hongmeng system, which is based on the distributed soft bus technology of Hongmeng system. First, write a unified device description file for the gateway device, which contains the basic information of the device, communication protocol, data format and other contents. Then, use the device discovery service of Hongmeng system to register the gateway device to the system so that it can be automatically discovered by the system. During the connection process, the distributed soft bus technology of Hongmeng system provides an efficient, IP-based communication method, which enables the gateway device to establish a stable connection with Hongmeng system. Through the unified device protocol, data can be reliably transmitted between the gateway device and Hongmeng system. Assume that the IP address of the gateway device is 192.168.1.100 and the IP address of Hongmeng system is 192.168.1.1. In the device discovery phase, Hongmeng system broadcasts a discovery request. After receiving the request, the gateway device replies with a message containing the device description file. Hongmeng system establishes a connection with the gateway device based on the reply information.
[0060] Step 2: Using the distributed data management function of Hongmeng system, data sharing between gateway devices and Hongmeng system is realized by defining data sharing policies. The data sharing policy adopts an attribute-based access control model, which allows the access rights of data to be defined according to the attributes of the data (such as data type, data source, etc.). In the specific implementation, a set of data attributes are first defined for the gateway device and its connected sensors. For example, the attributes of temperature data may include "data type: temperature", "data source: gateway device", etc. Then, based on these attributes, data sharing policies are defined, such as which users or systems are allowed to access the data, which operations are allowed, etc. If the access right of temperature data is "read-only", only the device management platform of Hongmeng system is allowed to access it. In the data sharing policy, it can be defined that "if the data type is temperature and the data source is the gateway device, the device management platform of Hongmeng system is allowed to read the data".
[0061] Step 3: Integrate the data collection function of the gateway device and its connected sensors through the unified device management platform of the Hongmeng system. The device management platform provides an API interface for collecting the working status data of the gateway device in real time. First, use the API interface provided by the device management platform to configure the data collection task. Then, the device management platform will send data collection requests to the gateway device regularly or in real time. After receiving the request, the gateway device will send the working status data (such as working temperature, current, voltage, network connection status, data transmission rate, and environmental parameters output by the sensor, etc.) to the device management platform in accordance with the predetermined data format and protocol. During the data collection process, a time synchronization algorithm is used to ensure that the collected data has a unified timestamp. The time synchronization algorithm can be NTP (Network Time Protocol) or PTP (Precision Time Protocol), etc. Through time synchronization, the timing and consistency of the data can be ensured. Assume that NTP is used for time synchronization. The NTP client and server can be configured in the gateway device and the Hongmeng system respectively. The NTP client will periodically send time synchronization requests to the NTP server, and the server will reply with the current time information. The client adjusts its system time according to the replied time information to ensure consistency with the server time.
[0062] Embodiment 2:
[0063] The present invention collects the status data of the gateway device and its connected sensors, combines them with historical fault records, and builds and trains a machine learning model that can accurately predict gateway device failures. The specific implementation steps include:
[0064] S1. Data collection and organization: Comprehensively collect operating status data from the gateway device and its connected sensors, including but not limited to the operating temperature, operating current, voltage, network connection status, data transmission rate of the gateway device, and various environmental parameters output by the sensor (such as humidity, temperature, pressure, etc.). At the same time, record in detail all historical equipment failures, including the time, location, type and confirmed cause of the failure. Assuming that the gateway device is deployed in a smart warehouse, it is necessary to continuously collect real-time data from the device and its connected sensors (such as temperature sensors, humidity sensors, etc.). In addition, it is necessary to consult historical records to understand all failures that have occurred in the device in the past year, including the time of failure, specific location (such as which module), type of failure (such as overheating, connection interruption, etc.) and cause of failure (such as dust accumulation, unstable power supply, etc.).
[0065] The collected status data and fault records are summarized and organized to form a complete fault history record data set.
[0066] S2. Data standardization: Since the collected data may have different dimensions and units, it is necessary to standardize these data. Use appropriate mathematical transformations (such as normalization, standardization, etc.) to convert data of different dimensions and units into a unified format and range.
[0067] For continuous data such as operating temperature and operating current, the Z-score standardization method is used to map the data values to the [0,1] interval. The standardization formula is: Among them, X is the original data, μ is the mean of the original data, σ is the standard deviation of the original data, and Z is the standardized data.
[0068] For discrete data such as network connection status, the One-Hot Encoding method is used to convert it into binary form.
[0069] S2. Key feature extraction: Based on the standardized data, key feature extraction is performed. By analyzing the correlation between data, characteristic parameters that have a key impact on equipment failure prediction are identified.
[0070] The Pearson correlation coefficient is used to measure the linear correlation between each feature and the probability of failure. The calculation formula of the Pearson correlation coefficient is:
[0071]
[0072] Among them, r represents the correlation coefficient, n represents the number of data points, x represents the feature value, and y represents the probability of fault occurrence (which can be simplified to 0 or 1, indicating whether the fault occurs). By calculating the Pearson correlation coefficient between each feature and the probability of fault occurrence, a correlation matrix can be obtained, in which each element represents the strength and direction of the correlation between a feature and the probability of fault occurrence (positive correlation or negative correlation). According to the correlation matrix, the importance of each feature is evaluated. Generally, the larger the absolute value of the correlation coefficient, the stronger the linear relationship between the feature and the probability of fault occurrence, and therefore the higher the importance of the feature in fault prediction. Features with larger absolute values of correlation coefficients can be selected as key features for subsequent model construction and training.
[0073] For example, after calculating the Pearson correlation coefficients between all the initially extracted features and the probability of fault occurrence, it was found that the absolute value of the correlation coefficient between the operating temperature and the probability of fault occurrence was the largest, reaching 0.85, indicating that the average value of the operating temperature is an important feature for predicting the probability of fault occurrence.
[0074] The extracted key feature parameters and the corresponding fault conditions are combined into a training data set, and the data set is divided into a training set, a validation set, and a test set for subsequent model training, validation, and evaluation.
[0075] S4. Construct a machine learning model: Construct a machine learning model based on the extracted key feature parameters and fault conditions. This embodiment uses a linear regression algorithm as the basis of the model, and its formula is:
[0076] y=β0+β1x1+β2x2+...+β n x n +∈
[0077] Among them, y is the target variable, representing the probability of transmission failure of the gateway device, x1, x2, ..., x n is the input variable, representing the real-time working status data of the gateway device; β1, β2, ..., β n is the regression coefficient, which is determined by model training; β0 is the intercept term, which represents the basic value of the target variable when there is no environmental influence; ∈ is the error term; the purpose of model training is to estimate the regression coefficients β0, β1, β1, β2, ..., β n , so that the error between the predicted value and the true value is minimized.
[0078] S5. Model parameter initialization: Set the initial parameters for the model, for each feature x in the linear regression model i The corresponding parameter β i Assign an initial value, which is set to a random number close to 0 to ensure that the starting point of the model training is random and avoid falling into the local optimal solution. At the same time, an initial value is also assigned to the intercept term β0; these initial parameter values will be used as the starting point of the model training (such as β0 = 0.5, β1 = 0.1, β2 = 0.2, β3 = 0.05, etc.), and will be continuously optimized and adjusted through subsequent training processes.
[0079] S6. Model training, validation and evaluation: Use the training set to train the prediction model after parameter adjustment. Use optimization algorithms (such as gradient descent) to continuously adjust the model parameters to minimize the gap between the predicted value and the actual value. Specifically, for each parameter β j (including the intercept term β0), the update formula is as follows:
[0080]
[0081] Among them, η is the learning rate, which controls the step size of parameter update; is the loss function for the parameter β j The partial derivative of , that is, the gradient.
[0082] During the training process, it is necessary to monitor the model's loss function value (such as mean square error MSE) and convergence to ensure that the model achieves stable performance within a reasonable time. The specific algorithm for mean square error MSE is:
[0083]
[0084] Where n is the number of data points, Y pred,i is the model prediction value, Y actual,i is the actual value; the prediction accuracy of the model is evaluated according to the MSE value. The smaller the MSE value, the higher the prediction accuracy of the model.
[0085] After training is completed, the trained model is verified using the validation set. Based on the validation results, the model parameters or structure are adjusted to improve the generalization ability of the model. During the validation process, the accuracy, recall, and F1 score indicators are used to evaluate the prediction performance of the model on different fault types.
[0086] S7. Model saving: Save the trained and verified fault prediction model in an appropriate file format (such as .pkl, .h5, etc.).
[0087] Here is a Python code example for building a fault prediction model:
[0088]
[0089] The above Python code uses the numpy library to generate some random data to simulate the status data (such as operating temperature, operating current, voltage, network connection status, and data transmission rate) and fault conditions of the gateway device. Convert this data into a pandas DataFrame for easier processing.
[0090] Numerical features were selected from the DataFrame as input to the model, and fault conditions were defined as the target variable of the model.
[0091] The feature data is standardized using StandardScaler to ensure that each feature has a similar influence in the model. The data is divided into training and test sets using the train_test_split function.
[0092] A linear regression model was constructed and trained using the training set data, and predictions were made using the test set data, and the mean squared error (MSE) was calculated to evaluate the performance of the model.
[0093] Embodiment 3:
[0094] This embodiment proposes a rule engine-based fault handling strategy and rule implementation method for predicting and handling faults of gateway devices, specifically including:
[0095] Define fault levels and thresholds: Define different fault levels based on the importance of the gateway device in the system and the impact of the fault on the overall system operation. For example, the fault level can be divided into three levels: level 1 fault (serious fault), level 2 fault (medium fault) and level 3 fault (minor fault). For each fault level, set the corresponding threshold. These thresholds are determined based on the analysis of the normal operation data and historical fault data of the gateway device. For example, the threshold for level 1 fault is set to the device operating temperature exceeding 80 degrees Celsius or the data transmission rate being less than 10kbps; the threshold for level 2 fault is set to the operating temperature between 70-80 degrees Celsius or the data transmission rate between 10-20kbps; the threshold for level 3 fault is set to the operating temperature being slightly higher or the data transmission rate being slightly fluctuating.
[0096] Develop a fault handling strategy: Develop a corresponding fault handling strategy for each fault level. For example:
[0097] For a level 1 fault, emergency measures need to be taken immediately due to its serious impact on the system. The handling strategy may include restarting the device, switching to a backup device, and immediately notifying maintenance personnel to handle it on site.
[0098] For a level 2 fault, although its impact on the system is not as serious as a level 1 fault, timely measures must still be taken. The handling strategy may include adjusting device parameters to try to restore normal operation and monitoring the device status. If the fault is not alleviated, it will be upgraded to level 1 fault handling.
[0099] For level 3 faults, since their impact is relatively small, a milder handling strategy can be adopted, for example, only logging is performed and the maintenance personnel are notified to conduct inspection and handling during subsequent maintenance.
[0100] Design rule engine: Design rule engine based on defined fault levels, thresholds and fault handling strategies. The rule engine uses conditional judgment and logical operations to trigger corresponding fault handling rules based on the data results of real-time analysis and processing.
[0101] The algorithm formula of the rule engine can be expressed as:
[0102]
[0103] Among them, data represents real-time data values (such as operating temperature, data transmission rate, etc.), threshold represents the preset threshold (such as 80 degrees Celsius, 10kbps, etc.), fault_level represents the current fault level (such as level 1, level 2, level 3), predefined_level represents the predetermined fault level (corresponding to the currently monitored fault level), and execute_strategy represents the execution of the corresponding fault handling strategy (such as restarting the device, adjusting parameters, etc.). In specific implementation, the rule engine will continuously receive real-time data from the gateway device and make judgments based on the preset thresholds and fault levels. Once the conditions of a certain fault level are met, the rule engine will immediately trigger the corresponding fault handling strategy. Assume that the normal operating temperature range of the gateway device is 20-70 degrees Celsius, and the normal data transmission rate range is 30-90kbps. The following fault levels and thresholds are now defined:
[0104] Level 1 fault: operating temperature > 80 degrees Celsius or data transmission rate < 10kbps.
[0105] Level 2 fault: 70 degrees Celsius < operating temperature ≤ 80 degrees Celsius or 10kbps ≤ data transmission rate < 20kbps.
[0106] Level 3 fault: 60 degrees Celsius < operating temperature ≤ 70 degrees Celsius or data transmission rate fluctuation ±5kbps (based on 30-90kbps).
[0107] The corresponding fault handling strategies are:
[0108] Level 1 failure: Restart the device, switch to the backup device, and notify maintenance personnel.
[0109] Secondary fault: adjust equipment parameters (such as reducing operating power, increasing heat dissipation, etc.) and monitor equipment status.
[0110] Level 3 fault: record the log and notify maintenance personnel to check during subsequent maintenance.
[0111] The rule engine will make judgments based on real-time data values (such as operating temperature of 75 degrees Celsius and data transmission rate of 15kbps) and the current fault level (such as level 2 fault), and trigger corresponding fault handling strategies (such as adjusting device parameters).
[0112] Embodiment 4:
[0113] Data cleaning is performed on the real-time working status data of the collected gateway devices and the sensors connected to them, including processing missing values and outliers.
[0114] Missing value handling: During data collection, due to various reasons (such as equipment failures, communication interruptions, etc.), some data may be missing. To maintain the integrity and continuity of the data, a linear interpolation algorithm is used to fill in the missing values.
[0115] The specific implementation steps are as follows:
[0116] i) Identify the missing values in the dataset and record their positions;
[0117] ii) Use the linear interpolation algorithm to calculate the estimated values of the missing values based on the data points before and after the missing values;
[0118] iii) Fill the estimated values into the positions of the missing values to complete the handling of the missing values.
[0119] For example, assume that the temperature data of a certain sensor is recorded at time points t1 and t3, but is missing at time point t2 (t1 < t2 < t3). At this time, the linear interpolation algorithm can be used to calculate the estimated temperature value at time t2 based on the temperature data at t1 and t3, and fill it into the position of t2.
[0120] Outlier handling: During data collection, due to reasons such as equipment failures and environmental interference, some data may deviate from the normal range, forming outliers. To ensure the accuracy and reliability of the data, a threshold judgment method is used to handle outliers.
[0121] The specific implementation steps are as follows:
[0122] i) Set the corresponding thresholds according to the normal operating ranges of the gateway device and its sensors;
[0123] ii) Traverse the dataset to determine whether each data point exceeds the preset threshold range;
[0124] iii) For data points that exceed the threshold range, consider them as outliers and replace them with the mean of their neighboring points.
[0125] For example, assume that the normal range of the current data of a certain sensor is 0 - 10A, but at a certain time point, the recorded current data is 15A, which clearly exceeds the normal range. This data point can be considered as an outlier and replaced with the mean of the current values of its neighboring points before and after.
[0126] During implementation, the logging and auditing functions of the HarmonyOS are used to track and record the entire process of the remote management and control of the gateway device.
[0127] Based on the real-time operating status data of the gateway device and its sensors, corresponding control instructions are generated. The control instructions include the operation type (such as restarting the device, adjusting parameters, etc.), parameter settings (such as operating temperature, current, etc.), and execution time.
[0128] In order to ensure the correctness and executability of control instructions, maintenance personnel are provided with an instruction execution approval function. Maintenance personnel can review the generated control instructions and execute them after confirming the rationality of the instructions. First, the generated control instructions are displayed to maintenance personnel; maintenance personnel review the instructions to determine whether they are correct and executable; if the instructions are correct and executable, maintenance personnel confirm the execution; if there are problems with the instructions, maintenance personnel can refuse to execute them and give corresponding modification suggestions.
[0129] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0130] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A remote management and control method for intelligent gateway devices based on Hongmeng system, characterized in that: The method comprises: Utilize the distributed architecture of Hongmeng system to realize the connection and data sharing between gateway devices and Hongmeng system, and collect the real-time working status data of gateway devices and their connected sensors through the unified device management platform of Hongmeng system, including working temperature, current, voltage, network connection status, data transmission rate and environmental parameters output by sensors; In combination with a machine learning algorithm, a fault prediction model is trained to predict the potential fault risk and maintenance cycle of the gateway device based on the real-time working status data of the gateway device; the fault prediction model includes the probability, type, level and time node of the predicted potential fault; Deploy the trained fault prediction model on the edge computing node of the Hongmeng system, analyze and process the collected data in real time through the system's message transmission mechanism, predict equipment failures, and automatically generate corresponding control instructions based on preset fault handling strategies and rules when potential failures are predicted; The generated control instructions are sent to the gateway device in real time to realize remote management and control of the equipment; and the notification service of the Hongmeng system is used to send early warning information to maintenance personnel.
2. According to the method for remote management and control of intelligent gateway devices based on Hongmeng system according to claim 1, it is characterized in that: The following specific steps are used to achieve the connection and data sharing between the gateway device and the Hongmeng system, and to collect the real-time working status data of the gateway device and its connected sensors through the unified device management platform of the Hongmeng system: Step 1: Use the device discovery and connection mechanism of Hongmeng system to realize automatic discovery and connection between gateway devices and Hongmeng system based on unified device description files and device protocols; Step 2: Utilize the distributed data management function of Hongmeng system and define data sharing strategies to realize data sharing between gateway devices and Hongmeng system; Step 3: Integrate the data collection function of the gateway device and its connected sensors through the unified device management platform of Hongmeng system, and use the API interface provided by the device management platform to collect the working temperature, current, voltage, network connection status, data transmission rate of the gateway device in real time, as well as the environmental parameters output by the sensor; During the data collection process, a time synchronization algorithm is used to ensure that the collected data has a unified timestamp; Among them, the device discovery and connection mechanism is based on the distributed soft bus technology of the Hongmeng system; The data sharing strategy adopts an attribute-based access control model.
3. According to claim 2, the remote management and control method of intelligent gateway equipment based on Hongmeng system is characterized in that: The steps to train a fault prediction model include: S1: Collect the status data of the gateway device during operation, including: collecting the device's operating temperature, operating current, voltage, network connection status, data transmission rate, and various environmental parameters output by the sensor from the gateway device and its connected sensors; at the same time, record all historical device failures, including the time, location, type, and confirmed cause of the failure; Summarize and organize the status data of the gateway equipment during operation and the corresponding fault conditions to form a complete fault history record; S2: Standardize the fault history record data collected in S1 so that the data with different dimensions and units are converted into a unified format and range; S3: Extract key features from the data processed by S2, identify the characteristic parameters that have a key impact on equipment failure prediction by analyzing the correlation between the data, and form a training data set; and divide the training data set into a training set, a validation set, and a test set; S4: Build a machine learning model, use the training data set formed in step 3, and combine it with the linear regression algorithm to train the fault prediction model; the linear regression algorithm formula is as follows: y=β0+β1x1+β2x2+...+β n x n +∈ Among them, y is the target variable, representing the probability of transmission failure of the gateway device, x1, x2, ..., x n is the input variable, representing the real-time working status data of the gateway device; β1, β2, ..., β n is the regression coefficient, which is determined by model training; β0 is the intercept term, which represents the basic value of the target variable when there is no environmental influence; ∈ is the error term; the purpose of model training is to estimate the regression coefficients β0, β1, β1, β2, ..., β n , so that the error between the predicted value and the true value is minimized; S5: Set initial parameters for the model, for each feature x in the linear regression model i The corresponding parameter β i Assign an initial value, which is set to a random number close to 0, and also assign an initial value to the intercept term β0; these initial parameter values will serve as the starting point for model training and will be continuously optimized and adjusted through subsequent training processes; S6: Use the training set to train the parameter adjustment prediction model, and continuously adjust the model parameters through the optimization algorithm to minimize the gap between the predicted setting parameters and the actual setting parameters; use the validation set to verify the trained model, and adjust the model parameters or structure according to the verification results; use the test set to comprehensively evaluate the optimized model through the set evaluation indicators to ensure that the model performance meets the expected standards; S7: Save the trained and verified fault prediction model.
4. According to claim 3, the remote management and control method of intelligent gateway device based on Hongmeng system is characterized in that: In step S2, the Z-score standardization method is used to subtract the mean of each eigenvalue and divide it by its standard deviation, so that the processed data conforms to the standard normal distribution. The formula for standardization is: Among them, X is the original data, μ is the mean of the original data, σ is the standard deviation of the original data, and Z is the standardized data.
5. According to claim 3, the remote management and control method of intelligent gateway device based on Hongmeng system is characterized in that: In step S3, a filtering method is used to extract features, and the importance of features is evaluated by calculating the correlation between each feature and the probability of failure; The Pearson correlation coefficient is used to measure the linear correlation between each feature and the probability of failure. The calculation formula of the Pearson correlation coefficient is: Among them, r represents the correlation coefficient, n represents the number of data points, x represents the eigenvalue, and y represents the probability of failure.
6. The remote management and control method of intelligent gateway device based on Hongmeng system according to claim 1 is characterized in that: The implementation methods of the preset fault handling strategies and rules are as follows: Define fault levels and thresholds: Define different fault levels based on the importance of the gateway device and the impact of the fault on the system, and set corresponding thresholds for each level; Formulate fault handling strategies: Develop corresponding fault handling strategies for each fault level, including restarting the device, adjusting device parameters, switching to backup devices, or notifying maintenance personnel to handle the problem on site; Design rule engine: Design rule engine based on defined fault levels, thresholds and fault handling strategies; The rule engine uses conditional judgment and logical operations to trigger corresponding fault handling rules based on the data results of real-time analysis and processing; The algorithm formula of the rule engine can be expressed as: Among them, data represents the real-time data value, threshold represents the preset threshold, fault_level represents the current fault level, predefined_level represents the predetermined fault level, and execute_strategy represents the execution of the corresponding fault handling strategy; that is, if the real-time data value is greater than the threshold and the fault level is equal to the predetermined level, the corresponding fault handling strategy is executed.
7. The remote management and control method of intelligent gateway device based on Hongmeng system according to claim 1 is characterized in that: Clean the collected real-time working status data of the gateway device and its connected sensors, including: For missing values, linear interpolation algorithm is used to fill them; For outliers, the threshold judgment method is used to regard data points that exceed the preset threshold range as outliers and replace them with the mean of their neighboring points.
8. The remote management and control method of intelligent gateway device based on Hongmeng system according to claim 1 is characterized in that: By utilizing the logging and auditing functions of the Hongmeng system, the entire remote management and control process of gateway devices can be tracked and recorded.
9. The remote management and control method of intelligent gateway device based on Hongmeng system according to claim 1 is characterized in that: The generated control instructions include operation type, parameter settings and execution time; and provide maintenance personnel with an instruction execution approval function to further verify the correctness and executability of the control instructions.
Citation Information
Patent Citations
Microwave oven control method, device and equipment and storage medium
CN116518429A
Preventive maintenance method and system for PLC controller network based on artificial intelligence
CN118092404A
Equipment operation data analysis method and system based on deep learning
CN118503860A
Internet of Things equipment management system
CN118612059A
PLC gateway equipment operation state monitoring system and method based on open source gap
CN118659992A
Cited By
Power grid equipment soft bus data processing method and system
CN120710823A
Router, gateway and camera operation and maintenance method and system
CN120856586A
Edge computing gateway
CN121309265A
An edge computing gateway
CN121309265B