Control method, device and system for communication module of smart home equipment

By real-time analysis of the communication module performance and status information of smart home devices and the use of a multi-layer perceptron model for dynamic module selection and switching, the problem of poor communication performance of smart home devices in changing environments is solved, achieving a more efficient and stable communication experience.

CN120692104APending Publication Date: 2025-09-23GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510939524.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

The communication modules of existing smart home devices have poor stability and energy consumption when facing a changing communication environment, resulting in poor communication effects.

Method used

By acquiring the performance indicators and equipment operating status information of the communication module in real time, the multi-layer perceptron model is used for prediction, and the target communication module that meets the preset conditions is dynamically selected and switched when necessary. This includes preprocessing of performance indicators, feature vector construction, and online learning to optimize the communication module selection.

Benefits of technology

It improves the communication efficiency and stability of smart home devices in complex environments, reduces energy consumption, and optimizes user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692104A_ABST
    Figure CN120692104A_ABST
Patent Text Reader

Abstract

The invention provides a control method, device and system for a communication module of smart home equipment. In the operation process of the smart home device, performance indexes of a current communication module and operation state information of the smart home device are obtained, the performance indexes comprise a received signal strength indication value, round-trip time, a packet loss rate and a handshake success rate, and the operation state information at least comprises task state information of the smart home device; determining a target communication module of the smart home equipment according to the performance index and the operation state information, wherein the target communication module meets at least one of the following preset conditions: the highest communication success rate, the lowest power consumption and the shortest communication delay; and comparing the target communication module with the current communication module, if the target communication module is the current communication module, continuing to operate the current communication module, and if the target communication module is not the current communication module, switching the current communication module to the target communication module for operation. The problem that the communication effect of the intelligent home communication module is poor is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a control method for a communication module of a smart home device, a control device for a communication module of a smart home device, and a control system for a communication module of a smart home device. Background Art

[0002] In modern smart home systems, communication methods are typically fixed. Mainstream devices connect to the local area network via Wi-Fi modules and are remotely controlled by user apps or devices like smart speakers. Although Wi-Fi offers excellent bandwidth and ubiquity, its stability and energy efficiency may not be optimal in volatile communication environments (such as signal obstruction, poor coverage, and power outages). Summary of the Invention

[0003] The main purpose of this application is to provide a control method for a communication module of a smart home device, a control device for a communication module of a smart home device, and a control system for the communication module of a smart home device, so as to at least solve the problem of poor communication effect of the smart home communication module in the prior art.

[0004] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for controlling a communication module of a smart home device is provided, comprising: during the operation of the smart home device, obtaining performance indicators of the current communication module and operating status information of the smart home device, wherein the performance indicators include received signal strength indicator value, round-trip time, packet loss rate and handshake success rate, and the operating status information includes at least task status information of the smart home device; determining a target communication module of the smart home device based on the performance indicators and the operating status information, the target communication module meeting preset conditions, and the preset conditions including at least one of the following: highest communication success rate, lowest power consumption and shortest communication delay; comparing the target communication module with the current communication module, and if the target communication module is the current communication module, continuing to operate the current communication module; if the target communication module is not the current communication module, switching the current communication module to the target communication module for operation.

[0005] Optionally, determining the target communication module of the smart home device based on the performance indicators and the operating status information includes: performing preprocessing operations on the performance indicators and the operating status information to obtain preprocessed performance indicators and preprocessed operating status information, wherein the preprocessing operations include standardization processing and structured processing; constructing a feature vector based on the preprocessed performance indicators and the preprocessed operating status information; inputting the feature vector into a multilayer perceptron model for prediction to obtain the target communication module, wherein the multilayer perceptron model is trained using multiple groups of historical data, each group of historical data includes historical communication data and historical target communication modules, and the historical communication data includes historical communication modules, performance indicators of the historical communication modules, and historical operating status information of the smart home device.

[0006] Optionally, a feature vector is constructed based on the preprocessed performance indicator and the preprocessed operating status information, including: performing outlier processing on the preprocessed performance indicator to obtain an outlier-processed performance indicator, and using a minimum-maximum scaling algorithm to convert the numerical value of the outlier-processed performance indicator to within a preset range to obtain a preprocessed performance indicator; using a machine learning algorithm to convert the preprocessed operating status information according to preset conversion rules to obtain preprocessed operating status information, the preset conversion rules including conversion rules for categorical data and conversion rules for numerical data; using a feature combination algorithm to splice the preprocessed performance indicator and the preprocessed operating status information to obtain the feature vector.

[0007] Optionally, after switching the current communication module to the target communication module for operation, the method further includes: monitoring and obtaining the communication performance data of the target communication module at preset intervals, the communication performance data including the communication establishment response time, the data packet reception completeness rate and the task response time; scoring the communication performance data according to preset scoring rules to obtain a communication score of the communication performance data; when the communication score is lower than a preset threshold for a preset number of consecutive times, determining the communication performance data as a fine-tuning sample; inputting the fine-tuning sample into the multilayer perceptron model, and adjusting the parameters of the multilayer perceptron model by online learning until a preset number of iterations is reached, wherein the parameters include a bias term, a learning rate and a hyperparameter.

[0008] Optionally, the communication performance data is scored according to a preset scoring rule to obtain a communication score of the communication performance data, including: setting the weights of the communication establishment response time, the data packet reception complete rate and the task response time to a first weight, a second weight and a third weight, respectively; based on the first weight, the second weight and the third weight, performing a weighted summation of the communication establishment response time, the data packet reception complete rate and the task response time to obtain the communication score of the communication performance data, wherein the first weight, the second weight and the third weight are set based on multidimensional communication evaluation parameters, and the multidimensional communication evaluation parameters include communication protocol attributes, communication task type and operating environment information of the smart home device.

[0009] Optionally, if the target communication module is not the current communication module, the current communication module is switched to the target communication module for operation, including: if the target communication module is not the current communication module, the target communication module is activated and the communication protocol stack of the target communication module is initialized; the communication data of the current communication module is subjected to a first cache processing, and a state synchronization processing is performed, the state synchronization processing includes a second cache processing of the control instructions that have been received and not executed, and the control instructions that have been received and not executed are determined as instructions to be executed; the target communication module is run, and the instructions to be executed are executed under the communication protocol stack of the target communication module.

[0010] Optionally, the method further includes: monitoring the output state of the multilayer perceptron model and the loading state of the target communication module in real time; when an output abnormality of the multilayer perceptron model or an abnormality in the loading of the target communication module is detected, switching the current communication module to a communication module that was run without abnormality last time.

[0011] Optionally, before determining the target communication module of the smart home device based on the performance indicators and the operating status information, the method further includes: obtaining the historical communication data and the historical target communication module of the smart home device, the historical communication data including the historical communication module, the performance indicators of the historical communication module and the historical operating status information of the smart home device; preprocessing the historical communication data and the historical target communication module to obtain training sample data; inputting the training sample data into an initial multilayer perceptron model, and training the initial multilayer perceptron model through a backpropagation algorithm until a preset convergence criterion is reached to obtain the multilayer perceptron model.

[0012] According to another aspect of the present application, a control device for a communication module of a smart home device is provided, comprising: a first acquisition unit, configured to acquire performance indicators of a current communication module and operating status information of the smart home device during operation of the smart home device, wherein the performance indicators include a received signal strength indicator value, a round-trip time, a packet loss rate, and a handshake success rate, and the operating status information includes at least task status information of the smart home device; a first determination unit, configured to determine a target communication module of the smart home device based on the performance indicators and the operating status information, wherein the target communication module meets preset conditions, and the preset conditions include at least one of the following: the highest communication success rate, the lowest power consumption, and the shortest communication delay; a comparison unit, configured to compare the target communication module with the current communication module, and if the target communication module is the current communication module, continue to operate the current communication module; if the target communication module is not the current communication module, switch the current communication module to the target communication module for operation.

[0013] According to another aspect of the present application, a control system for a communication module of a smart home device is provided, comprising: a smart home device; a communication module; and a cloud controller, communicatively connected to the smart home device and the communication module, for executing any one of the control methods for the communication module of the smart home device.

[0014] By applying the technical solution of this application, during the operation of a smart home device, the performance indicators of the current communication module and the operating status information of the smart home device are obtained, wherein the performance indicators include the received signal strength indicator value, round-trip time, packet loss rate, and handshake success rate, and the operating status information includes at least the task status information of the smart home device; the target communication module of the smart home device is determined based on the performance indicators and the operating status information, and the target communication module meets preset conditions, which include at least one of the following: the highest communication success rate, the lowest power consumption, and the shortest communication delay; the target communication module is compared with the current communication module. If the target communication module is the current communication module, the current communication module continues to operate; if the target communication module is not the current communication module, the current communication module is switched to the target communication module for operation. This solution solves the problem of poor communication performance of smart home communication modules in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:

