Multi-gateway communication link intelligent optimization method and system

By building an intelligent optimization method for multi-gateway communication links, using artificial intelligence and improved hashing algorithms, the problems of rigid detection mechanism, simple gateway selection strategy, unbalanced load allocation and insufficient reliability of equipment migration in the existing technology are solved, and efficient fault detection and system performance optimization are achieved, ensuring system stability and business continuity.

CN119743389AActive Publication Date: 2025-04-01HANGZHOU TUYA INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510239632.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-04-01
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

In the prior art, the detection mechanism is rigid, the gateway selection strategy is too simple, the load allocation is unbalanced, and the device migration reliability is insufficient, especially in complex and changeable practical application environments, which are difficult to achieve effective fault detection and system performance optimization.

Method used

The intelligent optimization method of multi-gateway communication links is adopted, and a hierarchical dynamic detection system is built by obtaining the real-time state data of the gateway, and a dynamic scheduling strategy optimization is used to generate a deep detection result set. Based on this, a performance prediction model is built, a gateway comprehensive rating calculation is performed, and a gateway reliability score table is obtained. Then, through the improved consistent hashing algorithm and locally sensitive hashing mechanism, a virtual node optimization allocation scheme is built, the device allocation strategy is optimized, and the device migration strategy is finally formulated and verified.

Benefits of technology

It realizes intelligent monitoring of gateway status, improves the accuracy and efficiency of fault detection, ensures balanced load allocation and overall system performance improvement, and ensures business continuity and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743389A_ABST
    Figure CN119743389A_ABST
Patent Text Reader

Abstract

The invention provides a multi-gateway communication link intelligent optimization method and system. According to the method, real-time state data of a gateway is obtained by constructing a hierarchical dynamic detection system, and dynamic scheduling strategy optimization is performed by using an artificial intelligence model; constructing a performance prediction model based on a depth detection result to perform gateway rating; an improved consistency hash algorithm and a locality sensitive hash mechanism are adopted to realize load balancing optimization; and finally, making a migration strategy and executing equipment migration verification. According to the invention, the intelligent optimization of the gateway communication link is realized, and the overall performance and stability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet of Things communication technology, and in particular to a method and system for intelligent optimization of multi-gateway communication links. Background Art

[0002] The rapid development of Internet of Things technology has promoted the widespread application of various smart devices. Among them, the gateway is the core node connecting terminal devices and cloud applications. Its performance and stability directly affect the operation of the entire Internet of Things system.

[0003] At present, common gateway communication optimization technologies mainly include gateway status detection based on fixed time intervals and simple load balancing mechanisms. For example, some systems use fixed time intervals to detect gateway status and allocate devices based on a simple proximity principle; other systems use polling to perform load balancing.

[0004] The more advanced solutions introduce gateway self-checking mechanisms and device migration functions, which regularly detect gateway performance indicators and reallocate devices when necessary. This solution monitors the communication quality of the gateway in real time and triggers device migration when performance degradation is detected to maintain system stability.

[0005] However, existing technologies have problems such as rigid detection mechanism, overly simple gateway selection strategy, unbalanced load distribution, and insufficient reliability of device migration. Especially in complex and changeable actual application environments, fixed-frequency detection methods cannot detect faults in time and waste computing resources; while simple gateway selection strategies cannot fully consider gateway performance, environmental factors, and long-term stability, resulting in poor overall system performance. Summary of the invention

[0006] In view of this, an embodiment of the present application provides a multi-gateway communication link intelligent optimization method and system, which solves the problems of rigid detection mechanism, overly simple gateway selection strategy, unbalanced load distribution and insufficient reliability of equipment migration in the prior art.

[0007] The present application provides a multi-gateway communication link intelligent optimization method, including: Acquire the real-time status data of the gateway, including the gateway load, signal strength and response time, build a hierarchical dynamic detection system, optimize the dynamic scheduling strategy through the artificial intelligence model, and obtain a deep detection result set; Based on the deep detection result set, a performance prediction model is constructed, and a gateway comprehensive rating calculation is performed to obtain a gateway reliability score table; Based on the gateway reliability score table, the hash ring structure is initialized by an improved consistent hashing algorithm, a virtual node optimization allocation scheme is constructed, and the allocation strategy of devices with similar physical locations is optimized by a local sensitive hashing mechanism to obtain an optimal device allocation scheme; Based on the optimal device allocation plan, a device migration strategy is formulated, device migration is executed and verified, and a migration verification report is output.

[0008] In some of the embodiments, the hierarchical dynamic detection system is constructed, and the dynamic scheduling strategy is optimized through the artificial intelligence model to obtain a deep detection result set, including: Constructing a two-layer detection framework including a basic detection layer and a deep detection layer, and generating a detection framework configuration parameter set based on the real-time status data of the gateway; Building a reinforcement learning environment based on the detection framework configuration parameter set and historical detection data, defining the gateway state space and the action space of the detection behavior, and obtaining the reinforcement learning environment parameter set using the reward function of the detection effect and resource consumption and the action space; Based on the reinforcement learning environment parameter set, a detection strategy model is obtained by training a deep Q learning algorithm to generate the deep detection result set.

[0009] In some of the embodiments, before obtaining the reinforcement learning environment parameter set using the reward function of the detection effect and resource consumption and the action space, the method further includes: Establishing a reward value and a penalty value of a reward function, wherein a first preset reward value is given when a fault is found within a preset time, and a second preset reward value is given when the detection resource utilization rate remains within a preset range; A first preset penalty value is given when detection resources are wasted, and a second preset penalty value is given when a fault is not discovered in time.

[0010] In some embodiments, the detection strategy model is obtained by training the deep Q learning algorithm to generate the deep detection result set, including: Construct an inductive logic learning environment and build an initial logic rule base containing basic predicates and background knowledge; Construct a fusion learning framework of inductive logic programming and reinforcement learning, configure the Actor-Critic network structure and logic rule learner; An answer set reasoning mechanism is introduced to guide the exploration process of the reinforcement learning, and an action candidate set is generated based on reasoning based on logical rules; Based on the action candidate set, a first decision mode is discovered through meta-rule learning, including: collecting decision experience through the interaction between the Actor-Critic network and the environment in the experience accumulation stage; based on the decision experience, inducing a second decision rule through inductive logic programming technology in the rule induction stage; based on the second decision rule, evaluating the second decision rule in the knowledge integration stage; The learned detection strategy, the logic rule base and the verification data are integrated to generate the deep detection result set.

[0011] In some of the embodiments, a performance prediction model is constructed, and a gateway comprehensive rating calculation is performed to obtain a gateway reliability score table, including: Based on the deep detection result set, an evaluation system is constructed by analyzing hardware indicators, communication quality and environmental parameters to obtain a gateway performance prediction model parameter set; Based on the gateway performance prediction model parameter set, historical stability and environmental adaptability factors, a dynamic performance indicator evaluation is performed to obtain a gateway rating result set; Based on the gateway rating result set, a gateway selection strategy is formulated through a multi-objective optimization algorithm to generate the gateway reliability score table.

[0012] In some of the embodiments, performing the dynamic evaluation of the performance indicator includes: The fluctuation degree of the gateway performance is evaluated by calculating the coefficient of variation of key indicators, the number of failures and the average failure recovery time in the past 30 days are counted, and the performance fluctuation of the gateway under different load conditions is evaluated to obtain a historical stability score; The stability of the gateway under the current temperature environment, the communication quality under electromagnetic interference conditions, and the location adaptability in the current network topology are evaluated, and the environmental adaptability score is obtained through a fuzzy comprehensive evaluation method.

[0013] In some of the embodiments, the hash ring structure is initialized by an improved consistent hashing algorithm, a virtual node optimization allocation scheme is constructed, and the allocation strategy of devices with similar physical locations is optimized by a locality-sensitive hashing mechanism to obtain an optimal device allocation scheme, including: Initializing the hash ring structure based on the reliability score table of the gateway, mapping the gateway node to the hash space through an improved hash algorithm, and obtaining an initial hash ring mapping relationship set; Based on the initial hash ring mapping relationship set, dynamically adjusting the number of virtual nodes of each gateway according to the reliability score of the gateway to obtain a virtual node allocation plan; Based on the virtual node allocation plan, the physical location information of the device is optimized through the locality sensitive hashing mechanism to generate the optimal device allocation plan.

