Artificial intelligence-based intelligent gateway optimization method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LANJING TECH (NANJING) CO LTD
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-04
AI Technical Summary
[0003]在工业智能网关的信道优化过程中,现有技术虽然通过带内探测技术避免了因信道切换导致的业务中断,但在探测样本的利用环节存在以下缺陷:由于探测报文发送时信道状态存在差异,部分探测可能发生在信道被其他设备占用的瞬间或信号强度较弱的时刻,导致采集到的质量样本本身存在可信度差异
(1)本发明通过带内探测技术,利用业务数据的空闲间隙发送低优先级探测帧,并结合基于接收信号强度指示值和信道占用状态的探测可信系数对探测结果进行加权,避免了传统信道切换方法中因试错性探索导致的业务中断,在保障实时音视频业务连续性的同时实现了对信道质量的持续感知,提升了用户体验的稳定性。
Smart Images

Figure CN122513271A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart gateway technology, and more specifically to a smart gateway optimization method based on artificial intelligence. Background Technology
[0002] As core access devices for the Industrial Internet of Things (IIoT), industrial smart gateways are deployed in complex industrial production environments, undertaking the task of data aggregation and real-time transmission from massive numbers of industrial terminals. These devices are surrounded by numerous industrial wireless devices, mobile terminals, and nearby access points, leading to severe wireless channel interference and dynamic changes in communication quality. Industrial automation scenarios have extremely stringent requirements for data transmission reliability and low latency; any communication interruption can trigger production equipment downtime or safety accidents. Therefore, industrial smart gateways need to possess the ability to autonomously optimize wireless channels.
[0003] In the channel optimization process of industrial intelligent gateways, while existing technologies avoid service interruptions due to channel handover through in-band probing, they have the following drawbacks in the utilization of probing samples: Due to differences in channel conditions when probing messages are sent, some probing may occur at moments when the channel is occupied by other devices or when signal strength is weak, resulting in inconsistencies in the reliability of the collected quality samples. If all probing samples are used indiscriminately for channel quality estimation, low-quality samples will contaminate the statistical results, causing a deviation in the probability distribution of channel performance and thus affecting the accuracy of subsequent handover decisions. This problem is not a direct cause of immediate service interruption, but it accumulates errors over long-term operation, weakening the channel optimization effect. Summary of the Invention
[0004] The purpose of this invention is to provide an artificial intelligence-based smart gateway optimization method to solve the problems mentioned above.
[0005] The objective of this invention can be achieved through the following technical solutions: The AI-based smart gateway optimization method includes the following steps: S1, construct the wireless channels available to the smart gateway as a set of channel options, initialize quality estimation parameters for each channel and set an uncertainty threshold. The quality estimation parameters are used to characterize the probability distribution of channel performance. S2, during the idle interval of service data transmission, send probe messages to candidate channels in the channel option set according to the current probe frequency, and receive the response results of the probe messages, and use the response results as quality samples of candidate channels; S3, using the quality samples as observations, updates the corresponding channel's quality estimation parameters through Bayesian inference to obtain the updated quality estimation parameters; S4. Based on the updated quality estimation parameters, calculate the performance comparison results between the currently used channel and the candidate channel, and determine whether to trigger channel handover based on the performance comparison results and the uncertainty threshold. If triggered, generate a handover command. S5 executes channel switching according to the switching command, and dynamically adjusts the frequency of subsequent probes according to the current service load, and uses the adjusted probe frequency as the input for the in-band probe step.
[0006] As a further aspect of the present invention: S1 specifically includes: The intelligent gateway is controlled to listen to the interference noise power of each channel upon startup and generate a list of interference strengths; Based on the list of interference strengths, each channel is assigned an initial quality estimation parameter. The expected performance represented by the quality estimation parameter of a channel with an interference strength higher than a preset threshold is lower than that of a channel with an interference strength lower than a preset threshold. The uncertainty threshold is calculated based on the total number of channels in the channel option set. The larger the total number of channels, the smaller the uncertainty threshold.
[0007] As a further aspect of the present invention: S2 specifically includes: Real-time monitoring of the inter-frame interval duration of business data; inter-frame intervals exceeding a preset threshold are identified as idle gaps that can be used for detection. The probe message to be sent is encapsulated into a probe frame with a lower priority than the service data, and the probe frame is inserted at the beginning of the idle interval. Listen for acknowledgment frames or bit error rate feedback information returned by the candidate channel, and record successful acknowledgment frames or bit error rates below the threshold as successful detection, and record failure of acknowledgment frames or bit error rates above the threshold as failed detection. The results of successful or unsuccessful detection are used as quality samples for candidate channels.
[0008] As a further aspect of the present invention: S3 specifically includes: Read the current channel quality estimation parameters, which include a first statistic and a second statistic used to describe the uncertainty of channel performance. Map the number of successful and failed detections in the quality sample to the first and second likelihood values, respectively. The first statistic is summed with the first likelihood value to obtain the updated first statistic. The second statistic is summed with the second likelihood value to obtain the updated second statistic. The updated first statistic and the updated second statistic are combined to form the updated quality estimation parameter.
[0009] As a further aspect of the present invention: mapping the number of successful detections and the number of failed detections in the quality sample to a first likelihood value and a second likelihood value, respectively, specifically includes: Extract the received signal strength indication value corresponding to each detection from the quality sample; Each detection is assigned a detection confidence coefficient based on the preset strength range into which the received signal strength indication value falls; The first likelihood value is obtained by multiplying the number of successful probes for all probes on the same channel by their respective probe confidence coefficients and summing the results. The second likelihood value is obtained by multiplying the number of failed probes for all probes on the same channel by their respective probe confidence coefficients and summing the results.
[0010] As a further aspect of the present invention: the process of assigning the detection confidence coefficient is as follows: Simultaneously with each probe, the energy detection level of the channel is sampled and a channel occupancy flag is generated; If the channel occupancy flag indicates that the channel is occupied, then the detection confidence coefficient of this probe will be set to zero. If the channel occupancy flag indicates that the channel is idle, the received signal strength indication value is compared with the preset strength range, and the corresponding detection confidence coefficient is assigned according to the range it falls into.
[0011] As a further aspect of the present invention: S4 specifically includes: The expected performance value of each channel is calculated based on the updated quality estimation parameters, and the channel option set is sorted from high to low according to the expected performance value to obtain a candidate channel priority list. The expected performance value of the currently used channel is compared with the highest expected performance value in the candidate channel priority list, the performance difference is calculated, and the cumulative number of times the currently used channel is continuously worse than the highest expected performance value is recorded. When the cumulative number of attempts reaches the preset threshold, it is further determined whether the performance difference exceeds the uncertainty threshold. If both conditions are met, a switching instruction is generated and the switching instruction is directed to the candidate channel corresponding to the highest expected performance value.
[0012] As a further aspect of the present invention: S5 specifically includes: According to the switching instruction, the currently used channel is switched to the target channel, and the cumulative number of times the currently used channel is reset after the switching is completed; Within a preset statistical period, monitor the inter-frame interval in the business data and calculate the average inter-frame interval duration; The average inter-frame interval duration is compared with the load threshold. If the average inter-frame interval duration is greater than the load threshold, the detection frequency is increased by a first ratio. If the average inter-frame interval duration is less than the load threshold, the detection frequency is decreased by a second ratio. The adjusted detection frequency is then used as the input for subsequent in-band detection steps.
[0013] The beneficial effects of this invention are: (1) This invention uses in-band probing technology to send low-priority probe frames during the idle gaps of service data, and combines the probe confidence coefficient based on the received signal strength indication value and the channel occupancy status to weight the probe results. This avoids the service interruption caused by trial and error exploration in traditional channel switching methods. While ensuring the continuity of real-time audio and video services, it realizes continuous perception of channel quality and improves the stability of user experience.
[0014] (2) The present invention dynamically adjusts the detection frequency based on the average inter-frame interval duration obtained from service load monitoring. When the load is light, the channel exploration is accelerated to quickly adapt to environmental changes. When the load is heavy, the detection frequency is actively reduced to avoid interfering with normal data transmission. At the same time, the dual handover determination mechanism of cumulative number and uncertainty threshold is combined to prevent false handover caused by instantaneous interference and to switch to a better channel in time when the channel continues to deteriorate, thus achieving a balance between network performance and resource overhead. Attached Figure Description
[0015] The invention will now be further described with reference to the accompanying drawings.
[0016] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figure 1 As shown, this invention is an intelligent gateway optimization method based on artificial intelligence, comprising the following steps: S1, construct the wireless channels available to the smart gateway as a set of channel options, initialize quality estimation parameters for each channel and set an uncertainty threshold. The quality estimation parameters are used to characterize the probability distribution of channel performance. S2, during the idle interval of service data transmission, send probe messages to candidate channels in the channel option set according to the current probe frequency, and receive the response results of the probe messages, and use the response results as quality samples of candidate channels; S3, using the quality samples as observations, updates the corresponding channel's quality estimation parameters through Bayesian inference to obtain the updated quality estimation parameters; S4. Based on the updated quality estimation parameters, calculate the performance comparison results between the currently used channel and the candidate channel, and determine whether to trigger channel handover based on the performance comparison results and the uncertainty threshold. If triggered, generate a handover command. S5 executes channel switching according to the switching command, and dynamically adjusts the frequency of subsequent probes according to the current service load, and uses the adjusted probe frequency as the input for the in-band probe step.
[0019] In S1, the available wireless channels of the smart gateway are constructed as a set of channel options. Quality estimation parameters are initialized for each channel, and an uncertainty threshold is set. These quality estimation parameters characterize the probability distribution of channel performance and specifically include: During channel sensing, upon power-on or when the wireless network service restarts, the smart gateway invokes the underlying wireless network card driver. This driver controls the RF front-end to sequentially tune to each available wireless channel. On each channel, the gateway continuously samples for a 100-millisecond silence period, recording the fluctuations in the received signal strength indicator (RSS) within that period using an energy detection mechanism. The background noise power is extracted from the sampled data, specifically the statistical average of the RSS within that period, as the interference noise power for that channel. The interference noise power of all channels is then aggregated to form an interference intensity list.
[0020] During parameter initialization, based on the interference noise power of each channel in the interference strength list, a pair of initial count parameters are assigned to each channel to describe the beta distribution of the channel's performance. The specific assignment rules are as follows: a preset interference threshold is set to -85 milliwatt decibels (dB). If the interference noise power of a channel is higher than -85 DB, the initial success count for that channel is set to 5, and the initial failure count is set to 15; if the interference noise power of a channel is lower than -85 DB, the initial success count is set to 15, and the initial failure count is set to 5. The initial success count and the initial failure count together constitute the channel's quality estimation parameters, where the relative magnitudes of the initial success count and the initial failure count determine the initial level of the channel's expected performance.
[0021] During threshold setting, the total number of channels in the channel option set is first counted; for example, this is typically 13 channels in the 2.4 GHz band. An uncertainty threshold is calculated based on this total number of channels. This threshold is used in subsequent steps to determine whether to trigger a handover. The uncertainty threshold is calculated by multiplying the reciprocal of the total number of channels by an adjustment factor, which is set to 0.5. For example, when the total number of channels is 13, its reciprocal is approximately 0.077, multiplied by 0.5, resulting in 0.0385, which is used as the final uncertainty threshold. The more channels there are, the smaller this threshold value should be, ensuring more cautious decision-making with a wider range of available channels.
[0022] In S2, during idle intervals in service data transmission, probe messages are sent to candidate channels in the channel option set according to the current probe frequency, and the response results of the probe messages are received. The response results are used as quality samples of the candidate channels, specifically including: During the idle interval identification process, the media access control layer of the smart gateway continuously monitors the inter-frame interval duration of service data. Specifically, the gateway records the idle time between the completion of sending or receiving a data frame and the start of transmission of the next data frame. This idle time is compared with a preset idle interval threshold, which is set at 150 microseconds. When the detected inter-frame interval duration is greater than 150 microseconds, this duration is determined to be an idle interval that can be used to insert a probe frame, and the start time and duration of this idle interval are recorded.
[0023] During probe frame construction, once an available idle gap is determined, the gateway retrieves the probe packet to be sent from the probe queue. This probe packet uses an empty data frame format and does not carry upper-layer service data. During encapsulation, the priority flag in the frame control field is set to a level lower than that of ordinary service data; for example, the access category flag is set to the background traffic category. At the start of the idle gap, the probe frame is immediately inserted at the front of the sending queue to ensure it occupies the idle gap for transmission.
[0024] During the response monitoring process, the gateway starts a response wait timer after sending the probe frame, with a wait duration set to 500 microseconds. During this wait, the gateway listens for the physical layer convergence protocol identifier on the candidate channel. If an acknowledgment frame matching the probe frame sequence number is correctly decoded on that channel, the probe is recorded as successful. If no acknowledgment frame is received, but bit error rate feedback information is obtained through demodulating physical layer data, the bit error rate is compared with a preset bit error rate threshold, set to one-thousandth. If the bit error rate is below one-thousandth, the probe is also recorded as successful; if the bit error rate is above one-thousandth or no feedback is received, the probe is recorded as failed.
[0025] During sample generation, for each completed probe, the recorded success or failure result is associated with the candidate channel identifier targeted by that probe. Each probe independently generates a quality sample, which contains two attributes: channel identifier and probe result. All quality samples are temporarily stored in a sample buffer in chronological order, serving as input data for subsequent Bayesian update steps.
[0026] In S3, quality samples are used as observations, and the corresponding channel quality estimation parameters are updated through Bayesian inference to obtain the updated quality estimation parameters, which specifically include: During the prior parameter acquisition process, the smart gateway reads the current channel quality estimation parameters from memory. These quality estimation parameters consist of a first statistic and a second statistic, which are used to describe the shape parameters of channel performance uncertainty, respectively. Specifically, the first statistic is denoted as the success count, representing the cumulative number of successful transmissions in the channel's history; the second statistic is denoted as the failure count, representing the cumulative number of failed transmissions in the channel's history. These two statistics are stored as integers, with initial values assigned during the initialization step and replaced with new values after each update.
[0027] In the likelihood estimation process, the received signal strength indicator (RSI) value corresponding to each probe is first extracted from the quality samples. The quality samples are the dataset output from the in-band probe step, and each record contains the candidate channel identifier, the probe result, and the RSI value for that probe. Probe results are divided into success and failure, represented by the numbers 1 and 0, respectively. To quantify the reliability of each probe, a probe reliability coefficient is assigned to each probe. This coefficient ranges from 0 to 1, with a larger value indicating a more reliable result for that probe.
[0028] The assignment of the detection reliability coefficient is achieved through the following sub-steps: First, during each detection, the channel energy detection level is sampled. The energy detection level is the real-time energy value obtained by the physical layer through listening to the channel carrier, measured in milliwatts (dB). This energy detection level is compared with a preset busy / idle threshold, which is set to -80 DB. If the energy detection level is higher than -80 DB, the channel is determined to be occupied, and a channel occupancy flag of 1 is generated; if the energy detection level is lower than or equal to -80 DB, the channel is determined to be idle, and a channel occupancy flag of 0 is generated. Second, if the channel occupancy flag is 1, it indicates that the channel is occupied by other devices during the detection. In this case, the detection packet may be subject to collision, and the detection result is unreliable. Therefore, the detection reliability coefficient for this detection is directly set to 0. Third, if the channel occupancy flag is 0, it indicates that the channel is idle, and the detection result has high reliability. In this case, the corresponding detection reliability coefficient is assigned based on the preset strength range into which the received signal strength indication value falls. The preset intensity range is divided according to the actual ambient noise level, for example, into four ranges: Range 1 is when the received signal strength indication value is below -75 mW dB, at which point the signal is weak and the detection result has a certain degree of uncertainty, and a detection confidence coefficient of 0.3 is assigned; Range 2 is when the received signal strength indication value is between -75 mW dB and -60 mW dB, and a detection confidence coefficient of 0.6 is assigned; Range 3 is when the received signal strength indication value is between -60 mW dB and -45 mW dB, and a detection confidence coefficient of 0.9 is assigned; Range 4 is when the received signal strength indication value is above or equal to -45 mW dB, at which point the signal is very strong and the detection result is very reliable, and a detection confidence coefficient of 1.0 is assigned.
[0029] After assigning the confidence coefficient for each probe, for the same candidate channel, all probe records within the current update period are summarized. Assuming the channel underwent N probes within the current update period, for the ... The next probe defines a successful probe indication value. If the detection result is successful, then Set the value to 1 if the probe fails, otherwise set it to 0; define the probe failure indicator value. If the detection result is unsuccessful, then Choose 1 if the likelihood is 1, otherwise choose 0. Then the first likelihood value is... The calculation formula is: ;in For the first The detection confidence coefficient corresponds to each detection. This formula means that the contribution of all successful detections is weighted and summed according to the confidence coefficient to obtain the cumulative first likelihood value.
[0030] Second likelihood value The calculation formula is: ;in For the first The failure indication value of the second probe. Similarly, this is the detection confidence coefficient. This formula weights and sums the contributions of failed detections to obtain the cumulative second likelihood value.
[0031] In the posterior calculation, the first prior statistic is denoted as... The prior second statistic is denoted as The first likelihood value Accumulated to The updated first statistic is obtained above. ; the second likelihood value Accumulated to The updated second statistic is obtained above. .because and All are real numbers (because) The updated statistics may contain decimal parts (potentially decimals), but in actual storage, they can be stored as floating-point numbers or scaled up to integers. The updated first and second statistics together constitute the updated quality estimation parameters and are written back to memory for subsequent handover decision steps. By introducing a probe confidence coefficient to weight the observations, the negative impact of erroneous samples caused by sudden channel interference or signal fluctuations on channel quality estimation can be effectively suppressed, making the probability distribution update of channel performance more robust.
[0032] In S4, based on the updated quality estimation parameters, the performance comparison results between the currently used channel and the candidate channels are calculated. Based on the performance comparison results and the uncertainty threshold, it is determined whether to trigger channel handover. If triggered, a handover command is generated, specifically including: During performance ranking, the smart gateway reads the updated quality estimate parameters for each channel stored in memory. These parameters include a first statistic and a second statistic. For each channel, its first statistic is divided by the sum of the first and second statistics, and the quotient is used as the expected performance value for that channel. This expected performance value ranges from 0 to 1, with a higher value indicating a higher expected channel quality. After calculating the expected performance values for all channels, the channels in the channel option set are sorted in descending order of their expected performance values, generating a priority list of candidate channels. The first item in this list is the candidate channel with the highest current expected performance value.
[0033] During the degradation assessment process, the expected performance value of the currently used channel is first obtained and denoted as the first expected value. Then, the highest expected performance value is extracted from the candidate channel priority list and denoted as the second expected value. The difference between the second expected value and the first expected value is calculated to obtain the performance difference. If the performance difference is positive, it indicates that the currently used channel is inferior to the best candidate channel. In this case, the cumulative number of times the currently used channel is consecutively inferior to the highest expected performance value is incremented by 1; if the performance difference is zero or negative, it indicates that the currently used channel is not inferior to the best candidate channel, and the cumulative count is reset to 0. The initial value of the cumulative count is 0, and it is stored in the gateway's temporary register after each update.
[0034] During the handover triggering process, a preset threshold of 3 counts is established. When the cumulative count reaches 3, it is further determined whether the current performance difference exceeds an uncertainty threshold. The uncertainty threshold is calculated in the initialization step; for example, when the total number of channels is 13, the uncertainty threshold is 0.0385. If the performance difference exceeds the uncertainty threshold, it indicates that the current channel is consistently significantly worse than the best candidate channel, and a handover needs to be performed. At this time, a handover command is generated, which includes the target channel identifier. The target channel is the channel corresponding to the highest expected performance value in the candidate channel priority list. The handover command is sent to the handover execution and adaptive adjustment step. If the cumulative count does not reach 3, or the performance difference does not exceed the uncertainty threshold, no handover command is generated, and the process returns to the in-band probing step to continue collecting samples. By using both the cumulative count and the uncertainty threshold for judgment, erroneous handovers caused by instantaneous fluctuations are avoided, while ensuring timely handover to a better channel when the channel continues to deteriorate.
[0035] In S5, channel switching is performed according to the switching command, and the frequency of subsequent probes is dynamically adjusted according to the current service load. The adjusted probe frequency is used as the input for the in-band probe step, which specifically includes: During the handover process, the smart gateway receives a handover command from the handover decision-making step, which includes a target channel identifier. The gateway invokes the underlying wireless network card driver to control the RF front-end to switch from the currently used channel to the channel indicated by the target channel identifier. After the channel adjustment is complete, the gateway immediately resets the cumulative number of times the currently used channel has been continuously worse than the highest expected performance value, setting this cumulative number to 0. Simultaneously, the target channel is updated to the new currently used channel, and the time of this handover is recorded for subsequent load monitoring and statistics.
[0036] During load monitoring, the gateway sets a statistical period of 1 second. Within each period, the gateway's media access control layer continuously records all successfully transmitted or received service data frames. For each data frame, the idle time between the end of its transmission and the start of the next data frame is recorded, i.e., the inter-frame interval. At the end of the statistical period, all recorded inter-frame interval durations are summed to obtain the total idle time, and the total number of inter-frame intervals is counted. The total idle time is divided by the total number of inter-frame intervals, and the quotient is used as the average inter-frame interval duration for that statistical period. This average inter-frame interval duration reflects the current service load: a shorter average inter-frame interval indicates denser service data and a higher load; a longer average inter-frame interval indicates sparser service data and a lower load.
[0037] During frequency adjustment, a load threshold is preset, set to 200 microseconds. The calculated average inter-frame interval duration is compared with this load threshold. If the average inter-frame interval duration is greater than 200 microseconds, it indicates that the current service load is relatively light, with many idle gaps available for probing. In this case, the subsequent probing frequency needs to be increased to accelerate the update speed of channel quality information. Specifically, the probing frequency is increased according to a first ratio, set to 1.2, meaning the new probing frequency equals the current probing frequency multiplied by 1.2, and the product is rounded to the nearest integer. If the average inter-frame interval duration is less than 200 microseconds, it indicates that the current service load is heavy, with scarce idle gaps. In this case, the probing frequency needs to be decreased to avoid probing frames interfering with normal service data. Specifically, the probing frequency is decreased according to a second ratio, set to 0.8, meaning the new probing frequency equals the current probing frequency multiplied by 0.8, and the product is rounded to the nearest integer. If the average inter-frame interval duration is equal to 200 microseconds, the current probing frequency remains unchanged. The initial probe frequency was set to 10 times per second. The adjusted probe frequency served as the input parameter for subsequent in-band probe steps, controlling the transmission frequency of probe frames in the next cycle. By dynamically adjusting the probe frequency, adaptive optimization was achieved, accelerating channel exploration under light load and avoiding service interference under heavy load.
[0038] The working principle of this invention is as follows: First, the available wireless channels of the smart gateway are constructed into a set of channel options. For each channel, a quality estimation parameter consisting of a first statistic and a second statistic is initialized, and an uncertainty threshold inversely proportional to the total number of channels is set. Second, during idle intervals in service data transmission, low-priority probe frames are sent to candidate channels according to the current probe frequency, and response results are received to generate quality samples. Then, using the quality samples as observations, the received signal strength indication value for each probe is extracted and assigned a probe confidence coefficient. Through Bayesian inference, the weighted number of successful and failed probes are accumulated to the first and second statistics of the corresponding channel, respectively, to obtain updated quality estimation parameters. Next, based on the updated quality estimation parameters, the expected performance value of each channel is calculated, and a candidate channel priority list is generated. When the cumulative number of times the current channel is continuously inferior to the best candidate channel reaches a preset threshold and the performance difference exceeds the uncertainty threshold, a switching instruction containing the target channel identifier is generated. Finally, channel switching is performed and the cumulative count is reset. Simultaneously, the subsequent probe frequency is dynamically adjusted according to the average inter-frame interval obtained from service load monitoring. The adjusted probe frequency is used as the input for the in-band probe step, forming a closed-loop adaptive optimization.
[0039] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. An AI-based intelligent gateway optimization method, characterized in that, Includes the following steps: S1, construct the wireless channels available to the smart gateway as a set of channel options, initialize quality estimation parameters for each channel and set an uncertainty threshold. The quality estimation parameters are used to characterize the probability distribution of channel performance. S2, during the idle interval of service data transmission, send probe messages to candidate channels in the channel option set according to the current probe frequency, and receive the response results of the probe messages, and use the response results as quality samples of candidate channels; S3, using the quality samples as observations, updates the corresponding channel's quality estimation parameters through Bayesian inference to obtain the updated quality estimation parameters; S4. Based on the updated quality estimation parameters, calculate the performance comparison results between the currently used channel and the candidate channel, and determine whether to trigger channel handover based on the performance comparison results and the uncertainty threshold. If triggered, generate a handover command. S5 executes channel switching according to the switching command, and dynamically adjusts the frequency of subsequent probes according to the current service load, and uses the adjusted probe frequency as the input for the in-band probe step.
2. The intelligent gateway optimization method based on artificial intelligence according to claim 1, characterized in that, S1 specifically includes: The intelligent gateway is controlled to listen to the interference noise power of each channel upon startup and generate a list of interference strengths; Based on the list of interference strengths, each channel is assigned an initial quality estimation parameter. The expected performance represented by the quality estimation parameter of a channel with an interference strength higher than a preset threshold is lower than that of a channel with an interference strength lower than a preset threshold. The uncertainty threshold is calculated based on the total number of channels in the channel option set. The larger the total number of channels, the smaller the uncertainty threshold.
3. The intelligent gateway optimization method based on artificial intelligence according to claim 1, characterized in that, S2 specifically includes: Real-time monitoring of the inter-frame interval duration of business data; inter-frame intervals exceeding a preset threshold are identified as idle gaps that can be used for detection. The probe message to be sent is encapsulated into a probe frame with a lower priority than the service data, and the probe frame is inserted at the beginning of the idle interval. Listen for acknowledgment frames or bit error rate feedback information returned by the candidate channel, and record successful acknowledgment frames or bit error rates below the threshold as successful detection, and record failure of acknowledgment frames or bit error rates above the threshold as failed detection. The results of successful or unsuccessful detection are used as quality samples for candidate channels.
4. The intelligent gateway optimization method based on artificial intelligence according to claim 1, characterized in that, S3 specifically includes: Read the current channel quality estimation parameters, which include a first statistic and a second statistic used to describe the uncertainty of channel performance. Map the number of successful and failed detections in the quality sample to the first and second likelihood values, respectively. The first statistic is summed with the first likelihood value to obtain the updated first statistic. The second statistic is summed with the second likelihood value to obtain the updated second statistic. The updated first statistic and the updated second statistic are combined to form the updated quality estimation parameter.
5. The intelligent gateway optimization method based on artificial intelligence according to claim 4, characterized in that, The step of mapping the number of successful detections and the number of failed detections in the quality sample to a first likelihood value and a second likelihood value, respectively, specifically includes: Extract the received signal strength indication value corresponding to each detection from the quality sample; Each detection is assigned a detection confidence coefficient based on the preset strength range into which the received signal strength indication value falls; The first likelihood value is obtained by multiplying the number of successful probes for all probes on the same channel by their respective probe confidence coefficients and summing the results. The second likelihood value is obtained by multiplying the number of failed probes for all probes on the same channel by their respective probe confidence coefficients and summing the results.
6. The intelligent gateway optimization method based on artificial intelligence according to claim 5, characterized in that, The process of assigning the detection confidence coefficient is as follows: Simultaneously with each probe, the energy detection level of the channel is sampled and a channel occupancy flag is generated; If the channel occupancy flag indicates that the channel is occupied, then the detection confidence coefficient of this probe will be set to zero. If the channel occupancy flag indicates that the channel is idle, the received signal strength indication value is compared with the preset strength range, and the corresponding detection confidence coefficient is assigned according to the range it falls into.
7. The intelligent gateway optimization method based on artificial intelligence according to claim 1, characterized in that, S4 specifically includes: The expected performance value of each channel is calculated based on the updated quality estimation parameters, and the channel option set is sorted from high to low according to the expected performance value to obtain a candidate channel priority list. The expected performance value of the currently used channel is compared with the highest expected performance value in the candidate channel priority list, the performance difference is calculated, and the cumulative number of times the currently used channel is continuously worse than the highest expected performance value is recorded. When the cumulative number of attempts reaches the preset threshold, it is further determined whether the performance difference exceeds the uncertainty threshold. If both conditions are met, a switching instruction is generated and the switching instruction is directed to the candidate channel corresponding to the highest expected performance value.
8. The intelligent gateway optimization method based on artificial intelligence according to claim 1, characterized in that, S5 specifically includes: According to the switching instruction, the currently used channel is switched to the target channel, and the cumulative number of times the currently used channel is reset after the switching is completed; Within a preset statistical period, monitor the inter-frame interval in the business data and calculate the average inter-frame interval duration; The average inter-frame interval duration is compared with the load threshold. If the average inter-frame interval duration is greater than the load threshold, the detection frequency is increased by a first ratio. If the average inter-frame interval duration is less than the load threshold, the detection frequency is decreased by a second ratio. The adjusted detection frequency is then used as the input for subsequent in-band detection steps.