[0016] Figure 1A hardware structure block diagram of a mobile terminal for executing a method for controlling a communication module of a smart home device provided in an embodiment of the present application is shown;

[0017] Figure 2 A schematic flow chart of a method for controlling a communication module of a smart home device according to an embodiment of the present application is shown;

[0018] Figure 3 A flowchart of a method for controlling a communication module of a specific smart home device provided in accordance with an embodiment of the present application is shown;

[0019] Figure 4 A structural block diagram of a control device for a communication module of a smart home device provided according to an embodiment of the present application is shown.

[0020] The above drawings include the following reference numerals:

[0021] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] As introduced in the background technology, the communication module of the smart home device in the prior art has poor stability and energy consumption performance when facing a changing communication environment. In order to solve the problem of poor communication effect of the smart home communication module in the prior art, the embodiments of the present application provide a control method for the communication module of a smart home device, a control device for the communication module of a smart home device, and a control system for the communication module of a smart home device.

[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.

[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of controlling a communication module of a smart home device according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0028] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the device information display method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] In this embodiment, a method for controlling a communication module of a smart home device running on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] Figure 2 1 is a flow chart of a method for controlling a communication module of a smart home device according to an embodiment of the present application.

[0031] like Figure 2 As shown, the method includes the following steps:

[0032] Step S201: During operation of the smart home device, performance indicators of the current communication module and operating status information of the smart home device are obtained, wherein the performance indicators include received signal strength indicator value, round-trip time, packet loss rate, and handshake success rate, and the operating status information includes at least task status information of the smart home device;

[0033] Specifically, during operation, smart home devices continuously collect and analyze performance metrics related to their communication modules, as well as information about the device's own operating status. This process allows for real-time assessment of the module's operating status and device usage scenarios, enabling optimal module selection and switching decisions. Specifically, the received signal strength indicator (RSSI) is a measure of communication signal strength and is particularly important for wireless communications. The RSSI value generally reflects the quality of the wireless signal between the device and the router or other base station, with higher values ​​indicating stronger signals. In volatile environments, the RSSI value can help the system determine the stability of the current communication path, especially in communication methods such as Wi-Fi and 4G, which may be significantly affected by obstacles or interference. Round-trip time (RTT) is the time required from sending data to receiving a response during communication, and can be used to assess latency along the communication path. In real-time communications or latency-sensitive applications, RTT is a key performance metric; a lower RTT indicates faster response times. During data transmission, some data packets may fail to reach their destination due to various reasons, resulting in packet loss. The packet loss rate describes the proportion of lost data packets to the total number of transmitted data packets within a given period of time. A high packet loss rate indicates network congestion, interference, or other communication quality issues, impacting data integrity and service availability. The handshake is the process by which two communicating parties establish a connection, and the handshake success rate is the probability of success. In some communication protocols, the success of the handshake directly determines whether a device can successfully connect to the network. For example, during a Wi-Fi connection, the success of the handshake between the device and the router determines whether a stable communication link can be established.

[0034] The operating status information of smart home devices at least includes the task status information of smart home devices. Task status information reflects the type of task currently performed by the smart home device and is an important basis for determining the best communication module. For example, the device may be in rest mode, data synchronization state, user interaction process or large-scale data transmission stage. Different tasks have different communication requirements. For example, large-scale data transmission may give priority to high-bandwidth Wi-Fi, while low-power standby scenarios are more suitable for low-power communication methods such as BLE. In addition, the operating status information also involves the power status of the device (such as battery level), external environment (such as whether there is an interference source), the health status of the device (such as hardware fault indication) and other environmental parameters related to communication performance (such as temperature, humidity, etc.).

[0035] In summary, during the operation of smart home devices, communication module performance indicators and device operating status information are collected. This information is used to determine the most appropriate communication module to meet the device's communication needs. Performance indicators directly reflect the quality and efficiency of wireless communication, while operating status information provides context for device usage scenarios, helping to make smarter and more timely communication choices. This ensures that the optimal communication method is selected regardless of the conditions, resulting in a more stable, efficient, and energy-efficient communication experience.

[0036] Step S202: determining a target communication module for the smart home device based on the performance indicator and the operating status information, wherein the target communication module meets preset conditions, the preset conditions including at least one of the following: the highest communication success rate, the lowest power consumption, and the shortest communication delay;

[0037] Specifically, in order to determine the optimal communication module, the performance indicators of the current communication module and the operating status information of the smart home devices are collected and analyzed in real time. Performance indicators include received signal strength indication RSSI, round-trip time RTT, packet loss rate, and handshake success rate. These indicators provide direct feedback on the performance of the current communication module, such as the quality of the signal, the smoothness of data transmission, and the stability of connection establishment. In addition to performance indicators, the operating status information of the device must also be considered, such as the device's task type (data synchronization, audio and video transmission, user interaction, etc.), power status (remaining power, whether charging), and the device's working mode (high-efficiency mode, high-performance mode). This information helps understand the device's immediate needs and constraints.

[0038] The target communication module for a smart home device is determined based on performance indicators and operating status information. The target communication module must meet pre-set conditions, including at least one of the following: highest communication success rate, lowest power consumption, and shortest communication latency. The highest communication success rate prioritizes communication reliability. In certain scenarios, such as emergency alerts or critical data transmission, communication success rate is the primary consideration. Based on the current module's performance indicators, such as packet loss rate and handshake success rate, as well as operating status information, the module is predicted to provide the highest communication success rate, thereby ensuring the integrity and timeliness of data transmission. Energy usage is optimized to extend device life. Power consumption management is crucial for battery-powered devices. Based on task requirements and battery status, the module is analyzed to maximize power savings while maintaining communication quality. For example, when a device is performing low-data-volume tasks or in standby mode, switching to a low-power Bluetooth Low Energy (BLE) module is a preferred option. Minimizing communication latency is crucial for achieving instant responsiveness and a smooth user experience. Real-time communication and interactive applications (such as video conferencing and remote control) place high demands on communication latency. Evaluate the RTT and other delay indicators of each communication module and select the module with the fastest response to ensure the immediacy of communication and the smoothness of the application.

[0039] By analyzing communication performance indicators (such as RSSI, RTT, packet loss rate, handshake success rate) and device operating status (including task status information), smart home devices can intelligently determine the target communication module that meets the preset optimization conditions of the highest communication success rate, lowest power consumption or shortest communication delay, thereby dynamically selecting the optimal communication method in various environments, significantly improving communication efficiency and stability, while effectively reducing energy consumption and optimizing user experience.

[0040] Step S203: compare the target communication module with the current communication module. If the target communication module is the current communication module, continue to run the current communication module. If the target communication module is not the current communication module, switch the current communication module to the target communication module for operation.

[0041] Specifically, if the target communication module is consistent with the module currently being used by the device, the current communication status is considered to be optimal or good enough, and no switching is required. This means that the current module has met the preset optimization conditions (such as the highest communication success rate, the lowest power consumption, or the shortest communication delay) and can cope with the current communication environment and task requirements, so the current module will continue to be used to ensure the continuity and stability of communication. However, if the target communication module does not match the current module, this indicates that the current module is no longer the best choice. For example, when the Wi-Fi module has a poor signal, it may be replaced by a BLE or 4G module in order to seek a higher communication success rate or lower power consumption. At this point, the switching process of the communication module will be started, and the target communication module will be switched to achieve performance optimization.

[0042] Through real-time analysis, the target communication module is compared with the current communication module. If the two are consistent, the status quo is maintained; otherwise, it automatically switches to the target module to ensure that smart home devices always operate in the most appropriate communication mode, thereby optimizing communication efficiency, reducing energy consumption and delays, and improving the communication effect of smart home communication modules.

[0043] Through this embodiment, during the operation of the smart home device, the performance indicators of the current communication module (such as received signal strength, round-trip time, packet loss rate and handshake success rate) and the task status of the smart home device are analyzed in real time. Based on these key information, it is possible to intelligently judge and select the target communication module that meets specific preset conditions (i.e., the best communication success rate, the lowest power consumption or the shortest communication delay). This process includes a dynamic comparison mechanism. Only when the target communication module is better than the current communication module, the switch from the current communication module to the target communication module is executed to ensure the continuity of communication and the efficient operation of the device. This method enhances the ability of smart home devices to cope with complex environments, optimizes communication performance, reduces energy consumption, shortens communication response time, and significantly improves user experience, thereby solving the problem of poor communication effect of smart home communication modules in the prior art.

[0044] During the specific implementation process, the target communication module of the above-mentioned smart home device is determined according to the above-mentioned performance indicators and the above-mentioned operating status information, including: performing preprocessing operations on the above-mentioned performance indicators and the above-mentioned operating status information to obtain preprocessed performance indicators and preprocessed operating status information, and the above-mentioned preprocessing operations include standardization processing and structured processing; constructing a feature vector based on the above-mentioned preprocessed performance indicators and the above-mentioned preprocessed operating status information; inputting the above-mentioned feature vector into a multi-layer perceptron model for prediction to obtain the above-mentioned target communication module, wherein the above-mentioned multi-layer perceptron model is trained using multiple groups of historical data, each group of the above-mentioned historical data includes historical communication data and historical target communication modules, and the above-mentioned historical communication data includes historical communication modules, performance indicators of the above-mentioned historical communication modules and historical operating status information of the above-mentioned smart home devices.

