Heterogeneous network communication link determination method, device commissioning method, apparatus, and system
Patent Information
- Application Number
- CN202610983155.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-08-18
AI Technical Summary
[0006]为了克服现有技术的不足,本申请提供一种异构网络通信链路确定方法、设备配网方法、装置及系统,以解决现有家庭集中控制器在多异构网络并存的环境下,选择通信链路时无法综合保证通信质量,用户体验差的问题
本申请技术方案提供一种异构网络通信链路确定方法、设备配网方法、装置及系统。通过基于信号强度、响应时延和功耗的评价指标确定可用路径的目标匹配度,以目标匹配度最高的通信链路作为目标通信链路;其中,对标准信号强度、标准时延和标准功耗分别计算比重和熵值以得到权重,对加权指标确定最优值和最差值,据此计算正理想解距离和负理想解距离,并对当前时刻的贴近度进行平滑处理得到平滑后的贴近度作为目标匹配度,从而抑制波动,使链路选择更稳定。在设备配网时,依据本地历史配网记录判断是否为相同类型设备和曾配网设备,若是直接使用最新配网记录以加速接入;配网完成后提取报文的特征,自动识别协议类型,提高设备接入效率。
Smart Images

Figure CN122601557A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method for determining communication links in heterogeneous networks, a method for configuring equipment, an apparatus, and a system. Background Technology
[0002] With the rapid development of whole-house intelligence, smart homes, and the Industrial Internet of Things (IIoT), home central controllers (or smart gateways, home edge computing nodes), as the central devices for data interaction, face increasingly complex communication environments. To meet the access needs of different devices (such as low-power sensors, high-definition cameras, and mobile terminals), current central controllers typically integrate multiple heterogeneous network communication interfaces, including but not limited to Wi-Fi, Bluetooth BLE (Bluetooth Low Energy), Zigbee, wired Ethernet, and cellular networks (such as 5G).
[0003] In existing multi-mode network routing schemes, the following strategies are commonly used: Static priority strategy: A fixed network priority order is preset at the factory (e.g., wired > Wi-Fi > 5G > Zigbee), and devices only attempt to establish connections according to this fixed order. This type of solution cannot perceive changes in real-time network quality. When high-priority link signals weaken or become congested, devices often still blindly attempt to connect, resulting in excessively long initial network configuration times or even failures.
[0004] Single-metric triggering strategy: Path switching is based solely on a single physical layer metric (such as signal strength RSSI or packet loss rate). This type of solution ignores the fundamental differences in power consumption and latency characteristics between different communication standards. For example, Wi-Fi has high signal strength but extremely high power consumption, while Zigbee has low power consumption but may require multiple hops and has a large latency. Single-metric evaluation can easily lead to "suboptimal selection" or energy consumption imbalance.
[0005] Simple round-robin or load balancing strategies allocate paths based solely on current traffic load, lacking the ability to predict long-term network trends. In complex home electromagnetic environments (such as microwave oven interference, wall shielding, and channel contention between adjacent networks), network parameters can fluctuate dramatically. Traditional strategies easily lead to frequent ping-pong switching of the main path between multiple interfaces, consuming system computing resources and causing repeated interruptions and reconnections of upper-layer services (such as audio / video streaming and firmware upgrades), severely degrading the user experience. Summary of the Invention
[0006] To overcome the shortcomings of existing technologies, this application provides a method for determining communication links in heterogeneous networks, a method for configuring devices, an apparatus, and a system to solve the problem that existing home central controllers cannot comprehensively guarantee communication quality and result in poor user experience when selecting communication links in environments with multiple heterogeneous networks.
[0007] The technical solution adopted by this application to solve its technical problem is: Firstly, a method for determining communication links in heterogeneous networks is provided, including: Determine available paths in all communication networks; The evaluation metrics for the available paths are obtained, including signal strength, response latency, and power consumption. The target matching degree of each available path is determined based on the evaluation indicators. The communication link with the highest target matching degree is identified as the target communication link.
[0008] As an optional implementation of this application, determining the target matching degree of each available path based on the evaluation index includes: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Based on the standard values of the target indicators, the weight of each indicator for each available path is obtained; the weight of the target indicator for the target available path = the standard value of the target indicator for the target available path / the sum of the standard values of the target indicators for all available paths; Calculate the information entropy of the indicator based on the stated proportion; , Let N be the information entropy, and N be the number of all available paths. The proportion of the target indicator; The weights of the target indicators are calculated based on the information entropy. , The weights of the target indicators; Based on the aforementioned weights, the corresponding standard signal strength, standard delay, and standard power consumption are weighted to obtain a weighted index; Obtain the best and worst values among the weighted indicators; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; , , , These are the ideal solution distance and the negative ideal solution distance, respectively. , These are the optimal value and the worst value, respectively. Let j be the weighted index value of the i-th available path; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness; The relative closeness is taken as the target matching degree.
[0009] As an optional implementation of this application, determining the target matching degree of each available path based on the signal strength, response delay, and power consumption includes: After obtaining the relative proximity, the proximity at the current moment is smoothed to obtain the smoothed proximity; the smoothed proximity = preset coefficient * proximity at the current moment + (1 - preset coefficient) * proximity at the previous moment. The smoothed proximity is used as the target matching degree.
[0010] Secondly, a device network configuration method is provided, including: After the device to be distributed to the network establishes a connection with the target communication link, the local historical distribution network record is obtained, wherein the target communication link is determined based on the heterogeneous network communication link determination method described above. Determine whether the devices are of the same type for network distribution based on local historical network distribution records; If so, then network configuration is performed on the device to be configured based on the latest network configuration information of the same type of device. The network configuration information includes network configuration policy, authentication parameters and session key negotiation method.
[0011] As an optional implementation of this application, it also includes: After the network distribution is completed, obtain the communication messages of the devices to be distributed. Extracting the time-series and spatial structure features of the message; The time series features are combined with the spatial structure features to obtain a high-dimensional vector; The high-dimensional vector is input into the local recognition model, which outputs the protocol type prediction and confidence level. If the confidence level is higher than the preset confidence level, it is determined that the device to be configured on the network adopts the target protocol type, wherein the target protocol type is the protocol type with the highest probability in the output protocol type prediction.
[0012] As an optional implementation of this application, before determining whether the devices are of the same type for network configuration based on local historical network configuration records, the following steps are also included: Determine whether the device to be configured on the network is a device that has been configured on the network before, based on local historical network distribution records; If so, then network distribution is performed on the device to be distributed based on the latest network distribution record.
[0013] Thirdly, a heterogeneous network communication link determination device is provided, comprising: Available path determination module, used to determine available paths in all communication networks; The path information acquisition module is used to acquire the evaluation indicators of the available paths, including signal strength, response delay and power consumption. The target matching degree determination module is used to determine the target matching degree of each available path based on the evaluation index; The communication link determination module is used to determine the communication link with the highest target matching degree as the target communication link.
[0014] Fourthly, a device for distributing equipment is provided, comprising: The distribution network record acquisition module is used to acquire local historical distribution network records after the device to be distributed establishes a connection with the target communication link, wherein the target communication link is determined based on the heterogeneous network communication link determination method described above. The same device identification module is used to determine whether the same type of devices are used for network distribution based on local historical network distribution records; The network configuration module for the device to be configured is used to configure the network for the device to be configured based on the latest network configuration information of the same type of device if the network configuration is specified. The network configuration information includes network configuration policy, authentication parameters and session key negotiation method.
[0015] Fifthly, a heterogeneous network communication link determination system is provided, comprising: At least one first processor and at least one first memory; The first memory stores the executable instructions of the first processor; The first processor is configured to perform the heterogeneous network communication link determination method described in any of the preceding claims.
[0016] Sixthly, a device distribution network system is provided, comprising: At least one second processor and at least one second memory; The second memory stores the executable instructions of the second processor; The second processor is configured to perform the device network configuration method described in any of the preceding embodiments.
[0017] Beneficial effects: This application provides a method for determining communication links in heterogeneous networks, a device for network configuration, an apparatus, and a system. The method determines the target matching degree of available paths based on evaluation metrics such as signal strength, response delay, and power consumption, selecting the communication link with the highest target matching degree as the target communication link. Specifically, the method calculates the weight and entropy value for standard signal strength, standard delay, and standard power consumption to obtain weights, determines the optimal and worst values for the weighted metrics, calculates the positive and negative ideal solution distances based on these values, and smooths the proximity at the current moment to obtain the smoothed proximity degree as the target matching degree, thereby suppressing fluctuations and making link selection more stable. During device network configuration, the method determines whether the device is of the same type or has been configured before based on local historical network configuration records; if so, the latest network configuration record is used directly to accelerate access. After network configuration is completed, message features are extracted, and the protocol type is automatically identified to improve device access efficiency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a method for determining heterogeneous network communication links provided in an embodiment of this application; Figure 2 This is a flowchart of the first method for determining the target matching degree of each available path based on the evaluation index provided in this application embodiment; Figure 3 This is a flowchart of a second method for determining the target matching degree of each available path based on the evaluation index provided in this application embodiment; Figure 4 This is a flowchart of a third method for determining the target matching degree of each available path based on the evaluation index provided in this application embodiment; Figure 5 This is a flowchart of a device network distribution method provided in an embodiment of this application; Figure 6 This is a flowchart of a device protocol active identification method provided in an embodiment of this application; Figure 7 This is a schematic diagram of a heterogeneous network communication link determination device provided in an embodiment of this application; Figure 8 This is a schematic diagram of a device distribution network structure provided in an embodiment of this application; Figure 9 This is a schematic diagram of a heterogeneous network communication link determination system provided in an embodiment of this application; Figure 10 This is a schematic diagram of a device distribution network system structure provided in an embodiment of this application; Figure 11 This is a general architecture diagram of a centralized control system provided in an embodiment of this application; Figure 12 This is a device access flowchart provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] As the core hub of the smart home system, the central controller undertakes key functions such as device access, protocol conversion, local control, and cloud communication. However, the heterogeneity of terminal devices and the barriers of proprietary protocols from various manufacturers pose significant challenges to access management and data standardization. Online solutions heavily rely on the cloud for command issuance and logical linkage, lacking the ability to register new devices offline; offline solutions are limited by the capacity of local protocol libraries, resulting in insufficient coverage of devices from multiple vendors. Furthermore, the lack of a memory-based reuse mechanism for network configuration leads to inefficient reconfiguration of similar devices. These bottlenecks severely restrict user experience optimization and global market expansion.
[0022] Patent CN119960569A discloses a portable modular edge AI smart home device that integrates an MCU, GPU, DSP main control board, and NPU edge computing module. It features a built-in lightweight AI model and privacy-de-identifying capabilities, enabling localized data processing and device control. However, this system uses a standard cloud authorization or local authentication process, requiring a complete authentication step for each network configuration, and lacks offline new device registration capabilities. Furthermore, the adaptive communication module can only identify and switch between "compatibility in different network environments," relying on the device's pre-built protocol library.
[0023] Patent CN113204332A proposes an automatic generation system for smart home device control programs. Through feature modeling, Bluetooth signal recognition and matching, templated program generation, and automatic testing, it automates device access and dynamically updates program templates, reducing development and maintenance costs. However, it primarily addresses the automation of device access on the development side (reducing manual driver writing) and relies on cloud computing and Bluetooth feature learning. Furthermore, it generates system-side control and management programs, requiring users to operate through existing apps or interfaces. Moreover, each recognition depends on a matching threshold; if the match is below the threshold, the feature model needs to be rebuilt, resulting in low efficiency.
[0024] The patented cross-platform multi-device network configuration method (CN119449927A) maintains a protocol configuration table mapping manufacturer codes to network configuration protocols on a public platform. It automatically matches the protocol and completes network configuration based on the manufacturer code broadcast by the device, then binds the user ID, simplifying the multi-platform, multi-device access process. However, this method relies on a pre-built "manufacturer code-protocol" mapping table in the cloud. If the manufacturer is not registered on the platform or the code is not entered, the device cannot be configured.
[0025] The patent with patent number CN118101791A constructs an IoT data processing system based on multi-protocol adaptive architecture. It integrates multi-protocol compatibility and fusion, adaptive access management, real-time data acquisition and processing, distributed storage, and API openness capabilities, improving device operability and protocol conversion accuracy, and supporting intelligent remote monitoring and decision-making. However, the visualization module's web page provides a visual and report-based display of device data, which falls under the category of traditional industrial monitoring dashboards.
[0026] Therefore, the existing technology has the following technical problems: Cloud-dependent issues causing unavailability without internet access Problem Description: Existing smart home central controllers heavily rely on cloud servers for device authentication, protocol matching, and logic execution. This results in the inability to complete new device registration, network configuration, and basic control in newly renovated environments without network access or in scenarios with network interruptions.
[0027] Low device compatibility issues caused by proprietary protocol barriers Problem description: Different manufacturers use proprietary communication protocols, and traditional gateways rely on pre-built whitelists or cloud protocol libraries, which makes it impossible to recognize long-tail devices that are not registered on the platform, resulting in low offline protocol coverage.
[0028] High interaction costs caused by fragmented control interfaces Problem description: Users need to download separate apps or use specific interfaces for different brand devices, resulting in fragmented control entry points and high learning costs.
[0029] Poor visualization experience caused by state-aware abstraction Problem description: Traditional offline solutions only provide two-dimensional text or icon status feedback, lacking intuitive perception of device operating status, making it difficult for users to understand the physical behavior of the device.
[0030] Low efficiency in batch deployment due to repetitive configuration Problem description: For each network configuration of similar devices, the entire discovery, authentication, and configuration process needs to be re-executed, and there is a lack of a mechanism for reusing historical experience, which results in excessively long deployment times.
[0031] To solve the above problems, refer to Figure 1 This application provides a method for determining heterogeneous network communication links, including: S11: Determine the available paths in all communication networks; The communication network includes various paths with different structures, including but not limited to Wi-Fi, Bluetooth BLE, Zigbee, Ethernet, and 5G communication.
[0032] To determine whether a path is available, you can check some basic but crucial indicators, such as: Physical layer connection status: Check whether the device's network card is enabled, whether the driver is normal, whether it can scan for network signals, and whether the physical connection (such as the network cable) is intact.
[0033] Signal Strength Threshold: Sets the minimum threshold for signal strength (RSSI) for different protocols. Only paths with signal strength above this threshold can be included in the candidate set of available paths. For example, for Zigbee, a signal quality (LQI) below a certain value (e.g., 60) may be considered unstable and therefore unusable.
[0034] Basic network connectivity: Test whether the gateway or critical server is reachable by sending ICMP Echo requests (i.e., ping) and obtain the round-trip time (RTT).
[0035] IP configuration validity: Check whether the device has correctly obtained the IP address, subnet mask, default gateway, etc., and confirm that there are no IP address conflicts.
[0036] S12: Obtain the evaluation metrics of the available paths, including signal strength, response delay, and power consumption; Signal strength (physical layer quality) represents the "stability and coverage" of the link. It directly determines the bit error rate and whether the connection will be frequently interrupted, and is the physical basis of communication.
[0037] Response latency (network layer efficiency) represents the "real-time performance and smoothness" of a link. For smart control in home scenarios (such as turning lights on and off, and door lock response), latency directly affects the user experience.
[0038] Power consumption (resource consumption) represents the "operating cost" of a link. Especially for battery-powered sensors or mobile devices, power consumption determines the device's battery life.
[0039] Using the above three evaluation indicators can improve communication speed and reduce operating costs while ensuring communication quality. It is a comprehensive consideration of the combined effects of quality, speed, and cost.
[0040] S13: Determine the target matching degree of each available path based on the evaluation index; Example 1:
[0041] like Figure 2 As shown, a method for determining the target matching degree of each available path based on the evaluation index is provided, including: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Obtain the best and worst values for each indicator; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness, , These are the ideal solution distance and the negative ideal solution distance, respectively. The relative closeness is taken as the target matching degree.
[0042] However, in Example 1, the three indicators are assigned equal weights by default, which cannot meet the needs of dynamically changing real-world application scenarios. Some examples also set fixed weights for the three indicators based on experience, but the results obtained with fixed weights in some extreme scenarios cannot meet actual requirements.
[0043] Therefore, this application proposes a second method in Embodiment 2 for determining the target matching degree of each available path based on the evaluation index.
[0044] Example 2:
[0045] like Figure 3 As shown, determining the target matching degree of each available path based on the evaluation index includes: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Based on the standard values of the target indicators, the weight of each indicator for each available path is obtained; the weight of the target indicator for the target available path = the standard value of the target indicator for the target available path / the sum of the standard values of the target indicators for all available paths; Calculate the information entropy of the indicator based on the stated proportion; , Let N be the information entropy, and N be the number of all available paths. The proportion of the target indicator; The weights of the target indicators are calculated based on the information entropy. , The weights of the target indicators; Based on the aforementioned weights, the corresponding standard signal strength, standard delay, and standard power consumption are weighted to obtain a weighted index; Obtain the best and worst values among the weighted indicators; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; , , , These are the ideal solution distance and the negative ideal solution distance, respectively. , These are the optimal value and the worst value, respectively. Let j be the weighted index value of the i-th available path; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness; The relative closeness is taken as the target matching degree.
[0046] This embodiment no longer relies on default equality or fixed weights based on human experience. Instead, it quantifies the effective information content of each indicator (signal strength, latency, power consumption) in this decision-making process through information entropy. This avoids the situation where key indicators are overwhelmed or amplified in specific scenarios due to improper human settings. Moreover, it can adapt to extreme scenarios, improving robustness. For example, in scenarios with extremely poor signal strength, the signal strength dispersion of each path is large (high distinguishability). The entropy weight method will automatically increase the weight of "signal strength" to select the path with the best signal. In scenarios with generally good signal strength but drastic latency fluctuations, the algorithm will automatically tilt the weight towards "response latency". This dynamic adjustment mechanism allows the evaluation results to adapt to actual working conditions, solving the problem of fixed weights "failing" in extreme scenarios. In addition, it can improve the distinguishability and accuracy of target matching. Since the positive ideal solution distance and negative ideal solution distance are calculated in the weighted data space, the relative proximity can better reflect the comprehensive advantages and disadvantages of each path in terms of "actual important indicators". This avoids the situation where the scores of each path are "clustered" and difficult to distinguish under equal weight processing, making the path ranking more in line with actual business needs.
[0047] However, in practical applications, the inventors of this application have found that in scenarios where network fluctuations are frequent, the above-mentioned scheme will cause frequent path switching. Based on this, this application proposes a third method in Embodiment 3 for determining the target matching degree of each available path based on the evaluation index: Example 3:
[0048] like Figure 4 As shown, determining the target matching degree of each available path based on the evaluation index includes: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Based on the standard values of the target indicators, the weight of each indicator for each available path is obtained; the weight of the target indicator for the target available path = the standard value of the target indicator for the target available path / the sum of the standard values of the target indicators for all available paths; Calculate the information entropy of the indicator based on the stated proportion; , Let N be the information entropy, and N be the number of all available paths. The proportion of the target indicator; The weights of the target indicators are calculated based on the information entropy. , The weights of the target indicators; Based on the aforementioned weights, the corresponding standard signal strength, standard delay, and standard power consumption are weighted to obtain a weighted index; Obtain the best and worst values among the weighted indicators; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; , , , These are the ideal solution distance and the negative ideal solution distance, respectively. , These are the optimal value and the worst value, respectively. Let j be the weighted index value of the i-th available path; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness; After obtaining the relative proximity, the proximity at the current moment is smoothed to obtain the smoothed proximity; the smoothed proximity = preset coefficient * proximity at the current moment + (1 - preset coefficient) * proximity at the previous moment. The smoothed proximity is used as the target matching degree.
[0049] The solution in Example 3, based on the solution in Example 2, introduces the proximity of the previous moment to smooth the proximity of the current moment, which effectively suppresses the drastic impact of instantaneous fluctuations on the evaluation results and avoids frequent path switching caused by instantaneous fluctuations. At the same time, it retains the trend tracking capability, and significantly improves the stability and continuity of path selection while taking into account the basic quality of the link, and significantly reduces switching overhead and service interruption risk.
[0050] S14: The communication link with the highest target matching degree is determined as the target communication link.
[0051] It should be noted that any process or method description in the flowchart or otherwise described herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which the embodiments of this application pertain.
[0052] Furthermore, in the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0053] The heterogeneous network communication link determination method provided in this application selects three core evaluation indicators—signal strength, response latency, and power consumption—to comprehensively evaluate path quality from three dimensions: stability, real-time performance, and operating cost, avoiding the limitations of single-indicator decision-making. Simultaneously, it uses information entropy to dynamically calculate the weights of each indicator, allowing the weights to automatically tilt towards indicators with greater information content and higher discriminative power based on actual operating conditions. For example, it emphasizes signal strength when the signal is poor and response latency when latency fluctuations are severe, effectively solving the problem of fixed weights or equal weighting failing in extreme scenarios and significantly improving scenario adaptability. Furthermore, by exponentially smoothing the proximity, it effectively filters out the drastic impact of instantaneous network fluctuations on the evaluation results, avoiding frequent switching of links under critical conditions, greatly improving the stability and continuity of path selection, and reducing switching overhead and service interruption risks. In summary, this application balances speed and cost while ensuring communication quality, and possesses good robustness and engineering practicality, enabling it to adapt to complex and ever-changing heterogeneous wireless network environments.
[0054] Based on the same inventive concept, such as Figure 5 As shown in the figure, this application provides a device network configuration method applied in an offline environment, the method comprising: S51: After the device to be configured on the network establishes a connection with the target communication link, the local historical network configuration record is obtained, wherein the target communication link is determined based on the heterogeneous network communication link determination method described above. S52: Determine whether the devices are of the same type for network distribution based on local historical network distribution records; It should be noted that in some embodiments, before determining whether the devices are of the same type for network distribution based on local historical network distribution records, the following steps are also included: Determine whether the device to be configured on the network is a device that has been configured on the network before, based on local historical network distribution records; If so, then network distribution is performed on the device to be distributed based on the latest network distribution record.
[0055] If not, proceed to step S52.
[0056] The identification mechanism for similar devices and devices previously configured in the network is primarily based on device fingerprints and network configuration history. For similar devices, the system extracts device fingerprint information by parsing device broadcast or protocol messages, including fields such as manufacturer identifier, product identifier, device type, and protocol type (Wi-Fi / BLE / Zigbee). These fingerprints are then matched against a predefined device type library. If a match is found, the device is identified as similar and the corresponding network configuration policy and default configuration can be applied. For devices previously configured in the network, the system obtains the device's MAC address or UUID and searches for it in the locally stored network configuration history. If a matching entry is found, the device is identified as previously configured, and the complete network configuration process is skipped, directly invoking the fast reconnection policy and restoring the historical configuration. If no match is found in the history, the system further checks the device fingerprint library to determine if it is a new device of the same type. If neither matches, the device is identified as entirely new, triggering the complete network configuration bootstrapping process. This hierarchical identification mechanism ensures both fast reconnection for devices previously configured in the network and differentiated processing for different types of devices.
[0057] S53: If so, then network configuration is performed on the device to be configured based on the latest network configuration information of the same type of device. The network configuration information includes network configuration strategy, authentication parameters and session key negotiation method.
[0058] If not, the system enters network discovery mode, searching for available devices in the vicinity via broadcast or scanning. When a new device is detected, its broadcast message is parsed to extract basic information (device name, MAC address, protocol type, etc.). Then, the system guides the user to confirm the device type (e.g., by scanning the device's QR code via a mobile app or manually selecting the device category). After user confirmation, the system enters the network configuration phase, where the gateway sends necessary parameters such as Wi-Fi SSID / password or network configuration key to the device. Next, after the device completes network access, the gateway establishes a connection with the device and registers and binds it, writing the device information (MAC, UUID, device type, room, etc.) into the local device list and updating the network configuration history. Finally, the gateway synchronously obtains the device's attribute list and capability description (such as supported function commands, sensor types, etc.) to complete the device initialization configuration. Throughout the entire network configuration process, for new, non-standard devices, the system will additionally require the user to manually specify the device type or perform device authentication to ensure that the device is correctly identified and matched with the appropriate control policy. Because different devices use different communication protocols, existing technologies require users to manually configure the communication protocol with the gateway or centralized controller after network configuration to complete device access. However, this method is slow. Therefore, this application provides a method for automatic device protocol identification and automatic access, such as... Figure 6 As shown, the automatic device protocol identification method includes: After the network distribution is completed, obtain the communication messages of the devices to be distributed. Extracting the time-series and spatial structure features of the message; The time series features are combined with the spatial structure features to obtain a high-dimensional vector; The high-dimensional vector is input into the local recognition model, which outputs the protocol type prediction and confidence level. If the confidence level is higher than the preset confidence level, it is determined that the device to be configured on the network adopts the target protocol type, wherein the target protocol type is the protocol type with the highest probability in the output protocol type prediction.
[0059] The device configuration method provided in this application significantly improves configuration efficiency and intelligence through a hierarchical identification mechanism: First, based on local historical configuration records, it quickly invokes reconnection strategies and restores historical configurations for previously configured devices, achieving "zero-awareness" second-level access; for similar new devices, it reuses the latest configuration strategies and authentication parameters, avoiding redundant configuration and significantly reducing user operation steps. Second, it introduces a complete boot process for new devices and uses device fingerprint matching to ensure accurate type identification, balancing flexibility and security. More importantly, after configuration is completed, it automatically predicts protocol types by extracting the time sequence and spatial structure features of communication messages and combining them with a local identification model, eliminating the need for users to manually configure communication protocols. This completely solves the problems of slow and error-prone device access in multi-protocol heterogeneous networks, achieving full automation from discovery and configuration to protocol adaptation. This lowers the barrier to entry and effectively improves the overall efficiency of batch device deployment and daily reconnection, making it suitable for multi-device hybrid networking scenarios such as smart homes and industrial IoT.
[0060] Based on the same inventive concept, such as Figure 7 As shown, this application provides a heterogeneous network communication link determination device 70, comprising: Available path determination module 71 is used to determine available paths in all communication networks; The communication network includes various paths with different structures, including but not limited to Wi-Fi, Bluetooth BLE, Zigbee, Ethernet, and 5G communication.
[0061] To determine whether a path is available, you can check some basic but crucial indicators, such as: Physical layer connection status: Check whether the device's network card is enabled, whether the driver is normal, whether it can scan for network signals, and whether the physical connection (such as the network cable) is intact.
[0062] Signal Strength Threshold: Sets the minimum threshold for signal strength (RSSI) for different protocols. Only paths with signal strength above this threshold can be included in the candidate set of available paths. For example, for Zigbee, a signal quality (LQI) below a certain value (e.g., 60) may be considered unstable and therefore unusable.
[0063] Basic network connectivity: Test whether the gateway or critical server is reachable by sending ICMP Echo requests (i.e., ping) and obtain the round-trip time (RTT).
[0064] IP configuration validity: Check whether the device has correctly obtained the IP address, subnet mask, default gateway, etc., and confirm that there are no IP address conflicts.
[0065] The path information acquisition module 72 is used to acquire the evaluation indicators of the available paths, including signal strength, response delay and power consumption. Signal strength (physical layer quality) represents the "stability and coverage" of the link. It directly determines the bit error rate and whether the connection will be frequently interrupted, and is the physical basis of communication.
[0066] Response latency (network layer efficiency) represents the "real-time performance and smoothness" of a link. For smart control in home scenarios (such as turning lights on and off, and door lock response), latency directly affects the user experience.
[0067] Power consumption (resource consumption) represents the "operating cost" of a link. Especially for battery-powered sensors or mobile devices, power consumption determines the device's battery life.
[0068] Using the above three evaluation indicators can improve communication speed and reduce operating costs while ensuring communication quality. It is a comprehensive consideration of the combined effects of quality, speed, and cost.
[0069] The target matching degree determination module 73 is used to determine the target matching degree of each available path based on the evaluation index; Example 1:
[0070] like Figure 2 As shown, a method for determining the target matching degree of each available path based on the evaluation index is provided, including: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Obtain the best and worst values for each indicator; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness, , These are the ideal solution distance and the negative ideal solution distance, respectively. The relative closeness is taken as the target matching degree.
[0071] However, in Example 1, the three indicators are assigned equal weights by default, which cannot meet the needs of dynamically changing real-world application scenarios. Some examples also set fixed weights for the three indicators based on experience, but the results obtained with fixed weights in some extreme scenarios cannot meet actual requirements.
[0072] Therefore, this application proposes a second method in Embodiment 2 for determining the target matching degree of each available path based on the evaluation index.
[0073] Example 2:
[0074] like Figure 3 As shown, determining the target matching degree of each available path based on the evaluation index includes: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Based on the standard values of the target indicators, the weight of each indicator for each available path is obtained; the weight of the target indicator for the target available path = the standard value of the target indicator for the target available path / the sum of the standard values of the target indicators for all available paths; Calculate the information entropy of the indicator based on the stated proportion; , Let N be the information entropy, and N be the number of all available paths. The proportion of the target indicator; The weights of the target indicators are calculated based on the information entropy. , The weights of the target indicators; Based on the aforementioned weights, the corresponding standard signal strength, standard delay, and standard power consumption are weighted to obtain a weighted index; Obtain the best and worst values among the weighted indicators; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; , , , These are the ideal solution distance and the negative ideal solution distance, respectively. , These are the optimal value and the worst value, respectively. Let j be the weighted index value of the i-th available path; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness; The relative closeness is taken as the target matching degree.
[0075] This embodiment no longer relies on default equality or fixed weights based on human experience. Instead, it quantifies the effective information content of each indicator (signal strength, latency, power consumption) in this decision-making process through information entropy. This avoids the situation where key indicators are overwhelmed or amplified in specific scenarios due to improper human settings. Moreover, it can adapt to extreme scenarios, improving robustness. For example, in scenarios with extremely poor signal strength, the signal strength dispersion of each path is large (high distinguishability). The entropy weight method will automatically increase the weight of "signal strength" to select the path with the best signal. In scenarios with generally good signal strength but drastic latency fluctuations, the algorithm will automatically tilt the weight towards "response latency". This dynamic adjustment mechanism allows the evaluation results to adapt to actual working conditions, solving the problem of fixed weights "failing" in extreme scenarios. In addition, it can improve the distinguishability and accuracy of target matching. Since the positive ideal solution distance and negative ideal solution distance are calculated in the weighted data space, the relative proximity can better reflect the comprehensive advantages and disadvantages of each path in terms of "actual important indicators". This avoids the situation where the scores of each path are "clustered" and difficult to distinguish under equal weight processing, making the path ranking more in line with actual business needs.
[0076] However, in practical applications, the inventors of this application have found that in scenarios where network fluctuations are frequent, the above-mentioned scheme will cause frequent path switching. Based on this, this application proposes a third method in Embodiment 3 for determining the target matching degree of each available path based on the evaluation index: Example 3:
[0077] like Figure 4 As shown, determining the target matching degree of each available path based on the evaluation index includes: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Based on the standard values of the target indicators, the weight of each indicator for each available path is obtained; the weight of the target indicator for the target available path = the standard value of the target indicator for the target available path / the sum of the standard values of the target indicators for all available paths; Calculate the information entropy of the indicator based on the stated proportion; , Let N be the information entropy, and N be the number of all available paths. The proportion of the target indicator; The weights of the target indicators are calculated based on the information entropy. , The weights of the target indicators; Based on the aforementioned weights, the corresponding standard signal strength, standard delay, and standard power consumption are weighted to obtain a weighted index; Obtain the best and worst values among the weighted indicators; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; , , , These are the ideal solution distance and the negative ideal solution distance, respectively. , These are the optimal value and the worst value, respectively. Let j be the weighted index value of the i-th available path; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness; After obtaining the relative proximity, the proximity at the current moment is smoothed to obtain the smoothed proximity; the smoothed proximity = preset coefficient * proximity at the current moment + (1 - preset coefficient) * proximity at the previous moment. The smoothed proximity is used as the target matching degree.
[0078] The solution in Example 3, based on the solution in Example 2, introduces the proximity of the previous moment to smooth the proximity of the current moment, which effectively suppresses the drastic impact of instantaneous fluctuations on the evaluation results and avoids frequent path switching caused by instantaneous fluctuations. At the same time, it retains the trend tracking capability, and significantly improves the stability and continuity of path selection while taking into account the basic quality of the link, and significantly reduces switching overhead and service interruption risk.
[0079] The communication link determination module 74 is used to determine the communication link with the highest target matching degree as the target communication link.
[0080] The heterogeneous network communication link determination device provided in this application comprehensively evaluates path quality from three dimensions—stability, real-time performance, and operating cost—by selecting three core evaluation indicators: signal strength, response latency, and power consumption, thus avoiding the limitations of single-indicator decision-making. Simultaneously, it uses information entropy to dynamically calculate the weights of each indicator, allowing the weights to automatically tilt towards indicators with greater information content and higher discriminative power based on actual operating conditions. For example, it emphasizes signal strength when the signal is poor and response latency when latency fluctuations are severe, effectively solving the problem of fixed weights or equal weighting failing in extreme scenarios and significantly improving scenario adaptability. Furthermore, by exponentially smoothing the proximity, it effectively filters out the drastic impact of instantaneous network fluctuations on the evaluation results, avoiding frequent link switching under critical conditions, greatly improving the stability and continuity of path selection, and reducing switching overhead and service interruption risks. In summary, this application balances speed and cost while ensuring communication quality, and possesses good robustness and engineering practicality, enabling it to adapt to complex and ever-changing heterogeneous wireless network environments.
[0081] Based on the same inventive concept, such as Figure 8 As shown, this application provides a device distribution network device 80, comprising: Distribution network record acquisition module 81 is used to acquire local historical distribution network records after the device to be distributed establishes a connection with the target communication link, wherein the target communication link is determined based on the heterogeneous network communication link determination method described above. The same device judgment module 82 is used to determine whether the devices are of the same type for network distribution based on local historical network distribution records; It should be noted that in some embodiments, before determining whether the devices are of the same type for network distribution based on local historical network distribution records, the following steps are also included: Determine whether the device to be configured on the network is a device that has been configured on the network before, based on local historical network distribution records; If so, then network distribution is performed on the device to be distributed based on the latest network distribution record.
[0082] If not, proceed to step S52.
[0083] The identification mechanism for similar devices and devices previously configured in the network is primarily based on device fingerprints and network configuration history. For similar devices, the system extracts device fingerprint information by parsing device broadcast or protocol messages, including fields such as manufacturer identifier, product identifier, device type, and protocol type (Wi-Fi / BLE / Zigbee). These fingerprints are then matched against a predefined device type library. If a match is found, the device is identified as similar and the corresponding network configuration policy and default configuration can be applied. For devices previously configured in the network, the system obtains the device's MAC address or UUID and searches for it in the locally stored network configuration history. If a matching entry is found, the device is identified as previously configured, and the complete network configuration process is skipped, directly invoking the fast reconnection policy and restoring the historical configuration. If no match is found in the history, the system further checks the device fingerprint library to determine if it is a new device of the same type. If neither matches, the device is identified as entirely new, triggering the complete network configuration bootstrapping process. This hierarchical identification mechanism ensures both fast reconnection for devices previously configured in the network and differentiated processing for different types of devices.
[0084] The network configuration module 83 for the device to be configured is used to configure the network for the device to be configured based on the latest network configuration information of the same type of device if the network configuration is true. The network configuration information includes network configuration strategy, authentication parameters and session key negotiation method.
[0085] If not, the system enters network discovery mode, searching for available devices in the vicinity via broadcast or scanning. When a new device is detected, its broadcast message is parsed to extract basic information (device name, MAC address, protocol type, etc.). Then, the system guides the user to confirm the device type (e.g., by scanning the device's QR code via a mobile app or manually selecting the device category). After user confirmation, the system enters the network configuration phase, where the gateway sends necessary parameters such as Wi-Fi SSID / password or network configuration key to the device. Next, after the device completes network access, the gateway establishes a connection with the device and registers and binds it, writing the device information (MAC, UUID, device type, room, etc.) into the local device list and updating the network configuration history. Finally, the gateway synchronously obtains the device's attribute list and capability description (such as supported function commands, sensor types, etc.) to complete the device initialization configuration. Throughout the entire network configuration process, for new, non-standard devices, the system will additionally require the user to manually specify the device type or perform device authentication to ensure that the device is correctly identified and matched with the appropriate control policy. Because different devices use different communication protocols, existing technologies require users to manually configure the communication protocol with the gateway or centralized controller after network configuration to complete device access. However, this method is slow. Therefore, this application provides a method for automatic device protocol identification and automatic access, such as... Figure 6 As shown, the automatic device protocol identification method includes: After the network distribution is completed, obtain the communication messages of the devices to be distributed. Extracting the time-series and spatial structure features of the message; The time series features are combined with the spatial structure features to obtain a high-dimensional vector; The high-dimensional vector is input into the local recognition model, which outputs the protocol type prediction and confidence level. If the confidence level is higher than the preset confidence level, it is determined that the device to be configured on the network adopts the target protocol type, wherein the target protocol type is the protocol type with the highest probability in the output protocol type prediction.
[0086] The device configuration device provided in this application significantly improves configuration efficiency and intelligence through a hierarchical identification mechanism: First, based on local historical configuration records, it quickly invokes reconnection strategies and restores historical configurations for previously configured devices, achieving "zero-perception" second-level access; for similar new devices, it reuses the latest configuration strategies and authentication parameters, avoiding redundant configuration and significantly reducing user operation steps. Second, it introduces a complete boot process for new devices and uses device fingerprint matching to ensure accurate type identification, balancing flexibility and security. More importantly, after configuration is completed, it automatically predicts the protocol type by extracting the time sequence and spatial structure features of communication messages and combining them with a local identification model, eliminating the need for users to manually configure communication protocols. This completely solves the problems of slow and error-prone device access in multi-protocol heterogeneous networks, achieving full automation from discovery and configuration to protocol adaptation. This lowers the barrier to entry and effectively improves the overall efficiency of batch deployment and daily reconnection of devices, making it suitable for multi-device hybrid networking scenarios such as smart homes and industrial IoT.
[0087] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the heterogeneous network communication link determination method provided in any of the above embodiments or the steps of the device network configuration method provided in any of the above embodiments.
[0088] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0089] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0090] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0091] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0092] The computer-readable storage medium provided in this application embodiment stores a computer program. When executed by a processor, the computer program implements the steps of the heterogeneous network communication link determination method provided in any of the above embodiments, or the steps of the device network configuration method provided in any of the above embodiments. This method determines the target matching degree of available paths based on evaluation metrics such as signal strength, response delay, and power consumption, and selects the communication link with the highest target matching degree as the target communication link. Specifically, the weights and entropy values of standard signal strength, standard delay, and standard power consumption are calculated to obtain weights. The optimal and worst values of the weighted metrics are determined, and the positive and negative ideal solution distances are calculated accordingly. The proximity at the current moment is smoothed to obtain a smoothed proximity degree as the target matching degree, thereby suppressing fluctuations and making link selection more stable. During device network configuration, the system determines whether the device is of the same type or has been configured before based on local historical network configuration records. If so, the latest network configuration record is used directly to accelerate access. After network configuration is completed, message features are extracted, and the protocol type is automatically identified to improve device access efficiency.
[0093] Based on the same inventive concept, such as Figure 9 As shown, this application also provides a heterogeneous network communication link determination system 90, comprising: At least one first processor 91 and at least one first memory 92; The first memory stores the executable instructions of the first processor; The first processor is configured to execute the heterogeneous network communication link determination method provided in the above embodiments.
[0094] The heterogeneous network communication link determination system provided in this application stores executable instructions of a first processor in a first memory. When these instructions are executed, the first processor can comprehensively evaluate the path's merits from three dimensions: stability, real-time performance, and operating cost by selecting three core evaluation indicators: signal strength, response latency, and power consumption. This avoids the limitations of single-indicator decision-making. Simultaneously, it uses information entropy to dynamically calculate the weights of each indicator, allowing the weights to automatically tilt towards indicators with greater information content and higher discriminative power based on actual operating conditions. For example, it emphasizes signal strength when the signal is poor and response latency when latency fluctuations are severe. This effectively solves the problem of fixed weights or equal weighting failing in extreme scenarios, significantly improving scenario adaptability. Furthermore, by exponentially smoothing the proximity, it effectively filters out the drastic impact of instantaneous network fluctuations on the evaluation results, avoiding frequent switching of links under critical conditions. This greatly improves the stability and continuity of path selection, reducing switching overhead and service interruption risks. In summary, this application balances speed and cost while ensuring communication quality, and possesses good robustness and engineering practicality, enabling it to adapt to complex and ever-changing heterogeneous wireless network environments.
[0095] Based on the same inventive concept, such as Figure 10 As shown, this application also provides a device distribution network system 100, including: At least one second processor 101 and at least one second memory 102; The second memory stores the executable instructions of the second processor; The second processor is configured to execute the device network configuration method provided in the above embodiments.
[0096] The device configuration system provided in this application embodiment stores the executable instructions of the second processor in a second memory. When the executable instructions are executed, the second processor can significantly improve the configuration efficiency and intelligence level through a hierarchical identification mechanism: First, based on local historical configuration records, it quickly invokes the reconnection strategy and restores the historical configuration for previously configured devices, achieving "zero-perception" second-level access; for similar new devices, it reuses the latest configuration strategy and authentication parameters to avoid repeated configuration and greatly reduce user operation steps. Second, it introduces a complete boot process for new devices and uses device fingerprint matching to ensure accurate type identification, balancing flexibility and security. More importantly, after configuration is completed, by extracting the time sequence and spatial structure features of communication messages and combining them with a local identification model, it automatically predicts the protocol type, eliminating the need for users to manually configure communication protocols. This completely solves the problems of slow and error-prone device access in multi-protocol heterogeneous networks, realizing full-process automation from discovery and configuration to protocol adaptation. This not only lowers the usage threshold but also effectively improves the overall efficiency of batch deployment and daily reconnection of devices, making it suitable for multi-device hybrid networking scenarios such as smart homes and industrial IoT.
[0097] To more clearly illustrate the solution of this application, this application provides a centralized control system that constructs a cloud-edge collaborative architecture, such as... Figure 11 As shown, it consists of a home central controller (edge terminal) and a cloud server; the edge terminal integrates the application service layer, core algorithm layer, data layer and communication access layer, and supports multi-mode access such as Wi-Fi / BLE / Zigbee / Ethernet / 5G.
[0098] Device access process as follows Figure 12 As shown, it includes: Step 1: Heterogeneous Network Sensing and Path Selection After the home central controller is powered on, it activates the heterogeneous network sensing module to scan the signal status of Wi-Fi, Bluetooth BLE, Zigbee, Ethernet, and 5G communication interfaces in parallel. The system uses algorithms to comprehensively evaluate the signal strength, response latency, and power consumption of each available path, dynamically selecting the primary and backup network paths. This step ensures that even in complex electromagnetic environments or under single network failure conditions, the device can still establish an initial connection through the optimal physical link, providing a stable communication foundation for subsequent network distribution processes.
[0099] The specific algorithm implementation is as follows: Constructing a data matrix Suppose that N available paths are detected at a certain moment (e.g., strong Wi-Fi signal but high power consumption, low power consumption Zigbee but requires multiple hops), construct the original data matrix:
[0100] in: : Signal strength of the i-th path; : Response latency of the i-th path; The power consumption of the i-th path; N is the number of available paths.
[0101] Standardized processing Signal strength standardization:
[0102] j is one of 1, 2, or 3, and here j is 1; Latency and power consumption standardization:
[0103] j is one of 1, 2, or 3, and here j is either 2 or 3; Calculate the proportion of indicators
[0104] Calculate information entropy
[0105] Calculate weights
[0106] Weighted normalization matrix
[0107] Determine the positive and negative ideal solutions Positive ideal solution (optimal values for each index):
[0108] Negative ideal solution (worst values for each indicator):
[0109] Calculate distance Distance to the ideal solution:
[0110] Distance to the negative ideal solution:
[0111] Calculate relative proximity
[0112] The value range is [0, 1], and the closer it is to 1, the better the path is.
[0113] To avoid frequent path switching caused by instantaneous network fluctuations, proximity is smoothed in a timely manner.
[0114] in: The relative proximity of the i-th path at time t, i.e., the target matching degree; The original relative proximity of the i-th path at time t; Smoothing coefficient, set according to actual needs.
[0115] Then, all available paths are sorted from highest to lowest target matching degree. If the system is running for the first time (without a current primary path), the path with the highest target matching degree is directly selected as the primary path, and the path with the second highest target matching degree is selected as the backup path. If the system already has a primary path, a switching decision is made: when the target matching degree difference between the path with the highest target matching degree and the current primary path exceeds the switching threshold Δ (recommended value 0.15), a path switch is triggered, switching to the path with the highest target matching degree as the new primary path, and simultaneously selecting a new path with the second highest target matching degree as the backup path. If the target matching degree difference does not exceed the threshold or the current primary path is still available, the current primary path remains unchanged, and the backup path remains the path with the second highest target matching degree. In addition, when the current primary path is unavailable (connection broken), the system will forcibly switch to the available path with the highest target matching degree to ensure communication continuity. The entire process balances optimal target matching degree and switching stability, avoiding frequent switching caused by instantaneous network fluctuations, and adjusting paths in a timely manner when network quality deteriorates significantly to ensure communication quality.
[0116] Step 2: Memory-based continuous distribution network After establishing a physical connection, the system immediately retrieves the local historical network distribution record database and compares the fingerprint characteristics of the current device with the locally stored historical records. This historical network distribution record database uses local persistent storage and includes device fingerprints, network distribution policies, authentication parameters, session key negotiation methods, and protocol configuration information, enabling independent retrieval and reuse without relying on the cloud.
[0117] If the system identifies a device as similar to another device or one that has previously been configured with the network, it prioritizes reusing the most recently successful configuration strategy, authentication parameters, and session key negotiation method, skipping redundant discovery and negotiation steps to achieve continuous offline configuration with memory. This mechanism ensures efficient deployment of batch devices even in network-free environments, significantly reducing the number of interactions and waiting time when configuring similar devices repeatedly. The memory strategy supports the accumulation of configuration experience across multiple generations of devices; the more configurations performed, the richer the local policy library, and the higher the efficiency of subsequent configurations. This is particularly suitable for scenarios involving the expansion of batch smart home devices and offline delivery.
[0118] The identification mechanism for similar devices and devices previously configured in the network is primarily based on device fingerprints and network configuration history. For similar devices, the system extracts device fingerprint information by parsing device broadcast or protocol messages, including fields such as manufacturer identifier, product identifier, device type, and protocol type (Wi-Fi / BLE / Zigbee). These fingerprints are then matched against a predefined device type library. If a match is found, the device is identified as similar and the corresponding network configuration policy and default configuration can be applied. For devices previously configured in the network, the system obtains the device's MAC address or UUID and searches for it in the locally stored network configuration history. If a matching entry is found, the device is identified as previously configured, and the complete network configuration process is skipped, directly invoking the fast reconnection policy and restoring the historical configuration. If no match is found in the history, the system further checks the device fingerprint library to determine if it is a new device of the same type. If neither matches, the device is identified as entirely new, triggering the complete network configuration bootstrapping process. This hierarchical identification mechanism ensures both fast reconnection for devices previously configured in the network and differentiated processing for different types of devices.
[0119] Furthermore, the network configuration process for newly configured devices of different types is as follows: First, the system enters network discovery mode, searching for available devices in the vicinity via broadcast or scanning. When a new device is detected, its broadcast message is parsed to extract basic information (device name, MAC address, protocol type, etc.). Then, the system guides the user to confirm the device type (e.g., by scanning the device's QR code via a mobile app or manually selecting the device category). After user confirmation, the system enters the network configuration phase, where the gateway sends necessary parameters such as Wi-Fi SSID / password or network configuration key to the device. Next, after the device completes network access, the gateway establishes a connection with the device and registers and binds it, writing the device information (MAC, UUID, device type, room, etc.) into the local device list and updating the network configuration history. Finally, the gateway synchronously obtains the device's attribute list and capability description (such as supported function commands, sensor types, etc.) to complete the device initialization configuration. Throughout the entire network configuration process, for brand-new, non-type devices, the system will additionally require the user to manually specify the device type or perform device authentication to ensure that the device is correctly identified and matched with the corresponding control policy.
[0120] Step 3: AI Protocol Inference and User Private Protocol Support The system reads device communication packets based on physical connections and calls a local lightweight Transformer model to perform protocol semantic reasoning. If the model's confidence level is higher than a preset threshold, it automatically matches and adapts to the appropriate protocol; if the confidence level is lower than the threshold or it is a completely proprietary protocol, the system supports receiving user-provided custom protocol files via USB, APP transfer, or local area network sharing. The edge AI protocol parsing model then extracts the instruction set and parameter mapping relationship, generates standardized protocol metadata, and stores it in a local knowledge base to ensure seamless access for heterogeneous devices and long-tail devices.
[0121] The core objective of the AI protocol inference system is to achieve automatic identification and seamless access for heterogeneous and long-tail devices. The system adopts an architecture of "edge AI inference + local knowledge base," where all protocol inference processes are executed locally, without relying on cloud services, thus ensuring real-time data transmission and user privacy. The system workflow mainly includes five stages: communication message acquisition, feature extraction and vectorization, Transformer model inference, inference result post-processing, and protocol metadata storage. When a device connects to the gateway and begins communication, the system passively listens to or actively probes the device's messages, extracting the time-series and spatial structure features of the messages. These features are combined into high-dimensional vectors and input into a lightweight Transformer model. The model outputs protocol type prediction, confidence score, instruction mapping relationship, and parameter parsing rules. If the model confidence score is higher than a preset threshold (usually set to 0.8), the system automatically writes the inference results into the local knowledge base; if the confidence score is lower than the threshold, the system guides the user to provide a custom protocol file or enter manual configuration mode.
[0122] Communication message acquisition and preprocessing Message acquisition is the starting point for protocol inference. The system acquires device communication data in two ways: passive listening mode and active probing mode. Passive listening mode is suitable for devices with established communication links. The gateway captures communication messages between the device and the cloud or mobile app at the data link layer or application layer. This requires the gateway to have corresponding protocol stack parsing capabilities, enabling it to identify and extract common application layer protocol payloads such as HTTP, MQTT, and CoAP. Active probing mode is suitable for devices that are not network-configured or are in a network-configured state. The gateway sends specific probe commands to the device, inducing the device to reply with response messages containing protocol characteristic information.
[0123] The collected raw messages are typically binary byte streams, which the system needs to preprocess before inputting into the model. Preprocessing steps include byte sequence standardization, field segmentation, and annotation. First, messages of varying lengths are uniformly processed into fixed-length sequences. Messages that are too short are padded with zero vectors at the end, while excessively long messages are truncated or sampled using a sliding window. Then, based on the common structural features of the protocol (such as header, data area, and checksum), the messages are segmented, and structural information such as byte length, position offset, and data type of each field is extracted. Finally, the segmentation results are converted into a token sequence format acceptable to the model, where each token represents a protocol field or a byte sequence with a specific meaning.
[0124] Extracting Protocol Features Feature engineering is a crucial step affecting the model's inference performance. The system extracts two types of features from the message: spatial structure features and temporal behavior features. Spatial structure features describe the layout and value patterns of various fields within a single frame of the message, including the total message length, header identifier, command code distribution, checksum location and algorithm, and the data type and value range of parameter fields. These features can be obtained through statistical analysis of a large number of messages from similar devices.
[0125] Timing behavior features describe the temporal correlation characteristics between multiple message frames, including the mean and variance of message transmission intervals, burst transmission modes, the latency relationship between commands and responses, and the response latency to device state changes. Devices from different manufacturers often exhibit significant differences in timing behavior. For example, some devices require control commands to be sent consecutively for three frames at fixed 50-millisecond intervals to take effect, while others use a synchronous "question-response" mode. By extracting these timing features and combining them with spatial structure features, the model can more comprehensively characterize the device's protocol behavior patterns.
[0126] After feature extraction, the system maps all features into high-dimensional vectors. Spatial structure features are converted into dense vector representations through an embedding layer, while temporal features are encoded into temporal vectors through one-dimensional convolution or recurrent neural networks. The two types of vectors are concatenated (directly joined end-to-end) to form the final input vector, whose dimension is usually between 256 and 512 to adapt to the computing power constraints of edge devices.
[0127] Lightweight Transformer Model Design The model employs a lightweight Transformer architecture optimized for edge inference, minimizing the number of parameters and computational complexity while maintaining inference accuracy. The overall model structure consists of three parts: an encoder layer, an attention aggregation layer, and an output layer. The encoder layer is responsible for performing preliminary semantic encoding on the input feature vectors, using a multi-layer feedforward neural network combined with layer normalization and residual connections. Each layer contains one linear transformation layer, one activation function, and another linear transformation layer. The attention aggregation layer is the core component of the Transformer, modeling the dependencies between different protocol fields through a multi-head self-attention mechanism, such as the association between instruction codes and parameter fields, and the association between packet headers and data areas.
[0128] To adapt to edge deployment requirements, the model adopts the following optimization strategies: First, knowledge distillation is used to transfer knowledge from the large model to the small model, and the number of parameters in the distilled student model can be controlled between 1M and 5M; second, INT8 quantization is used to convert floating-point parameters into 8-bit integers (considering that the model parameter range of this system is relatively small and needs to be deployed at the edge, although converting 32-bit floating-point numbers (FP32) to 8-bit integers (INT8) will bring some precision loss, it can reduce the model size and improve inference ability). The quantized model size is reduced by about 4 times, and the inference speed is increased by 2 to 3 times; finally, the number of model layers is usually set to 2 to 4, the hidden layer dimension is 128 to 256, and the number of heads is set to 2 to 4, so as to achieve a balance between inference performance and computing power consumption.
[0129] The model is trained using a strategy combining contrastive learning and multi-task learning. Contrastive learning clusters message features of similar protocols in the vector space, while separating features of different protocol types. Multi-task learning simultaneously trains the protocol classification task and the instruction mapping task, enabling the model to output both protocol type and instruction relationship simultaneously. The training data comes from publicly available protocol datasets, vendor SDK documentation parsing, and packet captures from actual device communication, and is a cleaned and labeled training corpus.
[0130] Reasoning process and confidence level determination Once the device communication message is input into the model, the inference process sequentially goes through three stages: feature extraction, model forward propagation, and result parsing. The feature extraction module converts the original message into a standardized feature vector, which is then input into the quantized Transformer model for forward computation. The model outputs a result structure containing the protocol type probability distribution, instruction mapping relationships, and auxiliary information. The auxiliary information is supplementary metadata (time consumption, quality score, entropy value, etc.) used to improve interpretability and traceability, rather than parameter parsing rules.
[0131] The protocol type probability distribution is a vector of length M, where M is the total number of protocol types supported by the system. Each element in the vector represents the probability that the input message belongs to the corresponding protocol type. The confidence score is taken from the maximum value in the probability distribution, which is the probability value corresponding to the most likely protocol type as determined by the model. When the confidence score is higher than a preset threshold (usually 0.8), the system considers the inference result reliable and automatically adopts that protocol type for subsequent parsing. When the confidence score is between the threshold and 0.5, the system determines it as low-confidence inference, outputs the protocol type but marks it as "pending confirmation," prompting the user for manual confirmation. When the confidence score is lower than 0.5, the system determines it as an unknown protocol, refuses automatic matching, and enters the user's private protocol processing flow. In addition to the protocol type, the model also outputs the instruction mapping relationship and parameter parsing rules. The instruction mapping relationship is a set of key-value pairs describing the correspondence between instruction codes and functions. The instruction mapping relationship refers to the set of key-value pairs that establishes a correspondence between instruction codes (binary or hexadecimal values) in device communication messages and specific functional actions. It is used to implement semantic control and protocol-independent forwarding. For example, if an upper-layer application (App / voice) sends semantic function commands (such as "turn_on"), the command mapping will convert them into the corresponding command codes of the device, thus decoupling the application layer from the device layer. Parameter parsing rules are a set of structured rules describing how to extract, parse, and verify each parameter field from device communication messages, including information such as field position offset, data type, value range, and unit. They are used to achieve correct data parsing, input validation, and automatic interface generation. For example, the type, range, and unit information in the parameter parsing rules can be directly used to generate corresponding interface controls (numerical boxes / slider / dropdown lists) to achieve automated UI adaptation. Another example is that during data parsing, when a user sets a temperature, the system needs to verify the input based on the parameter range [16, 30] to reject invalid values outside the range, protecting device safety. Command mapping relationships and parameter parsing rules support the system in achieving a complete chain from protocol recognition to semantic understanding to control execution.
[0132] User private protocol support When the model confidence level falls below a threshold or the device uses a fully proprietary protocol, the system enters a user-private protocol support mode. This mode provides three protocol import methods: importing protocol definition files via USB interface, uploading protocol configuration files via a mobile app, and obtaining protocol packets via a shared directory on a local area network. The protocol file format uses standardized JSON or XML definitions and mainly includes information such as protocol name, instruction code mapping table, parameter definitions, and byte order rules.
[0133] After the user imports the protocol file, the system calls the protocol parsing module to read the file content, extract the instruction set and parameter mapping relationship, and generate a standardized protocol metadata structure. This metadata is consistent with the metadata structure generated by AI inference, so it can be uniformly stored in the local knowledge base for direct access by subsequent devices. This hybrid mode of "AI inference + user supplementation" ensures the automatic recognition efficiency of mainstream devices while also taking into account the flexible access needs of long-tail devices and private devices.
[0134] Local knowledge base management The local knowledge base is a crucial infrastructure for the protocol inference system, storing the type definitions, command mappings, parameter parsing rules, and device instance information of identified protocols. The knowledge base is implemented using a key-value database or embedded SQLite, supporting efficient query and update operations. Once the AI model successfully infers protocol metadata, the system writes it to the knowledge base and associates it with the corresponding device. In subsequent communications, the system prioritizes retrieving the stored protocol configuration from the knowledge base to avoid redundant inference overhead.
[0135] The knowledge base also features version management and incremental update capabilities. When the same device communicates multiple times and accumulates more message samples, the system can trigger incremental model learning or manual correction, overwriting the old version with the updated protocol metadata. Furthermore, the knowledge base supports export and import functions, allowing users to export debugged protocol configurations as independent files for deployment on other gateways, achieving the reuse and sharing of protocol knowledge.
[0136] Step 4: AI automatically generates interactive interfaces and digital twins. Based on the parsed protocol metadata, the system drives the local AI UI generation model to automatically map control commands and state parameters, generate an interactive interface containing native controls such as switches, sliders, selectors, and numerical adjusters, and prioritizes the reuse of similar templates in the interface template library to shorten the generation time.
[0137] Meanwhile, the digital twin modeling engine allows users to upload 2D CAD drawings or 3D building information models of buildings via a local touchscreen or mobile app. The engine automatically parses the building's structural information (room division, door and window locations, equipment installation points) and generates a 3D visualization scene of the building in the local rendering engine. After a new smart device is successfully connected to the network, users can choose to embed the device's 3D model assets (such as smart lights, air conditioners, curtain motors, and smart door locks) into the corresponding location in the 3D scene. The system automatically establishes a mapping relationship between the device's protocol status parameters and the 3D model's animation nodes. Protocol status parameters (such as on / off status, brightness values, temperature settings, and curtain opening / closing ratios) drive the material changes, animation playback, and numerical annotations of the 3D model in real time, presenting the building's 3D visualization status in the local rendering engine. This enables immediate control upon network connection completion and intuitive status perception, significantly improving human-computer interaction efficiency and operational experience.
[0138] Step 5: Cloud-edge two-way synchronization After local network configuration and control processes are completed, if network connectivity is detected, the system initiates a cloud-edge bidirectional synchronization mechanism. The edge device digitally signs and encrypts the newly added protocol metadata using its device certificate, then uploads it to the cloud's global protocol library. Once verified by the cloud, the global policy is updated and distributed to other gateway nodes, enabling edge protocols to feed back into the cloud and sharing protocols across multiple gateways. This step ensures that locally developed innovative protocols can be securely integrated into the ecosystem, supporting unified management and operation of large-scale devices.
[0139] This solution achieves full offline automation of smart home devices from network configuration to control: users can complete all network configuration operations without connecting to the internet after purchasing new devices; a dedicated control interface is automatically generated instantly upon completion of network configuration, eliminating the need to download a third-party app; the digital twin model provides real-time 3D visualization of device operating status, significantly improving the intuitiveness of human-computer interaction and operational efficiency; it shortens the network configuration time for similar devices and increases the offline coverage of the protocol library; newly added protocols at the edge can be securely transmitted back to the cloud, supporting multi-gateway protocol sharing and ecosystem unification; all data processing and key negotiation are completed locally, complying with cybersecurity regulations regarding offline processing, minimal data collection, and local trust chains, significantly enhancing the product's global compliance and export competitiveness; it is the industry's first end-to-end solution covering the entire chain of 'offline discovery - intelligent protocol matching - custom protocol injection - AI interface generation - memory reuse - secure transmission - 3D twin presentation - cloud-edge closed-loop synchronization', truly achieving the ultimate user experience of 'buy and use'.
[0140] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0141] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means at least two.
[0142] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for determining communication links in heterogeneous networks, characterized in that, include: Determine available paths in all communication networks; The evaluation metrics for the available paths are obtained, including signal strength, response latency, and power consumption. The target matching degree of each available path is determined based on the evaluation indicators. The communication link with the highest target matching degree is identified as the target communication link.
2. The method according to claim 1, characterized in that: Determining the target matching degree of each available path based on the evaluation index includes: The signal strength, response delay, and power consumption are standardized to obtain standard values for the target indicators of each available path. The standard values include standard signal strength, standard delay, and standard power consumption. Based on the standard values of the target indicators, the weight of each indicator for each available path is obtained; the weight of the target indicator for the target available path = the standard value of the target indicator for the target available path / the sum of the standard values of the target indicators for all available paths; Calculate the information entropy of the indicator based on the stated proportion; , Let N be the information entropy, and N be the number of all available paths. The proportion of the target indicator; The weights of the target indicators are calculated based on the information entropy. , The weights of the target indicators; Based on the aforementioned weights, the corresponding standard signal strength, standard delay, and standard power consumption are weighted to obtain a weighted index; Obtain the best and worst values among the weighted indicators; Calculate the positive ideal solution distance and negative ideal solution distance for each available path based on the optimal value and the worst value, respectively; , , , These are the ideal solution distance and the negative ideal solution distance, respectively. , These are the optimal value and the worst value, respectively. Let j be the weighted index value of the i-th available path; The relative proximity is obtained based on the positive ideal solution distance and the negative ideal solution distance; , For relative closeness; The relative closeness is taken as the target matching degree.
3. The method according to claim 2, characterized in that: The determination of the target matching degree for each available path based on the signal strength, response delay, and power consumption includes: After obtaining the relative proximity, the proximity at the current moment is smoothed to obtain the smoothed proximity; the smoothed proximity = preset coefficient * proximity at the current moment + (1 - preset coefficient) * proximity at the previous moment. The smoothed proximity is used as the target matching degree.
4. A method for equipment network distribution, characterized in that, include: After the device to be configured on the network establishes a connection with the target communication link, the local historical network configuration records are obtained, wherein the target communication link is determined based on the method described in any one of claims 1-3; Determine whether the devices are of the same type for network distribution based on local historical network distribution records; If so, then network configuration is performed on the device to be configured based on the latest network configuration information of the same type of device. The network configuration information includes network configuration policy, authentication parameters and session key negotiation method.
5. The method according to claim 4, characterized in that, Also includes: After the network distribution is completed, obtain the communication messages of the devices to be distributed. Extracting the time-series and spatial structure features of the message; The time series features are combined with the spatial structure features to obtain a high-dimensional vector; The high-dimensional vector is input into the local recognition model, which outputs the protocol type prediction and confidence level. If the confidence level is higher than the preset confidence level, it is determined that the device to be configured on the network adopts the target protocol type, wherein the target protocol type is the protocol type with the highest probability in the output protocol type prediction.
6. The method according to claim 4, characterized in that: Before determining whether devices of the same type are being configured for network distribution based on local historical network distribution records, the following steps are also included: Determine whether the device to be configured on the network is a device that has been configured on the network before, based on local historical network distribution records; If so, then network distribution is performed on the device to be distributed based on the latest network distribution record.
7. A heterogeneous network communication link determination device, characterized in that, include: Available path determination module, used to determine available paths in all communication networks; The path information acquisition module is used to acquire the evaluation indicators of the available paths, including signal strength, response delay and power consumption. The target matching degree determination module is used to determine the target matching degree of each available path based on the evaluation index; The communication link determination module is used to determine the communication link with the highest target matching degree as the target communication link.
8. A device for power distribution, characterized in that, include: The distribution network record acquisition module is used to acquire local historical distribution network records after the device to be distributed establishes a connection with the target communication link, wherein the target communication link is determined based on the method described in any one of claims 1-3; The same device identification module is used to determine whether the same type of devices are used for network distribution based on local historical network distribution records; The network configuration module for the device to be configured is used to configure the network for the device to be configured based on the latest network configuration information of the same type of device if the network configuration is specified. The network configuration information includes network configuration policy, authentication parameters and session key negotiation method.
9. A heterogeneous network communication link determination system, characterized in that, include: At least one first processor and at least one first memory; The first memory stores the executable instructions of the first processor; The first processor is configured to perform the method according to any one of claims 1-3.
10. A device distribution network system, characterized in that, include: At least one second processor and at least one second memory; The second memory stores the executable instructions of the second processor; The second processor is configured to perform the method according to any one of claims 4-6.
Citation Information
Patent Citations
Intelligent household equipment control program generation system and method
CN113204332A
Internet of Things data processing system based on multi-protocol equipment access
CN118101791A
Cross-platform multi-device network distribution method and system
CN119449927A
Device and method for applying portable modular edge AI to smart home system
CN119960569A