CN111818611A - Equipment binding method and device - Google Patents

Equipment binding method and device Download PDF

Info

Publication number
CN111818611A
CN111818611A CN202010632118.1A CN202010632118A CN111818611A CN 111818611 A CN111818611 A CN 111818611A CN 202010632118 A CN202010632118 A CN 202010632118A CN 111818611 A CN111818611 A CN 111818611A
Authority
CN
China
Prior art keywords
mac address
target
devices
control instruction
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010632118.1A
Other languages
Chinese (zh)
Other versions
CN111818611B (en
Inventor
刘飞
魏巍
丁宜辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Yilai Intelligent Technology Co Ltd
Original Assignee
Qingdao Yilai Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Yilai Intelligent Technology Co Ltd filed Critical Qingdao Yilai Intelligent Technology Co Ltd
Priority to CN202010632118.1A priority Critical patent/CN111818611B/en
Publication of CN111818611A publication Critical patent/CN111818611A/en
Application granted granted Critical
Publication of CN111818611B publication Critical patent/CN111818611B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The invention provides a device binding method and a device, and the method comprises the following steps: acquiring MAC addresses broadcasted by a plurality of Internet of things devices in a preset time period in the operation process; sending a control instruction for controlling state change to a plurality of pieces of Internet of things equipment according to the candidate address list, acquiring state change of target equipment at a target position after receiving the control instruction through a camera, and determining an MAC address of the target equipment according to the state change; the MAC address of the target device is bound with the virtual device created for the target position in advance, the problems that in the related art, the device is bound in a mode of manually inputting or scanning the two-dimensional code, the operation of the manual input mode is complex, and if the two-dimensional code is lost or damaged in the mode of scanning the two-dimensional code, the device information is difficult to obtain can be solved, the MAC address of the target device is determined according to the state change of the target device acquired by the camera, the MAC is bound with the virtual device created in advance, and the device binding efficiency is improved.

Description

Equipment binding method and device
Technical Field
The invention relates to the field of information processing, in particular to a device binding method and device.
Background
In the implementation process of the internet of things system based on the wireless transmission technology, besides the installation of a plurality of internet of things devices in corresponding physical positions, the network access information (network topology information) of the internet of things devices in the network needs to be correspondingly stored through device identification, so that the network distribution process of the devices is completed. There is a need to find a way to correlate the logical identity of a device in a system with the physical device that is visible to the naked eye.
The existing solutions generally require a user (by manually inputting or scanning a two-dimensional code) to fill in identity information (such as an SN code or a MAC address) of a device to an APP, then scan surrounding devices and screen devices to be distributed according to the device identity information. This solution has some drawbacks; for example, manual input operations are cumbersome and the device two-dimensional code may be lost or inaccessible (the device is mounted to the ceiling).
Aiming at the problems that in the related art, equipment is bound in a mode of manually inputting or scanning a two-dimensional code, the operation of the manual input mode is complicated, and equipment information is difficult to obtain in a mode of scanning the two-dimensional code if the two-dimensional code is lost or damaged, a solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a device binding method and a device, and aims to at least solve the problems that in the related art, devices are bound in a mode of manually inputting or scanning a two-dimensional code, the operation of the manual input mode is complicated, and the device information is difficult to obtain if the two-dimensional code is lost or damaged in the mode of scanning the two-dimensional code.
According to an embodiment of the present invention, there is provided a device binding method including:
acquiring MAC addresses broadcasted by a plurality of Internet of things devices in a preset time period in the operation process;
sending a control instruction for controlling state change to the plurality of pieces of Internet of things equipment according to the candidate address list, acquiring state change of target equipment at a target position after receiving the control instruction through a camera, and determining an MAC address of the target equipment according to the state change;
and binding the MAC address of the target equipment with virtual equipment which is created for the target position in advance.
Optionally, sending a control instruction for controlling state change to the multiple pieces of internet of things equipment according to the candidate address list, acquiring, by a camera, a state change of target equipment at a target position after receiving the control instruction, and determining an MAC address of the target equipment according to the state change includes:
repeating the following operations on the candidate address list until one MAC address remains in the candidate address list, and determining that the MAC address is the MAC address of the target device:
sending the control instruction to the plurality of internet of things devices, wherein the control instruction is used for instructing the plurality of internet of things devices to execute a first operation if a MAC address is larger than or equal to a target MAC address, and execute a second operation if the MAC address is smaller than the target MAC address;
acquiring the operation executed by the target equipment after receiving the control instruction through the camera;
if the operation executed by the target device after receiving the control instruction is the first operation, dividing the target device into first class devices, wherein the first class devices are devices with the target MAC address or more, and updating the MAC address of the first class devices into the candidate MAC address;
if the operation executed by the target device after receiving the control instruction is the second operation, dividing the target device into second type devices, wherein the second type devices are devices smaller than the target MAC address, and updating the MAC address of the second type devices into the candidate MAC address.
Optionally, before sending the control instruction to the plurality of internet of things devices, the method further includes:
sequencing the MAC addresses of the Internet of things equipment from small to large or from large to small to obtain the candidate address list;
and determining the target MAC address from the candidate address list, wherein the target MAC address is the average value of two MAC addresses positioned in the middle of the candidate address list or the MAC address positioned in the middle of the candidate address list.
Optionally, the first operation is flashing once, and the second operation is flashing twice consecutively.
Optionally, after binding the MAC address of the target device with a virtual device configured for the target location in advance, the method further includes:
and sending the network configuration information of the virtual equipment to the target equipment.
Optionally, before acquiring the MAC addresses broadcast by the plurality of internet of things devices at a predetermined time period during operation, the method further includes:
creating virtual equipment at a physical position where the Internet of things equipment is located;
and storing the corresponding relation between the physical position and the virtual equipment, and storing the network configuration information of the virtual equipment.
According to another embodiment of the present invention, there is also provided an apparatus for binding devices, including:
the acquisition module is used for acquiring MAC addresses broadcasted by a plurality of Internet of things devices in a preset time period in the operation process;
the determining module is used for sending a control instruction for controlling state change to the plurality of pieces of Internet of things equipment according to the candidate address list, acquiring state change of target equipment at a target position after receiving the control instruction through a camera, and determining an MAC address of the target equipment according to the state change;
and the binding module is used for binding the MAC address of the target equipment with the virtual equipment which is created for the target position in advance.
Optionally, the determining module includes:
a repeating submodule, configured to repeat the following operations on the candidate address list until one MAC address remains in the candidate address list, and determine that the MAC address is the MAC address of the target device:
sending the control instruction to the plurality of internet of things devices, wherein the control instruction is used for instructing the plurality of internet of things devices to execute a first operation if a MAC address is larger than or equal to a target MAC address, and execute a second operation if the MAC address is smaller than the target MAC address;
acquiring the operation executed by the target equipment after receiving the control instruction through the camera;
if the operation executed by the target device after receiving the control instruction is the first operation, dividing the target device into first class devices, wherein the first class devices are devices with the target MAC address or more, and updating the MAC address of the first class devices into the candidate MAC address;
if the operation executed by the target device after receiving the control instruction is the second operation, dividing the target device into second type devices, wherein the second type devices are devices smaller than the target MAC address, and updating the MAC address of the second type devices into the candidate MAC address.
Optionally, the repetition submodule is further used for
Before the control instruction is sent to the plurality of pieces of internet-of-things equipment, the MAC addresses of the plurality of pieces of internet-of-things equipment are sorted from small to large or from large to small to obtain the candidate address list;
and determining the target MAC address from the candidate address list, wherein the target MAC address is the average value of two MAC addresses positioned in the middle of the candidate address list or the MAC address positioned in the middle of the candidate address list.
Optionally, the first operation is flashing once, and the second operation is flashing twice consecutively.
Optionally, the apparatus further comprises:
a sending module, configured to send the network configuration information of the virtual device to the target device.
Optionally, the apparatus further comprises:
the creating module is used for creating virtual equipment at the physical position of the Internet of things equipment;
and the storage module is used for storing the corresponding relation between the physical position and the virtual equipment and storing the network configuration information of the virtual equipment.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, MAC addresses broadcasted by a plurality of Internet of things devices in a preset time period in the operation process are obtained; sending a control instruction for controlling state change to the plurality of pieces of Internet of things equipment according to the candidate address list, acquiring state change of target equipment at a target position after receiving the control instruction through a camera, and determining an MAC address of the target equipment according to the state change; the MAC address of the target device is bound with the virtual device which is created for the target position in advance, the problems that in the related art, the device is bound in a mode of manually inputting or scanning the two-dimensional code, the operation of the manual input mode is complicated, and the device information is difficult to obtain in a mode of scanning the two-dimensional code if the two-dimensional code is lost or damaged are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a device binding method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a device binding method according to an embodiment of the invention;
FIG. 3 is a block diagram of a device binding apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a device binding apparatus according to a preferred embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a hardware structure block diagram of the mobile terminal of the device binding method according to the embodiment of the present invention, and as shown in fig. 1, the mobile terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for a communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the device binding method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a device binding method operating in the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of the device binding method according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, obtaining MAC addresses broadcasted by a plurality of Internet of things devices in a preset time period in the running process;
step S204, sending a control instruction for controlling state change to the plurality of Internet of things devices according to the candidate address list, acquiring state change of target devices at target positions after receiving the control instruction through a camera, and determining MAC addresses of the target devices according to the state change;
step S206, binding the MAC address of the target device with the virtual device created for the target location in advance.
Through the steps S202 to S206, MAC addresses broadcast by a plurality of internet of things devices in a predetermined time period during the operation process are obtained; sending a control instruction for controlling state change to the plurality of pieces of Internet of things equipment according to the candidate address list, acquiring state change of target equipment at a target position after receiving the control instruction through a camera, and determining an MAC address of the target equipment according to the state change; the MAC address of the target device is bound with the virtual device which is created for the target position in advance, the problems that in the related art, the device is bound in a mode of manually inputting or scanning the two-dimensional code, the operation of the manual input mode is complicated, and the device information is difficult to obtain in a mode of scanning the two-dimensional code if the two-dimensional code is lost or damaged are solved.
In an embodiment of the present invention, the step S204 may specifically include:
repeating the following operations on the candidate address list until one MAC address remains in the candidate address list, and determining that the MAC address is the MAC address of the target device:
sending the control instruction to the plurality of internet of things devices, wherein the control instruction is used for instructing the plurality of internet of things devices to execute a first operation if a MAC address is larger than or equal to a target MAC address, and execute a second operation if the MAC address is smaller than the target MAC address;
acquiring the operation executed by the target equipment after receiving the control instruction through the camera;
if the operation executed by the target device after receiving the control instruction is the first operation, dividing the target device into first class devices, wherein the first class devices are devices with the target MAC address or more, and updating the MAC address of the first class devices into the candidate MAC address;
if the operation executed by the target device after receiving the control instruction is the second operation, dividing the target device into second type devices, wherein the second type devices are devices smaller than the target MAC address, and updating the MAC address of the second type devices into the candidate MAC address.
In an optional embodiment, before the control instruction is sent to the multiple pieces of internet of things equipment, the MAC addresses of the multiple pieces of internet of things equipment are sorted from small to large or from large to small to obtain the candidate address list; and determining the target MAC address from the candidate address list, wherein the target MAC address is the average value of two MAC addresses positioned in the middle of the candidate address list or the MAC address positioned in the middle of the candidate address list.
In the embodiment of the present invention, the first operation may be flashing once, the second operation may be flashing twice continuously, and the device may determine the corresponding operation to be executed according to its MAC address after receiving the control instruction, so as to classify the device into one of two types of devices, that is, improve the efficiency of identifying the MAC address of the device by classification identification.
In an optional embodiment, after the MAC address of the target device is bound to the virtual device configured for the target location in advance, the network configuration information of the virtual device is sent to the target device.
In another optional embodiment, before obtaining MAC addresses broadcast by a plurality of internet of things devices in a predetermined time period during an operation process, a virtual device is created at a physical location where the internet of things devices are located; and storing the corresponding relation between the physical position and the virtual equipment, and storing the network configuration information of the virtual equipment.
In the embodiment of the present invention, an identification party (mobile terminal) and an identified party (internet of things device) quickly lock a target physical device from a device list in a dichotomy identification (or other classification identification) manner, specifically including:
1. the method comprises the steps that a cloud or a mobile terminal creates virtual equipment at a corresponding physical position and stores network configuration information of the virtual equipment;
2. the identified party broadcasts its own identity information periodically over the wireless interface at runtime.
3. The identifying party scans the radio broadcast to discover surrounding identified parties, resulting in a list of devices (e.g., a list of MAC addresses) for the surrounding identified parties. In order to bind each device in the device list to a device at a physical location, the devices in the device list need to be verified and bound.
4. The identification party starts a verification mode, specifically, the identification party aims at the target physical device, opens the camera, starts automatic verification, and the automatic verification specifically comprises:
1) dividing the identified party in the device list into a first part and a second part (which may be according to additional information in the broadcast information, such as device type, etc., or according to the signal strength of the broadcast, or according to the size arrangement of the MAC address, etc.);
2) sending a first control instruction to the first part of identified parties, and controlling the identified parties to carry out a first state change (such as flashing once); sending a second control instruction to the second part of the identified party to control the identified party to carry out a second state change (such as flashing twice) which can be identified by other parties;
3) if the identification party identifies that the target physical device has a first state change, dividing the first part in the device list into two parts again, and repeating the steps 1) and 2);
if the identification party identifies that the target physical device has a second state change, dividing the second part in the device list into two parts again, and repeating the steps 1) and 2);
4) and repeating the step 3) until only 1 item in the equipment list is left, namely the item of equipment is locked as the target physical equipment.
5. And the identification party configures the network information of the locked target physical device and configures the network configuration information of the virtual device to the target physical device.
According to the embodiment of the invention, the target physical equipment is locked for network access binding through equipment state change, so that the method and the system are convenient and quick; the equipment screening is an automatic process, the screening speed is high, a user only needs to open an APP, a camera of a terminal is used to aim at a target physical equipment, automatic verification can be started, theoretically, half of equipment can be screened out from an equipment list in each verification (equipment state change), the time of each equipment state change is only network delay time (usually not more than 1 second), and the time of each verification is only the network delay time multiplied by the state change times (usually not more than 5 seconds).
The following describes an embodiment of the present invention in detail by taking the reported number as 4 as an example.
There are 4 locations in the room where lighting devices can be installed, and the user enters information of the 4 locations in the management system, and actually installs one intelligent lighting device at each location. There is now a need to associate the smart device with 4 logical devices within the system. Each device carries different identity information in advance when leaving the factory, and the identity information can be a Bluetooth MAC address. After the user powers on all the devices, each device starts to send the bluetooth broadcast containing its own MAC address.
A user opens an application APP of the mobile terminal, specifically a mobile phone APP, and selects one of 4 positions; the mobile phone APP calls the camera and prompts a user to align the camera to the equipment installed at the corresponding position. Starting Bluetooth scanning by a mobile phone APP and finding that 4 devices to be configured are arranged around the mobile phone APP; arranging the scanned equipment MAC addresses from small to large to obtain candidate address lists m1, m2, m3 and m 4; the mobile phone APP orders the equipment with the MAC address larger than or equal to m3 to flash for two times and the equipment with the MAC address smaller than m3 to flash for two times in 4 equipment. The mobile phone app finds that the lighting equipment in the camera range flashes twice, so that the MAC address of the lighting equipment is less than m3, and the candidate address list is shortened to m1 and m 2; the mobile phone APP orders the equipment with the MAC address larger than or equal to m2 to flash for two times and the equipment with the MAC address smaller than m2 to flash for two times in 2 pieces of equipment; the cell phone app finds that the lighting device within the camera range is flashing, and then knows that the MAC address of the lighting device is equal to or greater than m2, and the candidate address list is shortened to m 2. The handset APP now concludes that the lighting device to be configured is m2 and initiates a configuration procedure to address m2, associating the device with location 1 in the system
The number of devices in the above process is 4, but the number of devices is not specifically limited in the embodiment of the present invention, and may be much higher than 4, and by a method of eliminating half of the devices each time, the identity information of the device to be configured can be quickly found. For example, when the number of devices to be configured in a room reaches 256, the identity information can be locked by repeating the process of sending the command/screening 8 times.
Example 2
According to another embodiment of the present invention, there is also provided a device binding apparatus, and fig. 3 is a block diagram of the device binding apparatus according to the embodiment of the present invention, as shown in fig. 3, including:
the obtaining module 32 is configured to obtain MAC addresses broadcast by multiple pieces of internet of things equipment in a predetermined time period during an operation process;
the determining module 34 is configured to send a control instruction for controlling state change to the multiple pieces of internet of things equipment according to the candidate address list, acquire, by using a camera, a state change of target equipment at a target position after receiving the control instruction, and determine an MAC address of the target equipment according to the state change;
a binding module 36, configured to bind the MAC address of the target device with a virtual device created in advance for the target location.
Optionally, the determining module 34 includes:
a repeating submodule, configured to repeat the following operations on the candidate address list until one MAC address remains in the candidate address list, and determine that the MAC address is the MAC address of the target device:
sending the control instruction to the plurality of internet of things devices, wherein the control instruction is used for instructing the plurality of internet of things devices to execute a first operation if a MAC address is larger than or equal to a target MAC address, and execute a second operation if the MAC address is smaller than the target MAC address;
acquiring the operation executed by the target equipment after receiving the control instruction through the camera;
if the operation executed by the target device after receiving the control instruction is the first operation, dividing the target device into first class devices, wherein the first class devices are devices with the target MAC address or more, and updating the MAC address of the first class devices into the candidate MAC address;
if the operation executed by the target device after receiving the control instruction is the second operation, dividing the target device into second type devices, wherein the second type devices are devices smaller than the target MAC address, and updating the MAC address of the second type devices into the candidate MAC address.
Optionally, the repetition sub-module is further used for
Before the control instruction is sent to the plurality of pieces of internet-of-things equipment, the MAC addresses of the plurality of pieces of internet-of-things equipment are sorted from small to large or from large to small to obtain the candidate address list;
and determining the target MAC address from the candidate address list, wherein the target MAC address is the average value of two MAC addresses positioned in the middle of the candidate address list or the MAC address positioned in the middle of the candidate address list.
Optionally, the first operation is flashing once, and the second operation is flashing twice consecutively.
Fig. 4 is a block diagram of a device binding apparatus according to a preferred embodiment of the present invention, as shown in fig. 4, the apparatus further includes:
a sending module 42, configured to send the network configuration information of the virtual device to the target device.
Optionally, the apparatus further comprises:
the creating module is used for creating virtual equipment at the physical position of the Internet of things equipment;
and the storage module is used for storing the corresponding relation between the physical position and the virtual equipment and storing the network configuration information of the virtual equipment.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, obtaining MAC addresses broadcast by a plurality of Internet of things devices in a preset time period in the running process;
s2, sending a control instruction for controlling state change to the plurality of Internet of things devices according to the candidate address list, acquiring state change of target devices at target positions after receiving the control instruction through a camera, and determining MAC addresses of the target devices according to the state change;
s3, binding the MAC address of the target device with the virtual device created for the target location in advance.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Example 4
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, obtaining MAC addresses broadcast by a plurality of Internet of things devices in a preset time period in the running process;
s2, sending a control instruction for controlling state change to the plurality of Internet of things devices according to the candidate address list, acquiring state change of target devices at target positions after receiving the control instruction through a camera, and determining MAC addresses of the target devices according to the state change;
s3, binding the MAC address of the target device with the virtual device created for the target location in advance.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A device binding method, comprising:
acquiring MAC addresses broadcasted by a plurality of Internet of things devices in a preset time period in the operation process;
sending a control instruction for controlling state change to the plurality of pieces of Internet of things equipment according to the candidate address list, acquiring state change of target equipment at a target position after receiving the control instruction through a camera, and determining an MAC address of the target equipment according to the state change;
and binding the MAC address of the target equipment with virtual equipment which is created for the target position in advance.
2. The method of claim 1, wherein sending a control instruction for controlling state change to the plurality of internet of things devices according to the candidate address list, acquiring state change of a target device at a target position after receiving the control instruction through a camera, and determining the MAC address of the target device according to the state change comprises:
repeating the following operations on the candidate address list until one MAC address remains in the candidate address list, and determining that the MAC address is the MAC address of the target device:
sending the control instruction to the plurality of internet of things devices, wherein the control instruction is used for instructing the plurality of internet of things devices to execute a first operation if a MAC address is larger than or equal to a target MAC address, and execute a second operation if the MAC address is smaller than the target MAC address;
acquiring the operation executed by the target equipment after receiving the control instruction through the camera;
if the operation executed by the target device after receiving the control instruction is the first operation, dividing the target device into first class devices, wherein the first class devices are devices with the target MAC address or more, and updating the MAC address of the first class devices into the candidate MAC address;
if the operation executed by the target device after receiving the control instruction is the second operation, dividing the target device into second type devices, wherein the second type devices are devices smaller than the target MAC address, and updating the MAC address of the second type devices into the candidate MAC address.
3. The method of claim 2, wherein prior to sending the control instructions to the plurality of internet of things devices, the method further comprises:
sequencing the MAC addresses of the Internet of things equipment from small to large or from large to small to obtain the candidate address list;
and determining the target MAC address from the candidate address list, wherein the target MAC address is the average value of two MAC addresses positioned in the middle of the candidate address list or the MAC address positioned in the middle of the candidate address list.
4. The method of claim 2, wherein the first operation is flashing once and the second operation is flashing twice in succession.
5. The method of claim 1, wherein after binding the MAC address of the target device with a virtual device pre-configured for the target location, the method further comprises:
and sending the network configuration information of the virtual equipment to the target equipment.
6. The method according to any one of claims 1 to 4, wherein before acquiring the MAC addresses broadcasted by the plurality of Internet of things devices in a predetermined time period in the operation process, the method further comprises:
creating virtual equipment at a physical position where the Internet of things equipment is located;
and storing the corresponding relation between the physical position and the virtual equipment, and storing the network configuration information of the virtual equipment.
7. An apparatus for binding a device, comprising:
the acquisition module is used for acquiring MAC addresses broadcasted by a plurality of Internet of things devices in a preset time period in the operation process;
the determining module is used for sending a control instruction for controlling state change to the plurality of pieces of Internet of things equipment according to the candidate address list, acquiring state change of target equipment at a target position after receiving the control instruction through a camera, and determining an MAC address of the target equipment according to the state change;
and the binding module is used for binding the MAC address of the target equipment with the virtual equipment which is created for the target position in advance.
8. The apparatus of claim 7, wherein the determining module comprises:
a repeating submodule, configured to repeat the following operations on the candidate address list until one MAC address remains in the candidate address list, and determine that the MAC address is the MAC address of the target device:
sending the control instruction to the plurality of internet of things devices, wherein the control instruction is used for instructing the plurality of internet of things devices to execute a first operation if a MAC address is larger than or equal to a target MAC address, and execute a second operation if the MAC address is smaller than the target MAC address;
acquiring the operation executed by the target equipment after receiving the control instruction through the camera;
if the operation executed by the target device after receiving the control instruction is the first operation, dividing the target device into first class devices, wherein the first class devices are devices with the target MAC address or more, and updating the MAC address of the first class devices into the candidate MAC address;
if the operation executed by the target device after receiving the control instruction is the second operation, dividing the target device into second type devices, wherein the second type devices are devices smaller than the target MAC address, and updating the MAC address of the second type devices into the candidate MAC address.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 6 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
CN202010632118.1A 2020-07-03 2020-07-03 Equipment binding method and device Active CN111818611B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010632118.1A CN111818611B (en) 2020-07-03 2020-07-03 Equipment binding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010632118.1A CN111818611B (en) 2020-07-03 2020-07-03 Equipment binding method and device