[0045] Specifically, before the performance indicators and operating status information are input into the multi-layer perceptron model, the data is preprocessed to optimize the model's learning effect and prediction accuracy. Preprocessing operations mainly include standardization and structured processing. Standardization: By scaling the data values ​​to a common range, such as converting all values ​​to the form of zero mean and unit variance, the dimensional differences between different indicators are eliminated, so that the model can treat each feature fairly and avoid large-value features dominating the decision-making process. Structured processing: Convert the collected unstructured or semi-structured data into a structured format suitable for model input, such as converting text labels into digital codes, or organizing them into tabular form, to ensure the consistency and integrity of the data and facilitate model understanding and processing.

[0046] The preprocessed performance metrics and preprocessed operational status information are combined into a feature vector, which serves as the input to the multilayer perceptron model. This feature vector contains all necessary information, such as performance metrics such as RSSI, RTT, packet loss rate, and handshake success rate for each communication module, as well as task status information for smart home devices. It may also include operational status information such as battery level, power status, and communication power consumption estimates. The feature vector is designed to enable the model to effectively extract features and make decisions.

[0047] The Multi-Layer Perceptron (MLP) model is a deep learning model used in this embodiment to predict the target communication module. The MLP model consists of an input layer, several hidden layers, and an output layer. Each layer has multiple neurons connected by weights to form a complex network. During the training phase, the model establishes the correlation between performance indicators and the optimal module by learning multiple sets of historical data (including historical communication modules, their performance indicators, and device operating status information), as well as the corresponding optimal module selection (historical target communication module). During the prediction phase, the model receives the feature vector generated by the preprocessing operation and, after multiple layers of calculation, outputs the predicted target communication module.

[0048] Training a multilayer perceptron model relies on a large historical dataset. Each dataset contains information about the communication module, its performance, and the device's operating status at a specific point in the past, as well as the module considered optimal at that time. Through supervised learning, the model gradually optimizes its internal parameters during training to minimize the error between the predicted results and the actual optimal module. Common training strategies include gradient descent and its variants, such as stochastic gradient descent, as well as cross-validation techniques to verify the model's generalization capabilities.

[0049] In the actual application of smart home devices, whenever performance indicators and operating status information change, the above process is automatically triggered: data preprocessing, feature vector construction, input into the MLP model prediction, and finally switching to the target communication module based on the model output. This dynamic and intelligent module selection mechanism ensures that the device can operate efficiently through the optimal communication method regardless of the environment, while reducing energy consumption and improving communication stability and responsiveness. For example, when the system detects that the Wi-Fi signal suddenly becomes unstable, it uses the MLP model to predict that the BLE module may provide a more stable but lower-bandwidth communication option, automatically switching communication to BLE until the Wi-Fi signal returns to an acceptable level. In this way, smart home devices can achieve adaptive communication optimization, providing users with more reliable and energy-efficient services.

[0050] Through preprocessing, real-time communication performance metrics and operational status information from smart home devices are effectively integrated and standardized. This preprocessing step, including standardization and structuring, ensures that data from different sources can be compared and analyzed on a consistent basis, thereby constructing a feature vector that comprehensively reflects the current communication environment and device status. This feature vector is then input into a multi-layer perceptron (MLP) model for in-depth analysis and prediction to determine the most suitable target communication module. The MLP model is trained based on extensive historical communication data, including historical communication module selection, performance metrics, and device operational status under different tasks. This approach more accurately matches current needs with the most appropriate communication method, enabling real-time and efficient switching of communication modules to achieve the optimal communication success rate, lowest power consumption, or shortest communication latency. This approach improves the communication flexibility and performance of smart home devices, providing users with a smoother, more energy-efficient, and responsive smart device communication experience.

[0051] Furthermore, a feature vector is constructed based on the above-mentioned preprocessed performance indicators and the above-mentioned preprocessed operating status information, including: performing outlier processing on the above-mentioned preprocessed performance indicators to obtain outlier-processed performance indicators, and using a minimum-maximum scaling algorithm to convert the numerical value of the above-mentioned outlier-processed performance indicators to a preset range to obtain preprocessed performance indicators; using a machine learning algorithm to convert the above-mentioned preprocessed operating status information according to preset conversion rules to obtain preprocessed operating status information, and the above-mentioned preset conversion rules include conversion rules for categorical data and conversion rules for numerical data; using a feature combination algorithm to splice the above-mentioned preprocessed performance indicators and the above-mentioned preprocessed operating status information to obtain the above-mentioned feature vector.

[0052] Specifically, outlier handling aims to identify and address data points that deviate from the normal range. When processing performance metrics such as RSSI and packet loss rate, extreme values ​​may occur due to signal fluctuations, measurement errors, or interference. If left unaddressed, these outliers may affect the model's prediction accuracy. Treatment methods include removing, replacing, or smoothing these outliers to ensure the cleanliness of the dataset. Next, a min-max scaling algorithm is used to convert the performance metric values ​​to a fixed, preset range, typically [0, 1]. This method preserves the relative relationships between data while eliminating dimensionality effects, ensuring that performance metrics of different scales have equal weight in the model. This is crucial for subsequent model training, preventing a single metric from dominating the model learning process due to excessively large values ​​and ensuring that the model fairly learns the impact of each performance metric. Operational status information includes both categorical and numerical data. Categorical data, such as task type and communication module type, needs to be converted to numerical representations using machine learning algorithms. Common approaches are one-hot encoding or label encoding. This is because machine learning models typically process numerical inputs, and converting categorical information into numerical values ​​allows the model to better understand and use this type of data. For numerical data such as battery charge and power supply voltage, the key is to ensure that they conform to pre-defined conversion rules, such as adjusting the data format or unit so that they can form a complete feature vector input along with other numerical performance indicators.

[0053] Using a feature combination algorithm, the processed performance indicators and operating status information are concatenated to form a unified feature vector. This process can involve vector concatenation (combining vectors from two different sources) or more advanced feature engineering, such as feature cross-pollination and feature aggregation. The goal is to create comprehensive features that better reflect device status and environmental conditions, thereby improving the prediction accuracy of the multilayer perceptron model. The final feature vector, which contains all preprocessed performance indicators and operating status information, is a crucial component of the model input. It not only reflects the current device communication capabilities and status, but also fully considers the impact of environmental changes on communication performance. This feature vector construction enables the multilayer perceptron model to make more reasonable and accurate communication module predictions based on multi-dimensional data.

[0054] By performing outlier processing on preprocessed performance indicators, the impact of extreme or erroneous data is effectively eliminated, ensuring the quality and accuracy of model input. A minimum-maximum scaling algorithm is used to convert the numerical range of the processed performance indicators to meet the model's input requirements, facilitating the model's understanding and processing of indicator data of various magnitudes. Furthermore, preprocessed operational status information is effectively converted and encoded into categorical and numerical data using a machine learning algorithm and pre-set conversion rules, further enriching the feature description and enhancing the model's recognition and prediction capabilities. A feature combination algorithm is used to efficiently combine performance indicators and operational status information to form a complete feature vector that comprehensively reflects the current communication environment and task requirements of smart home devices. These steps enable more accurate identification of the device's real-time status, providing strong data support for subsequent intelligent decision-making by the communication module. This ensures accurate communication switching and improves communication efficiency, while reducing decision-making bias caused by data quality issues. This allows devices to maintain stable communication performance and low energy consumption in complex and changing environments, significantly enhancing the intelligent communication capabilities and user experience of smart home devices.

[0055] In some embodiments of the present application, after switching the above-mentioned current communication module to the above-mentioned target communication module for operation, the above-mentioned method also includes: monitoring and obtaining the communication performance data of the above-mentioned target communication module at preset intervals, the above-mentioned communication performance data including the communication establishment response time, the data packet reception completeness rate and the task response time; scoring the above-mentioned communication performance data according to preset scoring rules to obtain the communication score of the above-mentioned communication performance data; when the above-mentioned communication score is lower than the preset threshold for a preset number of consecutive times, determining the above-mentioned communication performance data as a fine-tuning sample; inputting the above-mentioned fine-tuning sample into the above-mentioned multi-layer perceptron model, and adjusting the parameters of the above-mentioned multi-layer perceptron model by online learning until the preset number of iterations is reached, wherein the above-mentioned parameters include the bias term, the learning rate and the hyperparameter.

[0056] The above involves how to continuously monitor the performance of the target communication module after the communication module switching is completed, and based on this, conduct prior learning and fine-tuning of model parameters. Specifically, during the operation of the new communication module, a series of key communication performance data will be collected regularly (every preset period, such as 5 minutes or 1 hour), including communication establishment response time, data packet reception completeness rate and task response time. Among them, the communication establishment response time refers to the time required from the device attempting to establish a communication connection to the successful connection, reflecting the ability and speed of the communication module to establish an effective connection. The data packet reception completeness rate measures the reception quality of the data packet during the communication process, that is, how many of the received data packets are complete and error-free, which directly reflects the reliability of the communication. The task response time is the time from the device sending a task request to receiving a response, which comprehensively reflects the efficiency and stability of the communication module in handling daily tasks.

[0057] Furthermore, the communication performance data is scored according to preset scoring rules to obtain a communication score for the communication performance data, including: setting the weights of the communication establishment response time, the data packet reception complete rate and the task response time to be the first weight, the second weight and the third weight respectively; based on the first weight, the second weight and the third weight, the communication establishment response time, the data packet reception complete rate and the task response time are weighted and summed to obtain the communication score for the communication performance data, wherein the first weight, the second weight and the third weight are set based on multi-dimensional communication evaluation parameters, and the multi-dimensional communication evaluation parameters include communication protocol attributes, communication task types and the operating environment information of the smart home device.

[0058] Specifically, communication establishment response time, packet reception completeness rate, and task response time are three key metrics for measuring communication performance. To comprehensively assess the impact of these metrics on overall communication quality, different weights are assigned to each: primary, secondary, and tertiary. The weightings are determined by multiple factors, including the communication protocol properties, the type of communication task, and the operating environment of the smart home device. For example, if the device primarily performs real-time tasks such as video calls or gaming, a higher value is assigned to communication establishment response time (primary weight), as fast communication establishment is crucial for the user experience. Conversely, if the device's current task prioritizes data transmission integrity, such as file upload or download, packet reception completeness rate (secondary weight) becomes more important. Task response time (third weight) typically encompasses both real-time and data transmission efficiency requirements, and its weighting depends on the specific application scenario and user preferences.

[0059] After determining the weights for each performance indicator, the three indicators are weighted and summed to obtain a comprehensive communication score. This weighted summation results in a quantitative communication score that comprehensively considers the real-time nature of communication, the integrity of data transmission, and the efficiency of task processing. It fully reflects the communication quality of smart home devices under the current communication module.

[0060] The first, second, and third weights above are not static but are set based on multi-dimensional communication evaluation parameters. This means that these weights will adjust accordingly with changes in the environment, task type, and communication protocol characteristics. Weights are updated in real time based on historical communication data, environmental monitoring results, or user behavior patterns to ensure that the scoring rules always meet actual needs, allowing the communication score to accurately reflect the current optimized communication status.

[0061] By introducing multiple weighting parameters, personalized scoring can be performed for three key performance indicators: communication establishment response time, packet reception completeness, and task response time, based on different communication protocol attributes, task types, and device operating environments. The core advantage of this approach lies in its flexible and targeted scoring rules. The primary, secondary, and tertiary weights can be adjusted based on specific application scenarios, ensuring that the scoring system accurately reflects the communication needs and performance expectations of smart home devices in specific contexts. For example, in real-time-critical tasks, communication establishment response time and task response time can be given higher weight, while in scenarios focusing on data transmission integrity, packet reception completeness can be given a correspondingly higher weight. The communication score derived through this weighted summation not only comprehensively considers the importance of each performance indicator but also fully reflects the influence of multiple communication evaluation parameters. This provides a scientific basis for intelligently selecting target communication modules, helps achieve optimal allocation of communication resources in complex environments, and thus improves communication stability and efficiency. It also meets the varying communication quality requirements of different tasks, significantly enhancing the adaptability of smart home devices.

[0062] If the communication scores collected for multiple consecutive times (a preset number of times, such as 3 or 5 times in a row) are all lower than a set threshold (preset threshold), it indicates that the performance of the current module has failed to meet the expected standards. At this time, these communication performance data below the threshold are regarded as fine-tuning samples for subsequent model parameter adjustment. Through online learning, the fine-tuning samples are input into the multilayer perceptron model, and the parameters of the model, including the bias term, learning rate, and hyperparameters, are adjusted in real time. Among them, the bias term determines the offset center of the model and directly affects the decision boundary of the model. The learning rate controls the speed at which the model updates the parameters each time. If it is too large, the model will oscillate, and if it is too small, the convergence will be slow. Hyperparameters, such as the number of hidden layers and the number of neurons in each layer, will affect the performance of the model.

[0063] This adjustment process continues until a preset number of iterations is reached (e.g., 100 or until the score improves). This process aims to improve actual communication performance by continuously optimizing model parameters, improving the model's prediction accuracy in the current environment and the rationality of communication module selection. This online learning mechanism enables the system to dynamically adjust strategies based on actual environmental changes, continuously optimizing communication performance and ensuring that smart home devices maintain high-quality communication connections in various scenarios.

[0064] After each successful switch to the target communication module, new communication performance data is regularly collected and analyzed, including communication establishment response time, packet reception completeness rate, and task execution response time. This data directly reflects the module's real-time communication performance. Pre-set scoring rules are used to quantify and score this communication performance data, objectively assessing the current communication status. If the communication score falls below the preset performance threshold for several consecutive monitoring cycles, indicating suboptimal performance of the communication module, these low-scoring samples are used as a basis for fine-tuning, automatically triggering the online learning process of the multilayer perceptron model. Online learning allows the model to optimize its parameters, including bias, learning rate, and hyperparameters, in real time during device operation. This rapid iterative adjustment aims to improve the model's adaptability to the current environment and thus enhance communication performance. This mechanism not only promptly corrects model prediction deviations but also addresses new challenges brought about by environmental changes, ensuring that smart home devices maintain optimal communication module performance under various conditions, ultimately improving communication stability, reducing power consumption, and minimizing latency.

[0065] In other embodiments of the present application, if the target communication module is not the current communication module, the current communication module is switched to the target communication module for operation, including: if the target communication module is not the current communication module, the target communication module is activated and the communication protocol stack of the target communication module is initialized; the communication data of the current communication module is subjected to a first cache processing, and a state synchronization processing is performed, the state synchronization processing includes a second cache processing of the control instructions that have been received and not executed, and the control instructions that have been received and not executed are determined as instructions to be executed; the target communication module is run, and the instructions to be executed are executed under the communication protocol stack of the target communication module.

[0066] Specifically, it first confirms that the target communication module is different from the currently used communication module, indicating that a module switch is required. The target communication module is then activated and its communication protocol stack is initialized. This initialization process includes setting the module's operating mode, power level, frequency, channel, and other parameters, as well as establishing the necessary network connections (such as searching for Wi-Fi networks or establishing a 4G connection). Once initialization is complete, the target communication module is ready to begin communication tasks.

[0067] While initializing the target communication module, the data being transmitted or waiting to be transmitted by the current communication module is subjected to a first cache process. This is to avoid the sudden interruption of the ongoing communication session when switching the communication module, resulting in data loss, especially for those critical or non-repeatable data, such as real-time control instructions, audio and video streams, etc. The cache process can ensure the integrity of the data and the continuity of communication. In addition to caching ordinary communication data, special attention is also paid to the status synchronization of control instructions. For those control instructions that have been received but not yet executed, a second cache process is performed to mark them as instructions to be executed. This is because control instructions are often time-sensitive and sequential, and must be executed in the correct order in the correct communication environment to achieve the desired effect. The second cache process ensures that these control instructions will not be ignored or executed incorrectly even during the module switching process, providing an orderly instruction queue for communication after the switch.

[0068] Once the target communication module and its protocol stack are fully operational, control commands marked as pending will begin execution under the new communication environment. This involves resending commands and confirming their execution status to ensure that all control commands are correctly processed under the new communication module. This mechanism not only ensures the integrity of control commands but also improves responsiveness and availability, seamlessly conveying user intent even during network handovers and maintaining the normal operation of smart home devices.

[0069] When it is determined that a switch from the current communication module to the target communication module is necessary, the target communication module is immediately activated, and the corresponding communication protocol stack is quickly initialized, allowing the new module to quickly enter a usable state. To avoid communication interruptions during the switch, the communication data of the current communication module is first cached to ensure data integrity. State synchronization is also performed: received but not yet executed control instructions are secondarily cached and marked as pending. This prevents command loss or duplicate execution during the switch and maintains command execution consistency. Once the target communication module and its protocol stack are ready, these pending instructions are retrieved from the cache and issued in the new communication environment, ensuring the continuity of communication tasks and the accuracy of device control. This mechanism significantly improves the intelligence level of communication module switching, reduces switching delays, avoids data loss, and enhances the adaptability and user experience of smart home devices under different communication conditions. This is especially true in complex environments where multiple modules coexist, enabling flexible switching of communication modes and continuous high-performance communication.

[0070] Furthermore, the above method also includes: real-time monitoring of the output status of the above-mentioned multilayer perceptron model and the loading status of the above-mentioned target communication module; when it is detected that the output of the above-mentioned multilayer perceptron model is abnormal or the loading of the above-mentioned target communication module is abnormal, the above-mentioned current communication module is switched to the communication module that was run without abnormality last time.

[0071] Specifically, the output results of the multilayer perceptron model and the loading and operation status of the target communication module are continuously monitored. The monitoring targets include the model output status and the loading status of the target communication module. Regarding the model output status, check whether the model is operating normally and whether the output is meaningful, for example, whether there are output abnormal values ​​or unrecognizable module numbers. This helps to ensure that the decision logic of the model is not damaged and that the output module switching recommendations are based on reasonable logic and data. Regarding the loading status of the target communication module, observe whether the target communication module is successfully loaded and whether the operating status after loading is stable, including whether initialization is completed, whether the network connection is established, and whether communication is unimpeded. This step is critical to ensure that the device can immediately start using the new communication channel after the module is switched.

[0072] Anomaly detection can promptly detect two types of abnormal events: model output anomalies and module loading anomalies. Model output anomalies: abnormal output caused by the model encountering untrained data, abnormal internal parameters, or being affected by external interference (such as electromagnetic interference). Module loading anomalies: The target communication module has problems such as initialization failure, network connection anomalies, software failure or hardware failure. These problems will directly affect the continuity and reliability of communication. Once any of the above anomalies is detected, the rollback mechanism will be immediately triggered to switch the current communication module back to the last communication module that ran without anomalies. This means that the current target communication module will be abandoned and the module that worked normally before will be used instead to ensure that the device does not lose communication capabilities due to module switching failure. This rollback operation is usually accompanied by a rapid module switching and communication recovery strategy to ensure that service continuity is not affected.

[0073] By monitoring the output status of the multilayer perceptron model and the loading status of the target communication module in real time, the system constantly monitors the health of core communication components. If a model output anomaly is detected, such as a prediction result that doesn't meet expectations or an internal model error, or if the target communication module fails to load, initializes, or communicates properly, the system immediately initiates a rollback mechanism, switching the current communication method to the last functioning and functioning module. This switchover occurs within seconds, reducing communication downtime caused by failures. This system is particularly suitable for applications requiring constant communication, such as when a smart security system detects an intrusion signal or when smart home appliances need to respond to user actions. Even in the face of communication anomalies, connections can be quickly restored to ensure the execution of urgent or critical tasks. Furthermore, by automatically falling back to a stable state, it prevents single points of failure from causing overall system failure, enhancing the robustness and user trust of the entire smart home ecosystem and ensuring the continued operation and efficient communication of devices in complex network environments.

[0074] In some embodiments of the present application, a dedicated deep learning network (such as an LSTM or GRU sequence model) is introduced to learn and memorize the changing trends of the communication environment over time. The deep learning network can capture long-term time dependencies and make accurate predictions even when the network environment changes slowly or experiences periodic fluctuations. Based on the learned network environment model, the communication conditions in the future can be predicted and the most suitable communication module can be preloaded in advance. For example, if it is predicted that the upcoming Wi-Fi signal is unstable, the BLE or 4G module is pre-activated and prepared to cope with possible network fluctuations and reduce the risk of delay and communication interruption during actual switching. Based on the network environment learning results, the threshold for communication module switching is dynamically adjusted to adapt to the performance requirements in different scenarios. When a higher network load or poor signal quality is predicted, the switching threshold is tightened and alternative communication solutions are more actively sought; conversely, when the network environment is predicted to be good, the threshold is relaxed to reduce unnecessary module switching and save power resources.

[0075] Furthermore, before determining the target communication module of the smart home device based on the performance indicators and the operating status information, the method further includes: obtaining the historical communication data and the historical target communication module of the smart home device, the historical communication data including the historical communication module, the performance indicators of the historical communication module and the historical operating status information of the smart home device; preprocessing the historical communication data and the historical target communication module to obtain training sample data; inputting the training sample data into an initial multilayer perceptron model, and training the initial multilayer perceptron model through a backpropagation algorithm until a preset convergence criterion is reached to obtain the multilayer perceptron model.

[0076] Specifically, relevant communication data is first extracted from the historical records of smart home devices. This data covers information on a series of historical communication scenarios, including historical communication modules, performance indicators of historical communication modules, historical operating status information of smart home devices, and historical target communication modules. Historical communication modules are communication methods used by devices in the past, such as Wi-Fi, Bluetooth (BLE), cellular networks (4G / 5G), etc. The performance indicators of historical communication modules refer to the performance of each module at a specific moment, such as signal strength (RSSI), data transmission rate, packet loss rate, handshake success rate, etc. These are important parameters for evaluating communication quality and stability. The historical operating status information of smart home devices refers to the operating status of the device when communicating, including energy consumption, battery power, the task scenario in which the device is located, etc. This information helps to understand the effect of communication selection under different operating conditions.

[0077] The acquired historical data needs to be preprocessed in order to be converted into a form that the model can understand. The preprocessing steps include data cleaning, feature extraction and encoding, data standardization or normalization, and generating sample pairs. Data cleaning refers to removing invalid, missing or noisy data to ensure data quality. Feature extraction and encoding is to extract meaningful features from the original data and encode categorical data (such as One-Hot Encoding). Data standardization or normalization is to convert all features to the same scale to prevent certain features from dominating model decisions due to excessive range. Generating sample pairs is to use the historical target communication module as the output label and the corresponding performance indicators and operating status information as input features to form a series of training sample pairs in preparation for model training.

[0078] With the preprocessed training samples, the next step is to use this data to train the initial multilayer perceptron model. The training process follows these steps:

[0079] Model Building: Define the architecture of the multilayer perceptron model, including the input layer, multiple hidden layers, and the output layer. Choose an appropriate activation function (such as ReLU), loss function (such as cross entropy), and optimization algorithm (such as gradient descent).

[0080] Data partitioning: Divide the historical data set into a training set and a validation set. The former is used to train the model, and the latter is used to evaluate model performance and prevent overfitting.

[0081] Model training: Forward propagation is used to calculate predictions. Backward propagation is then used to adjust model parameters based on the labels of training samples (i.e., historical target communication modules) to make the model's predictions more closely aligned with the actual target. This process is repeated until the model converges, i.e., meets the preset convergence criteria. This involves steps such as error calculation, gradient calculation, and parameter updates.

[0082] Training termination criteria: Convergence criteria are based on a decrease in training error or validation error, or reaching a set number of iterations. Once the model meets the convergence criteria, training ends.

[0083] The above training process yields a multilayer perceptron model capable of predicting the most suitable communication module based on given performance metrics and operational status information. With the accumulation of more historical data and continued model training, the model's prediction accuracy and generalization capabilities will further improve, enabling smart home devices to make more intelligent communication decisions in changing environments. The pre-trained multilayer perceptron model enables a better understanding and prediction of which communication module will provide optimal performance under different operational conditions and communication environments. This not only leverages past experience but also provides powerful decision support for real-time communication module selection, significantly improving communication efficiency and user experience in real-world smart home applications.

[0084] In some embodiments of the present application, a multi-mode communication module collaborative optimization and fault isolation mechanism is introduced. Specifically, through the collaborative optimization algorithm between communication modules, not only the performance maximization of a single module is considered, but also the consistency and efficiency of the entire multi-mode communication are focused on. For example, by balancing the load between the modules, performance bottlenecks or energy consumption problems caused by excessive use of a certain module are avoided. Once a communication module fails, it can be quickly isolated from the communication link while ensuring the normal operation of other modules. In addition, the mechanism has the ability to quickly build redundant communication paths. Even in the case of failure of the main communication module, uninterrupted service can be provided through other modules, enhancing the stability and reliability of communication. Continuous monitoring of the health of each communication module is implemented, including indicators such as hardware wear, software version, and communication quality. When the health of a module is detected to be lower than a preset threshold, an early warning is issued and proactive measures are taken (such as reducing the load, performing diagnosis, or starting a backup module) to prevent the module from failing at a critical moment and affecting the overall communication quality.

[0085] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the control method of the communication module of the smart home device of the present application will be described in detail below with reference to specific embodiments.

[0086] This embodiment relates to a specific method for controlling a communication module of a smart home device, such as Figure 3 Shown, including:

[0087] 1. Equipment initialization phase

[0088] After the device is started, it first automatically identifies and loads various communication protocol stacks supported by the current hardware of the device (such as Wi-Fi, BLE, 4G, Zigbee, etc.), performs hardware connection detection and protocol layer response verification through the communication interface between the main control chip and the module, and combines local configuration parameters to achieve automatic identification and initialization of supported modules (such as Wi-Fi / BLE / 4G, etc.). This process does not require user intervention to ensure that the device automatically establishes a module capability list after a cold start or restart. The AI ​​decision-making module is then started, and the pre-trained AI model (multi-layer perceptron model) or the locally cached historical communication strategy is loaded to ensure that the initial communication judgment capability is available even in the absence of a network. In order to reduce energy consumption and improve startup efficiency, the system defaults to the lowest power communication mode (such as BLE or Wi-Fi low-power scanning mode) to enter the standby state and perform the initial communication environment scanning task.