[0014] In some of the embodiments, formulating the device migration strategy includes: Based on the optimal equipment allocation plan, analyzing the business importance, service level and migration risk of the equipment, and formulating an equipment migration strategy plan; Wherein, based on the optimal device allocation plan, a device migration strategy is formulated, device migration is executed and verified, and a migration verification report is output, including: Based on the device migration strategy, perform device migration through fault detection and rollback mechanism to obtain a migration execution result set; Based on the migration execution result set, verification is performed through performance testing, stability assessment and business continuity check to generate the migration verification report.

[0015] In some of the embodiments, constructing the hierarchical dynamic detection system and constructing the performance prediction model based on the deep detection result set includes: Deploy local detection agents at gateway nodes and global coordination agents at core nodes to form a multi-agent network topology; Based on the multi-agent network topology, the stability of the multi-agent network is maintained through a lease-based heartbeat mechanism, and an agent collaboration framework is constructed; Based on the intelligent agent collaborative framework, local decision-making is achieved through the Actor-Critic architecture, and the global detection strategy is optimized through the meta-learning method to obtain the deep detection result set; Receive the deep detection result set, build a local evaluation model for each gateway agent, and integrate the evaluation results of each local detection agent through a swarm intelligence algorithm to form a gateway swarm evaluation model; Based on the gateway group evaluation model, the marginal contribution of each gateway in the overall service quality is calculated through the alliance game model, the load distribution weight is dynamically adjusted, and a gateway reliability score table is generated.

[0016] The embodiment of the present application also provides a multi-gateway communication link intelligent optimization system, the system includes a hierarchical dynamic detection module, a gateway evaluation module, a load balancing optimization module and a migration verification module, wherein: The hierarchical dynamic detection module is used to obtain real-time status data of the gateway, which includes gateway load, signal strength and response time, to build a hierarchical dynamic detection system, optimize the dynamic scheduling strategy through an artificial intelligence model, and obtain a deep detection result set; The gateway evaluation module is used to build a performance prediction model based on the deep detection result set, perform gateway comprehensive rating calculation, and obtain a gateway reliability score table; A load balancing optimization module is used to initialize the hash ring structure based on the gateway reliability score table through an improved consistent hashing algorithm, construct a virtual node optimization allocation plan, and optimize the allocation strategy of devices with similar physical locations through a local sensitive hashing mechanism to obtain an optimal device allocation plan; The migration verification module is used to formulate a device migration strategy based on the optimal device allocation plan, execute and verify the device migration, and output a migration verification report.

[0017] The present application also provides a computer device, the computer device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned multi-gateway communication link intelligent optimization method.

[0018] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the above-mentioned multi-gateway communication link intelligent optimization method.

[0019] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the above-mentioned multi-gateway communication link intelligent optimization method.

[0020] The embodiments of the present application have the following technical effects: 1. Through the hierarchical dynamic detection system and artificial intelligence model, intelligent monitoring of gateway status is realized, improving the accuracy and efficiency of fault detection; 2. Based on the performance prediction model and comprehensive rating mechanism, accurate evaluation of gateway performance is achieved, providing a reliable decision-making basis for load balancing; 3. The improved consistent hashing algorithm and locality-sensitive hashing mechanism are used to achieve balanced load distribution and local access, thus improving the overall performance of the system; 4. Through a reliable device migration mechanism, business continuity and system stability are ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described are only part of the embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0022] Figure 1 A flowchart of a multi-gateway communication link intelligent optimization method provided in an embodiment of the present application; Figure 2 A schematic diagram of a method for hierarchical dynamic detection provided in an embodiment of the present application; Figure 3 A schematic diagram of a method for a gateway evaluation model provided in an embodiment of the present application; Figure 4 A schematic diagram of a load balancing optimization method provided in an embodiment of the present application; Figure 5 A structural block diagram of a multi-gateway communication link intelligent optimization system provided in an embodiment of the present application; Figure 6 A schematic diagram of the computer device structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0024] like Figure 1 As shown, the embodiment of the present application provides a multi-gateway communication link intelligent optimization method, comprising the following steps: S1: Acquire the real-time status data of the gateway, which includes the gateway load, signal strength and response time, build a hierarchical dynamic detection system, optimize the dynamic scheduling strategy through the artificial intelligence model, and obtain a deep detection result set; First, the system obtains the real-time status data of the gateway from the actual operating environment. This data includes multiple key performance indicators: gateway load (including CPU usage, memory occupancy, network bandwidth utilization, etc.), signal strength (signal strength value in dBm) and response time (the delay time for the gateway to process a request). This data is regularly collected and reported through the built-in monitoring module of the gateway.

[0025] Based on the acquisition of real-time status data, the system builds a hierarchical dynamic detection system. The system adopts a two-layer architecture design, including a basic detection layer and a deep detection layer. The basic detection layer performs regular monitoring with a basic cycle of 5 minutes, focusing on the basic operating status of the gateway; the deep detection layer is activated when specific conditions are triggered to perform more detailed performance analysis. This hierarchical design ensures the continuity of basic monitoring and avoids the waste of resources caused by excessive detection.

[0026] In order to realize the intelligent scheduling of detection resources, the system introduces an artificial intelligence model for dynamic optimization. Specifically, the system builds a reinforcement learning environment based on Deep Q-Learning. In this environment, the state space contains the real-time status information of the gateway, such as CPU usage (0-100%), memory occupancy (0-100%), network bandwidth utilization (0-100%), the number of currently connected devices, the average response time (ms), signal strength (dBm) and other key indicators; the action space includes operations such as adjusting the basic detection frequency (adjustable within the range of 3-10 minutes), triggering deep detection (yes / no), and adjusting the detection indicator range (expand / reduce).

[0027] The system has designed a sophisticated reward mechanism to guide the optimization of detection strategies. When the system successfully finds a fault within the preset time, a positive reward of +10 points is given; when the detection resource utilization rate remains within a reasonable range, a basic positive reward of +1 point is given; when there is a waste of detection resources, a negative reward of -5 points is given; when the fault is not found in time, a serious negative reward of -20 points is given. This reward mechanism effectively guides the reinforcement learning agent to learn the optimal detection strategy.

[0028] During the training process, the system uses a four-layer deep neural network as the Q network: the input layer dimension is consistent with the state space, two hidden layers (128 neurons per layer), and the output layer dimension corresponds to the action space. At the same time, the system implements an experience replay pool with a capacity of 10,000 to store transition samples (state, action, reward, next state) during the training process, and improves the stability of training by randomly sampling 32 samples for batch learning.

[0029] In order to further enhance the training effect, the system uses the target network technology to synchronize the network parameters every 100 training steps. In terms of exploration strategy, the system adopts the ε-greedy strategy, with an initial ε value of 0.9, which gradually decreases to 0.1 as training progresses, achieving a balance between exploration and utilization. When the average reward value fluctuates by less than 5% within 100 consecutive episodes, the model training is considered to have converged.

[0030] Finally, the trained model can autonomously decide on the detection strategy based on the real-time status of the gateway, and output a deep detection result set containing detailed performance indicators of each gateway. This result set not only includes performance data, but also includes the optimal detection strategy for different scenarios, providing comprehensive data support for subsequent gateway evaluation.

[0031] Compared with the traditional fixed-cycle detection method, this dynamic detection method based on artificial intelligence can better balance the detection effect and resource consumption, improve the accuracy and efficiency of fault detection, and reduce the waste of system resources. Especially in the scenario where the gateway load changes frequently, this method can adjust the detection strategy in time to ensure the stable operation of the system.

[0032] Specifically, if Figure 2 As shown, S1 specifically includes: S1.1: construct a two-layer detection framework including a basic detection layer and a deep detection layer, and generate a configuration parameter set of the detection framework based on the real-time status data of the gateway; In S1.1, the system builds a two-layer detection framework including a basic detection layer and a deep detection layer. The basic detection layer performs routine monitoring with a basic cycle of 5 minutes, and is mainly responsible for collecting and analyzing basic operation indicators of the gateway, including real-time status data such as CPU load, memory usage, and network bandwidth utilization. The basic detection layer adopts a lightweight detection mechanism and regularly collects data through the built-in monitoring module to ensure minimal impact on the normal operation of the gateway.

