A smart gateway conversion method, device, equipment and storage medium
Through deep learning models and edge computing technologies, the shortcomings of intelligent gateways in multi-protocol analysis, real-time data processing and security management are solved, efficient and intelligent protocol analysis and security monitoring are achieved, and the overall performance and security of the system are improved. .
Patent Information
- Application Number
- CN202411074115.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Existing intelligent gateways have poor adaptability in multi-protocol parsing and conversion, low efficiency, difficult to meet the needs of real-time data processing and security management, and lack intelligent management and security monitoring mechanisms.
Deep learning model is used to parse protocol packet structure, integrate edge computing and natural language processing, design dynamic load balancing mechanisms and computer vision technology, and realize real-time data processing and security monitoring.
It improves the accuracy and efficiency of protocol parsing, enhances real-time response capabilities, realizes intelligent device management and security monitoring, and improves the overall performance and security of the system.
Smart Images

Figure CN118612309B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of gateway conversion, and in particular relates to an intelligent gateway conversion method, device, equipment and storage medium. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, more and more devices and systems are connected to the network, forming a huge interconnected ecosystem. Especially in the power industry, the development of smart grid technology has promoted the widespread application of power IoT, closely linking various links such as power generation, transmission, distribution and power consumption, and realizing comprehensive perception, intelligent control and optimized management of the power system. However, with the rapid increase in the types and number of IoT devices, the interoperability and interoperability between different devices and systems have become particularly important. Existing IoT devices and systems use a variety of communication protocols and data formats, including but not limited to IEC61850, Modbus, DL / T645, DL / T698, etc., and there are also various communication methods, including Zigbee, LoRa, NB-IoT, Wi-Fi, Bluetooth and RS485. These diverse protocols and communication methods not only improve the functions and application scope of devices, but also bring huge interoperability challenges.
[0003] The current intelligent gateway technology has the following major problems in multi-protocol parsing and conversion:
[0004] First, existing multi-protocol gateways usually use fixed rules or predefined templates for protocol parsing and conversion. This method has poor adaptability to new protocols and is difficult to cope with constantly updated protocol standards.
[0005] Second, due to the huge differences in data formats and communication methods of different protocols, existing gateways are inefficient when performing data parsing and conversion, and are prone to data loss or conversion errors.
[0006] Third, with the rise of edge computing, data processing is gradually shifting from the cloud to the edge. Existing smart gateways have bottlenecks in real-time data processing and response capabilities, making it difficult to meet the application requirements of low latency and high reliability.
[0007] Fourth, existing equipment management and configuration methods mostly rely on manual operations, which are inefficient and error-prone, and lack intelligent and automated management methods.
[0008] Fifth, in terms of security, existing gateways generally lack effective device identification and security monitoring mechanisms, making them easy targets for network attacks. Summary of the invention
[0009] The purpose of the present invention is to propose an intelligent gateway conversion method, device, equipment and storage medium, which solves many deficiencies in the prior art and improves the overall performance and application effect of the intelligent gateway by introducing the latest artificial intelligence technology, especially deep learning, edge computing, natural language processing and computer vision.
[0010] In order to achieve the above object, the present invention provides an intelligent gateway conversion method, the method comprising:
[0011] Design intelligent gateway system architecture and perform system integration;
[0012] Build a deep learning model and use it to parse the protocol data packet structure to obtain parsing results;
[0013] Design protocol conversion rules and standardized data formats to process the parsing results and obtain data packets in a standard format;
[0014] Integrate edge computing capabilities to perform AI reasoning and real-time data processing on standard format data packets locally;
[0015] Design a dynamic load balancing mechanism to intelligently allocate data processing tasks;
[0016] The integrated edge computing capability performs AI reasoning and real-time data processing on standard format data packets locally, specifically including:
[0017] The shortest path algorithm is used to determine the edge node location, which is calculated as follows:
[0018] ;
[0019] Where D represents the minimum transmission distance between all edge nodes and data sources, P represents the set of all possible edge node locations, represents the jth data source, Represents an edge node With data source The distance between them, K represents the total number of nodes;
[0020] Use a load balancing algorithm to dynamically allocate computing resources based on real-time computing needs, as shown below:
[0021] ;
[0022] in, represents the amount of resources allocated to the kth edge node at time t, represents the computing power of the kth edge node, Represents the total amount of computing tasks at time t;
[0023] The collected data is processed by sliding window, which is expressed as follows:
[0024] ;
[0025] in, represents the mean of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0026] ;
[0027] in, represents the standard deviation of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0028] The parallel algorithm for design load calculation is expressed as follows:
[0029] ;
[0030] in, represents the total load at time t, represents the weight of the j-th resource, represents the usage of the jth resource at time t, and M represents the total number of resources;
[0031] A statistical-based approach is used to detect abnormal load events, as shown below:
[0032] ;
[0033] in, An indicator variable indicating whether an abnormal event is detected at time t, Indicates the preset threshold; when an abnormal event is detected, resource allocation is adjusted immediately or / and an alarm is sent, as shown below:
[0034] ;
[0035] in, represents the adjustment amount of resource allocation of the kth edge node at time t, Indicates the adjustment range;
[0036] Use the local database to store the processing results, as shown below:
[0037] ;
[0038] in, Represents the processing result set stored at time t, represents the i-th processing result;
[0039] The processing results are transmitted to the central server or cloud periodically, as shown below:
[0040] ;
[0041] in, It represents the data set transmitted to the cloud, and T represents the total time period of transmission.
[0042] Optionally, introduce NLP technology to enable intelligent configuration and management through voice and / or text commands;
[0043] Introducing computer vision technology, using face recognition to verify user identity and monitor the network environment in real time;
[0044] Establish a system self-learning and optimization mechanism, continuously monitor system status, collect feedback data, and dynamically adjust and optimize network performance.
[0045] Optionally, the intelligent gateway system architecture includes software and hardware; wherein the hardware includes a central processing unit, memory, storage, a network interface and an auxiliary processing unit; and the software includes a deep learning module, an edge computing module, an NLP module and a computer vision module.
[0046] Optionally, the deep learning model is expressed as follows:
[0047] Define model input as a sequence of packets , the output is the predicted label , using the cross entropy loss function L as the optimization target, the loss L function is expressed as follows:
[0048] ;
[0049] in, For the model to sample The predicted probability of is the true label;
[0050] Train the model through the back-propagation algorithm and gradient descent optimizer to update the model parameters , which is expressed as follows:
[0051] ;
[0052] in, is the learning rate, is the loss function L with respect to the model parameters gradient.
[0053] Optionally, the protocol conversion rule defines a conversion rule according to a data packet format of different communication protocols;
[0054] The standardized data format is defined as follows:
[0055] Define standard data formats and convert all data into standard formats;
[0056] Receive a data packet of a first protocol, and convert its data field into a data field of a second protocol through a mapping function;
[0057] The converted second protocol data field Convert to standard data format using data normalization functions.
[0058] Optionally, the design of a dynamic load balancing mechanism to intelligently allocate data processing tasks specifically includes:
[0059] Install a load monitoring sensor on each computing node of the smart gateway to calculate the total load of each node :
[0060] ;
[0061] in, represents the total load of node i at time t, represents the computational requirements of the jth task processed by node i at time t, represents the weight coefficient of task j;
[0062] Use monitoring data to design a task scheduling algorithm to reasonably allocate tasks to each computing node; the task scheduling matrix of the task scheduling algorithm is , which is expressed as follows:
[0063] ;
[0064] in, represents the resource ratio of task j allocated to node i at time t, and K is the total number of nodes;
[0065] Based on the total load of each node Dynamically adjust the resource allocation of each node, and iteratively optimize the task scheduling matrix by minimizing the maximum load. .
[0066] Optionally, the operating status of each node is monitored in real time, and a fault detection module is designed to immediately start a fault recovery mechanism when the fault detection module detects a fault; the fault detection status of the fault detection module It is expressed as follows:
[0067] ;
[0068] in, represents the fault state of node i at time t;
[0069] Fault recovery ensures stable operation of the system by redistributing tasks on the faulty node. The redistribution formula is as follows:
[0070] ;
[0071] in, represents the proportion of resources that task j reallocated to healthy node k at time t, Indicates that task j is assigned to the faulty node at time t The proportion of resources is the fault state of node k at time t.
[0072] In addition, to achieve the above-mentioned purpose, the present invention also provides an intelligent gateway conversion device, the intelligent gateway conversion device comprising:
[0073] Gateway design module, used to design the intelligent gateway system architecture and perform system integration;
[0074] A deep learning module is used to build a deep learning model and use the deep learning model to parse the protocol data packet structure to obtain the parsing result;
[0075] The protocol processing module is used to design protocol conversion rules and standardize data formats to process the parsing results and obtain data packets in a standard format;
[0076] Edge computing module, which integrates edge computing capabilities to perform AI reasoning and real-time data processing on standard format data packets locally;
[0077] Dynamic load design module, used to design dynamic load balancing mechanism and intelligently allocate data processing tasks;
[0078] The steps performed by the edge computing module specifically include:
[0079] The shortest path algorithm is used to determine the edge node location, which is calculated as follows:
[0080] ;
[0081] Where D represents the minimum transmission distance between all edge nodes and data sources, P represents the set of all possible edge node locations, represents the jth data source, Represents an edge node With data source The distance between them, K represents the total number of nodes;
[0082] Use a load balancing algorithm to dynamically allocate computing resources based on real-time computing needs, as shown below:
[0083] ;
[0084] in, represents the amount of resources allocated to the kth edge node at time t, represents the computing power of the kth edge node, Represents the total amount of computing tasks at time t;
[0085] The collected data is processed by sliding window, which is expressed as follows:
[0086] ;
[0087] in, represents the mean of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0088] ;
[0089] in, represents the standard deviation of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0090] The parallel algorithm for design load calculation is expressed as follows:
[0091] ;
[0092] in, represents the total load at time t, represents the weight of the j-th resource, represents the usage of the jth resource at time t, and M represents the total number of resources;
[0093] A statistical-based approach is used to detect abnormal load events, as shown below:
[0094] ;
[0095] in, An indicator variable indicating whether an abnormal event is detected at time t, Indicates the preset threshold; when an abnormal event is detected, resource allocation is adjusted immediately or / and an alarm is sent, as shown below:
[0096] ;
[0097] in, represents the adjustment amount of resource allocation of the kth edge node at time t, Indicates the adjustment range;
[0098] Use the local database to store the processing results, as shown below:
[0099] ;
[0100] in, Represents the processing result set stored at time t, represents the i-th processing result;
[0101] The processing results are transmitted to the central server or cloud periodically, as shown below:
[0102] ;
[0103] in, It represents the data set transmitted to the cloud, and T represents the total time period of transmission.
[0104] In addition, to achieve the above-mentioned purpose, the present invention also proposes an intelligent gateway conversion device, which includes: a memory, a processor, and an intelligent gateway conversion program stored in the memory and executable on the processor, and the intelligent gateway conversion is configured to implement the steps of the intelligent gateway conversion method described above.
[0105] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a smart gateway conversion program is stored, and when the smart gateway conversion program is executed by a processor, the steps of the smart gateway conversion method described above are implemented.
[0106] The beneficial technical effects of the present invention are at least as follows:
[0107] (1) The present invention uses deep learning models (such as Transformer) to automatically parse the data packet structure of different communication protocols to achieve intelligent recognition and conversion of protocols. Through dynamic learning, the system can continuously optimize the protocol parsing model based on the data received in actual applications to improve the accuracy and efficiency of parsing. This innovation effectively solves the problem that existing multi-protocol gateways have poor adaptability to new protocols and low parsing efficiency.
[0108] (2) The present invention integrates edge computing capabilities in the intelligent gateway to enable data processing at a location close to the data source, reduce latency, and improve real-time response capabilities. Edge computing not only improves the real-time performance of data processing, but also enables localized AI reasoning and supports low-latency intelligent applications such as real-time video analysis and speech recognition. Through a dynamic load balancing mechanism, data processing tasks are intelligently allocated according to network load and computing resources to ensure efficient operation of the system. This innovation overcomes the bottleneck of existing intelligent gateways in real-time data processing and response capabilities.
[0109] (3) The present invention introduces advanced natural language processing (NLP) technology to achieve gateway configuration and management through natural language. Users can interact with the gateway directly through voice or text commands. The system has semantic understanding capabilities, can accurately understand the user's intentions, and automatically perform related configuration operations. In addition, an intelligent customer service system is integrated to provide real-time technical support and troubleshooting, improving user experience and system availability. This innovation solves the problem that existing device management and configuration methods are inefficient and error-prone.
[0110] (4) The present invention integrates computer vision technology in the gateway to achieve real-time monitoring of access devices and the environment, and detect abnormal behavior or intrusion attempts. Through face recognition technology, user identity is verified to prevent unauthorized devices from accessing the network. Once abnormal behavior or intrusion attempts are detected, the system will immediately issue an alarm and take corresponding protective measures. This innovation improves the security of the smart gateway and effectively responds to the risk of network attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0112] Figure 1 The present invention is a flow chart of an intelligent gateway conversion method.
[0113] Figure 2 This is a framework diagram of an intelligent gateway conversion device of the present invention DETAILED DESCRIPTION
[0114] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0115] like Figure 1 As shown, an embodiment of the present invention provides a distribution network terminal data transmission fault diagnosis method, the method comprising the following steps S1-S5:
[0116] S1. Design the intelligent gateway system architecture and perform system integration.
[0117] Specifically, the intelligent gateway system architecture includes software and hardware; wherein the hardware includes a central processing unit, memory, storage, network interface and auxiliary processing unit; the software includes a deep learning module, an edge computing module, an NLP module and a computer vision module.
[0118] The hardware includes:
[0119] Central Processing Unit (CPU): Use a high-performance, multi-core processor, such as the ARM Cortex-A series or x86 architecture processor, to provide sufficient computing power to support multi-protocol analysis and real-time data processing.
[0120] Memory (RAM): Configure at least 8GB of memory to ensure that the system will not encounter bottlenecks when processing large amounts of data and complex calculations.
[0121] Storage: Use SSD as the main storage medium to improve read and write speed and system response time.
[0122] Network interface: Configure multiple network interfaces (such as Ethernet, Wi-Fi, Bluetooth, LoRa, NB-IoT) to ensure the compatibility of multi-protocol communications.
[0123] Auxiliary processing unit (GPU / TPU): Choose the appropriate GPU or TPU to accelerate deep learning reasoning and computer vision tasks.
[0124] Software includes:
[0125] Deep learning module: Configure an independent computing acceleration unit, which is responsible for loading and reasoning deep learning models, integrate deep learning reasoning frameworks (such as TensorFlowLite and ONNXRuntime) into the system, configure model loading and reasoning interfaces, test the performance and accuracy of deep learning models under actual data, and ensure parsing efficiency.
[0126] Using regular expressions and finite state machines (FSM) for packet parsing:
[0127] ;
[0128] in, represents the parsing process at time t, Indicates the protocol type. Represents the data packet structure, Indicates data content.
[0129] Edge computing module: a computing unit that processes real-time data, integrates edge computing platforms (such as EdgeXFoundry), configures data processing workflows, tests the real-time and reliability of data processing in actual application scenarios, and dynamic load balancing formula:
[0130] ;
[0131] in, represents the total load at time t, represents the task weight, represents the computational requirements of the i-th task at time t.
[0132] NLP module: speech and text processing unit, supports parsing and execution of natural language commands, integrates natural language processing frameworks (such as SpaCy, NLTK), configures speech and text parsing interfaces, tests the recognition rate of speech commands and the execution accuracy of text commands, and semantic parsing model formula:
[0133] ;
[0134] in, represents the semantic representation of the user command u, represents the model parameters, Embedding vector representing the command.
[0135] Computer vision module: image and video processing unit, responsible for device identification and environment monitoring, integrating computer vision libraries (such as OpenCV), configuring image and video processing interfaces, testing the accuracy and real-time performance of device identification and security monitoring, face recognition algorithm formula:
[0136] ;
[0137] in, represents the recognition result of the input image d, represents the feature vector of the input image, A feature vector representing registered users.
[0138] Optionally, the communication protocol driver develops drivers for various network interfaces and supports multiple communication protocols (such as TCP / IP, UDP, RS485). The device management middleware realizes automatic discovery, registration and management of devices and provides a unified interface for upper-layer applications to call. The system bus is designed to ensure that each module can exchange data and transmit control signals through a standard interface, and the MQTT protocol is used as the message transmission mechanism within the system to achieve efficient communication and data transmission between modules.
[0139] S2. Build a deep learning model and use the deep learning model to parse the protocol data packet structure to obtain the parsing result.
[0140] Specifically, select a deep learning model suitable for multi-protocol parsing, such as a model based on the Transformer architecture. This model is good at processing sequence data and is suitable for parsing data packets of multiple communication protocols. Prepare training data, including data packet samples of various communication protocols, with labels corresponding to protocol types and data fields. The training data set D is represented as ,in is the i-th data packet sample, The corresponding label.
[0141] The deep learning model is expressed as follows:
[0142] Define model input as a sequence of packets , the output is the predicted label , using the cross entropy loss function L as the optimization target, the loss L function is expressed as follows:
[0143] ;
[0144] in, For the model to sample The predicted probability of is the true label;
[0145] Train the model through the back-propagation algorithm and gradient descent optimizer to update the model parameters , which is expressed as follows:
[0146] ;
[0147] in, is the learning rate, is the loss function L with respect to the model parameters gradient.
[0148] Furthermore, the trained model is deployed to the deep learning module of the smart gateway to ensure that the model can be loaded and inferred in real time. The model inference interface is configured to receive the input data packet sequence and output the parsing result.
[0149] Then, each received data packet is first preprocessed to convert it into an input format acceptable to the model. . Input the preprocessed data packet into the model to obtain the prediction result According to the prediction result Y, the valid information in the data packet is extracted for subsequent processing and protocol conversion.
[0150] Furthermore, in order to cope with new protocols or protocol updates, the intelligent gateway should have the ability to dynamically update the model. Regularly collect new protocol data packet samples and expand the training data set D. Perform incremental training in the edge computing module to update the model parameters. , ensuring that the parsing capabilities of the model continue to improve as the protocol changes.
[0151] S3. Design protocol conversion rules and standardized data formats to process the parsing results and obtain data packets in a standard format.
[0152] Specifically, the protocol conversion rules define conversion rules according to the data packet formats of different communication protocols:
[0153] Assume there are two protocols A and B, their packet formats are:
[0154] Protocol A: ,in Represents the i-th data field in protocol A.
[0155] Protocol B: ,in Represents the jth data field in protocol B.
[0156] Defining the mapping function , map the data fields of protocol A to the corresponding fields of protocol B:
[0157] ;
[0158] in, is the conversion function from protocol A to protocol B, is the i-th data field in protocol A, is the jth data field in protocol B.
[0159] Specifically, the standardized data format is defined as follows:
[0160] Define a standard data format and convert all data into the standard format:
[0161] Specifically, a standard data format S is defined, and all data should conform to the standard format after conversion. Assume that the standard format is:
[0162] ;
[0163] in, Represents the kth data field in the standard data format;
[0164] Define a data standardization function g to convert the data fields of protocol B into a standard format:
[0165] ;
[0166] Where g is the data normalization function, is the jth data field in protocol B, The kth data field in the standard data format.
[0167] Receive a data packet of the first protocol and convert its data field into a data field of the second protocol through a mapping function:
[0168] Specifically, a data packet of the first protocol is received and its data field Through the mapping function Data fields converted to the second protocol ;
[0169] ;
[0170] in, is the jth data field in the second protocol, is the i-th data field in the first protocol.
[0171] The converted second protocol data field Convert to standard data format through data normalization function:
[0172] Specifically, the converted second protocol data field Convert to standard data format through data standardization function g ;
[0173] ;
[0174] in, is the kth data field in the standard data format, is the jth data field in the second protocol. Finally, the data packet of the first protocol is converted and standardized into the standard format S.
[0175] Preferably, the protocol conversion and data standardization algorithms are implemented and integrated into the intelligent gateway, and the specific steps include:
[0176] (1) Write a mapping function and the code of the standardized function g, which implements the conversion from protocol A to protocol B and the conversion from protocol B to the standard format.
[0177] (2) Deploy the conversion and standardization module and configure the interface to ensure that the system can receive data packets of protocol A and output data in a standard format.
[0178] (3) Test the performance and accuracy of the conversion and standardization modules in actual applications to ensure that the conversion and standardization processes are correct.
[0179] S4, integrated edge computing capabilities, local AI reasoning and real-time data processing of standard format data packets, including:
[0180] Select the best location to deploy the edge node, making it as close to the data source as possible to reduce the delay of data transmission. The shortest path algorithm is used to determine the edge node location. The calculation is as follows:
[0181] ;
[0182] Where D represents the minimum transmission distance between all edge nodes and data sources, P represents the set of all possible edge node locations, represents the jth data source, Represents an edge node With data source The distance between them, K represents the total number of nodes;
[0183] Use a load balancing algorithm to dynamically allocate computing resources based on real-time computing needs, as shown below:
[0184] ;
[0185] in, represents the amount of resources allocated to the kth edge node at time t, represents the computing power of the kth edge node, Represents the total amount of computing tasks at time t;
[0186] Design a high-precision sensor interface to ensure the continuity and real-time performance of data collection, and perform sliding window processing on the collected data, as shown below:
[0187] ;
[0188] in, represents the mean of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0189] ;
[0190] in, represents the standard deviation of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0191] The parallel algorithm for design load calculation is expressed as follows:
[0192] ;
[0193] in, represents the total load at time t, represents the weight of the j-th resource, Indicates the usage of the jth resource at time t, and M represents the total number of resources; implements parallel processing of data analysis algorithms, and uses multi-threading and multi-process technologies to improve computing efficiency;
[0194] A statistical-based approach is used to detect abnormal load events, as shown below:
[0195] ;
[0196] in, An indicator variable indicating whether an abnormal event is detected at time t, Indicates the preset threshold; when an abnormal event is detected, resource allocation is adjusted immediately or / and an alarm is sent, as shown below:
[0197] ;
[0198] in, represents the adjustment amount of resource allocation of the kth edge node at time t, Indicates the adjustment range;
[0199] Use the local database to store the processing results, as shown below:
[0200] ;
[0201] in, Represents the processing result set stored at time t, represents the i-th processing result;
[0202] The processing results are transmitted to the central server or cloud periodically, as shown below:
[0203] ;
[0204] in, It represents the data set transmitted to the cloud, and T represents the total time period of transmission.
[0205] S5. Design a dynamic load balancing mechanism to intelligently allocate data processing tasks, including:
[0206] Install load monitoring sensors on each computing node of the smart gateway to collect the node's CPU, memory, network bandwidth and other usage in real time and calculate the total load of each node. :
[0207] ;
[0208] in, represents the total load of node i at time t, represents the computational requirements of the jth task processed by node i at time t, represents the weight coefficient of task j;
[0209] Use monitoring data to design a task scheduling algorithm to reasonably allocate tasks to each computing node to ensure balanced load; the task scheduling matrix of the task scheduling algorithm is , which is expressed as follows:
[0210] ;
[0211] in, represents the resource ratio of task j allocated to node i at time t, and K is the total number of nodes;
[0212] In order to achieve load balancing, dynamically adjust the resource allocation of each node; assuming that the average load of the system is , resource adjustment amount The calculation formula is:
[0213] ;
[0214] in, represents the resource adjustment amount of node i at time t, represents the average load of the system at time t, Is the adjustment factor. Update resource allocation:
[0215] ;
[0216] in, represents the resource allocation of node i at time t+1, represents the resource allocation of node i at time t;
[0217] In order to further optimize the load balancing, the method of minimizing the maximum load is adopted to iteratively optimize the task scheduling matrix The optimization goal is:
[0218] ;
[0219] in, represents the load of node i at time t. The task scheduling matrix is continuously adjusted through an iterative algorithm to balance the load of all nodes;
[0220] Monitor the operating status of each node in real time, design a fault detection module, and immediately start the fault recovery mechanism when a fault is detected. The calculation formula is:
[0221] ;
[0222] in, represents the fault state of node i at time t. Fault recovery ensures stable operation of the system by redistributing tasks on the faulty node. The redistribution formula is:
[0223] ;
[0224] in, represents the proportion of resources that task j reallocated to healthy node k at time t, Denote the resource ratio of task j assigned to the faulty node at time t , and is the faulty state of node k at time t.
[0225] Preferably, the present invention further includes the following steps:
[0226] S6. Introduce NLP technology for intelligent configuration and management through voice and / or text commands, including:
[0227] S601. Voice command recognition and processing:
[0228] On the management interface of the intelligent gateway, users can configure and manage the gateway through voice commands, such as "restart the gateway", "modify network configuration", "add new device", etc. The voice signal is converted into text representation through the automatic speech recognition (ASR) model :
[0229] ;
[0230] where ASR represents the automatic speech recognition function, represents the voice signal, and represents the transcribed text command.
[0231] Preprocess the transcribed text , including removing stop words (such as "de", "le", "zai"), word segmentation (such as splitting "modify network configuration" into "modify", "network", "configuration"), and standardization (such as unifying "Wi-Fi" to "wifi"):
[0232] ;
[0233] where preprocess represents the preprocessing function, represents the transcribed text, and represents the preprocessed text.
[0234] S602. Text command parsing and intent recognition:
[0235] Use dependency syntax analysis to parse the preprocessed text and extract the key information in the user command . For example, for the command "modify network configuration", the parsing result may include the operation type (modify), the target (network configuration), etc.:
[0236] ;
[0237] where parse represents the parsing function, Represents the preprocessed text, Indicates the extracted key information.
[0238] Using the LSTM-based intent recognition model, the key information extracted Mapping to specific user intent For example, the intent "Modify network configuration" is recognized to change the network settings of a gateway:
[0239] ;
[0240] Among them, intent represents the intention recognition function. Indicates the extracted key information. Indicates the recognized user intent.
[0241] S603, operation instruction generation and execution:
[0242] Based on the identified user intent , generate corresponding operation instructions , for example, to generate specific instructions for modifying network configuration:
[0243] ;
[0244] Among them, generate represents the operation instruction generation function, Indicates the identified user intent, Indicates the generated operation instruction.
[0245] The generated operation instructions Sent to the execution module of the smart gateway to perform corresponding operations, such as modifying network parameters, restarting the device, or updating protocol settings, and return the execution results :
[0246] ;
[0247] Among them, execute means executing the function. Indicates operation instructions. Indicates the execution result.
[0248] S604, Feedback and Adaptive Learning:
[0249] Collect execution results and user feedback , collect feedback information through the user interface or voice feedback module to evaluate the accuracy of command execution and user satisfaction:
[0250] ;
[0251] in, Indicates the evaluation result, evaluate indicates the evaluation function, Indicates the execution result. Indicates user feedback.
[0252] Based on the evaluation results , using incremental training algorithms to adjust the parameters of speech recognition and intent recognition models, achieve adaptive learning, and continuously improve recognition accuracy and user satisfaction:
[0253] ;
[0254] in, represents the model parameters at time t, is the learning rate, Represents the gradient of the evaluation result with respect to the model parameters.
[0255] S7. Introduce computer vision technology, use face recognition to verify user identity, and monitor the network environment in real time.
[0256] Specifically, a high-resolution camera is configured on the smart gateway device to collect video data of the monitored area in real time. Assume that the video frame is , represented as an image sequence .
[0257] The collected video frames are preprocessed, including grayscale, denoising and edge detection. Grayscale can reduce the amount of calculation, and denoising and edge detection can improve the effect of feature extraction. Assume that the preprocessed image is , then the grayscale and denoising processing is expressed as:
[0258] ;
[0259] Among them, grayscale represents the grayscale function, denoise represents the denoising function, represents the original video frame, Represents the preprocessed image.
[0260] Extract key features such as edges, corners, and texture features from the preprocessed image. These features can help the system identify the device more accurately. Assume that the feature vector is , use the SIFT (Scale Invariant Feature Transform) algorithm to extract features:
[0261] ;
[0262] Among them, SIFT represents the scale-invariant feature transformation algorithm. represents the preprocessed image, represents the extracted feature vector.
[0263] The extracted feature vector Match the feature vector with the feature vector in the device feature library to identify the specific device. Assume that the device feature library is , device identification is expressed as:
[0264] ;
[0265] in, represents the device identified at time t, Represents the distance measure between feature vectors. The benefit of this formula is that it can accurately compare the similarity of feature vectors, thereby achieving accurate identification of devices.
[0266] Furthermore, a security event detection module is designed to monitor the video stream in real time and identify abnormal events or security threats. For example, background subtraction is used to detect intrusion behavior. Background subtraction can effectively distinguish the foreground and background, and the detected foreground part is the possible intruder:
[0267] ;
[0268] in, represents the abnormal event detected at time t, background_subtraction represents the background subtraction function, and B represents the background model.
[0269] Immediately respond to detected security events, such as triggering an alarm, logging an event, or sending a notification. Alarm trigger conditions are represented by:
[0270] ;
[0271] in, An indicator variable indicating whether an alarm is triggered at time t, is the preset threshold. This formula is used to determine whether to trigger an alarm, which helps the system respond quickly when an anomaly is detected.
[0272] Furthermore, the results of identification and detection are stored in a local database to ensure data persistence and traceability. Assume that the stored result set is , expressed as:
[0273] ;
[0274] in, Represents the result set at time t, including device identification results , Abnormal event detection results and alarm indicator variables .
[0275] Preferably, the stored result data is analyzed regularly to evaluate the performance of the system and optimize the device identification and security monitoring algorithms. An important indicator of performance evaluation is the correct recognition rate and the missed recognition rate. The analysis formula is expressed as:
[0276] ;
[0277] Among them, P represents the performance index of the system, TP(t) represents the number of correct recognitions at time t, FN(t) represents the number of missed recognitions at time t, and T represents the total time.
[0278] This formula is used to evaluate the recognition performance of the system and help discover and improve deficiencies in the recognition process.
[0279] S8. Establish a system self-learning and optimization mechanism, continuously monitor the system status, collect feedback data, and dynamically adjust and optimize network performance.
[0280] Specifically, deploy a performance monitoring module to monitor various system performance indicators in real time, including response time, resource utilization, recognition accuracy, etc. Assume that the system performance indicator set is P(t), including response time RT(t), resource utilization RU(t) and recognition accuracy RA(t):
[0281] ;
[0282] Among them, RT(t) represents the response time at time t, RU(t) represents the resource utilization, and RA(t) represents the recognition accuracy. By monitoring these key indicators, we can fully understand the performance of the system in actual operation and provide data support for subsequent optimization.
[0283] Regularly collect system operation data and user feedback for model update and algorithm optimization. Assume that the collected data set is D(t), including user feedback F(t) and system log L(t):
[0284] ;
[0285] Among them, F(t) represents user feedback at time t, and L(t) represents system log. By analyzing user feedback and system log, problems and improvement points in system operation can be identified.
[0286] Furthermore, based on the collected new data and user feedback, the models in the system are regularly updated, including deep learning models and other algorithm models. Assume that the model parameters are , the new model parameter update formula is:
[0287] ;
[0288] in, represents the model parameters at time t, is the learning rate, It represents the gradient of the evaluation result with respect to the model parameters. By continuously updating the model parameters, the model can adapt to new data distribution and user needs, and improve the generalization ability and accuracy of the model.
[0289] Then, the system parameters are tuned through the optimization algorithm to improve the system performance. Assume that the optimization goal is to minimize the response time and resource utilization while maximizing the recognition accuracy. The optimization objective function is:
[0290] ;
[0291] in, , and is the weight coefficient, RT(t) is the response time, RU(t) is the resource utilization, and RA(t) is the recognition accuracy. By tuning the parameters, the best balance point can be found among multiple performance indicators to improve the overall performance of the system.
[0292] Preferably, an online learning algorithm is used to enable the model to adapt to new data and environmental changes in real time. Assume that the data flow in the online learning process is , the model parameter update formula is:
[0293] ;
[0294] in, For input data, is the true label, is the loss function, and N is the data batch size. Through online learning, the model can be updated in time to maintain sensitivity and adaptability to environmental changes.
[0295] According to the performance monitoring results, the system parameters and algorithm strategies are adaptively adjusted to cope with different workloads and environmental changes. Assume that the set of adaptively adjusted parameters is , the adjustment formula is:
[0296] ;
[0297] in, represents the set of parameters at time t, To adjust the rate, It represents the gradient of the performance index with respect to the parameter. Through adaptive adjustment, the system performance can be dynamically optimized to ensure the stable operation of the system under different working conditions.
[0298] Preferably, according to the performance monitoring results, the system parameters and algorithm strategies are adaptively adjusted to cope with different workloads and environmental changes. Assume that the set of adaptively adjusted parameters is , the adjustment formula is:
[0299] ;
[0300] in, represents the set of parameters at time t, To adjust the rate, Represents the gradient of the performance index with respect to the parameter. Through adaptive adjustment, the system performance can be dynamically optimized to ensure the stable operation of the system under different working conditions. According to the effect evaluation results, the deficiencies and improvement points in the system can be identified, and targeted optimization adjustments can be made to ensure the continuous improvement and efficient operation of the system. For example, the model structure can be adjusted, the algorithm parameters can be optimized, and the data processing capability can be enhanced to continuously improve the system performance.
[0301] like Figure 2 As shown, the intelligent gateway conversion device proposed in the embodiment of the present invention includes:
[0302] The gateway design module 101 is used to design the intelligent gateway system architecture and perform system integration;
[0303] A deep learning module 102 is used to build a deep learning model and use the deep learning model to parse the protocol data packet structure to obtain a parsing result;
[0304] The protocol processing module 103 is used to design protocol conversion rules and standardize data formats to process the parsing results and obtain data packets in a standard format;
[0305] The edge computing module 104 is used to integrate edge computing capabilities and perform AI reasoning and real-time data processing on data packets in a standard format locally;
[0306] Dynamic load design module 105, used to design a dynamic load balancing mechanism and intelligently allocate data processing tasks;
[0307] The steps performed by the edge computing module specifically include:
[0308] The shortest path algorithm is used to determine the edge node location, which is calculated as follows:
[0309] ;
[0310] Where D represents the minimum transmission distance between all edge nodes and data sources, P represents the set of all possible edge node locations, represents the jth data source, Represents an edge node With data source The distance between them, K represents the total number of nodes;
[0311] Use a load balancing algorithm to dynamically allocate computing resources based on real-time computing needs, as shown below:
[0312] ;
[0313] in, represents the amount of resources allocated to the kth edge node at time t, represents the computing power of the kth edge node, Represents the total amount of computing tasks at time t;
[0314] The collected data is processed by sliding window, which is expressed as follows:
[0315] ;
[0316] in, represents the mean of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0317] ;
[0318] in, represents the standard deviation of the sliding window at time t, represents the data value at time i, and N represents the window size;
[0319] The parallel algorithm for design load calculation is expressed as follows:
[0320] ;
[0321] in, represents the total load at time t, represents the weight of the j-th resource, represents the usage of the jth resource at time t, and M represents the total number of resources;
[0322] A statistical-based approach is used to detect abnormal load events, as shown below:
[0323] ;
[0324] in, An indicator variable indicating whether an abnormal event is detected at time t, Indicates the preset threshold; when an abnormal event is detected, resource allocation is adjusted immediately or / and an alarm is sent, as shown below:
[0325] ;
[0326] in, represents the adjustment amount of resource allocation of the kth edge node at time t, Indicates the adjustment range;
[0327] Use the local database to store the processing results, as shown below:
[0328] ;
[0329] in, Represents the processing result set stored at time t, represents the i-th processing result;
[0330] The processing results are transmitted to the central server or cloud periodically, as shown below:
[0331] ;
[0332] in, It represents the data set transmitted to the cloud, and T represents the total time period of transmission.
[0333] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0334] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the parameter operation method provided in any embodiment of the present invention, and will not be repeated here.
[0335] Other embodiments or specific implementations of the intelligent gateway conversion device of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.
[0336] In addition, an embodiment of the present invention further provides a storage medium, on which a smart gateway conversion program is stored. When the smart gateway conversion program is executed by a processor, the steps of the smart gateway conversion method described above are implemented.
[0337] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0338] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0339] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0340] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A smart gateway conversion method, characterized in that: The method comprises: Design intelligent gateway system architecture and perform system integration; Build a deep learning model and use it to parse the protocol data packet structure to obtain parsing results; Design protocol conversion rules and standardized data formats to process the parsing results and obtain data packets in a standard format; Integrate edge computing capabilities to perform AI reasoning and real-time data processing on standard format data packets locally; Design a dynamic load balancing mechanism to intelligently allocate data processing tasks; The integrated edge computing capability performs AI reasoning and real-time data processing on standard format data packets locally, specifically including: The shortest path algorithm is used to determine the edge node location, which is calculated as follows: ; Where D represents the minimum transmission distance between all edge nodes and data sources, P represents the set of all possible edge node locations, represents the jth data source, Represents an edge node With data source The distance between them, K represents the total number of nodes; Use a load balancing algorithm to dynamically allocate computing resources based on real-time computing needs, as shown below: ; in, represents the amount of resources allocated to the kth edge node at time t, represents the computing power of the kth edge node, Represents the total amount of computing tasks at time t; The collected data is processed by sliding window, which is expressed as follows: ; in, represents the mean of the sliding window at time t, represents the data value at time i, and N represents the window size; ; in, represents the standard deviation of the sliding window at time t, represents the data value at time i, and N represents the window size; The parallel algorithm for design load calculation is expressed as follows: ; in, represents the total load at time t, represents the weight of the j-th resource, represents the usage of the jth resource at time t, and M represents the total number of resources; A statistical-based approach is used to detect abnormal load events, as shown below: ; in, An indicator variable indicating whether an abnormal event is detected at time t, Indicates the preset threshold; when an abnormal event is detected, resource allocation is adjusted immediately or / and an alarm is sent, as shown below: ; in, represents the adjustment amount of resource allocation of the kth edge node at time t, Indicates the adjustment range; Use the local database to store the processing results, as shown below: ; in, Represents the processing result set stored at time t, represents the i-th processing result; The processing results are transmitted to the central server or cloud periodically, as shown below: ; in, It represents the data set transmitted to the cloud, and T represents the total time period of transmission.
2. The intelligent gateway conversion method according to claim 1, characterized in that: The method further comprises: Introducing NLP technology for intelligent configuration and management via voice and / or text commands; Introducing computer vision technology, using face recognition to verify user identity and monitor the network environment in real time; Establish a system self-learning and optimization mechanism, continuously monitor system status, collect feedback data, and dynamically adjust and optimize network performance.
3. The intelligent gateway conversion method according to claim 1, characterized in that: The intelligent gateway system architecture includes software and hardware; wherein the hardware includes a central processing unit, memory, storage, network interface and auxiliary processing unit; the software includes a deep learning module, an edge computing module, an NLP module and a computer vision module.
4. The intelligent gateway conversion method according to claim 1, characterized in that: The deep learning model is expressed as follows: Define model input as a sequence of packets , the output is the predicted label , using the cross entropy loss function L as the optimization target, the loss L function is expressed as follows: ; in, For the model to sample The predicted probability of is the true label; Train the model through the back-propagation algorithm and gradient descent optimizer to update the model parameters , which is expressed as follows: ; in, is the learning rate, is the loss function L with respect to the model parameters gradient.
5. The intelligent gateway conversion method according to claim 1, characterized in that: The protocol conversion rules define conversion rules according to the data packet formats of different communication protocols; The standardized data format is defined as follows: Define standard data formats and convert all data into standard formats; Receive a data packet of a first protocol, and convert its data field into a data field of a second protocol through a mapping function; The converted second protocol data field Convert to standard data format using data normalization functions.
6. The intelligent gateway conversion method according to claim 1, characterized in that: The design of a dynamic load balancing mechanism intelligently distributes data processing tasks, specifically including: Install a load monitoring sensor on each computing node of the smart gateway to calculate the total load of each node : ; in, represents the total load of node i at time t, represents the computational requirements of the jth task processed by node i at time t, represents the weight coefficient of task j; Use monitoring data to design a task scheduling algorithm to reasonably allocate tasks to each computing node; the task scheduling matrix of the task scheduling algorithm is , which is expressed as follows: ; in, represents the resource ratio of task j allocated to node i at time t, and K is the total number of nodes; Based on the total load of each node Dynamically adjust the resource allocation of each node, and iteratively optimize the task scheduling matrix by minimizing the maximum load. .
7. The intelligent gateway conversion method according to claim 6, characterized in that: Monitor the running status of each node in real time, design a fault detection module, and immediately start the fault recovery mechanism when the fault detection module detects a fault; the fault detection status of the fault detection module It is expressed as follows: ; in, represents the fault state of node i at time t; Fault recovery ensures stable operation of the system by redistributing tasks on the faulty node. The redistribution formula is as follows: ; in, represents the proportion of resources that task j reallocated to healthy node k at time t, Indicates that task j is assigned to the faulty node at time t The proportion of resources is the fault state of node k at time t.
8. An intelligent gateway conversion device, characterized in that: The intelligent gateway conversion device comprises: Gateway design module, used to design the intelligent gateway system architecture and perform system integration; A deep learning module is used to build a deep learning model and use the deep learning model to parse the protocol data packet structure to obtain the parsing result; The protocol processing module is used to design protocol conversion rules and standardize data formats to process the parsing results and obtain data packets in a standard format; Edge computing module, which integrates edge computing capabilities to perform AI reasoning and real-time data processing on standard format data packets locally; Dynamic load design module, used to design dynamic load balancing mechanism and intelligently allocate data processing tasks; The steps performed by the edge computing module specifically include: The shortest path algorithm is used to determine the edge node location, which is calculated as follows: ; Where D represents the minimum transmission distance between all edge nodes and data sources, P represents the set of all possible edge node locations, represents the jth data source, Represents an edge node With data source The distance between them, K represents the total number of nodes; Use a load balancing algorithm to dynamically allocate computing resources based on real-time computing needs, as shown below: ; in, represents the amount of resources allocated to the kth edge node at time t, represents the computing power of the kth edge node, Represents the total amount of computing tasks at time t; The collected data is processed by sliding window, which is expressed as follows: ; in, represents the mean of the sliding window at time t, represents the data value at time i, and N represents the window size; ; in, represents the standard deviation of the sliding window at time t, represents the data value at time i, and N represents the window size; The parallel algorithm for design load calculation is expressed as follows: ; in, represents the total load at time t, represents the weight of the j-th resource, represents the usage of the jth resource at time t, and M represents the total number of resources; A statistical-based approach is used to detect abnormal load events, as shown below: ; in, An indicator variable indicating whether an abnormal event is detected at time t, Indicates the preset threshold; when an abnormal event is detected, resource allocation is adjusted immediately or / and an alarm is sent, as shown below: ; in, represents the adjustment amount of resource allocation of the kth edge node at time t, Indicates the adjustment range; Use the local database to store the processing results, as shown below: ; in, Represents the processing result set stored at time t, represents the i-th processing result; The processing results are transmitted to the central server or cloud periodically, as shown below: ; in, It represents the data set transmitted to the cloud, and T represents the total time period of transmission.
9. An intelligent gateway conversion device, characterized in that: The device comprises: a memory, a processor, and an intelligent gateway conversion program stored in the memory and executable on the processor, wherein the intelligent gateway conversion program is configured to implement the steps of the intelligent gateway conversion method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores an intelligent gateway conversion program, and when the intelligent gateway conversion program is executed by the processor, the steps of the intelligent gateway conversion method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
AI model dynamic fragmentation deployment and incremental updating method based on intelligent gateway
CN121664653A