[0089] The AI ​​model is based on a multi-layer perceptron (MLP) architecture, which is used to output the optimal communication module selection under different communication environments. Its specific structure is as follows:

[0090] Input layer: Receives standardized feature vectors, including: real-time status of the communication module (such as RSSI, RTT, packet loss rate, handshake success rate, etc.), device status (such as task type, battery level, whether charging), and current environment labels (such as network mode, user interaction intensity, etc.).

[0091] Hidden layers (2 layers with ReLU activation): First hidden layer: 128 units, ReLU activation. Second hidden layer: 64 units, ReLU activation. Dropout layer (to prevent overfitting) with a dropout rate of 0.3.

[0092] Output layer: Softmax classifier, which outputs the selection probability of each module (such as Wi-Fi: 60%, BLE: 30%, 4G: 10%), and ultimately selects the module with the highest probability as the current module.

[0093] Training Data: Communication logs collected from multiple devices, locations, and time periods; module status and communication success rate records; and handover records in various simulated network fluctuation environments. Training Process: Model training is performed using TensorFlow. Training Method: Supervised learning, with the goal of obtaining the optimal module label. Optimization Objectives: Improve communication stability (success rate) and reduce handover latency and power consumption. Artificial network fluctuations and occlusion scenarios are artificially created to enrich decision-making examples.

[0094] Model deployment: After training, the model is compressed using quantization (INT8) and pruning techniques and deployed locally on the device (such as the main control chip or module MCU).

[0095] 2. Communication environment perception and feature collection

[0096] During operation, the system continuously or periodically monitors the surrounding communication environment and collects key performance indicators of various communication modules, including but not limited to RSSI (Received Signal Strength Indicator), RTT (Round Trip Time), packet loss rate, and handshake success rate. It also collects information such as the device's current task status (e.g., whether it is currently in the data synchronization, user interaction, or audio and video push phase), battery charge, power status, and estimated current module power consumption. If the device is connected to the cloud, historical communication logs are synchronized to provide long-term data support for modeling and prediction.

[0097] Among them, task status detection (such as data synchronization, user interaction, and audio and video push) interacts with the task scheduling module of the upper-layer application (RTOS task scheduler, business event bus) to determine in real time what communication activity the device is currently engaged in. If the device is performing a scheduled upload operation, the system marks it as "data synchronization"; if the user interacts with the device through a voice applet, it is marked as "user interaction"; if the device is pushing audio and video content or performing a large data transmission task, it is marked as a "high real-time task."

[0098] Battery charge and power status acquisition: The I2C / SPI bus between the main control chip and the power management unit (PMU) reads information such as battery voltage, charge percentage, and whether an external power source is connected. Integrated battery management chips such as the BQ series or MAX series typically provide a real-time SOC (State of Charge) reading interface, which the main control system periodically calls and updates the current power status.

[0099] Current communication module power consumption estimation: Instantaneous power consumption is estimated based on historical power consumption models and the current module status. If the Wi-Fi module is connected but has no data traffic, the estimated power consumption is "idle" (approximately 50-80mW). If BLE is broadcasting, the estimated power consumption is "broadcast." If 4G is transmitting data, the estimated active power consumption is between 300-500mW.

[0100] 3. Communication environment feature modeling module

[0101] The collected communication environment information is standardized and structured to construct a unified feature vector as input for the AI ​​model (multi-layer perceptron model). The processed feature vector includes the following dimensions: the current signal quality of each communication module (such as RSSI, packet loss rate, RTT, etc.), the device's current task scenario label (such as real-time control, long connection maintenance, or streaming), device operating status information (power consumption, battery level, charging status), and dynamic feedback data such as the most recent communication success rate. After normalization and cleaning, these features will be passed as input to the subsequent AI inference module.

[0102] 4. AI communication strategy decision module

[0103] This decision is based on a multilayer perceptron (MLP) model, which takes a standard feature vector as input and outputs the optimal communication module number (e.g., 0 for Wi-Fi, 1 for BLE, 2 for 4G, etc.). The network structure consists of an input layer, two hidden layers with Reluctant Unit (ReLU) activations, a Dropout layer to prevent overfitting, and a Softmax classification output layer. The model uses supervised learning, using historical communication records as training samples. The optimization goals are to improve communication success rate, reduce power consumption, and reduce communication latency. After model training, it is compressed and deployed locally on the device, supporting real-time inference.

[0104] 5. Module dynamic loading and protocol switching module

[0105] The AI ​​module outputs the optimal communication module decision, immediately activates the target communication module, and initializes the relevant protocol stack. To ensure uninterrupted communication during the switch, the current module's communication data is cached before the switch, and a soft keepalive mechanism maintains the communication status of upper-layer applications. During the protocol switch, a state synchronization process is also executed to ensure that control commands are not lost or duplicated during the switch. After the switch is complete, the original module is recycled or suspended to free up system resources.

[0106] During dynamic communication module switching, a "soft keep-alive mechanism" is introduced to prevent service interruptions, control command loss, or state inconsistencies caused by network interruptions. This mechanism's core goal is to maintain upper-layer logic's awareness of "communication continuity" during module shutdown, uninstallation, or switching through caching, state maintenance, and protocol passivation, enabling "imperceptible switching" or "minimally perceptible switching." This strategy favors a combination of "state-aware deception during module switching and delayed data transaction submission."

[0107] During the dynamic switching of the communication module (from Wi-Fi to 4G), a state synchronization process is designed to prevent abnormal situations such as loss, retransmission or repeated execution of control instructions when transmission is interrupted.

[0108] Before module switching: Control instructions are frozen and cache suspended. When the decision is made to switch the communication module, the following process is immediately initiated: Freeze new instruction reception: The service control layer suspends the issuance of new control instructions; Suspend unfinished instructions: Control instructions that have been issued but have not yet received an execution result confirmation (ACK) are temporarily cached, recording their unique ID, issuance time, target device, and control parameters; Mark execution status: These control instructions are marked as "pending" and enter the "awaiting confirmation" state.

[0109] During module switching, communication context persistence and soft keepalive are implemented in conjunction with each other. A soft keepalive mechanism is implemented to maintain the illusion of an "unbroken" logical connection. The current communication session context (including connection status, command execution progress, ACK send and receive records, etc.) is persisted to RAM or flash memory. If the module switch is not completed within the specified time, a retry or fallback to the backup module will be performed.

[0110] After module switching: State recovery and command reissue mechanism. After the new module is initialized and the network connection is established: Communication context is restored: The session state and pending command list cached in the previous step are restored locally. ACK check mechanism: By querying the target device status and comparing the operation counter or the command execution log sent back by the device, it is determined whether the control command has been executed. If it has been executed and the status is consistent, it is marked as completed. If it has not been executed or the status is inconsistent, the control command is reissued. Idempotent execution guarantee: All control commands are bound to a unique cmd_id. Before execution, the device checks whether it is a duplicate execution to ensure idempotence.

[0111] 6. Communication monitoring and model feedback after switching

[0112] Once the target module has been switched and is operating stably, the communication monitoring phase begins, recording the actual communication performance after the switch, such as connection latency, packet loss, and task response time. These communication results are fed into the AI ​​module as feedback data for model fine-tuning and local strategy optimization, enabling adaptive capabilities and faster and more accurate module predictions in similar environments in the future.

[0113] 7. Exception handling and redundancy control strategy

[0114] A built-in fault monitoring mechanism automatically activates multi-level redundancy strategies in the event of AI model output failure, module loading anomalies, or communication unreachability. For example, it can quickly roll back to the last stable communication module to avoid service interruptions caused by switch failures. If all modules are unavailable, it will enter local offline control mode, maintaining minimum control functions through physical buttons, local voice, or preset automatic logic to ensure uninterrupted core business operations.

[0115] 8. Communication Environment Perception and Feature Collection Model Training and Deployment Strategy

[0116] Supports a combination of offline and online model training and deployment. Initially, a variety of typical communication scenarios can be constructed within the test platform, using real-world data for sample collection and model training. The training platform supports tool frameworks such as TensorFlow Lite and scikit-learn, enabling lightweight model construction and compression. After training, the model can be embedded in the main control chip, communication module firmware, or edge computing unit for fast local inference and judgment. Later, remote model updates and online fine-tuning via OTA are supported, improving model adaptability and continuous optimization capabilities.

[0117] The optimal communication module is intelligently selected through an AI algorithm. The algorithm comprehensively considers multiple factors such as environmental changes, signal quality, power consumption requirements, etc., and automatically optimizes the selection of communication modules. In a complex communication environment, traditional communication strategies usually rely on manual settings or fixed priority rules and cannot dynamically adapt to changes in the environment. This application introduces modules such as environmental identification (such as signal strength, interference source, delay, etc.), channel prediction (such as network load prediction, signal stability assessment) and power consumption model (such as automatic selection of low-power protocols based on battery power and task requirements) to form a dynamic decision-making system based on real-time data. It can intelligently select the most suitable communication protocol (such as Wi-Fi, BLE, 4G, etc.) according to changes in the real-time communication environment, and continuously optimize this decision-making process, ultimately improving communication quality and reducing unnecessary energy consumption.

[0118] The module operation status monitoring and intelligent switching mechanism enables the device to monitor the operation status of each module in real time during the communication process and automatically switch to other communication modules when necessary to ensure continuous and stable communication connection. For example, when the Wi-Fi signal is unstable, it will automatically switch to 4G or other backup networks without affecting the normal operation of the device. At the same time, the mechanism also has the ability to self-recover from network disconnection: when the device loses connection with the network, it can quickly detect and enable backup communication modules (such as BLE, 4G, etc.), or start local offline mode if it cannot be recovered, to ensure that the device can at least continue to perform basic functions. This mechanism effectively solves the problem that traditional smart devices cannot recover quickly when the network environment is unstable or interrupted, and improves the reliability of the device in a changing environment.

[0119] Through AI dynamic decision-making (such as environmental identification, channel prediction, and power consumption model), the optimal communication module (Wi-Fi / BLE / 4G) is selected in real time, significantly improving communication stability and real-time performance. At the same time, dynamic optimization of protocol switching strategies can reduce redundant power consumption (such as avoiding high-power modules from running idle) and extend battery life. For example, in a weak Wi-Fi environment, it automatically switches to low-power BLE or enables 4G on demand to balance performance and energy consumption. Based on intelligent disaster recovery switching mechanisms (such as network disconnection self-recovery and abnormal rollback), the communication link is ensured to be continuously reliable. When the main module fails, it quickly switches to the backup module or downgrades to local offline mode to avoid service interruption. The lightweight AI model adapts to edge devices, so that the above functions can run in real time on resource-constrained terminals (such as IoT devices), taking into account low latency and high reliability.

[0120] The embodiment of the present application also provides a control device for a communication module of a smart home device. It should be noted that the control device for the communication module of the smart home device in the embodiment of the present application can be used to execute the control method for the communication module of the smart home device provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation methods, and the details that have been explained will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceived.

[0121] The following introduces the control device of the communication module of the smart home device provided in the embodiment of the present application.

[0122] Figure 4 Schematic diagram of a control device for a communication module of a smart home device according to an embodiment of the present application. Figure 4 As shown, the apparatus includes a first acquisition unit 10, a first determination unit 20, and a comparison unit 30. The first acquisition unit is used to acquire performance indicators of the current communication module and operation status information of the smart home device during operation of the smart home device, wherein the performance indicators include received signal strength indicator value, round-trip time, packet loss rate, and handshake success rate, and the operation status information includes at least task status information of the smart home device; the first determination unit is used to determine a target communication module of the smart home device based on the performance indicators and the operation status information, wherein the target communication module meets preset conditions, and the preset conditions include at least one of the following: the highest communication success rate, the lowest power consumption, and the shortest communication delay; the comparison unit is used to compare the target communication module with the current communication module. If the target communication module is the current communication module, the current communication module continues to operate; if the target communication module is not the current communication module, the current communication module is switched to the target communication module for operation.

[0123] In this solution, the performance indicators and device operating status information of the device communication module are collected in real time, and the target communication module of the smart home device is determined based on the performance indicators and operating status information. By comparing the target communication module with the current module, dynamic optimization selection of the communication module is achieved, thereby solving the problem of poor communication effect of the smart home communication module in the existing technology.

[0124] In a specific implementation process, the first determination unit includes a preprocessing module, a construction module, and a prediction module. The preprocessing module is used to perform preprocessing operations on the performance indicators and the operating status information to obtain preprocessed performance indicators and preprocessed operating status information, wherein the preprocessing operations include standardization and structuring. The construction module is used to construct a feature vector based on the preprocessed performance indicators and the preprocessed operating status information. The prediction module is used to input the feature vector into a multilayer perceptron model for prediction to obtain the target communication module, wherein the multilayer perceptron model is trained using multiple sets of historical data, each set of historical data includes historical communication data and historical target communication modules, and the historical communication data includes historical communication modules, performance indicators of the historical communication modules, and historical operating status information of the smart home devices.

[0125] By preprocessing performance indicators and operating status information, constructing feature vectors, and using trained multi-layer perceptron models for prediction, smart home devices can intelligently switch to the optimal communication module to achieve the optimization goals of maximizing communication success rate, minimizing power consumption, or minimizing communication latency. This mechanism fully leverages the potential of artificial intelligence and significantly improves device flexibility and performance.

[0126] Furthermore, the construction module includes a processing submodule, a conversion submodule, and a splicing submodule. The processing submodule is used to perform outlier processing on the preprocessed performance indicators to obtain outlier-processed performance indicators, and use a minimum-maximum scaling algorithm to convert the numerical values ​​of the preprocessed performance indicators to within a preset range to obtain preprocessed performance indicators; the conversion submodule is used to use a machine learning algorithm to convert the preprocessed operating status information according to preset conversion rules to obtain preprocessed operating status information, and the preset conversion rules include conversion rules for categorical data and conversion rules for numerical data; the splicing submodule is used to use a feature combination algorithm to splice the preprocessed performance indicators and the preprocessed operating status information to obtain the feature vector.

[0127] Data quality and consistency were ensured by performing outlier processing and minimum and maximum scaling on performance indicators, combined with machine learning transformation of operational status information. Subsequently, a feature combination algorithm was used to integrate the processed performance indicators and operational status information into a feature vector, which served as the input for a multilayer perceptron model. This effectively improved the model's prediction accuracy and the intelligence of communication module selection, enabling stable and efficient communication for smart home devices in complex environments.

[0128] In some embodiments of the present application, the device further includes a first monitoring unit, a scoring unit, a second determining unit, and an adjusting unit. The first monitoring unit is used to monitor and obtain the communication performance data of the target communication module at preset intervals after the current communication module is switched to the target communication module for operation, wherein the communication performance data includes the communication establishment response time, the data packet reception completeness rate, and the task response time; the scoring unit is used to score the communication performance data according to a preset scoring rule to obtain a communication score for the communication performance data; the second determining unit is used to determine the communication performance data as a fine-tuning sample when the communication score is lower than a preset threshold for a consecutive preset number of times; the adjusting unit is used to input the fine-tuning sample into the multilayer perceptron model and adjust the parameters of the multilayer perceptron model using online learning until a preset number of iterations is reached, wherein the parameters include a bias term, a learning rate, and a hyperparameter.

[0129] Furthermore, the scoring unit includes a setting module and a calculation module. The setting module is used to set the weights of the communication establishment response time, the data packet reception complete rate, and the task response time to a first weight, a second weight, and a third weight, respectively; and the calculation module is used to perform a weighted summation of the communication establishment response time, the data packet reception complete rate, and the task response time based on the first weight, the second weight, and the third weight to obtain the communication score of the communication performance data, wherein the first weight, the second weight, and the third weight are set based on multi-dimensional communication evaluation parameters, and the multi-dimensional communication evaluation parameters include communication protocol attributes, communication task type, and operating environment information of the smart home device.

[0130] Based on dynamic weighting, a comprehensive score is assigned to communication performance, guiding subsequent online learning and optimization of module switching strategies. This scoring mechanism not only quantifies the performance of communication modules but also enables fine-tuning of communication strategies based on specific scenarios and user needs, thereby improving communication efficiency across the entire smart home device.

[0131] By implementing performance monitoring, scoring, and feedback loops for the target communication modules, and combining them with online learning mechanisms to adjust the parameters of the multilayer perceptron model, it is possible to continuously optimize the communication module selection strategy and ensure that smart home devices always maintain the best communication status in a dynamic environment.

[0132] In some other embodiments of the present application, the comparison unit includes an activation module, a cache module, and an operation module. The activation module is used to activate the target communication module and initialize the communication protocol stack of the target communication module if the target communication module is not the current communication module; the cache module is used to perform a first cache process on the communication data of the current communication module and perform a state synchronization process, wherein the state synchronization process includes performing a second cache process on the control instructions that have been received but not executed, and determining the control instructions that have been received but not executed as instructions to be executed; the operation module is used to run the target communication module and execute the instructions to be executed under the communication protocol stack of the target communication module.

[0133] Through the above process, communication data and control instructions can be effectively managed and protected during communication module switching, ensuring the continuity of communication tasks and the correctness of instruction execution. This mechanism is particularly important for smart home devices, as it ensures that the devices can still provide stable services in a changing network environment, improving the user experience.

[0134] Furthermore, the apparatus further includes a second monitoring unit and a switching unit. The second monitoring unit is configured to monitor the output state of the multilayer perceptron model and the loading state of the target communication module in real time. The switching unit is configured to switch the current communication module to a previously running communication module without abnormalities if it detects an output abnormality of the multilayer perceptron model or an abnormal loading state of the target communication module.

[0135] By implementing this real-time monitoring and exception handling mechanism, it is possible to self-diagnose and prevent potential communication errors, enhancing the robustness and disaster recovery capabilities of the communication system. This design is particularly important for smart home devices, as they often rely on stable communication links to perform tasks such as remote control, status updates, and data exchange. By promptly detecting and correcting anomalies, the inconvenience caused by communication interruptions can be minimized, providing users with a continuous and reliable smart service experience.

[0136] Furthermore, the apparatus further includes a second acquisition unit, a preprocessing unit, and a training unit. The second acquisition unit is configured to acquire the historical communication data and the historical target communication module of the smart home device before determining the target communication module of the smart home device based on the performance indicators and the operating status information. The historical communication data includes the historical communication module, the performance indicators of the historical communication module, and the historical operating status information of the smart home device. The preprocessing unit is configured to preprocess the historical communication data and the historical target communication module to obtain training sample data. The training unit is configured to input the training sample data into an initial multilayer perceptron model and train the initial multilayer perceptron model using a backpropagation algorithm until a preset convergence criterion is reached, thereby obtaining the multilayer perceptron model.

[0137] The above training process yields a multilayer perceptron model capable of predicting the most suitable communication module based on given performance metrics and operational status information. With the accumulation of more historical data and continued model training, the model's prediction accuracy and generalization capabilities will further improve, enabling smart home devices to make more intelligent communication decisions in changing environments. The pre-trained multilayer perceptron model enables a better understanding and prediction of which communication module will provide optimal performance under different operational conditions and communication environments. This not only leverages past experience but also provides powerful decision support for real-time communication module selection, significantly improving communication efficiency and user experience in real-world smart home applications.

[0138] The control device for the communication module of the smart home device includes a processor and memory. The first acquisition unit, first determination unit, comparison unit, etc. are all stored as program units in the memory, and the processor executes the program units stored in the memory to implement the corresponding functions. The above modules are all located in the same processor; alternatively, the above modules can be located in different processors in any combination.

[0139] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0140] An embodiment of the present invention provides a control system for a communication module of a smart home device, comprising: a smart home device; a communication module; and a cloud controller, which is communicatively connected to the smart home device and the communication module and is used to execute any one of the control methods for the communication module of the smart home device.

[0141] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is run, the device where the computer-readable storage medium is located is controlled to execute a control method for the communication module of the smart home device.

[0142] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the control method of the communication module of the smart home device when running.

[0143] An embodiment of the present invention provides an electronic device comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for controlling the communication module of the smart home device described above are implemented. The device herein may be a server, a PC, a PAD, a mobile phone, or the like.

[0144] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the control method for initializing the communication module of the above-mentioned smart home device.

[0145] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0146] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0147] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0148] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0150] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0151] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0152] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0153] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0154] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A method for controlling a communication module of a smart home device, characterized in that: include: During operation of the smart home device, obtaining performance indicators of the current communication module and operating status information of the smart home device, wherein the performance indicators include received signal strength indicator value, round-trip time, packet loss rate, and handshake success rate, and the operating status information includes at least task status information of the smart home device; Determining a target communication module of the smart home device according to the performance indicator and the operating status information, wherein the target communication module meets preset conditions, and the preset conditions include at least one of the following: the highest communication success rate, the lowest power consumption, and the shortest communication delay; The target communication module is compared with the current communication module. If the target communication module is the current communication module, the current communication module continues to run. If the target communication module is not the current communication module, the current communication module is switched to the target communication module for operation.

2. The method according to claim 1, characterized in that Determining a target communication module of the smart home device according to the performance indicator and the operating status information includes: Performing a preprocessing operation on the performance indicator and the operating status information to obtain preprocessed performance indicator and preprocessed operating status information, wherein the preprocessing operation includes standardization processing and structured processing; constructing a feature vector based on the preprocessed performance indicator and the preprocessed operating status information; The feature vector is input into a multi-layer perceptron model for prediction to obtain the target communication module. Among them, the multilayer perceptron model is trained using multiple groups of historical data, each group of historical data includes historical communication data and historical target communication modules, and the historical communication data includes historical communication modules, performance indicators of the historical communication modules and historical operating status information of the smart home devices.

3. The method according to claim 2, characterized in that Constructing a feature vector based on the preprocessed performance indicator and the preprocessed operating status information includes: Performing outlier processing on the preprocessed performance indicator to obtain an outlier-processed performance indicator, and converting the value of the outlier-processed performance indicator into a preset range using a minimum-maximum scaling algorithm to obtain a preprocessed performance indicator; Using a machine learning algorithm to convert the preprocessed operating status information according to preset conversion rules to obtain preprocessed operating status information, the preset conversion rules including conversion rules for categorical data and conversion rules for numerical data; The preprocessed performance index and the preprocessed running status information are spliced ​​using a feature combination algorithm to obtain the feature vector.

4. The method according to claim 2, characterized in that After switching the current communication module to the target communication module for operation, the method further includes: Monitor and obtain communication performance data of the target communication module at predetermined intervals, wherein the communication performance data includes communication establishment response time, data packet reception completeness rate, and task response time; Scoring the communication performance data according to a preset scoring rule to obtain a communication score for the communication performance data; If the communication score is lower than a preset threshold for a consecutive preset number of times, determining the communication performance data as a fine-tuning sample; The fine-tuning sample is input into the multilayer perceptron model, and the parameters of the multilayer perceptron model are adjusted by online learning until a preset number of iterations is reached, wherein the parameters include a bias term, a learning rate, and a hyperparameter.

5. The method according to claim 4, characterized in that Scoring the communication performance data according to a preset scoring rule to obtain a communication score for the communication performance data includes: Setting the weights of the communication establishment response time, the data packet reception completeness rate, and the task response time to be a first weight, a second weight, and a third weight, respectively; Based on the first weight, the second weight, and the third weight, a weighted sum is performed on the communication establishment response time, the data packet reception complete rate, and the task response time to obtain the communication score of the communication performance data; The first weight, the second weight and the third weight are set based on multi-dimensional communication evaluation parameters, and the multi-dimensional communication evaluation parameters include communication protocol attributes, communication task types and operating environment information of the smart home device.

6. The method according to claim 1, characterized in that If the target communication module is not the current communication module, switching the current communication module to the target communication module for operation includes: If the target communication module is not the current communication module, activating the target communication module and initializing the communication protocol stack of the target communication module; Performing a first cache process on the communication data of the current communication module and executing a state synchronization process, wherein the state synchronization process includes performing a second cache process on the received and unexecuted control instructions and determining the received and unexecuted control instructions as instructions to be executed; The target communication module is run, and the to-be-executed instruction is executed under the communication protocol stack of the target communication module.

7. The method according to claim 2, characterized in that The method further comprises: monitoring the output state of the multilayer perceptron model and the loading state of the target communication module in real time; When an output abnormality of the multilayer perceptron model or an abnormality in the loading of the target communication module is detected, the current communication module is switched to a communication module that was run last time without abnormality.

8. The method according to claim 2, characterized in that Before determining the target communication module of the smart home device according to the performance indicator and the operating status information, the method further includes: Acquire the historical communication data and the historical target communication module of the smart home device, the historical communication data including historical communication modules, performance indicators of the historical communication modules, and historical operating status information of the smart home device; Preprocessing the historical communication data and the historical target communication module to obtain training sample data; The training sample data is input into an initial multilayer perceptron model, and the initial multilayer perceptron model is trained by a back propagation algorithm until a preset convergence standard is reached, thereby obtaining the multilayer perceptron model.

9. A control device for a communication module of a smart home device, characterized in that: include: a first acquiring unit, configured to acquire, during operation of the smart home device, performance indicators of the current communication module and operating status information of the smart home device, wherein the performance indicators include received signal strength indicator value, round-trip time, packet loss rate, and handshake success rate, and the operating status information includes at least task status information of the smart home device; a first determining unit, configured to determine a target communication module of the smart home device according to the performance indicator and the operating status information, wherein the target communication module satisfies a preset condition, the preset condition comprising at least one of the following: a highest communication success rate, a lowest power consumption, and a shortest communication delay; A comparison unit is used to compare the target communication module with the current communication module. If the target communication module is the current communication module, the current communication module continues to run; if the target communication module is not the current communication module, the current communication module is switched to the target communication module for operation.

10. A control system for a communication module of a smart home device, characterized in that: include: Smart home devices; Communication module; A cloud controller is communicatively connected to the smart home device and the communication module, and is used to execute the control method of the communication module of the smart home device according to any one of claims 1 to 8.