Publications (2)

Publication Number Publication Date
CN111818611A true CN111818611A (en) 2020-10-23
CN111818611B CN111818611B (en) 2022-04-01

Family

ID=72855230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010632118.1A Active CN111818611B (en) 2020-07-03 2020-07-03 Equipment binding method and device

Country Status (1)

Country Link
CN (1) CN111818611B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788545A (en) * 2020-12-29 2021-05-11 武汉联影智融医疗科技有限公司 Binding method, computer device and storage medium
CN114398917A (en) * 2021-11-23 2022-04-26 青岛奥利普自动化控制系统有限公司 Pump valve maintenance method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160191780A1 (en) * 2014-12-31 2016-06-30 Xiaomi Inc. Method and apparatus for recording videos
CN105739314A (en) * 2016-01-29 2016-07-06 北京小米移动软件有限公司 Method and device capable of establishing binding relation with controllable device
CN105871821A (en) * 2016-03-24 2016-08-17 浙江风向标科技有限公司 Device binding method
CN109922140A (en) * 2019-02-17 2019-06-21 北京意锐新创科技有限公司 Batch binds the method and system of two dimension code reading device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160191780A1 (en) * 2014-12-31 2016-06-30 Xiaomi Inc. Method and apparatus for recording videos
CN105739314A (en) * 2016-01-29 2016-07-06 北京小米移动软件有限公司 Method and device capable of establishing binding relation with controllable device
CN105871821A (en) * 2016-03-24 2016-08-17 浙江风向标科技有限公司 Device binding method
CN109922140A (en) * 2019-02-17 2019-06-21 北京意锐新创科技有限公司 Batch binds the method and system of two dimension code reading device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788545A (en) * 2020-12-29 2021-05-11 武汉联影智融医疗科技有限公司 Binding method, computer device and storage medium
CN114398917A (en) * 2021-11-23 2022-04-26 青岛奥利普自动化控制系统有限公司 Pump valve maintenance method and device and storage medium

