Network connection method for smart home equipment and smart home gateway
Through the adaptive network topology construction and dynamic reconnection mechanism of the smart home gateway, Wi-Fi Direct and optimization algorithms are used to solve the problem of connection stability and efficiency of smart home devices in dynamic environments, realize automatic updates, and improve user experience. experience and system performance.
Patent Information
- Application Number
- CN202410285340.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-03-13
AI Technical Summary
The network connection of smart home devices is difficult to maintain stable in a dynamic environment. The fixed network topology of the existing technology cannot adapt to the increase of devices, changes in location and changes in the signal environment, resulting in a decrease in connection stability and communication efficiency, and changes in configuration information require Manual updates are inefficient.
Realize the adaptive construction and dynamic reconnection mechanism of network topology through smart home gateways, use Wi-Fi Direct low-power wireless communication technology to search for devices, obtain key information about network connections, and apply fuzzy C-means clustering algorithm and genetic algorithm to optimize wireless networks Topology automatically adjusts to environmental changes and automatically updates device connections when configuration information changes.
It improves the stability and efficiency of smart home device connections, reduces signal interference, enhances transmission quality, avoids the tedious process of manual configuration, and improves user experience and system performance.
Smart Images

Figure CN118175605B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a network connection method for smart home devices and a smart home gateway. Background Art
[0002] With the rapid development of Internet of Things technology and the improvement of people's living standards, smart home devices have gradually become an indispensable part of modern families. Smart home devices such as smart TVs, smart air conditioners, smart cameras, and smart door locks not only improve the convenience and comfort of living, but also bring more fun and security to family life. These smart home devices usually need to be connected to home gateways or other devices through wireless networks to achieve functions such as remote control, data synchronization, and inter-device communication. These smart home devices are connected to the home center device, the smart home gateway, through wireless networks, thereby achieving functions such as remote control, automated operation, and data synchronization. However, in actual applications, the network connection of smart home devices faces a series of challenges.
[0003] In the prior art, smart home gateways usually establish connections with smart home devices through a preset network topology. This fixed network topology is often difficult to adapt to dynamic changes in the home environment, such as the addition of devices, movement of locations, or changes in the signal environment. Once the network topology no longer adapts to the actual environment, it will lead to reduced connection stability, reduced communication efficiency, and even communication interruption between devices.
[0004] In addition, when the configuration information of the smart home gateway changes, such as the IP address, port number or encryption method, users are usually required to manually update the configuration of each smart home device to ensure that the device can re-establish a connection with the gateway. This manual configuration method is not only inefficient and error-prone, but also brings unnecessary trouble and extra workload to users. Summary of the invention
[0005] The embodiments of the present invention provide a network connection method for smart home devices and a smart home gateway, which realizes adaptive construction of network topology and dynamic reconnection mechanism through the smart home gateway, effectively solves the stability and efficiency problems faced by smart home devices in wireless network connection, and improves the overall performance and user experience of the smart home system.
[0006] An embodiment of the present invention provides a network connection method for smart home devices, which is applied to a smart home gateway, including:
[0007] Searching for nearby smart home devices to be connected to the network, and obtaining key network connection information of the smart home devices to be connected to the network;
[0008] According to the key network connection information, construct an optimal wireless network connection topology between the smart home gateway and each of the smart home devices;
[0009] Establishing a network connection with each of the smart home devices according to the constructed optimal wireless network connection topology;
[0010] When it is detected that the configuration information of the smart home gateway has changed, the changed configuration information is sent to the smart home devices after the network connection is established, so that each of the smart home devices re-establishes the network connection with the smart home gateway.
[0011] As an improvement of the above solution, the searching for nearby smart home devices to be connected to the network and obtaining key network connection information of the smart home devices to be connected to the network includes:
[0012] Using Wi-Fi Direct's low-power wireless communication technology, it periodically broadcasts connection information requests to surrounding smart home devices waiting to be connected to the network;
[0013] Receive a response returned by the smart home device based on the connection information request and parse out key network connection information therein.
[0014] As an improvement of the above solution, the key network connection information includes physical location coordinates, signal quality transmission requirements and power consumption characteristics.
[0015] As an improvement of the above solution, the optimal wireless network connection topology between the smart home gateway and each of the smart home devices is constructed according to the network connection key information, including:
[0016] According to the network connection key information, each of the smart home devices is preliminarily grouped using a fuzzy C-means clustering algorithm, and a plurality of cluster centers are formed according to the similarities between the smart home devices, each center representing a possible wireless network sub-area;
[0017] Iteratively adjusting the membership matrix and the cluster center so that each of the smart home devices is evenly distributed in different clusters;
[0018] The wireless network topology design is converted into an optimization problem, wherein each of the smart home devices corresponds to a set of variables, and the objective function is to maximize the overall network performance; the variables include at least one of the following: access point selection, frequency band allocation or power control; and maximizing the overall network performance includes at least one of the following: throughput, coverage or energy efficiency;
[0019] Apply genetic algorithm to search the optimal solution space and create an initial population, each individual represents a possible wireless network topology solution;
[0020] The fitness function is used to evaluate the quality of individuals, and excellent individuals are selected to enter the next generation of population according to the fitness function value;
[0021] Part of the topological structure features are exchanged between the two selected individuals to generate new offspring solutions.
[0022] Another embodiment of the present invention provides a smart home gateway for:
[0023] Searching for nearby smart home devices to be connected to the network, and obtaining key network connection information of the smart home devices to be connected to the network;
[0024] According to the key network connection information, construct an optimal wireless network connection topology between the smart home gateway and each of the smart home devices;
[0025] Establishing a network connection with each of the smart home devices according to the constructed optimal wireless network connection topology;
[0026] When it is detected that the configuration information of the smart home gateway has changed, the changed configuration information is sent to the smart home devices after the network connection is established, so that each of the smart home devices re-establishes the network connection with the smart home gateway.
[0027] As an improvement of the above solution, when the smart home gateway is used to search for nearby smart home devices to be connected to the network and obtain key network connection information of the smart home devices to be connected to the network, it is specifically used to:
[0028] Using Wi-Fi Direct's low-power wireless communication technology, it periodically broadcasts connection information requests to surrounding smart home devices waiting to be connected to the network;
[0029] Receive a response returned by the smart home device based on the connection information request and parse out key network connection information therein.
[0030] As an improvement of the above solution, the key network connection information includes physical location coordinates, signal quality transmission requirements and power consumption characteristics.
[0031] As an improvement of the above solution, when the smart home gateway is used to construct the optimal wireless network connection topology between the smart home gateway and each of the smart home devices according to the key network connection information, it is specifically used to:
[0032] According to the network connection key information, each of the smart home devices is preliminarily grouped using a fuzzy C-means clustering algorithm, and a plurality of cluster centers are formed according to the similarities between the smart home devices, each center representing a possible wireless network sub-area;
[0033] Iteratively adjusting the membership matrix and the cluster center so that each of the smart home devices is evenly distributed in different clusters;
[0034] The wireless network topology design is converted into an optimization problem, wherein each of the smart home devices corresponds to a set of variables, and the objective function is to maximize the overall network performance; the variables include at least one of the following: access point selection, frequency band allocation or power control; and maximizing the overall network performance includes at least one of the following: throughput, coverage or energy efficiency;
[0035] Apply genetic algorithm to search the optimal solution space and create an initial population, each individual represents a possible wireless network topology solution;
[0036] The fitness function is used to evaluate the quality of individuals, and excellent individuals are selected to enter the next generation of population according to the fitness function value;
[0037] Part of the topological structure features are exchanged between the two selected individuals to generate new offspring solutions.
[0038] Randomly changing some attributes of an individual to increase population diversity; the attribute change includes: randomly changing the access point or frequency band of some of the smart home devices;
[0039] In each iteration, the effect of the wireless network topology scheme running in the actual environment is simulated, and the fitness function is further optimized by comparing the network performance indicators under different schemes;
[0040] The above process is repeated until a preset stop condition is reached, and finally the optimal wireless network connection topology between the smart home gateway and each of the smart home devices is obtained; the stop condition includes: the number of iterations or the convergence accuracy.
[0041] Another embodiment of the present invention provides a smart home gateway, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the network connection method of the smart home device described in the above-mentioned embodiment of the invention is implemented.
[0042] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0043] The smart home gateway can automatically adjust the network topology according to changes in the home environment and device status to adapt to the new environment and needs, which helps to reduce signal interference, improve transmission quality, and thus enhance the stability of smart home device connections. When the configuration information of the smart home gateway changes, such as the IP address, port number, etc., this solution can automatically send updated configuration information to the connected smart home devices and trigger the devices to reconnect with the gateway. This avoids the tedious process of manually configuring and updating devices, and improves the efficiency and reliability of network connections. In summary, the embodiments of the present invention implement the adaptive construction and dynamic reconnection mechanism of the network topology through the smart home gateway, effectively solving the stability and efficiency problems faced by smart home devices in wireless network connections, and improving the overall performance and user experience of the smart home system. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flowchart of a network connection method for a smart home device provided by an embodiment of the present invention;
[0045] Figure 2 The figure is a schematic diagram of the structure of a smart home gateway provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] See also Figure 1 , is a flow chart of a network connection method for a smart home device provided by an embodiment of the present invention. The network connection method for a smart home device comprises steps S10 to S14:
[0048] S10, searching for nearby smart home devices to be connected to the network, and obtaining key network connection information of the smart home devices to be connected to the network;
[0049] S11, constructing an optimal wireless network connection topology between the smart home gateway and each of the smart home devices according to the key network connection information;
[0050] S12, establishing a network connection with each of the smart home devices according to the constructed optimal wireless network connection topology;
[0051] S13, when it is detected that the configuration information of the smart home gateway has changed, the changed configuration information is sent to the smart home devices after the network connection is established, so that each of the smart home devices re-establishes the network connection with the smart home gateway.
[0052] In an embodiment of the present invention, the smart home gateway can automatically adjust the network topology according to changes in the home environment and device status to adapt to the new environment and needs, which helps to reduce signal interference, improve transmission quality, and thus enhance the stability of the connection of smart home devices. When the configuration information of the smart home gateway changes, such as the IP address, port number, etc., this solution can automatically send updated configuration information to the connected smart home devices and trigger the devices to re-establish a connection with the gateway. This avoids the tedious process of manually configuring and updating devices, and improves the efficiency and reliability of network connections. In summary, the embodiment of the present invention implements the adaptive construction and dynamic reconnection mechanism of the network topology through the smart home gateway, effectively solves the stability and efficiency problems faced by smart home devices in wireless network connections, and improves the overall performance and user experience of the smart home system.
[0053] In this embodiment, it should be noted that the network connection is established with each of the smart home devices according to the constructed optimal wireless network connection topology, and the reconnection mechanism after the configuration information of the smart home gateway changes. These specific working principles can refer to the existing wireless network communication technology and will not be elaborated here.
[0054] For example, searching for nearby smart home devices to be connected to the network and obtaining key network connection information of the smart home devices to be connected to the network includes:
[0055] Using Wi-Fi Direct's low-power wireless communication technology, it periodically broadcasts connection information requests to surrounding smart home devices waiting to be connected to the network;
[0056] Receive a response returned by the smart home device based on the connection information request and parse out key network connection information therein.
[0057] Specifically, the working process of this embodiment is as follows: Step 1, broadcast detection: using Wi-Fi Direct low-power wireless communication technology, the smart home gateway regularly sends broadcast packets or actively scans the surrounding devices to be connected; new or reset smart home devices usually enter the discovery mode and send out signals of their existence. Among them, for devices that support protocols such as UPnP (Universal Plug and Play) or mDNS (Multicast DNS), the gateway can discover the device and its basic information by listening to and parsing UPnP notifications or mDNS broadcasts. It is also possible to use IoT-specific discovery protocols, such as the Discovery Topic of MQTT (Message Queuing Telemetry Transport), or the discovery mechanism of a specific smart home platform (such as Apple HomeKit, Google Home or Amazon Alexa) to achieve automatic discovery of surrounding devices to be connected to the network. Step 2, information collection: After receiving the query instruction from the gateway or other controller, the smart home device to be connected uploads its own key network connection information to the gateway. The information may include but is not limited to:
[0058] Physical location coordinates: If the device supports geolocation, the latitude and longitude are provided; if not, the location may be relative to a known reference point, such as the layout of a room.
[0059] Transmission requirements: bandwidth and latency requirements that are pre-set by the device through firmware or customized by the user.
[0060] Power consumption characteristics: data such as current consumption in device working mode and power consumption in sleep mode.
[0061] Wireless environment conditions: RSSI (received signal strength indicator) recorded by the device itself, channel occupancy, surrounding interference level, etc.
[0062] Environmental perception: If the device has environmental perception capabilities, such as being equipped with sensors, it can collect information such as the floor it is on, the room structure, etc. through integrated IoT sensing technology. This may require co-positioning with other devices with known locations or combining with home maps for analysis.
[0063] By way of example, the network connection key information includes physical location coordinates, signal quality transmission requirements, and power consumption characteristics.
[0064] Furthermore, the step S11 includes steps S110 to S116:
[0065] S110, performing preliminary grouping of the smart home devices using a fuzzy C-means clustering algorithm according to the key network connection information, and forming a plurality of cluster centers according to the similarities between the smart home devices, each center representing a possible wireless network sub-area;
[0066] S111, iteratively adjusting the membership matrix and the cluster center so that each of the smart home devices is evenly distributed in different clusters;
[0067] S112, converting the wireless network topology design into an optimization problem, wherein each of the smart home devices corresponds to a set of variables, and the objective function is to maximize the overall network performance; the variables include at least one of the following: access point selection, frequency band allocation or power control; maximizing the overall network performance includes at least one of the following: throughput, coverage or energy efficiency;
[0068] S113, the root applies a genetic algorithm to search the optimal solution space and create an initial population, each individual representing a possible wireless network topology solution;
[0069] S114, the root evaluates the quality of individuals through the fitness function, and selects excellent individuals to enter the next generation population according to the fitness function value;
[0070] S115, the root exchanges some topological structure features between the two selected individuals to generate a new offspring solution.
[0071] The following is a detailed step-by-step introduction to the above technical solution, with examples to illustrate:
[0072] 1. Data collection and preprocessing: Collect key information of smart home devices, including physical location coordinates (denoted as Pi, where i represents the i-th device), signal quality (denoted as Si, quantifying the quality of wireless transmission between devices), and power consumption characteristics (denoted as Ei). For example, the central controller or gateway of the smart home system first sends a request message to each device to be connected through the built-in communication module and protocol (such as Wi-Fi, Bluetooth, Zigbee, etc.), requesting them to report their respective key network connection information. For example, a smart light bulb may report its current location (by cooperating with other devices such as locators to calculate the relative distance or longitude and latitude), the expected maximum bandwidth, the response delay requirement, and the wireless environment factors in which it is located (such as the signal attenuation on the floor or in the room). The collected information is initially screened and formatted to remove outliers or invalid data to ensure the effectiveness of subsequent algorithm processing. For example, convert non-digital location information into a form that can be used for cluster analysis.
[0073] 2. Define the objective function of fuzzy C-means clustering: Use the fuzzy C-means clustering algorithm to preliminarily group smart home devices, and define the objective function of fuzzy C-means clustering as minimizing the sum of squares of the difference between the membership matrix of each device to all cluster centers and the characteristics of the cluster centers. The formula of the objective function is:
[0074]
[0075] Where: N is the total number of devices, K is the number of cluster centers, is the membership degree of smart home device i to cluster center j, m is the fuzzy index, is the Euclidean distance between the feature vector Xi = [Pi, Si, Ei] of smart home device i and the cluster center j, is the eigenvector of cluster center j.
[0076] 3. Iteratively adjust the membership matrix and cluster center: Through the iterative method, repeatedly update the membership matrix U and cluster center C of each smart home device to the cluster center until The value converges or reaches the preset maximum number of iterations.
[0077] 4. Build an optimization problem model: Set the set of decision variables corresponding to each smart home device, for example, access point selection , frequency band allocation , and power control The wireless network topology design is transformed into an optimization problem, and the objective function can be expressed as:
[0078]
[0079] in: is the throughput of device i, is the network coverage indicator, is the energy consumption of device i, , , is the weight coefficient, reflecting the priority of different performance indicators.
[0080] 5. Create an initial population: Initialize a population containing multiple individuals (i.e., network topology scheme). The genetic code of each individual contains the decision variables of all smart home devices.
[0081] 6. Fitness function design: Set the fitness function Fitness (existing fitness functions can be used) to evaluate the quality of each individual (network topology scheme). It is the inverse of the objective function Z, that is, higher throughput, coverage, and energy efficiency will lead to higher fitness values.
[0082] 7. Application of genetic operators: 7.1 Selection: Roulette selection, tournament selection, etc. are implemented according to the fitness function value to select excellent individuals to enter the next generation population. 7.2 Crossover: Perform single-point crossover or partial matching crossover operations on the two selected individuals, exchange the decision variables of some devices, and generate new offspring solutions. For example, exchange the access point or frequency band settings of some devices in the two solutions. 7.3 Mutation: Randomly mutate some genes (device attributes) of individuals, for example, randomly change the access point or frequency band settings of some devices to increase population diversity.
[0083] 8. Simulation and fitness optimization: In each iteration, for each individual (network topology scheme), use simulation tools to simulate its operating effect in the actual environment, calculate the corresponding network performance indicators (throughput, coverage, energy efficiency, etc.), and use these values as the actual fitness values. Update the fitness function value according to the simulation results, and sort the population according to the new fitness. The specific principle can refer to the fitness function update technology of the existing genetic algorithm, which will not be elaborated here.
[0084] 9. Iteration and end conditions: Repeat the above genetic operations to continuously optimize the fitness value until the preset stop condition is reached, such as reaching the maximum number of iterations MaxGen or the rate of change of the fitness function value is lower than the preset threshold (i.e., convergence accuracy).
[0085] Here is an example: suppose there is a home environment with 10 smart home devices. Through fuzzy C-means clustering, the devices are divided into 3 clusters, corresponding to the first floor living area, the second floor entertainment area and the basement of the home. In the genetic algorithm stage, the gene string of each individual represents the access point selection and frequency band allocation of all devices. In the simulation process, it is found that after the 10th iteration of a certain scheme, the throughput, coverage and energy efficiency of the device have reached the optimal state. At this time, the preset stop condition is met, and the scheme is selected as the optimal wireless network connection topology. For example, in this optimal scheme, all devices on the first floor are connected to the same access point and use the same frequency band to reduce interference. The devices on the second floor also adopt a similar strategy. Due to the special physical location of the basement devices, separate access points and frequency band settings are used to enhance signal coverage and improve network performance. For example, a specific channel of the 2.4GHz frequency band is used in the first floor living area, and different channels of the 5GHz frequency band are used in the second floor entertainment area. The user's mobile device (such as a smartphone) flexibly accesses the nearest AP with a lighter load.
[0086] In summary, this embodiment focuses on the optimization of the smart home network environment, combining fuzzy C-means clustering (FCM) and genetic algorithm (GA) to intelligently optimize the wireless network connection between devices. First, based on the location, signal quality and power consumption characteristics of the device, the FCM algorithm is used for cluster analysis to form sub-areas with similar characteristics, and the balanced distribution of devices in different sub-areas is achieved through iterative adjustment, providing a reasonable layout basis for wireless network deployment. Subsequently, the design of the wireless network topology is transformed into a multivariate optimization problem. The decision variables cover key factors such as access point selection, frequency band allocation and power control. The objective function is set to achieve the best overall network performance in terms of throughput, coverage and energy efficiency. Next, a genetic algorithm is used to generate and evaluate a series of possible wireless network topology solutions, that is, to create an initial population containing multiple solutions. Each individual corresponds to a specific deployment strategy, and its pros and cons in network performance are measured by designing a fitness function. Solutions with high fitness will be selected for genetic operations (crossover and mutation) to generate a new generation of candidate solutions. In this process, the simulation technology is combined to provide real-time feedback on the performance of each solution in the actual network environment, and the fitness function is continuously and dynamically optimized, and finally the ideal wireless network topology structure that can maximize the overall network performance is selected. Therefore, this embodiment adopts an intelligent optimization algorithm to achieve wireless network connection optimization based on the physical location of the device, signal quality and power consumption characteristics. This solution combines the fuzzy C-means clustering algorithm with the genetic algorithm to construct and optimize the wireless network topology structure between smart home devices and gateways, thereby maximizing the overall network performance, which not only simplifies the wireless network planning problem in complex environments, but also effectively improves the overall performance and user experience of the smart home system.
[0087] Another embodiment of the present invention provides a smart home gateway, which is used for:
[0088] Searching for nearby smart home devices to be connected to the network, and obtaining key network connection information of the smart home devices to be connected to the network;
[0089] According to the key network connection information, construct an optimal wireless network connection topology between the smart home gateway and each of the smart home devices;
[0090] Establishing a network connection with each of the smart home devices according to the constructed optimal wireless network connection topology;
[0091] When it is detected that the configuration information of the smart home gateway has changed, the changed configuration information is sent to the smart home devices after the network connection is established, so that each of the smart home devices re-establishes the network connection with the smart home gateway.
[0092] In an embodiment of the present invention, the smart home gateway can automatically adjust the network topology according to changes in the home environment and device status to adapt to the new environment and needs, which helps to reduce signal interference, improve transmission quality, and thus enhance the stability of the connection of smart home devices. When the configuration information of the smart home gateway changes, such as the IP address, port number, etc., this solution can automatically send updated configuration information to the connected smart home devices and trigger the devices to re-establish a connection with the gateway. This avoids the tedious process of manually configuring and updating devices, and improves the efficiency and reliability of network connections. In summary, the embodiment of the present invention implements the adaptive construction and dynamic reconnection mechanism of the network topology through the smart home gateway, effectively solves the stability and efficiency problems faced by smart home devices in wireless network connections, and improves the overall performance and user experience of the smart home system.
[0093] As an improvement of the above solution, when the smart home gateway is used to search for nearby smart home devices to be connected to the network and obtain key network connection information of the smart home devices to be connected to the network, it is specifically used to:
[0094] Using Wi-Fi Direct's low-power wireless communication technology, it periodically broadcasts connection information requests to surrounding smart home devices waiting to be connected to the network;
[0095] Receive a response returned by the smart home device based on the connection information request and parse out key network connection information therein.
[0096] As an improvement of the above solution, the key network connection information includes physical location coordinates, signal quality transmission requirements and power consumption characteristics.
[0097] As an improvement of the above solution, when the smart home gateway is used to construct the optimal wireless network connection topology between the smart home gateway and each of the smart home devices according to the key network connection information, it is specifically used to:
[0098] According to the network connection key information, each of the smart home devices is preliminarily grouped using a fuzzy C-means clustering algorithm, and a plurality of cluster centers are formed according to the similarities between the smart home devices, each center representing a possible wireless network sub-area;
[0099] Iteratively adjusting the membership matrix and the cluster center so that each of the smart home devices is evenly distributed in different clusters;
[0100] The wireless network topology design is converted into an optimization problem, wherein each of the smart home devices corresponds to a set of variables, and the objective function is to maximize the overall network performance; the variables include at least one of the following: access point selection, frequency band allocation or power control; and maximizing the overall network performance includes at least one of the following: throughput, coverage or energy efficiency;
[0101] Apply genetic algorithm to search the optimal solution space and create an initial population, each individual represents a possible wireless network topology solution;
[0102] The fitness function is used to evaluate the quality of individuals, and excellent individuals are selected to enter the next generation of population according to the fitness function value;
[0103] Part of the topological structure features are exchanged between the two selected individuals to generate new offspring solutions.
[0104] Randomly changing some attributes of an individual to increase population diversity; the attribute change includes: randomly changing the access point or frequency band of some of the smart home devices;
[0105] In each iteration, the effect of the wireless network topology scheme running in the actual environment is simulated, and the fitness function is further optimized by comparing the network performance indicators under different schemes;
[0106] The above process is repeated until a preset stop condition is reached, and finally the optimal wireless network connection topology between the smart home gateway and each of the smart home devices is obtained; the stop condition includes: the number of iterations or the convergence accuracy.
[0107] See also Figure 2 , is a schematic diagram of a smart home gateway provided in an embodiment of the present invention. The smart home gateway of this embodiment includes: a processor 100, a memory 101, and a computer program stored in the memory 101 and executable on the processor 100, such as a network connection program for smart home devices. When the processor 100 executes the computer program, the steps in the network connection method embodiments of the above-mentioned smart home devices are implemented. Alternatively, when the processor 100 executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0108] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the smart home gateway.
[0109] The smart home gateway may include, but is not limited to, a processor 100 and a memory 101. Those skilled in the art will appreciate that the schematic diagram is merely an example of a smart home gateway and does not limit the smart home gateway. The smart home gateway may include more or fewer components than shown in the diagram, or may combine certain components, or may include different components. For example, the smart home gateway may also include input and output devices, network access devices, buses, and the like.
[0110] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the smart home gateway, and uses various interfaces and lines to connect various parts of the entire smart home gateway.
[0111] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the smart home gateway by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0112] Wherein, if the module / unit integrated in the smart home gateway is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0113] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0114] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A network connection method for smart home devices, characterized in that: Applied to smart home gateways, including: Searching for nearby smart home devices to be connected to the network, and obtaining key network connection information of the smart home devices to be connected to the network; Constructing an optimal wireless network connection topology between the smart home gateway and each of the smart home devices according to the key network connection information; Establishing a network connection with each of the smart home devices according to the constructed optimal wireless network connection topology; When it is detected that the configuration information of the smart home gateway has changed, the changed configuration information is sent to the smart home devices after the network connection is established, so that each of the smart home devices re-establishes the network connection with the smart home gateway; The step of constructing an optimal wireless network connection topology between the smart home gateway and each of the smart home devices according to the key network connection information includes: According to the network connection key information, each of the smart home devices is preliminarily grouped using a fuzzy C-means clustering algorithm, and a plurality of cluster centers are formed according to the similarities between the smart home devices, each center representing a possible wireless network sub-area; Iteratively adjusting the membership matrix and the cluster center so that each of the smart home devices is evenly distributed in different clusters; The wireless network topology design is converted into an optimization problem, wherein each of the smart home devices corresponds to a set of variables, and the objective function is to maximize the overall network performance; the variables include at least one of the following: access point selection, frequency band allocation or power control; and maximizing the overall network performance includes at least one of the following: throughput, coverage or energy efficiency; Genetic algorithm is applied to search the optimal solution space and create an initial population, where each individual represents a possible wireless network topology solution; The fitness function is used to evaluate the quality of individuals, and excellent individuals are selected to enter the next generation of population according to the fitness function value; Part of the topological structure features are exchanged between the two selected individuals to generate new offspring schemes; Randomly changing some attributes of an individual to increase population diversity; the attribute change includes: randomly changing the access point or frequency band of some of the smart home devices; In each iteration, the effect of the wireless network topology scheme running in the actual environment is simulated, and the fitness function is further optimized by comparing the network performance indicators under different schemes; The above process is repeated until a preset stop condition is reached, and finally the optimal wireless network connection topology between the smart home gateway and each of the smart home devices is obtained; the stop condition includes: the number of iterations or the convergence accuracy.
2. The network connection method of the smart home device according to claim 1, characterized in that: The searching for nearby smart home devices to be connected to the network and obtaining key network connection information of the smart home devices to be connected to the network includes: Using Wi-Fi Direct's low-power wireless communication technology, it periodically broadcasts connection information requests to surrounding smart home devices waiting to be connected to the network; Receive a response returned by the smart home device based on the connection information request and parse out key network connection information therein.
3. The network connection method of the smart home device according to claim 1, characterized in that: The network connection key information includes physical location coordinates, signal quality transmission requirements and power consumption characteristics.
4. A smart home gateway, characterized in that: Used for: Searching for nearby smart home devices to be connected to the network, and obtaining key network connection information of the smart home devices to be connected to the network; Constructing an optimal wireless network connection topology between the smart home gateway and each of the smart home devices according to the key network connection information; Establishing a network connection with each of the smart home devices according to the constructed optimal wireless network connection topology; When it is detected that the configuration information of the smart home gateway has changed, the changed configuration information is sent to the smart home devices after the network connection is established, so that each of the smart home devices re-establishes the network connection with the smart home gateway; When the smart home gateway is used to construct the optimal wireless network connection topology between the smart home gateway and each of the smart home devices according to the key network connection information, the smart home gateway is specifically used to: According to the network connection key information, each of the smart home devices is preliminarily grouped using a fuzzy C-means clustering algorithm, and a plurality of cluster centers are formed according to the similarities between the smart home devices, each center representing a possible wireless network sub-area; Iteratively adjusting the membership matrix and the cluster center so that each of the smart home devices is evenly distributed in different clusters; The wireless network topology design is converted into an optimization problem, wherein each of the smart home devices corresponds to a set of variables, and the objective function is to maximize the overall network performance; the variables include at least one of the following: access point selection, frequency band allocation or power control; and maximizing the overall network performance includes at least one of the following: throughput, coverage or energy efficiency; Genetic algorithm is applied to search the optimal solution space and create an initial population, where each individual represents a possible wireless network topology solution; The fitness function is used to evaluate the quality of individuals, and excellent individuals are selected to enter the next generation of population according to the fitness function value; Part of the topological structure features are exchanged between the two selected individuals to generate new offspring schemes; Randomly change some attributes of an individual to increase population diversity; The property changes include: randomly changing the access point or frequency band of some of the smart home devices; In each iteration, the effect of the wireless network topology scheme running in the actual environment is simulated, and the fitness function is further optimized by comparing the network performance indicators under different schemes; The above process is repeated until a preset stop condition is reached, and finally the optimal wireless network connection topology between the smart home gateway and each of the smart home devices is obtained; the stop condition includes: the number of iterations or the convergence accuracy.
5. The smart home gateway according to claim 4, characterized in that: When the smart home gateway is used to search for nearby smart home devices to be connected to the network and obtain key network connection information of the smart home devices to be connected to the network, it is specifically used to: Using Wi-Fi Direct's low-power wireless communication technology, it periodically broadcasts connection information requests to surrounding smart home devices waiting to be connected to the network; Receive a response returned by the smart home device based on the connection information request and parse out key network connection information therein.
6. The smart home gateway according to claim 4, characterized in that: The network connection key information includes physical location coordinates, signal quality transmission requirements and power consumption characteristics.
7. A smart home gateway, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the network connection method for the smart home device according to any one of claims 1 to 3 is implemented.