[0033] The deep detection layer is triggered under specific conditions, such as when the basic detection layer finds abnormal indicators, or when the system predicts that a performance bottleneck may occur. The deep detection layer performs a more comprehensive performance analysis, including detailed communication quality assessment, network topology analysis, device connection status check, etc. This layered design ensures the continuity of basic monitoring and avoids the waste of resources caused by excessive detection. Based on the collected real-time status data of the gateway, the system generates a detection framework configuration parameter set, which includes configuration information such as detection cycle, trigger conditions, and detection indicator range.

[0034] S1.2: Build a reinforcement learning environment based on the detection framework configuration parameter set and historical detection data, define the gateway state space and the action space of the detection behavior, and use the reward function of the detection effect and resource consumption and the action space to obtain the reinforcement learning environment parameter set; In S1.2, the system builds a reinforcement learning environment based on the detection framework configuration parameter set and historical detection data. First, the system defines a complete gateway state space, which includes multiple key dimensions: CPU usage (0-100%), memory usage (0-100%), network bandwidth utilization (0-100%), number of currently connected devices, average response time (ms), signal strength (dBm), etc. These state variables together describe the working status of the gateway at a certain moment.

[0035] The system also designs an action space for detection behaviors, including: adjusting the basic detection frequency (adjustable within the range of 3-10 minutes), triggering deep detection (yes / no), adjusting the detection index range (expand / reduce), etc. These actions directly affect the execution effect of the detection strategy. In order to evaluate the effectiveness of these actions, the system implements a reward function based on detection effect and resource consumption. A significant positive reward (+10 points) is given when a fault is successfully discovered within a preset time, and a basic positive reward (+1 point) is given when the detection resource utilization rate remains within a reasonable range. On the contrary, a negative reward (-5 points) is given when detection resources are wasted, and a serious negative reward (-20 points) is given when the fault is not discovered in time.

[0036] Steps S1.2.1 and S1.2.2 are described in detail below: In the process of building a reinforcement learning environment, the system first designed a sophisticated reward mechanism to guide the learning and optimization of detection strategies by setting specific reward values ​​and penalty values. This reward mechanism mainly considers two aspects: the effectiveness of fault detection and the efficiency of resource use.

[0037] In S1.2.1, the system establishes two types of positive reward values. The first preset reward value (+10 points) is used to reward the successful discovery of faults within the preset time. The "preset time" here is dynamically set according to the severity of different types of faults. For example, for faults that seriously affect the business, the preset time may be set to 5 minutes; for minor performance degradation, the preset time may be extended to 30 minutes. The second preset reward value (+1 point) is used to reward the situation where the detection resource utilization remains within the preset range. This preset range is usually set to CPU utilization not exceeding 20% ​​and memory usage not exceeding 30%, ensuring that the detection activities do not significantly affect the normal operation of the gateway.

[0038] Specifically, when the system successfully detects a serious fault in which the CPU usage of the gateway suddenly soars to more than 90% within 5 minutes, it will receive a first preset reward value of +10 points; when the system's resource usage remains within a reasonable range during the detection task (such as the CPU usage remains at around 15%), it will receive a second preset reward value of +1 point. This differentiated reward design not only emphasizes the importance of fault detection, but also encourages the system to maintain efficient resource usage.

[0039] In S1.2.2, the system sets up two types of penalty values ​​to constrain detection behavior. The first preset penalty value (-5 points) is used to punish the waste of detection resources. For example, this penalty value will be triggered when the system frequently performs deep detection when the gateway load is low and stable, or maintains a high detection frequency when it is not necessary. The second preset penalty value (-20 points) is used to punish the failure to detect faults in time, which is the most serious penalty. This penalty value will be triggered when the system fails to detect important faults in the gateway within the preset time, resulting in business interruption or severe performance degradation.

[0040] For example, if the system unnecessarily performs a deep detection every 1 minute during normal operation of the gateway, resulting in a detection resource usage rate exceeding 50%, a first preset penalty value of -5 points will be imposed; if the system fails to detect an abnormality in an important service process of the gateway within 10 minutes, resulting in the connected devices being unable to communicate normally, a second preset penalty value of -20 points will be imposed. The design of this penalty mechanism places special emphasis on the penalty for not discovering a fault in a timely manner, as this situation may lead to more serious business impact.

[0041] Through this mechanism design with clear rewards and penalties, the system can effectively guide the reinforcement learning agent to form a reasonable detection strategy, ensuring the detection effect while avoiding resource waste. In particular, by imposing the most severe punishment for failure to detect faults in time, it ensures that the system will prioritize the timeliness and accuracy of detection, which is of great significance for maintaining the stable operation of the gateway. At the same time, the punishment for resource waste also ensures that the system will adjust the detection strategy in a timely manner to avoid the performance overhead caused by excessive detection.

[0042] In addition, in the process of building a reinforcement learning environment, the system first designed a sophisticated reward mechanism to guide the learning and optimization of detection strategies by setting specific reward values ​​and penalty values. This reward mechanism mainly considers two aspects: the effectiveness of fault detection and the efficiency of resource use.

[0043] Specifically, before executing S1.2, it also includes: S1.2.1: Establish a reward value and a penalty value of the reward function, wherein a first preset reward value is given when a fault is found within a preset time, and a second preset reward value is given when the detection resource utilization rate remains within a preset range; In S1.2.1, the system establishes two types of positive reward values. The first preset reward value (+10 points) is used to reward the successful discovery of faults within the preset time. The "preset time" here is dynamically set according to the severity of different types of faults. For example, for faults that seriously affect the business, the preset time may be set to 5 minutes; for minor performance degradation, the preset time may be extended to 30 minutes. The second preset reward value (+1 point) is used to reward the situation where the detection resource utilization remains within the preset range. This preset range is usually set to CPU utilization not exceeding 20% ​​and memory usage not exceeding 30%, ensuring that the detection activities do not significantly affect the normal operation of the gateway.

[0044] Specifically, when the system successfully detects a serious fault in which the CPU usage of the gateway suddenly soars to more than 90% within 5 minutes, it will receive a first preset reward value of +10 points; when the system's resource usage remains within a reasonable range during the detection task (such as the CPU usage remains at around 15%), it will receive a second preset reward value of +1 point. This differentiated reward design not only emphasizes the importance of fault detection, but also encourages the system to maintain efficient resource usage.

[0045] S1.2.2: A first preset penalty value is given when detection resources are wasted, and a second preset penalty value is given when a fault is not discovered in time.

[0046] In S1.2.2, the system sets up two types of penalty values ​​to constrain detection behavior. The first preset penalty value (-5 points) is used to punish the waste of detection resources. For example, this penalty value will be triggered when the system frequently performs deep detection when the gateway load is low and stable, or maintains a high detection frequency when it is not necessary. The second preset penalty value (-20 points) is used to punish the failure to detect faults in time, which is the most serious penalty. This penalty value will be triggered when the system fails to detect important faults in the gateway within the preset time, resulting in business interruption or severe performance degradation.

[0047] For example, if the system unnecessarily performs a deep detection every 1 minute during normal operation of the gateway, resulting in a detection resource usage rate exceeding 50%, a first preset penalty value of -5 points will be imposed; if the system fails to detect an abnormality in an important service process of the gateway within 10 minutes, resulting in the connected devices being unable to communicate normally, a second preset penalty value of -20 points will be imposed. The design of this penalty mechanism places special emphasis on the penalty for not discovering a fault in a timely manner, as this situation may lead to more serious business impact.

[0048] Through this mechanism design with clear rewards and penalties, the system can effectively guide the reinforcement learning agent to form a reasonable detection strategy, ensuring the detection effect while avoiding resource waste. In particular, by imposing the most severe punishment for failure to detect faults in time, it ensures that the system will prioritize the timeliness and accuracy of detection, which is of great significance for maintaining the stable operation of the gateway. At the same time, the punishment for resource waste also ensures that the system will adjust the detection strategy in a timely manner to avoid the performance overhead caused by excessive detection.

[0049] S1.3: Based on the reinforcement learning environment parameter set, a detection strategy model is obtained by deep Q learning algorithm training to generate the deep detection result set; In S1.3, the system is trained using a deep Q-learning algorithm based on a set of reinforcement learning environment parameters. The system uses a four-layer deep neural network as the Q network, including: an input layer corresponding to the state space dimension, two hidden layers containing 128 neurons each, and an output layer corresponding to the action space dimension. In order to improve the stability of training, the system implements an experience replay pool with a capacity of 10,000 to store transition samples (state, action, reward, next state) during training, and performs batch learning by randomly sampling 32 samples.

