Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of a networking control method for smart home according to an embodiment of the present invention, where this embodiment is applicable to a situation of networking of smart devices in a complex installation environment, and the method may be executed by a networking control device, and the networking control device may be implemented in a hardware and/or software manner, and is generally integrated in a control device for smart home, referring to fig. 1, the method provided in the embodiment of the present invention specifically includes the following steps:
andstep 110, acquiring the equipment to be networked according to the broadcast connection information of the first communication protocol.
The first communication protocol may support a communication protocol of message broadcasting, for example, a bluetooth communication protocol, a WIFI communication protocol, and the like, the connection information may be connection request information of the control device, and may include a connection address of the control device, connection verification information, and the like, the device to be networked may be an intelligent device that needs to be networked in an environment where the control device is located, and the intelligent device may support the first communication protocol and the second communication protocol.
In the embodiment of the present invention, the control device may broadcast the connection information according to the first communication protocol, so that the device to be networked in the environment may receive the connection information, and the device to be networked may feed back information to the control device, so that the control device discovers the device to be networked in the environment.
Andstep 120, determining networking equipment in each equipment to be networked according to the received user instruction.
The user instruction may be selection information of the networking device, and may be collected by the control device, for example, the user may input the selection information on a display interface of the control device. The networking device may be a device connected to a target network, the networking device may specifically be an intelligent home device, and the target networks to which the networking devices may be connected may be the same or different.
Specifically, the control terminal may receive a user instruction, and select a networking device from the obtained one or more devices to be networked according to the user instruction, it may be understood that the number of the networking devices selected by the user instruction may not be limited, and one or more devices to be networked may be selected from the multiple devices to be networked as the networking device.
Step 130, transmitting networking information to the networking device based on the first communication protocol, so that the networking device is connected to the target network according to the second communication protocol.
The networking information may control information that the networking device is connected to the network, and may include a gateway address of the target network, a network protocol address, connection verification information, and the like. The target network may be a network to which the networking device is connected, the target networks corresponding to different networking devices may be the same or different, and the target network of the networking device may be determined by the networking information of the control device.
In the embodiment of the present invention, after determining the networking devices, the first communication protocol may be used to send the networking information to the networking devices, and it is understood that the control device may send the networking information based on the first communication protocol by using a single-point-to-single-point transmission or a single-point-to-multipoint transmission. After the networking information is sent to the networking equipment, the networking equipment can be connected to a target network according to the content of the networking information.
According to the embodiment of the invention, the equipment to be networked in the surrounding environment is obtained according to the broadcast connection information of the first communication protocol, the networking equipment is determined in each equipment to be networked according to the received user instruction, and the networking information is transmitted to the networking equipment based on the first communication protocol, so that the networking equipment is connected to the target network based on the second communication protocol, the quick networking of the intelligent equipment is realized, the networking operation difficulty is reduced, and the use experience of a user can be improved.
Example two
Fig. 2 is a flowchart of another method for controlling networking of smart homes according to a second embodiment of the present invention, which is embodied on the basis of the second embodiment of the present invention, and referring to fig. 2, the method according to the second embodiment of the present invention specifically includes the following steps:
step 210, broadcasting the connection information to the environment where the control device is located according to the first communication protocol.
The environment of the control device may be a surrounding space indicating the control device, and may include indoor space, outdoor space, and the like.
In the embodiment of the present invention, the control device may broadcast connection information to the surrounding environment using the first communication protocol, where the connection information may include a connection address of the control device, connection verification information, and the like, and the device to be networked within the environment may receive the connection information based on the first communication protocol.
Step 220, receiving the device identification information responding to the connection information, and recording the device corresponding to the device identification information as the device to be networked.
The device identification information may be unique information for identifying the device to be networked, and may be an MAC address, an IP address, a device name, and the like of the device to be networked, and the device identification information may be generated by the device to be networked when receiving the connection information.
Specifically, after the control device broadcasts the connection information, the control device may receive device identification information sent by each device to be networked, and the control device may use the device sending the device identification information as the device to be networked.
Andstep 230, displaying the identification information of each device on a preset interface of the control device.
The preset interface can be a display interface on the control device, and can show the device identification information of the devices to be networked in a picture or text form, and further can show the device performance, connection condition and the like of each device to be networked in the preset interface.
In the embodiment of the invention, the obtained equipment identification information can be visually displayed on the preset interface of the control equipment according to the preset format, so that a user can know the equipment to be networked in the current environment according to the preset interface, and the user can conveniently control the equipment to be networked.
Step 240, receiving a user instruction for selecting the device identification information on a preset interface, where the user instruction includes at least one of a slide instruction, a click instruction, and a press instruction.
The user instruction may be an instruction for selecting the device to be networked by the user, and may be one or more of a sliding instruction, a point-touching instruction, and a pressing instruction, and the user may select the device identification information on the preset interface of the device in a sliding, point-touching, pressing, and other manners.
Specifically, a user instruction generated by sliding, touching, pressing and the like by a user can be collected on a preset interface of the control device, and the user instruction can be used for selecting the device to be networked corresponding to the device identification information.
Andstep 250, determining the device to be networked corresponding to the device identification information as networking device according to each user instruction.
In the embodiment of the invention, the selected equipment identification information can be determined by the collected user instruction, and the equipment to be networked corresponding to the equipment identification information is used as networking equipment for networking control. It can be understood that the number corresponding relationship between the user instruction and the device identification information may be limited differently, for example, each user instruction may correspond to one device identification information, a user generates one user instruction by clicking the device identification information in a preset interface, the user instruction and the clicked device identification information have a unique corresponding relationship, and a device to be networked corresponding to the device identification information may be directly used as a networking device according to the user instruction; one user instruction can also correspond to a plurality of pieces of equipment identification information, a user selects the plurality of pieces of equipment identification information in a preset interface in a mode that the user fingers across the plurality of pieces of equipment identification information, the associated plurality of pieces of equipment identification information can be determined according to the sliding track of the user instruction, and the equipment to be networked corresponding to the pieces of equipment identification information can be used as networking equipment.
Step 260, obtaining pre-configured networking information, wherein the networking information at least comprises target gateway information and connection key information.
Specifically, the networking information may be preset by a user, and may be generated in a manner of manually inputting or automatically scanning a network gateway, and the networking information may include target gateway information and connection key information, where the target gateway information may be information such as a port number, an MAC address, and a network address of a gateway of a network to be connected, and the connection key information may be security information for connecting a device to be networked to the security information, and the security information may be used to verify an identity of the networking device.
In the embodiment of the present invention, pre-configured networking information may be obtained in the terminal device, where the networking information may include target gateway information and connection key information, and it is understood that multiple sets of networking information may exist, and one set of verification networking information or multiple sets of networking information may be obtained according to a user's need.
And step 270, sending the networking information to each networking device according to the first communication protocol.
In the embodiment of the present invention, the networking information may be sent to each networking device according to the first communication protocol, for example, the networking information may be sent to the networking device corresponding to the device identification information according to a single-point communication manner based on the first communication protocol. Further, networking information corresponding to different networking devices may be the same or different, for example, when a user selects a networking device from each to-be-networked device, the user may also select corresponding networking information for the selected networking device, networking information corresponding to different networking devices may be different, the user may allocate different networking information according to the type of the networking device, or allocate different networking information according to the distance from the networking device to the control device, and the user may flexibly configure according to actual needs.
And step 280, controlling the networking equipment to be connected to a target gateway corresponding to the networking information based on the second communication protocol.
Specifically, after receiving the networking information, the networking device may access the target gateway according to the target gateway information in the networking information, and join the networking device to the corresponding network through the verification of the target gateway according to the connection key information.
According to the embodiment of the invention, the connection information is broadcasted into the environment through the first communication protocol, the equipment identification information of the equipment to be networked responding to the connection information is received, the equipment identification information is displayed in the preset interface, the user instruction for selecting the equipment identification information is collected, the equipment to be networked is determined as the networking equipment according to the user instruction, the configured networking information is obtained, and the networking information is sent to each networking equipment to control the networking equipment to be connected to the corresponding target gateway based on the second communication protocol, so that the quick networking of the intelligent equipment is realized, the equipment to be networked and the networking information are flexibly selected, the networking operation difficulty is reduced, and the equipment networking experience of the user is improved.
Further, on the basis of the embodiment of the present invention, determining, according to each user instruction, the device to be networked corresponding to the device identification information as the networking device includes:
determining the receiving position of each user instruction, and determining corresponding equipment identification information according to the receiving position; recording the equipment identification information to a networking equipment information table, and determining the equipment to be networked corresponding to the equipment identification information as the networking equipment.
The receiving position may be a position on a preset interface, or may be a configuration position of a display control in the preset interface, and the device identification information displayed in the display control may have an association relationship with the receiving position, for example, a user clicks a display item in the preset interface to generate a user instruction, the display control of the display item has an association relationship with the device identification information, and the device identification information selected by the user may be determined by the receiving position of the user instruction according to the association relationship.
In the embodiment of the present invention, the networking device information table may be used to store information of networking devices, the networking device information table may store information of networking devices that perform networking operations or complete networking operations, and a user may manage a device networking situation through the networking device information table.
Further, on the basis of the above embodiment of the present invention, before determining a networking device in each device to be networked according to the received user instruction, the method further includes: deleting the equipment identification information existing in a networking equipment information table, wherein the networking equipment information table stores the equipment identification information determined as the networking equipment.
Specifically, in order to prevent the occurrence of the situation of repeated networking of the networking device, the networking device information table may be used to screen the received device identification information, if the device identification information exists in the networking device information table, the corresponding device to be networked has completed networking, and the networking operation does not need to be repeatedly executed, and the device identification information may be deleted, if the device identification information is not stored in the networking device information table, the corresponding device to be networked has not been networked, and the networking operation may be executed.
Further, on the basis of the above embodiment of the present invention, in the method, the first communication protocol is a bluetooth communication protocol, and the second communication protocol is a Zigbee communication protocol.
In the embodiment of the present invention, the communication protocols supported by the control device and the device to be networked may be a bluetooth communication protocol and a Zigbee communication protocol, the device to be networked may be networked based on the Zigbee communication protocol, and the networking control performs information interaction through the bluetooth communication protocol.
Fig. 3 is an exemplary diagram of a networking control method for a smart home according to a second embodiment of the present invention, and referring to fig. 3, taking networking control of a smart device supporting a Zigbee protocol and a bluetooth protocol as an example, when a Zigbee device leaves a factory, a bluetooth function is default turned on or turned on during installation, when a large number of Zigbee devices or Zigbee devices inconvenient to network are present in a networking field, a Zigbee device in an environment may be scanned through mobile phone bluetooth broadcast, a device identifier of the Zigbee device may be obtained after scanning is completed, a user may select a Zigbee device to be added to a network in a mobile phone, and send related information of the network to the Zigbee device by using mobile phone bluetooth, and the Zigbee device establishes a network through related information, so that rapid networking is conveniently achieved in an environment with a large number of devices and a poor device installation location. The networking control method of the equipment to be networked in the embodiment of the invention can comprise the following steps: and after the networking equipment is discovered by the mobile phone, the networking equipment can receive network information sent by the mobile phone and carry out network configuration according to the network information so as to be connected to the network.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a networking control device for smart home according to a third embodiment of the present invention, which is capable of executing a networking control method according to any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. The device can be implemented by software and/or hardware, and specifically comprises: adevice finding module 301, anetworking determination module 302, and anetworking control module 303.
Thedevice searching module 301 is configured to obtain a device to be networked according to broadcast connection information of a first communication protocol.
Anetworking determining module 302, configured to determine a networking device in each device to be networked according to the received user instruction.
Thenetworking control module 303 is configured to transmit networking information to the networking device based on the first communication protocol, so that the networking device is connected to a target network according to a second communication protocol.
According to the embodiment of the invention, the equipment to be networked in the surrounding environment is obtained through the equipment searching module according to the broadcast connection information of the first communication protocol, the networking determining module determines the networking equipment in each equipment to be networked according to the received user instruction, and the networking control module transmits the networking information to the networking equipment based on the first communication protocol, so that the networking equipment is connected to the target network based on the second communication protocol, the quick networking of the intelligent equipment is realized, the networking operation difficulty is reduced, and the use experience of a user can be improved.
Further, on the basis of the above embodiment of the present invention, thedevice search module 301 includes:
and the information broadcasting unit is used for broadcasting the connection information to the environment where the control equipment is located according to the first communication protocol.
And the equipment marking unit is used for receiving the equipment identification information responding to the connection information and marking the equipment corresponding to the equipment identification information as the equipment to be networked.
Further, on the basis of the above embodiment of the present invention, thenetworking determining module 302 includes:
and the equipment display unit is used for displaying the identification information of each piece of equipment on a preset interface of the control equipment.
And the instruction receiving unit is used for receiving the user instruction on the preset interface, wherein the user instruction comprises at least one of a sliding instruction, a point-touching instruction and a pressing instruction.
And the equipment selection unit is used for determining the equipment to be networked corresponding to the equipment identification information as the networking equipment according to each user instruction.
Further, on the basis of the above embodiment of the present invention, the device selection unit is specifically configured to:
determining the receiving position of each user instruction, and determining corresponding equipment identification information according to the receiving position; recording the equipment identification information to a networking equipment information table, and determining the equipment to be networked corresponding to the equipment identification information as the networking equipment.
Further, on the basis of the above embodiment of the invention, the apparatus further includes:
and the equipment screening unit is used for deleting the equipment identification information existing in a networking equipment information table, wherein the networking equipment information table stores the equipment identification information determined as the networking equipment.
Further, on the basis of the above embodiment of the present invention, thenetworking control module 303 includes:
acquiring pre-configured networking information, wherein the networking information at least comprises target gateway information and connection key information;
sending the networking information to each networking device according to the first communication protocol;
and controlling the networking equipment to be connected to a target gateway corresponding to the networking information based on the second communication protocol.
Further, on the basis of the above embodiment of the present invention, in the device, the first communication protocol is a bluetooth communication protocol, and the second communication protocol is a Zigbee communication protocol.
Example four
Fig. 5 is a schematic structural diagram of a control apparatus according to a fourth embodiment of the present invention, and as shown in fig. 5, the control apparatus includes aprocessor 40, amemory 41, aninput device 42, and anoutput device 43; the number of theprocessors 40 in the control device may be one or more, and oneprocessor 40 is taken as an example in fig. 5; theprocessor 40, thememory 41, theinput device 42 and theoutput device 43 in the control apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5.
Thememory 41 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the networking control method in the embodiment of the present invention (for example, thedevice searching module 301, thenetworking determining module 302, and thenetworking control module 303 in the networking control apparatus of the smart home). Theprocessor 40 executes various functional applications and data processing of the control device by running software programs, instructions and modules stored in thememory 41, that is, the networking control method of the smart home is implemented.
Thememory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, thememory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples,memory 41 may further include memory located remotely fromprocessor 40, which may be connected to the control device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Theinput device 42 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function control of the control apparatus. The output device 73 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a networking control method for smart home, where the method includes:
acquiring equipment to be networked according to the broadcast connection information of the first communication protocol;
determining networking equipment in each piece of equipment to be networked according to the received user instruction;
and transmitting networking information to the networking equipment based on the first communication protocol so that the networking equipment is connected to a target network according to a second communication protocol.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the networking control method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the networking control device, each included unit and module are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.