Smart home equipment networking method, smart home equipment, gateway and storage medium
By receiving networking requests from gateway broadcasts and automatically analyzing and comparing gateway information, smart home devices can automatically complete networking operations, solving the complex and time-consuming problems of networking operations in the existing technology and improving networking efficiency.
Patent Information
- Application Number
- CN202311461091.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2025-05-13
AI Technical Summary
When existing smart home devices are updated in the gateway iteratively, users need to manually operate the smart home device sensors and start the networking process, which is complex, time-consuming and inefficient.
By receiving the networking request from the gateway broadcast, if the smart home device is currently in the disconnected gateway state, the networking request will be parsed, the first gateway information will be obtained, and the latest stored second gateway information will be compared. If the networking operation will be performed to connect to the gateway.
The networking process of smart home devices is automatically completed without manual operation by users, improving networking efficiency.
Smart Images

Figure CN119996100A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a smart home device networking method, a smart home device, a gateway and a storage medium. Background Art
[0002] With the development of science and technology, smart home systems have become increasingly mature and widely used. They are mainly composed of gateways and various smart home devices. At present, when the gateway is updated, the user usually triggers the smart home device sensor to start the network addition process and writes relevant information to the sensor through the mobile phone application to add a new gateway. The operation is complicated, time-consuming, labor-intensive and inefficient.
[0003] Therefore, how to improve the networking efficiency of smart home devices has become an urgent problem to be solved. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to provide a smart home device networking method, a smart home device, a gateway and a storage medium, aiming to improve the networking efficiency of smart home devices.
[0005] In a first aspect, an embodiment of the present application provides a method for adding a smart home device to a network, which is applied to a smart home device, and the method includes:
[0006] Receive network joining request broadcasted by gateway;
[0007] If the smart home device is currently disconnected from the gateway, the network joining request is parsed to obtain the first gateway information;
[0008] comparing the first gateway information with the most recently stored second gateway information;
[0009] If the first gateway information is consistent with the second gateway information, a network joining operation is performed to connect to the gateway.
[0010] In a second aspect, an embodiment of the present application provides a method for adding a smart home device to a network, which is applied to a gateway. The method includes:
[0011] Collecting gateway information, where the gateway information includes at least one of SIM card information and gateway access device information;
[0012] If the gateway is a newly replaced gateway, a network joining request carrying the gateway information is broadcasted, so that when the smart home device receives the network joining request, it performs a network joining operation according to the gateway information carried in the network joining request and connects to the gateway.
[0013] In a third aspect, an embodiment of the present application provides a smart home device, wherein the smart home device includes:
[0014] A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the smart home device networking method as described above are realized.
[0015] In a fourth aspect, an embodiment of the present application provides a gateway, the gateway comprising:
[0016] A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the above-mentioned smart home device networking method are realized.
[0017] In a fifth aspect, an embodiment of the present application provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the smart home device networking method as described above.
[0018] The embodiment of the present application provides a smart home device networking method, a smart home device, a gateway and a storage medium. By receiving a network joining request broadcast by a gateway, if the smart home device is currently disconnected from the gateway, the network joining request is parsed to obtain first gateway information, and the first gateway information is compared with the latest stored second gateway information. If the first gateway information is consistent with the second gateway information, the network joining operation is performed to connect to the gateway, thereby eliminating the user's manual operation and improving the networking efficiency of the smart home device. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of a process for adding a smart home device to a network provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of the structure of a gateway provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the structure of a smart home device provided by an embodiment of the present invention;
[0023] Figure 4A flow chart of adding a smart home device to a network provided by an embodiment of the present invention;
[0024] Figure 5 A flow chart of a smart home device updating gateway information provided by an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of a process of another smart home device networking method provided by an embodiment of the present invention;
[0026] Figure 7 A flow chart of a gateway broadcasting information externally provided by an embodiment of the present invention;
[0027] Figure 8 A schematic block diagram of the structure of a smart home device provided by an embodiment of the present invention;
[0028] Fig. 9 A schematic block diagram of the structure of a gateway provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0031] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0032] The embodiments of the present invention provide a smart home device networking method, a smart home device, a gateway and a storage medium, aiming to improve the networking efficiency of the smart home device.
[0033] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0034] Please refer to Figure 1 , Figure 1A flow chart of a method for adding a smart home device to a network is provided in an embodiment of the present invention. The method for adding a smart home device to a network can be applied to smart home devices to improve the efficiency of adding a smart home device to a network. The smart home devices include but are not limited to televisions, lighting lamps, air conditioners, sweepers, etc.
[0035] like Figure 1 As shown, the smart home device networking method includes steps S101 to S104.
[0036] S101: Receive a network joining request broadcast by a gateway.
[0037] The structure of the gateway is as follows Figure 2 As shown, the gateway includes a SIM (Subscriber Identity Module) card module, an access device module, an information collection module, an external broadcast information module, etc. Among them, based on the SIM card module, the gateway can carry a SIM card; based on the access device module, the gateway access device can access the gateway, wherein the gateway access device includes but is not limited to a mobile phone, a computer, etc.; based on the information collection module, it is possible to obtain SIM card information, gateway access device information, etc., SIM card information includes but is not limited to MSISDN (Mobile Subscriber International ISDN / PSTN number, mobile user number), IMSI (International Mobile Subscriber Identity, International Mobile Subscriber Identity), ICCID (Integrate circuit card identity, integrated circuit card identification code) and other information of the SIM card in the gateway, and gateway access device information includes but is not limited to the MAC (Media Access Control Address, media access control address) address of the gateway access device or other identification information of the gateway access device; based on the external broadcast information module, it is possible to broadcast SIM card information, gateway access device information, etc. to the outside.
[0038] The structure of smart home devices is as follows Figure 3 As shown, the smart home device includes an identity authentication module, an information storage module, an information receiving and parsing module, etc. Among them, based on the information receiving and parsing module, it is possible to receive and parse the SIM card information, gateway access device information, etc. broadcast by the gateway; based on the information storage module, it is possible to store the received SIM card information, gateway access device information, etc.; based on the identity authentication module, it is possible to perform authentication based on the SIM card information, gateway access device information, etc.
[0039] After the gateway is powered on for the first time, it successfully joins the network through the traditional method. If the gateway is a wireless gateway that carries a SIM card, the gateway collects SIM card information, such as MSISDN, IMSI, ICCID and other SIM card information, as well as gateway access device information. If the gateway is a new device, that is, a newly replaced gateway, the gateway broadcasts a network joining request to the outside, and the smart home device receives the network joining request broadcast by the gateway. Among them, the network joining request broadcast by the gateway carries at least one of the following information: SIM card information, gateway access device information, etc.
[0040] S102: If the smart home device is currently disconnected from the gateway, the network joining request is parsed to obtain first gateway information.
[0041] If the smart home device finds that the current main body is in a gateway disconnected state, when receiving a new network joining request, the smart home device parses the new network joining request and parses out the gateway information carried in the network joining request, where the gateway information includes but is not limited to at least one of SIM card information and gateway access device information. For the convenience of distinguishing descriptions, the gateway information carried in the network joining request parsed by the smart home device is referred to as the first gateway information below.
[0042] S103: Compare the first gateway information with the latest stored second gateway information.
[0043] The latest gateway information is stored in the smart home device. For the sake of distinction, the gateway information stored in the smart home device is referred to as the second gateway information below. After the smart home device parses the network joining request to obtain the first gateway information, it compares the first gateway information with the stored second gateway information to determine whether the first gateway information is consistent with the second gateway information.
[0044] Exemplarily, the second gateway information can also be stored in any other device that can control and connect to the smart home device, such as a relay device or a centralized controller. After the smart home device parses the network joining request to obtain the first gateway information, it obtains the stored second gateway information from the relay device or the centralized controller and other devices, and then compares the first gateway information with the second gateway information to determine whether the first gateway information is consistent with the second gateway information.
[0045] In some embodiments, comparing the first gateway information with the latest stored second gateway information includes:
[0046] Determining whether the first gateway information includes SIM card information;
[0047] If the first gateway information includes SIM card information, comparing the SIM card information in the first gateway information with the second gateway information;
[0048] If the SIM card information in the second gateway information matches the SIM card information in the first gateway information, it is determined that the first gateway information is consistent with the second gateway information.
[0049] The smart home device first determines whether the parsed first gateway information includes SIM card information. If the first gateway information includes SIM card information, the SIM card information in the first gateway information is compared with the stored second gateway information. If the SIM card information in the stored second gateway information matches the SIM card information in the first gateway information, it is determined that the first gateway information is consistent with the second gateway information.
[0050] S104: If the first gateway information is consistent with the second gateway information, perform a network joining operation to connect to the gateway.
[0051] If the SIM card information in the stored second gateway information matches the SIM card information in the first gateway information, the current new gateway is considered to be a trustworthy device, and the network joining is agreed to be automatically started, the network joining operation is performed, and the gateway is connected.
[0052] In some embodiments, the smart home device networking method further includes:
[0053] If the first gateway information does not include SIM card information, or no SIM card information in the second gateway information matches the SIM card information in the first gateway information, comparing the gateway access device information in the first gateway information with the second gateway information;
[0054] If the gateway access device information in the second gateway information matches the gateway access device information in the first gateway information, it is determined that the first gateway information is consistent with the second gateway information;
[0055] If no gateway access device information in the second gateway information matches the gateway access device information in the first gateway information, it is determined that the first gateway information is inconsistent with the second gateway information.
[0056] If the first gateway information does not include SIM card information, or the first gateway information includes SIM card information but there is no SIM card information in the second gateway information that matches the SIM card information in the first gateway information, then the smart home device further compares the gateway access device information in the first gateway information with the second gateway information to determine whether there is gateway access device information in the second gateway information that matches the gateway access device information in the first gateway information. If there is gateway access device information in the second gateway information that matches the gateway access device information in the first gateway information, it is also determined that the first gateway information is consistent with the second gateway information, and the current new gateway is considered to be a trustworthy device, and the network joining operation is performed to connect to the gateway.
[0057] On the contrary, if there is no gateway access device information in the second gateway information that matches the gateway access device information in the first gateway information, at this time, it is determined that the first gateway information is inconsistent with the second gateway information, and the current new gateway is considered not to be a trusted device, and the network joining operation is not performed, that is, the gateway is not connected.
[0058] Taking the gateway as a wireless gateway carrying a SIM card as an example, after the gateway broadcasts the network joining request, for example, Figure 4 As shown, the smart home device receives the network joining request broadcast by the gateway and determines whether it is currently disconnected from the gateway. If the smart home device is not currently disconnected from the gateway, it does not need to perform the network joining operation and ends directly. If the smart home device is currently disconnected from the gateway, the SIM card information and gateway access device information are parsed from the network joining request, and the internal storage data is read to determine whether there is matching SIM card information; if there is matching SIM card information, the network joining process is started; if there is no matching SIM card information, it is determined whether there is matching gateway access device information; if there is matching gateway access device information, the network joining process is started; if there is no matching gateway access device information, it ends.
[0059] In some embodiments, the smart home device networking method further includes:
[0060] receiving third gateway information periodically broadcast by the gateway;
[0061] The stored second gateway information is updated according to the third gateway information.
[0062] The gateway periodically updates gateway information such as SIM card information and gateway access device information, and broadcasts it to smart home devices regularly. For the sake of distinction, the gateway information periodically broadcast by the gateway is referred to as the third gateway information below. After receiving the third gateway information periodically broadcast by the gateway, the smart home device compares the latest received third gateway information with the stored second gateway information, and updates the stored second gateway information based on the third gateway information.
[0063] In some embodiments, updating the stored second gateway information according to the third gateway information includes:
[0064] Determine whether the SIM card information in the second gateway information is consistent with the SIM card information in the third gateway information;
[0065] If the SIM card information in the second gateway information is inconsistent with the SIM card information in the third gateway information, updating the SIM card information in the second gateway information to the SIM card information in the third gateway information;
[0066] Determining whether the gateway access device information in the second gateway information is consistent with the gateway access device information in the third gateway information;
[0067] If the gateway access device information in the second gateway information is inconsistent with the gateway access device information in the third gateway information, the gateway access device information in the second gateway information is updated to the gateway access device information in the third gateway information.
[0068] After receiving the third gateway information broadcast by the gateway, the smart home device determines whether the SIM card information in the stored second gateway information is consistent with the SIM card information in the received third gateway information. If the SIM card information in the second gateway information is consistent with the SIM card information in the received third gateway information, the stored SIM card information does not need to be updated; otherwise, if the SIM card information in the second gateway information is inconsistent with the SIM card information in the received third gateway information, the stored SIM card information in the second gateway information is updated to the SIM card information in the third gateway information. And determine whether the gateway access device information in the stored second gateway information is consistent with the gateway access device information in the received third gateway information. If the gateway access device information in the second gateway information is consistent with the gateway access device information in the received third gateway information, the stored gateway access device information does not need to be updated; otherwise, if the gateway access device information in the second gateway information is inconsistent with the gateway access device information in the received third gateway information, the stored gateway access device information in the second gateway information is updated to the gateway access device information in the third gateway information.
[0069] For example, Figure 5As shown, after the smart home device receives the gateway information broadcasted periodically by the gateway, it parses the SIM card information and the gateway access device information, and reads the internal storage data to determine whether the SIM card information needs to be updated; if so, the SIM card information is updated; if the SIM card information does not need to be updated or after the SIM card information is updated, it is determined whether the gateway access device information needs to be updated; if the gateway access device information does not need to be updated, the operation is terminated; if the gateway access device information needs to be updated, the gateway access device information is updated and the operation is terminated.
[0070] Exemplarily, if the second gateway information is not stored in the smart home device, but stored in other devices that can control and connect to the smart home device, such as a relay device or a centralized controller, the same processing method can also be used to update the second gateway information stored in the relay device or centralized controller and other devices based on the third gateway information periodically broadcast by the gateway. The specific process can be referred to the aforementioned embodiment, so it will not be repeated here.
[0071] In the above embodiment, by receiving the network joining request broadcast by the gateway, if the smart home device is currently in a gateway disconnected state, the network joining request is parsed to obtain the first gateway information, and the first gateway information is compared with the latest stored second gateway information. If the first gateway information is consistent with the second gateway information, the network joining operation is executed to connect to the gateway, eliminating the user's manual operation, thereby improving the networking efficiency of the smart home device.
[0072] Please refer to Figure 6 , Figure 6 A flowchart of another method for adding a smart home device to a network is provided in an embodiment of the present invention. The method for adding a smart home device to a network can be applied in a gateway to improve the efficiency of adding a smart home device to a network. Figure 6 As shown, the smart home device networking method includes step S201 and step S202.
[0073] S201. Collect gateway information, where the gateway information includes at least one of SIM card information and gateway access device information.
[0074] After the gateway is powered on for the first time, it is successfully connected to the network through the traditional method. If the gateway is a wireless gateway with a SIM card, the gateway collects gateway information, where the gateway information includes at least one of SIM card information and gateway access device information, such as MSISDN, IMSI, ICCID, etc.
[0075] S202: If the gateway is a newly replaced gateway, a network joining request carrying the gateway information is broadcasted, so that when the smart home device receives the network joining request, it performs a network joining operation according to the gateway information carried in the network joining request and connects to the gateway.
[0076] If the gateway is a new device, that is, a newly replaced gateway, the gateway broadcasts a network request to the outside, wherein the network request carries at least one of the following information: SIM card information, gateway access device information, etc. After the smart home device receives the network request broadcast by the gateway, if it finds that the main body is already disconnected from the gateway, the smart device parses the new network request, first determines whether it contains SIM card information, if so, continues to compare it with the SIM card information stored internally, if they are consistent, the new gateway is considered to be a trustworthy device, and agrees to join the network and automatically starts the network joining process, executes the network joining operation, and connects to the gateway. If there is no SIM card information or the SIM card information does not match, it continues to determine whether it contains the gateway access device information, if it contains the gateway access device information, continues to compare it with the gateway access device information stored internally, if they are consistent, the new gateway is also considered to be a trustworthy device, agrees to join the network and automatically starts the network joining process, executes the network joining operation, and connects to the gateway.
[0077] In some embodiments, after collecting the gateway information, the method further includes:
[0078] If the gateway is not a newly replaced gateway, the gateway information is broadcasted so that the smart home device can update the stored gateway information based on the received gateway information.
[0079] The gateway periodically updates the gateway information such as SIM card information and gateway access device information, and broadcasts it to smart home devices regularly. After receiving the gateway information periodically broadcast by the gateway, if the SIM card information or gateway access device information is already existing, the smart home device directly abandons it and does not perform the update operation; if it is new SIM card information or gateway access device information, the new SIM card information or gateway access device information is stored, for example, in the relevant information list, and the gateway information is updated.
[0080] For example, Figure 7 As shown, the gateway determines whether there is a SIM card. If there is a SIM card, the SIM card information is collected; if there is no SIM card, or after the SIM card information is collected, the gateway access device information is collected; after completion, it is determined whether the gateway is a new device. If the gateway is a new device, a network joining request carrying gateway information such as SIM card information and gateway access device information is broadcast externally to perform the network joining operation of the smart home device; if the gateway is not a new device, the gateway information such as SIM card information and gateway access device information is broadcast externally to update the gateway information stored in the smart home device.
[0081] In the above embodiment, by collecting gateway information, the gateway information includes at least one of SIM card information and gateway access device information. If the gateway is a newly replaced gateway, a network joining request carrying the gateway information is broadcast. When the smart home device receives the network joining request, it performs the network joining operation according to the gateway information carried in the network joining request and connects to the gateway, thereby eliminating the user's manual operation and improving the networking efficiency of the smart home device.
[0082] The present invention also provides a smart home device. Figure 8 , Figure 8 It is a schematic block diagram of a smart home device provided in one embodiment of the present application.
[0083] like Figure 8 As shown, the smart home device 200 may include a processor 210 and a memory 220, wherein the processor 210 and the memory 220 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.
[0084] Specifically, the processor 210 may be a micro-controller unit (MCU), a central processing unit (CPU), or a digital signal processor (DSP).
[0085] Specifically, the memory 220 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB disk, or a mobile hard disk, etc. The memory 220 stores various computer programs for the processor 210 to execute.
[0086] The processor 210 is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:
[0087] Receive network joining request broadcasted by gateway;
[0088] If the smart home device is currently disconnected from the gateway, the network joining request is parsed to obtain the first gateway information;
[0089] comparing the first gateway information with the most recently stored second gateway information;
[0090] If the first gateway information is consistent with the second gateway information, a network joining operation is performed to connect to the gateway.
[0091] In some embodiments, when implementing the comparison of the first gateway information with the latest stored second gateway information, the processor 210 is used to implement:
[0092] Determining whether the first gateway information includes SIM card information;
[0093] If the first gateway information includes SIM card information, comparing the SIM card information in the first gateway information with the second gateway information;
[0094] If the SIM card information in the second gateway information matches the SIM card information in the first gateway information, it is determined that the first gateway information is consistent with the second gateway information.
[0095] In some embodiments, the processor 210 is further configured to implement:
[0096] If the first gateway information does not include SIM card information, or no SIM card information in the second gateway information matches the SIM card information in the first gateway information, comparing the gateway access device information in the first gateway information with the second gateway information;
[0097] If the gateway access device information in the second gateway information matches the gateway access device information in the first gateway information, it is determined that the first gateway information is consistent with the second gateway information;
[0098] If no gateway access device information in the second gateway information matches the gateway access device information in the first gateway information, it is determined that the first gateway information is inconsistent with the second gateway information.
[0099] In some embodiments, the processor 210 is further configured to implement:
[0100] receiving third gateway information periodically broadcast by the gateway;
[0101] The stored second gateway information is updated according to the third gateway information.
[0102] In some embodiments, when the processor 210 implements the updating of the stored second gateway information according to the third gateway information, it is configured to implement:
[0103] Determine whether the SIM card information in the second gateway information is consistent with the SIM card information in the third gateway information;
[0104] If the SIM card information in the second gateway information is inconsistent with the SIM card information in the third gateway information, updating the SIM card information in the second gateway information to the SIM card information in the third gateway information;
[0105] Determining whether the gateway access device information in the second gateway information is consistent with the gateway access device information in the third gateway information;
[0106] If the gateway access device information in the second gateway information is inconsistent with the gateway access device information in the third gateway information, the gateway access device information in the second gateway information is updated to the gateway access device information in the third gateway information.
[0107] The embodiment of the present invention also provides a gateway, see Fig. 9 , Fig. 9 It is a schematic block diagram of a gateway provided in an embodiment of the present application.
[0108] like Fig. 9 As shown, the gateway 300 may include a processor 310 and a memory 320, wherein the processor 310 and the memory 320 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.
[0109] Specifically, the processor 310 may be a micro-controller unit (MCU), a central processing unit (CPU), or a digital signal processor (DSP).
[0110] Specifically, the memory 320 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB disk, or a mobile hard disk, etc. The memory 320 stores various computer programs for the processor 310 to execute.
[0111] The processor 310 is used to run a computer program stored in the memory, and implement the following steps when executing the computer program:
[0112] Collecting gateway information, where the gateway information includes at least one of SIM card information and gateway access device information;
[0113] If the gateway is a newly replaced gateway, a network joining request carrying the gateway information is broadcasted, so that when the smart home device receives the network joining request, it performs a network joining operation according to the gateway information carried in the network joining request and connects to the gateway.
[0114] In some embodiments, after implementing the collection of gateway information, the processor 310 is further configured to implement:
[0115] If the gateway is not a newly replaced gateway, the gateway information is broadcasted so that the smart home device can update the stored gateway information based on the received gateway information.
[0116] The embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any smart home device networking method provided in the embodiment specification of the present application.
[0117] The storage medium may be an internal storage unit of the smart home device or gateway described in the foregoing embodiment, such as a hard disk or memory of the smart home device or gateway. The storage medium may also be an external storage device of the smart home device or gateway, such as 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), etc., equipped on the smart home device or gateway.
[0118] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0119] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0120] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for adding a smart home device to a network, applied to a smart home device, the method comprising: Receive network joining request broadcasted by gateway; If the smart home device is currently disconnected from the gateway, the network joining request is parsed to obtain the first gateway information; comparing the first gateway information with the most recently stored second gateway information; If the first gateway information is consistent with the second gateway information, a network joining operation is performed to connect to the gateway.
2. The method according to claim 1, characterized in that The comparing the first gateway information with the latest stored second gateway information includes: Determining whether the first gateway information includes SIM card information; If the first gateway information includes SIM card information, comparing the SIM card information in the first gateway information with the second gateway information; If the SIM card information in the second gateway information matches the SIM card information in the first gateway information, it is determined that the first gateway information is consistent with the second gateway information.
3. The method according to claim 2, characterized in that The method further comprises: If the first gateway information does not include SIM card information, or no SIM card information in the second gateway information matches the SIM card information in the first gateway information, comparing the gateway access device information in the first gateway information with the second gateway information; If the gateway access device information in the second gateway information matches the gateway access device information in the first gateway information, it is determined that the first gateway information is consistent with the second gateway information; If no gateway access device information in the second gateway information matches the gateway access device information in the first gateway information, it is determined that the first gateway information is inconsistent with the second gateway information.
4. The method according to claim 1, characterized in that: The method further comprises: Receiving third gateway information periodically broadcast by the gateway; The stored second gateway information is updated according to the third gateway information.
5. The method according to claim 4, characterized in that The updating of the stored second gateway information according to the third gateway information includes: Determine whether the SIM card information in the second gateway information is consistent with the SIM card information in the third gateway information; If the SIM card information in the second gateway information is inconsistent with the SIM card information in the third gateway information, updating the SIM card information in the second gateway information to the SIM card information in the third gateway information; Determining whether the gateway access device information in the second gateway information is consistent with the gateway access device information in the third gateway information; If the gateway access device information in the second gateway information is inconsistent with the gateway access device information in the third gateway information, the gateway access device information in the second gateway information is updated to the gateway access device information in the third gateway information.
6. A method for adding a smart home device to a network, applied to a gateway, the method comprising: Collecting gateway information, where the gateway information includes at least one of SIM card information and gateway access device information; If the gateway is a newly replaced gateway, a network joining request carrying the gateway information is broadcasted, so that when the smart home device receives the network joining request, it performs a network joining operation according to the gateway information carried in the network joining request and connects to the gateway.
7. The method according to claim 6, characterized in that After collecting the gateway information, the method further includes: If the gateway is not a newly replaced gateway, the gateway information is broadcasted so that the smart home device can update the stored gateway information based on the received gateway information.
8. A smart home device, characterized in that: The smart home devices include: A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the smart home device networking method as described in any one of claims 1 to 5 are realized.
9. A gateway, characterized in that: The gateway comprises: A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the smart home device networking method as described in any one of claims 6 to 7 are realized.
10. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the smart home device networking method as described in any one of claims 1 to 5; or, implement the steps of the smart home device networking method as described in any one of claims 6 to 7.