[0050] The system also uses target network technology to further improve the stability of training, and performs parameter synchronization every 100 training steps. In terms of exploration strategy, the system uses the ε-greedy strategy, with the initial ε value set to 0.9, which is gradually reduced to 0.1 as training progresses, achieving a balance between exploration and utilization. When the average reward value of the model fluctuates by less than 5% within 100 consecutive episodes, the training is considered to have reached convergence.

[0051] Finally, the trained model can autonomously decide the detection strategy according to the real-time status of the gateway. The system integrates the trained detection strategy model, verification data and other information into a deep detection result set. This result set not only includes the detailed performance indicators of each gateway, but also includes the optimal detection strategy for different scenarios, providing comprehensive data support for subsequent gateway evaluation. This detection method based on deep reinforcement learning can dynamically adjust the detection strategy according to the actual operating status of the gateway, improving detection efficiency while reducing system resource consumption.

[0052] In addition, in one specific embodiment, S1.3 may further include: S1.3.1: Build an inductive logic learning environment and construct an initial logic rule base containing basic predicates and background knowledge; In S1.3.1, the system first built an inductive logic learning environment. This environment contains a set of basic predicates that describe the state and behavior of the gateway, such as hasHighLoad / 1, which means that the gateway load is high, needsInspection / 1, which means that deep inspection is required, etc. At the same time, the system also established a background knowledge base containing information such as gateway topology relationships and historical performance rules. Based on these predicates and background knowledge, the system built an initial logic rule base for each local detection agent. These rule bases provide a basic knowledge framework for the subsequent learning process.

[0053] S1.3.2: Construct a fusion learning framework of inductive logic programming and reinforcement learning, and configure the Actor-Critic network structure and the logic rule learner; In S1.3.2, the system constructs an innovative fusion learning framework of inductive logic programming and reinforcement learning. In this framework, each detection agent is equipped with both an Actor-Critic network structure and a logic rule learner. The Actor-Critic network is responsible for generating specific detection actions, while the logic rule learner is responsible for inducing high-level decision rules from successful interaction experiences. This dual learning mechanism can simultaneously obtain low-level action strategies and high-level decision rules.

[0054] S1.3.3: Introduce an answer set reasoning mechanism to guide the exploration process of the reinforcement learning, and generate the action candidate set based on reasoning based on logical rules; In S1.3.3, the system introduces the Answer Set Programming (ASP) mechanism to guide the exploration process of reinforcement learning. When the agent needs to make a detection decision, it first uses the learned logical rules to reason and generate a set of possible action candidates. For example, the system may derive through rule reasoning, and the reasoning code is as follows: prolog needsInspection(X):hasHighLoad(X), lowResponseTime(X), notrecentlyChecked(X). adjustFrequency(X, high) :hasHighLoad(X), stablePerformance(X). These candidate actions serve as priority options for reinforcement learning exploration, significantly reducing the probability of invalid exploration.

[0055] S1.3.4: Based on the action candidate set, discovering a first decision pattern through meta-rule learning, including: collecting decision experience through the interaction between the Actor-Critic network and the environment in the experience accumulation stage; based on the decision experience, inducing a second decision rule through the inductive logic programming technology in the rule induction stage; based on the second decision rule, evaluating the second decision rule in the knowledge integration stage; In S1.3.4, the system discovers decision patterns through meta-rule learning based on the generated action candidate set. This process is divided into three stages: first, in the experience accumulation stage, the Actor-Critic network interacts with the environment to collect successful decision-making experience; then in the rule induction stage, inductive logic programming techniques are used to infer new decision rules from these experiences; finally, in the knowledge integration stage, the effectiveness and universality of these new rules are evaluated.

[0056] In particular, in the rule induction stage, the system can extract more abstract decision rules from specific interaction experiences. For example, the system may summarize from multiple successful detection experiences that when the gateway load is continuously higher than 90% and the response time increases by more than 50%, deep detection should be triggered immediately. These rules include not only specific trigger conditions, but also corresponding time windows and threshold settings.

[0057] S1.3.5: Integrate the learned detection strategy, the logic rule base and the verification data to generate the deep detection result set.

[0058] The learned detection strategies, logic rule bases, and related verification data are integrated to generate a complete set of deep detection results. This result set is a multi-level knowledge base that contains a complete strategy system from low-level detection actions to high-level decision rules. In this way, the system can not only make accurate detection decisions, but also explain the reasons for these decisions, improving the interpretability and maintainability of the system.

[0059] This approach of combining inductive logic programming with reinforcement learning has unique advantages: it retains the optimization capabilities of reinforcement learning in continuous action space and obtains the advantages of logic programming in knowledge representation and reasoning. This enables the system to better adapt to complex gateway detection scenarios and generate interpretable decision rules. Especially in scenarios that require rapid response, rule-based reasoning can provide immediate decision suggestions, while reinforcement learning can optimize these rules through continuous learning.

[0060] S2: Figure 3 As shown, based on the deep detection result set, a performance prediction model is constructed, and a gateway comprehensive rating calculation is performed to obtain a gateway reliability score table; The following is a detailed description of step S2: After obtaining the deep detection result set, the system starts to build a gateway performance prediction model. This model uses an ensemble learning method to combine the advantages of multiple basic models to provide comprehensive performance prediction. Specifically, the system uses three basic models: random forest, XGBoost, and LightGBM to build an ensemble predictor, each of which is responsible for different aspects of performance prediction.

[0061] Random forests are mainly used to process predictions of hardware indicators, including the fluctuation range of CPU usage, the stability of memory usage, and the peak performance of data throughput. Since random forests are insensitive to outliers, they can provide stable hardware performance prediction results. For example, when the system detects that the fluctuation range of the CPU usage of a gateway is abnormal in the past 24 hours, the random forest model can accurately predict possible future load trends.

[0062] XGBoost is responsible for predicting communication quality-related indicators, including signal strength attenuation characteristics, end-to-end delay distribution, packet loss rate change trend, etc. XGBoost's excellent feature combination capabilities enable it to capture complex communication patterns. For example, by analyzing historical data, XGBoost can predict changes in communication quality at different time periods and under different load conditions.

[0063] LightGBM focuses on the impact assessment of environmental parameters, including temperature and humidity, electromagnetic interference, physical location constraints, etc. Its efficient leaf growth strategy is particularly suitable for processing such multi-category features. For example, LightGBM can assess the impact of different environmental conditions on gateway performance and predict possible performance bottlenecks.

[0064] During model training, the system uses a five-fold cross-validation approach to evaluate model performance and determines the optimal hyperparameter combination through grid search. For random forests, the system optimizes the number of trees (100-500) and the maximum depth (10-30); for XGBoost, the focus is on adjusting the learning rate (0.01-0.1) and the minimum child node weight (1-5); for LightGBM, the focus is on the number of leaves (31-127) and the feature sampling ratio (0.6-0.8).

[0065] Based on the trained model, the system performs a comprehensive gateway rating calculation. This process uses the analytic hierarchy process (AHP) to determine the weights of each evaluation dimension: performance prediction results have a weight of 0.4, historical stability has a weight of 0.35, and environmental adaptability has a weight of 0.25. The system evaluates each gateway from these three dimensions and ultimately generates a comprehensive score of 0-100.

[0066] When making a comprehensive rating, the system also considers historical stability factors, including the number of failures in the past 30 days, average failure recovery time, etc. At the same time, the environmental adaptability assessment will consider factors such as the stability of the gateway in the current temperature environment, the communication quality under electromagnetic interference conditions, and the location adaptability in the current network topology.

[0067] Finally, the system integrates the prediction results, rating results and related parameters into a gateway reliability score sheet. This score sheet not only includes the current status score of each gateway, but also includes future performance forecasts, applicable scenario recommendations and load capacity assessment information. For example, for gateways with a score of 90 or above, the system will recommend that they can handle more device connections; for gateways with a score of less than 70, the system will give specific optimization suggestions or recommend reducing their load.

[0068] This evaluation method based on multi-model integration can comprehensively and accurately evaluate the performance status and potential risks of the gateway, providing a reliable decision-making basis for subsequent load balancing optimization. Especially in complex network environments, this multi-dimensional evaluation method can help the system make more accurate load distribution decisions.

[0069] S2 specifically includes: S2.1: Based on the deep detection result set, an evaluation system is constructed by analyzing hardware indicators, communication quality and environmental parameters to obtain a gateway performance prediction model parameter set; In S2.1, the system builds a multi-dimensional evaluation system based on the deep detection result set. In terms of hardware indicators, the system mainly focuses on indicators such as the fluctuation range of CPU usage, the stability of memory usage, and the peak performance of data throughput; in terms of communication quality, the system analyzes the attenuation characteristics of signal strength, the distribution of end-to-end delay, and the changing trend of packet loss rate; in terms of environmental parameters, factors such as temperature and humidity, electromagnetic interference, and physical location constraints are considered. The system uses an integrated learning method to apply three models, random forest, XGBoost, and LightGBM, to the prediction of these different types of indicators.

[0070] Through five-fold cross validation and grid search, the system optimized the hyperparameters of each model. For the random forest model, the prediction accuracy of hardware indicators was optimized by adjusting the number of trees (100-500) and the maximum depth (10-30); for the XGBoost model, the learning rate (0.01-0.1) and the minimum child node weight (1-5) were optimized to improve the accuracy of communication quality prediction; for the LightGBM model, the prediction effect of environmental parameters was optimized by adjusting the number of leaves (31-127) and the feature sampling ratio (0.6-0.8). Finally, the system integrated these optimized model parameters, feature weights, prediction thresholds and other information into the gateway performance prediction model parameter set.

[0071] S2.2: Based on the gateway performance prediction model parameter set, historical stability and environmental adaptability factors, a dynamic performance indicator evaluation is performed to obtain the gateway rating result set; In S2.2, the system performs dynamic evaluation of performance indicators based on the prediction model parameter set. First, the system calculates the coefficient of variation of key indicators to evaluate the degree of fluctuation of gateway performance, counts the number of failures and average failure recovery time in the past 30 days, and evaluates the performance fluctuation of the gateway under different load conditions to obtain a historical stability score. For example, when a gateway has less than 3 failures in the past 30 days and the average failure recovery time is less than 5 minutes, its historical stability score will be higher.

[0072] At the same time, the system evaluates the environmental adaptability of the gateway, including stability in the current temperature environment (for example, evaluating the performance of the gateway in a high temperature environment above 35°C), communication quality under electromagnetic interference conditions (such as evaluating signal stability in an industrial environment), and location adaptability in the current network topology (such as evaluating the connection reliability of the gateway at the edge). The system uses a fuzzy comprehensive evaluation method to combine these factors to derive an environmental adaptability score. Finally, the system integrates these evaluation results into a gateway rating result set.

[0073] The dynamic evaluation of the performance indicators is performed in S2.2, specifically including: S2.2.1: Evaluate the degree of fluctuation of the performance of the gateway by calculating the coefficient of variation of key indicators, count the number of failures and the average failure recovery time in the past 30 days, evaluate the performance fluctuation of the gateway under different load conditions, and obtain a historical stability score; S2.2.2: Evaluate the stability of the gateway under the current temperature environment, the communication quality under electromagnetic interference conditions, and the location adaptability in the current network topology, and obtain the environmental adaptability score through the fuzzy comprehensive evaluation method.

[0074] For example, in S2.2.1, a historical stability assessment is performed on gateway A in a certain industrial park. First, the system calculates the coefficient of variation of key indicators. For example, the CPU usage data of gateway A in the past 7 days: the average value is 45%, the standard deviation is 9%, and the coefficient of variation is 0.2 (standard deviation / average value). The same method is also applied to indicators such as memory usage (coefficient of variation 0.15) and network throughput (coefficient of variation 0.25). These coefficients of variation reflect the stability of gateway performance. The smaller the coefficient of variation, the more stable the performance.

[0075] Next, the system counted the failures of Gateway A in the past 30 days: a total of 3 failures occurred, 2 of which were short response delays caused by sudden load increases (recovery time was 3 minutes and 4 minutes respectively), and 1 was a planned restart caused by system updates (recovery time was 5 minutes). The average failure recovery time was 4 minutes, which was lower than the 10-minute warning line set by the system, and performed well.

[0076] In the performance evaluation under different load conditions, the system simulated three load scenarios: light load (the number of connected devices does not exceed 30% of the total capacity), medium load (the number of connected devices is between 30% and 70% of the total capacity), and heavy load (the number of connected devices exceeds 70% of the total capacity). Gateway A performs stably under light and medium load conditions, and the CPU usage fluctuates by no more than 10%; but under heavy load conditions, once the number of connected devices exceeds 85% of the total capacity, the response time will increase sharply, and the CPU usage will fluctuate by up to 30%. Based on these data, the system gives a historical stability score of 85 points.

[0077] In S2.2.2, the system evaluates the environmental adaptability of Gateway A. In terms of temperature adaptability, since Gateway A is installed in an air-conditioned room, the ambient temperature is kept in the range of 18-25°C all year round, which is far below the critical value of 40°C. Monitoring data shows that even when the air conditioner fails briefly in summer and the room temperature rises to 32°C, the performance of the gateway remains stable, so it receives a temperature adaptability score of 92 points.

[0078] In terms of electromagnetic interference assessment, since Gateway A is located near an industrial workshop, it is often subject to electromagnetic interference from various mechanical equipment. Through analysis, it was found that during normal working hours (8:00-20:00 every day), the signal strength averaged -65dBm, and the signal quality was good; but when large equipment was started (about 3-4 times a day), the signal strength would temporarily drop to -75dBm, and the communication quality would slightly decrease but still be within an acceptable range, so the electromagnetic interference adaptability score was 78 points.

[0079] In terms of network topology location adaptability, Gateway A is located at the core of the campus network, with no more than 2 network hops to upstream and downstream devices, and has redundant link protection. Tests show that even when the main link fails, the backup link can complete the switch within 200ms to ensure business continuity. Therefore, it received a location adaptability score of 88 points.

[0080] The system uses a fuzzy comprehensive evaluation method to calculate the final environmental adaptability score based on temperature adaptability (weight 0.3), electromagnetic interference adaptability (weight 0.4) and location adaptability (weight 0.3): 92×0.3 + 78×0.4 + 88×0.3 = 85.2 points.

[0081] This multi-dimensional evaluation method can fully reflect the adaptability of the gateway in the actual operating environment and provide a reliable basis for gateway selection and load distribution. Especially in complex industrial environments, the environmental adaptability score can help the system better predict and respond to possible performance fluctuations.

[0082] S2.3: Based on the gateway rating result set, a gateway selection strategy is formulated through the multi-objective optimization algorithm to generate the gateway reliability score table.

[0083] In S2.3, the system formulates a gateway selection strategy through a multi-objective optimization algorithm. Specifically, the system sets three core optimization goals: maximizing the overall system service quality, minimizing load imbalance, and minimizing device migration costs. The system uses an improved NSGA-III (non-dominated sorting genetic algorithm III) to solve this multi-objective optimization problem. The search efficiency is improved by introducing adaptive crossover and mutation operators, the quality of the solution is enhanced by introducing a local search strategy, and the diversity of the solution is improved by introducing a reference point adaptive adjustment mechanism.

[0084] For example, when the system needs to select an access gateway for a new device, it will consider: the current score of each gateway (gateways with scores above 90 can be given priority), load balancing status (to avoid excessive load on a gateway), and potential migration costs (gateways with closer physical locations are given priority). The system selects the best compromise solution from the Pareto optimal solution set, and integrates this selection strategy, together with the reliability score, applicable scenarios, load recommendations, and other information of each gateway into the final gateway reliability score table. This score table contains not only static score data, but also dynamic adjustment recommendations, providing comprehensive decision support for subsequent load balancing.

[0085] S3: Figure 4As shown, based on the gateway reliability score table, the hash ring structure is initialized by an improved consistent hashing algorithm, a virtual node optimization allocation scheme is constructed, and the allocation strategy of devices with similar physical locations is optimized by a local sensitive hashing mechanism to obtain the optimal device allocation scheme; After obtaining the gateway reliability score table, the system first builds a consistent hash ring structure. The system selects MurmurHash3 as the basic hash function, which has excellent randomness and efficient computing performance. The system sets the hash value range to 0 to 2^32-1, forming a hash ring connected end to end. In order to solve the problem of uneven node distribution in traditional consistent hashing algorithms, the system introduces the concept of balance factor. By calculating the size of the hash space between adjacent gateway nodes, the hash value of the node is dynamically adjusted to ensure that the difference in the size of the hash space responsible for each node is within 20%.

[0086] In order to cope with possible failure of gateway nodes, the system implements a backup partition strategy on the hash ring. For each primary partition, the system selects two adjacent partitions in the clockwise direction on the hash ring as its backup partitions and establishes a primary-backup mapping relationship. When the gateway where the primary partition is located fails, the system can quickly transfer the load to the backup partition to ensure service continuity.

[0087] In terms of virtual node allocation, the system has established a dynamic adjustment model for virtual nodes. This model is based on the reliability score of the gateway and uses a nonlinear mapping function to calculate the basic number of virtual nodes for each gateway: gateways with a score of 90 or above will receive 100-150 virtual nodes, those with a score of 80-90 will receive 50-100 virtual nodes, those with a score of 70-80 will receive 30-50 virtual nodes, and those with a score below 70 will only retain 10-30 virtual nodes. The system dynamically adjusts the number of virtual nodes by real-time monitoring of the performance indicators of the gateway, including CPU usage, memory usage, network throughput, etc.

[0088] In order to ensure the uniformity of virtual node distribution, the system uses an improved consistent hashing algorithm to place virtual nodes. The system calculates the "pressure coefficient" of each location (the density and load of surrounding nodes) and selects locations with lower pressure coefficients to place virtual nodes to avoid local aggregation.

[0089] In terms of device allocation optimization, the system introduces a locality sensitive hashing (LSH) mechanism. For each device, the system collects information such as its physical coordinates (latitude and longitude or indoor coordinates), network topology location, communication delay, etc., and constructs a multi-dimensional feature vector. The system uses p-stable distribution (such as Cauchy distribution) to construct the LSH function family and improves query efficiency through a multi-level LSH index structure.

[0090] When a gateway needs to be selected for a device, the system first uses LSH to quickly locate the location bucket to which the device should belong, and then selects a suitable gateway node in the hash ring area corresponding to the bucket. The selection process not only considers the proximity of the physical location, but also the current load status and performance score of the gateway. In order to handle edge cases, the system implements a cross-bucket load balancing mechanism. When the gateway load in a location bucket is too high, some devices can be assigned to the gateway of the adjacent bucket.

[0091] For example, suppose there is a new device in an industrial park that needs to access the network. The system first determines through LSH that the device is located in the southeast corner of the park (location bucket 1). There are three gateway nodes on the hash ring in this area: Gateway A (score 92 points, current load 60%), Gateway B (score 85 points, current load 75%), and Gateway C (score 88 points, current load 45%). Although Gateway A has the highest score, considering that it has already assumed a high load, the system ultimately selects Gateway C with a lower load as the access point for the device. This allocation strategy that comprehensively considers location proximity and load balancing ensures communication efficiency while avoiding the problem of overloading a single gateway.

[0092] Through this optimization solution that combines consistent hashing and locality-sensitive hashing, the system can allocate devices to gateways with similar physical locations as much as possible while ensuring load balancing, thereby improving overall network performance and reliability. Especially in scenarios where devices frequently join and leave dynamically, this solution can effectively reduce the overhead of network reconstruction and improve the scalability and stability of the system.

[0093] In another embodiment, a multi-agent approach may be used to construct the hierarchical dynamic detection system and the performance prediction model based on the deep detection result set, specifically including: A1: deploy local detection agents at the gateway nodes and global coordination agents at the core nodes to form a multi-agent network topology; In A1, the system deploys a local detection agent (LDA) on each gateway node and a global coordination agent (GCA) on the core node. Each LDA is responsible for monitoring and managing the status of a single gateway, including collecting performance data and executing local decisions. For example, five gateway nodes are deployed in an industrial park, each of which is equipped with an LDA, and a GCA is deployed on the core server in the central control room. These agents are interconnected through the network to form a hierarchical multi-agent network topology.

[0094] A2: Based on the multi-agent network topology, the stability of the multi-agent network is maintained through a lease-based heartbeat mechanism to build the agent collaboration framework; The system has built a lease-based heartbeat mechanism to maintain the stability of the multi-agent network. Each LDA needs to send a heartbeat message to the GCA regularly (such as every 30 seconds), including its current status and brief performance data. The GCA will assign a lease to each LDA, which is usually valid for three times the heartbeat interval (such as 90 seconds). If the GCA does not receive a heartbeat message from an LDA before the lease expires, the corresponding fault handling mechanism will be triggered. At the same time, the system uses the Paxos algorithm to ensure the consistency of distributed decision-making, and implements a message middleware based on the publish / subscribe model.

[0095] A3: Based on the agent collaborative framework, local decision-making is achieved through the Actor-Critic architecture, and the global detection strategy is optimized through the meta-learning method to obtain the deep detection result set; A distributed learning mechanism is implemented based on the intelligent agent collaboration framework. Each LDA uses the Actor-Critic architecture to achieve local decision-making capabilities: the Actor network is responsible for generating detection actions (such as adjusting the detection frequency, selecting detection indicators, etc.), and the Critic network is responsible for evaluating the value of these actions. GCA uses a meta-learning method to optimize the global detection strategy. It can extract common knowledge from the experience of each LDA to form a more general strategy model. For example, the successful strategy adopted by an LDA when dealing with a sudden increase in gateway load can be quickly mastered by other LDAs through GCA's meta-learning.

[0096] A4: Receive the deep detection result set, build a local evaluation model for each gateway agent, and integrate the evaluation results of each local detection agent through a swarm intelligence algorithm to form a gateway swarm evaluation model; Local evaluation models are built for each gateway agent. These models evaluate local gateways from three dimensions: performance (processing power, response time, etc.), stability (failure rate, recovery, etc.), and adaptability (load elasticity, environmental adaptation, etc.). Through the swarm intelligence algorithm, the system integrates the evaluation results of each LDA to form a complete gateway group evaluation model. For example, when multiple gateways in a region detect similar performance degradation patterns, the swarm intelligence algorithm can quickly identify possible system-level problems.

[0097] A5: Based on the gateway group evaluation model, the marginal contribution of each gateway in the overall service quality is calculated through the alliance game model, the load distribution weight is dynamically adjusted, and the gateway reliability score table is generated.

[0098] Specifically, a coalition game model is introduced to optimize load distribution. By calculating the marginal contribution (Shapley value) of each gateway in the overall service quality, the system can more accurately evaluate the importance of each gateway. For example, a gateway located in a key position in the network may not have the best independent performance indicators, but due to its special geographical location and network topology, its Shapley value may be higher. Based on these calculation results, the system dynamically adjusts the load distribution weights and finally generates a gateway reliability score table containing detailed scoring and weight information.

[0099] This multi-agent-based implementation significantly improves the scalability and adaptability of the system through distributed architecture design and collaborative learning mechanism. Especially in the scenario of large-scale gateway deployment, the multi-agent architecture can better handle complex coordination and optimization problems and provide more flexible and efficient solutions.

[0100] Among them, S3 specifically includes: S3.1: Initializing the hash ring structure based on the gateway reliability score table, mapping the gateway node to the hash space through the improved hash algorithm, and obtaining the initial hash ring mapping relationship set; In S3.1, the system first initializes the hash ring structure based on the gateway reliability score table. The system selects MurmurHash3 as the basic hash function, which performs well in both computational performance and randomness. The hash value range is set from 0 to 2^32-1 to form a complete hash ring. In order to solve the problem of uneven node distribution in traditional consistent hashing, the system introduces a balance factor mechanism.

[0101] For example, there are four gateway nodes (A, B, C, D) in an industrial park, and their initial hash values ​​are 0x2000000, 0x4000000, 0x8000000, and 0xE000000 respectively. The system detects that the hash space between nodes B and C (0x4000000 to 0x8000000) is significantly larger than other intervals. At this time, the system adjusts the balance factor and appropriately shifts the hash value of node C to 0x6000000, so that the difference in the size of the hash space between adjacent nodes is controlled within 20%.

[0102] At the same time, the system implements a backup partition strategy. For each primary partition, two adjacent partitions are selected as backups in the clockwise direction on the hash ring. For example, the primary partition backup of gateway A is assigned to gateways B and C. When A fails, the system can transfer its load to these two backup gateways within 200ms.

[0103] S3.2: Based on the initial hash ring mapping relationship set, dynamically adjust the number of virtual nodes of each gateway according to the reliability score of the gateway to obtain the virtual node allocation plan; In S3.2, the system builds a dynamic adjustment model for virtual nodes based on the initial hash ring mapping relationship set. Taking gateway A as an example, its reliability score is 92 points, and the system initially allocates 120 virtual nodes to it. The system determines the number of virtual nodes through a nonlinear mapping function: 100-150 nodes are allocated for scores above 90, 50-100 nodes are allocated for scores between 80 and 90, 30-50 nodes are allocated for scores between 70 and 80, and only 10-30 nodes are allocated for scores below 70.

[0104] The system monitors the performance indicators of Gateway A in real time: when its CPU usage rate is observed to exceed 80% continuously, the system gradually reduces the number of its virtual nodes from 120 to 80; when the load drops below 30%, the number of virtual nodes is appropriately increased. This dynamic adjustment ensures the flexibility of load distribution. In order to avoid local aggregation of virtual nodes, the system calculates the "pressure coefficient" of each location. For example, if a certain area already has many nodes and a high load, the new virtual node will be placed in an area with less pressure.

[0105] S3.3: Based on the virtual node allocation plan, the physical location information of the device is optimized through the locality sensitive hashing mechanism to generate the optimal device allocation plan.

[0106] In S3.3, the system optimizes device allocation through the locality sensitive hashing (LSH) mechanism. Assume that a new temperature sensor needs to be connected to the network, its physical coordinates are (120.5, 30.2), and the network delay is required to be less than 100ms. The system first constructs a feature vector for the device, which contains information such as location coordinates and network requirements. The LSH function family constructed using the p-stable distribution maps this feature vector to a specific location bucket.

[0107] The system found that the device belongs to the "East District Industrial Park" location bucket, and there are three candidate gateways in this area (E, F, G). Although gateway E is physically closest, its current load has reached 85%; although gateway F has a lower load (45%), the communication delay is close to 150ms; the system finally selected gateway G with a load of 60% and a delay of 80ms as the optimal access point. In order to handle possible load surges, the system also reserved gateway H in the adjacent location bucket as an alternative.

[0108] This allocation strategy, which combines physical location and performance indicators, not only ensures communication efficiency, but also maintains overall load balance. For example, in a batch access scenario, the system successfully allocated 100 new devices to 5 different gateways, ensuring the principle of nearby access (average communication delay is controlled within 50ms) and avoiding excessive load on a single gateway (maximum load does not exceed 75%).

[0109] S4: Based on the optimal device allocation plan, formulate a device migration strategy, execute and verify the device migration, and output a migration verification report; In S4, based on the optimal device allocation plan, the business importance, service level and migration risk of the device are analyzed, and the device migration strategy plan is formulated.

[0110] Among them, S4.1 also includes: S4.1.1: Based on the device migration strategy, perform device migration through fault detection and rollback mechanism to obtain the migration execution result set; S4.1.2: Based on the migration execution result set, verification is performed through performance testing, stability assessment and business continuity check to generate the migration verification report.

[0111] The following uses an example of an IoT system in an industrial park to illustrate the device migration and verification process: Assume that there are three main gateways (Gateway-A, Gateway-B, and Gateway-C) and a newly deployed gateway (Gateway-D) in the campus. Due to the performance degradation of Gateway-A, the system needs to migrate some of its devices to the newly deployed Gateway-D. Gateway-A is currently connected to 100 IoT devices, including 30 high-priority production line monitoring devices, 50 medium-priority environmental monitoring devices, and 20 low-priority asset tracking devices.

[0112] Based on the business importance analysis of the equipment, the system divides the migration strategy into three phases: Phase 1 (pre-migration preparation): Migrate during the daily maintenance period of the production line (2:00-4:00 a.m.), when the impact on business is minimal. The system prepares a detailed rollback plan, including device configuration backup, network connection parameter archiving, etc.

[0113] Phase 2 (staged migration execution): First round of migration (2:15): Select five low-priority asset tracking devices for trial migration; Second round of migration (2:45): Migrate 20 environmental monitoring devices; The third round of migration (3:15): Migrate the remaining 25 environmental monitoring devices and 10 production line monitoring devices; Fourth round of migration (3:45): Complete the migration of the remaining devices; Phase 3 (Emergency Preparation): Reserve a 15-minute rollback window for each group of devices.

[0114] Taking the 20 environmental monitoring devices in the second round of migration as an example, the system executed the following migration process (S4.1.1): 1. Record baseline performance data before migration: data collection frequency (60 data points per minute), average response time (120ms), and data accuracy (99.95%); 2. Execute the migration procedure: 2:45:00 Notify Gateway-A and Gateway-D to enter the migration preparation state; 2:45:05 Started device configuration migration and updated the gateway connection parameters of 20 devices; 2:45:15 The devices switch gateway connections one by one, and each device is given 3 seconds to switch; 2:45:35 Completed connection switching of all devices; 2:45:40 Conduct preliminary connectivity verification; During the migration process, the system monitors key indicators in real time: Network connection status: Keep 100% of devices online; Data transmission delay: slightly increased from 120ms to 125ms, which is within an acceptable range; Data integrity: no data loss during migration; In the verification phase (S4.1.2), taking one of the environmental monitoring devices (temperature and humidity sensor TH-001) as an example, the system was fully verified: Performance Verification: Data collection: Maintain a collection frequency of 60 data points per minute; Response time: optimized from 120ms to 115ms; Data accuracy: maintained at 99.95%; Signal strength: improved from -75dBm to -65dBm; Stability verification: Perform 24-hour continuous monitoring to verify the performance of the equipment at different times; Simulate network fluctuations to verify the automatic reconnection capability of the device; Test the data caching mechanism to ensure that temporary network interruptions do not result in data loss; Business Continuity Verification: Check data integration with environmental control systems; Verify the normal operation of the alarm triggering mechanism; Confirm the integrity and accessibility of historical data; Finally, the system generated a detailed migration verification report, documenting: Performance comparison data before and after migration; Records of temporary performance fluctuations during the migration process; Detailed results of each validation test; Potential issues found and optimization suggestions; The report shows that this migration not only successfully ensured business continuity, but also improved equipment performance through the optimized deployment of Gateway-D, especially in terms of signal strength and response time. This successful case provides valuable experience for the subsequent optimization and upgrade of other gateways.

[0115] like Figure 5 As shown, the embodiment of the present application also provides a multi-gateway communication link intelligent optimization system, the system includes a hierarchical dynamic detection module, a gateway evaluation module, a load balancing optimization module and a migration verification module, wherein: The hierarchical dynamic detection module is used to obtain real-time status data of the gateway, which includes gateway load, signal strength and response time, to build a hierarchical dynamic detection system, optimize the dynamic scheduling strategy through an artificial intelligence model, and obtain a deep detection result set; The gateway evaluation module is used to build a performance prediction model based on the deep detection result set, perform gateway comprehensive rating calculation, and obtain a gateway reliability score table; A load balancing optimization module is used to initialize the hash ring structure based on the gateway reliability score table through an improved consistent hashing algorithm, construct a virtual node optimization allocation plan, and optimize the allocation strategy of devices with similar physical locations through a local sensitive hashing mechanism to obtain an optimal device allocation plan; The migration verification module is used to formulate a device migration strategy based on the optimal device allocation plan, execute and verify the device migration, and output a migration verification report.

[0116] Each module in the above system can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0117] In one embodiment, a computer device is also provided, such as Figure 6As shown, the computer device is the multi-gateway communication link intelligent optimization system mentioned in the above method embodiment. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface.

[0118] Among them, the processor of the computer device is used to provide computing and control capabilities, and can be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but is not limited thereto. The processor may include one or more processors, for example, one or more central processing units (CPUs). When the processor is a CPU, the CPU may be a single-core CPU or a multi-core CPU. The processor may also include one or more dedicated processors, and the dedicated processor may include a GPU, an FPGA, etc., for accelerated processing. The processor is used to call the program code and data in the memory and execute the steps in the above method embodiment. For details, please refer to the description in the method embodiment, which will not be repeated here.

[0119] The memory of the computer device includes, but is not limited to, non-volatile storage media and internal memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium.

[0120] The input / output interface of the computer device is used to exchange information between the processor and external devices.

[0121] The communication interface of the computer device is used to communicate with an external terminal via a network connection.

[0122] When the computer program is executed by a processor, the above method is implemented.

[0123] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the division of each unit / module is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0125] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium or transmitted by the computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a tape, a magnetic disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.

[0126] The system of the embodiments of the present disclosure can execute the method provided by the embodiments of the present disclosure, and the implementation principles are similar. The actions performed by each module in the system of each embodiment of the present disclosure correspond to the steps in the method of each embodiment of the present disclosure. For the detailed functional description of each module of the system, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0127] The above is only an optional implementation method for some implementation scenarios of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present disclosure, other similar implementation methods based on the technical ideas of the present disclosure are also within the protection scope of the embodiments of the present disclosure.

[0128] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A multi-gateway communication link intelligent optimization method, characterized in that: The method comprises the following steps: Acquire the real-time status data of the gateway, including the gateway load, signal strength and response time, build a hierarchical dynamic detection system, optimize the dynamic scheduling strategy through the artificial intelligence model, and obtain a deep detection result set; Based on the deep detection result set, a performance prediction model is constructed, and a gateway comprehensive rating calculation is performed to obtain a gateway reliability score table; Based on the gateway reliability score table, the hash ring structure is initialized by an improved consistent hashing algorithm, a virtual node optimization allocation scheme is constructed, and the allocation strategy of devices with similar physical locations is optimized by a local sensitive hashing mechanism to obtain an optimal device allocation scheme; Based on the optimal device allocation plan, a device migration strategy is formulated, device migration is executed and verified, and a migration verification report is output.

2. The method according to claim 1, characterized in that The hierarchical dynamic detection system is constructed, and the dynamic scheduling strategy is optimized through the artificial intelligence model to obtain a deep detection result set, including: Constructing a two-layer detection framework including a basic detection layer and a deep detection layer, and generating a detection framework configuration parameter set based on the real-time status data of the gateway; Building a reinforcement learning environment based on the detection framework configuration parameter set and historical detection data, defining the gateway state space and the action space of the detection behavior, and obtaining the reinforcement learning environment parameter set using the reward function of the detection effect and resource consumption and the action space; Based on the reinforcement learning environment parameter set, a detection strategy model is obtained by training a deep Q learning algorithm to generate the deep detection result set.

3. The method according to claim 2, characterized in that Before obtaining the reinforcement learning environment parameter set by using the reward function of the detection effect and resource consumption and the action space, the method further includes: Establishing a reward value and a penalty value of a reward function, wherein a first preset reward value is given when a fault is found within a preset time, and a second preset reward value is given when the detection resource utilization rate remains within a preset range; A first preset penalty value is given when detection resources are wasted, and a second preset penalty value is given when a fault is not discovered in time.

4. The method according to claim 2, characterized in that The detection strategy model is obtained by training the deep Q learning algorithm to generate the deep detection result set, including: Construct an inductive logic learning environment and build an initial logic rule base containing basic predicates and background knowledge; Construct a fusion learning framework of inductive logic programming and reinforcement learning, configure the Actor-Critic network structure and logic rule learner; An answer set reasoning mechanism is introduced to guide the exploration process of the reinforcement learning, and an action candidate set is generated based on reasoning based on logical rules; Based on the action candidate set, a first decision mode is discovered through meta-rule learning, including: collecting decision experience through the interaction between the Actor-Critic network and the environment in the experience accumulation stage; based on the decision experience, inducing a second decision rule through inductive logic programming technology in the rule induction stage; based on the second decision rule, evaluating the second decision rule in the knowledge integration stage; The learned detection strategy, the logic rule base and the verification data are integrated to generate the deep detection result set.

5. The method according to claim 1, characterized in that Build a performance prediction model, perform gateway comprehensive rating calculation, and obtain a gateway reliability score table, including: Based on the deep detection result set, an evaluation system is constructed by analyzing hardware indicators, communication quality and environmental parameters to obtain a gateway performance prediction model parameter set; Based on the gateway performance prediction model parameter set, historical stability and environmental adaptability factors, a dynamic performance indicator evaluation is performed to obtain a gateway rating result set; Based on the gateway rating result set, a gateway selection strategy is formulated through a multi-objective optimization algorithm to generate the gateway reliability score table.

6. The method according to claim 5, characterized in that Executing the dynamic evaluation of the performance indicator includes: The fluctuation degree of the gateway performance is evaluated by calculating the coefficient of variation of key indicators, the number of failures and the average failure recovery time in the past 30 days are counted, and the performance fluctuation of the gateway under different load conditions is evaluated to obtain a historical stability score; The stability of the gateway under the current temperature environment, the communication quality under electromagnetic interference conditions, and the location adaptability in the current network topology are evaluated, and the environmental adaptability score is obtained through a fuzzy comprehensive evaluation method.

7. The method according to claim 1, characterized in that The hash ring structure is initialized by an improved consistent hashing algorithm, a virtual node optimization allocation scheme is constructed, and the allocation strategy of devices with similar physical locations is optimized by a local sensitive hashing mechanism to obtain an optimal device allocation scheme, including: Initializing the hash ring structure based on the reliability score table of the gateway, mapping the gateway node to the hash space through an improved hash algorithm, and obtaining an initial hash ring mapping relationship set; Based on the initial hash ring mapping relationship set, dynamically adjusting the number of virtual nodes of each gateway according to the reliability score of the gateway to obtain a virtual node allocation plan; Based on the virtual node allocation plan, the physical location information of the device is optimized through the locality sensitive hashing mechanism to generate the optimal device allocation plan.

8. The method according to claim 1, characterized in that Develop the device migration strategy, including: Based on the optimal equipment allocation plan, analyzing the business importance, service level and migration risk of the equipment, and formulating an equipment migration strategy plan; Wherein, based on the optimal device allocation plan, a device migration strategy is formulated, device migration is executed and verified, and a migration verification report is output, including: Based on the device migration strategy, perform device migration through fault detection and rollback mechanism to obtain a migration execution result set; Based on the migration execution result set, verification is performed through performance testing, stability assessment and business continuity check to generate the migration verification report.

9. The method according to claim 1, characterized in that Constructing the hierarchical dynamic detection system and constructing the performance prediction model based on the deep detection result set includes: Deploy local detection agents at gateway nodes and global coordination agents at core nodes to form a multi-agent network topology; Based on the multi-agent network topology, the stability of the multi-agent network is maintained through a lease-based heartbeat mechanism, and an agent collaboration framework is constructed; Based on the intelligent agent collaborative framework, local decision-making is achieved through the Actor-Critic architecture, and the global detection strategy is optimized through the meta-learning method to obtain the deep detection result set; Receive the deep detection result set, build a local evaluation model for each gateway agent, and integrate the evaluation results of each local detection agent through a swarm intelligence algorithm to form a gateway swarm evaluation model; Based on the gateway group evaluation model, the marginal contribution of each gateway in the overall service quality is calculated through the alliance game model, the load distribution weight is dynamically adjusted, and a gateway reliability score table is generated.

10. A multi-gateway communication link intelligent optimization system, characterized in that: The system includes a hierarchical dynamic detection module, a gateway evaluation module, a load balancing optimization module and a migration verification module, wherein: The hierarchical dynamic detection module is used to obtain real-time status data of the gateway, which includes gateway load, signal strength and response time, to build a hierarchical dynamic detection system, optimize the dynamic scheduling strategy through an artificial intelligence model, and obtain a deep detection result set; The gateway evaluation module is used to build a performance prediction model based on the deep detection result set, perform gateway comprehensive rating calculation, and obtain a gateway reliability score table; The load balancing optimization module is used to initialize the hash ring structure based on the gateway reliability score table through an improved consistent hashing algorithm, construct a virtual node optimization allocation plan, and optimize the allocation strategy of devices with similar physical locations through a local sensitive hashing mechanism to obtain an optimal device allocation plan; The migration verification module is used to formulate a device migration strategy based on the optimal device allocation plan, execute and verify device migration, and output a migration verification report.

Citation Information

Patent Citations

  • Routing decision-making method and system based on collaborative multi-agent reinforcement learning

    CN115714741A

  • Distributed WSN energy efficiency routing optimization method based on multi-agent reinforcement learning

    CN117014988A

  • Multi-bank link artificial intelligence gateway processing method and system, medium and equipment

    CN117176592A

  • Time delay guarantee intelligent routing method and system of TSN

    CN118487988A

  • Calculation network resource scheduling optimization method based on multi-agent deep reinforcement learning

    CN119201470A

Cited By

  • Gateway monitoring method and device, electronic equipment, storage medium and computer product

    CN121441792A