Also Published As

Publication number Publication date
CN111818611B (en) 2022-04-01

Similar Documents

Publication Publication Date Title
CN111865736B (en) Equipment control method and device
CN110061871B (en) Base station opening method and device, computer storage medium and equipment
CN103346974B (en) Controlling method of service process and network device
CN111885144B (en) Equipment binding method and device
CN111818611B (en) Equipment binding method and device
CN111641997B (en) Equipment network access method and device based on Bluetooth Mesh network, and storage medium
CN111885115B (en) Device binding changing method and device
CN109240724A (en) A kind of cascade device upgrade method and equipment
CN111885594A (en) Equipment binding method and device
CN111342985A (en) Network distribution method, Internet of things system and Internet of things equipment
CN110472216B (en) Method and device for determining field, storage medium and electronic device
CN111641996A (en) Equipment network access method and device based on Bluetooth Mesh network, and storage medium
CN113285810B (en) Target equipment login method and device, storage medium and electronic device
CN113452556A (en) Product skill configuration method and device, storage medium and electronic device
CN112637221B (en) Equipment control method and device
CN111356182A (en) Resource scheduling and processing method and device
CN112738785A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN111866856A (en) Mesh device control method and system, storage medium and electronic device
CN114205378A (en) Network distribution method and device of Internet of things equipment, storage medium and electronic device
CN111385110B (en) Network management method and device
CN114007276A (en) Network access processing method, device, equipment and system of ZigBee network
CN111726411B (en) Equipment binding method, device, system, storage medium and electronic device
CN110611589B (en) Control method and device of regional control system and air conditioning system
CN112533304A (en) Ad hoc network management method, device, system, electronic device and storage medium
CN114697375B (en) Voice packet switching method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant