[go: up one dir, main page]

CN116367355A - Networking method and system of electrical equipment, terminal equipment and readable storage medium - Google Patents

Networking method and system of electrical equipment, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN116367355A
CN116367355A CN202310332903.9A CN202310332903A CN116367355A CN 116367355 A CN116367355 A CN 116367355A CN 202310332903 A CN202310332903 A CN 202310332903A CN 116367355 A CN116367355 A CN 116367355A
Authority
CN
China
Prior art keywords
equipment
electrical
ble
terminal
electrical 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.)
Pending
Application number
CN202310332903.9A
Other languages
Chinese (zh)
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202310332903.9A priority Critical patent/CN116367355A/en
Publication of CN116367355A publication Critical patent/CN116367355A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a networking method, a networking system, terminal equipment and a readable storage medium of electrical equipment, wherein the terminal equipment acquires identification information of a plurality of electrical equipment in a preset space; according to the identification information of each electrical equipment, BLE connection is respectively established with each electrical equipment so as to establish BLE networking, and a WiFi Mesh network is established according to the BLE networking so that any two electrical equipment are connected through WiFi communication; and transmitting the first instruction data packet to the intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to the first type of electric equipment by using WiFi communication to control the first type of electric equipment. According to the router device, the terminal equipment is connected with the BLE of each electrical equipment, the configuration and the control of the remote electrical equipment are realized through WiFi communication between the electrical equipment, and the problems that the existing BLE communication distance is short and router equipment is needed in WiFi networking are solved.

Description

Networking method and system of electrical equipment, terminal equipment and readable storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a networking method of an electrical device, a networking system of an electrical device, a terminal device, and a computer readable storage medium.
Background
Networking control methods for electrical appliances (such as air conditioners) are now increasing, for example: wiFi, BLE, etc., and various networking approaches have their own advantages and disadvantages, such as WiFi networking can be remote but requires networking and requires router devices; BLE consumes low power but has a short communication range.
Disclosure of Invention
The main object of the present application is to provide a networking method for electrical equipment, a networking system for electrical equipment, a terminal device and a computer readable storage medium, so as to at least solve the problems that the existing BLE communication distance is short and the router device is required for WiFi networking.
To achieve the above object, according to one aspect of the present application, there is provided a networking method of an electrical device, including: the terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment; the terminal equipment establishes BLE connection with each electrical equipment according to the identification information of each electrical equipment so as to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking so as to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence; the terminal equipment adopts BLE communication to send a first instruction data packet to the intermediate equipment, so that the intermediate equipment adopts WiFi communication to forward the first instruction data packet to first type electrical equipment to control the first type electrical equipment, wherein the distance between the first type electrical equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate equipment is one of a plurality of electrical equipment except the first type electrical equipment.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by adopting BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by adopting WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires a plurality of transmission paths, wherein each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment, each transmission path comprises a plurality of nodes, each node comprises a terminal equipment node, at least one intermediate equipment node and a first type electrical equipment node, the terminal equipment node is used for representing the terminal equipment, the intermediate equipment node is used for representing the intermediate equipment, and the first type electrical equipment node is used for representing the first type electrical equipment; the terminal equipment determines the transmission path with the least intermediate equipment node from a plurality of transmission paths as a target transmission path; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
Optionally, the transmission paths with the minimum intermediate device are multiple, and the terminal device determines the transmission path with the minimum intermediate device node from the multiple transmission paths as a target transmission path, including: the terminal equipment acquires a plurality of target distances, wherein each target distance is the distance between an initial intermediate equipment node and the terminal equipment node, and the initial intermediate equipment node is the next node of the terminal equipment node; the terminal device determines the transmission path corresponding to the shortest target distance among the plurality of target distances as the target transmission path.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by adopting BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by adopting WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires the path hop number of the first instruction data packet sent from the terminal equipment to the first type electrical equipment on each transmission path, wherein the path hop number represents the number of the nodes on the transmission paths, and each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the path of the first type electrical equipment; the terminal equipment determines the transmission path with the minimum path hop number as a target transmission path according to each path hop number; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
Optionally, the method further comprises: the terminal equipment acquires the identification information of the newly added equipment; the terminal equipment establishes BLE connection with the newly-added equipment according to the identification information of the newly-added equipment so that the newly-added equipment joins the WiFi Mesh network; and the terminal equipment sends the identification information of the newly-added equipment to each electrical equipment in the WiFi Mesh network.
Optionally, the terminal device establishes a WiFi Mesh network according to the BLE networking, including: the terminal equipment receives first request information of each electrical equipment, wherein the first request information is information of the electrical equipment requesting to establish the WiFi communication with the terminal equipment; and the terminal equipment establishes a WiFi Mesh network according to the first request information and the BLE networking.
Optionally, the method further comprises: the terminal equipment adopts BLE communication to directly send a second instruction data packet to second-type electrical equipment so as to control the second-type electrical equipment, wherein the second-type electrical equipment is the electrical equipment with the distance from the terminal equipment being smaller than or equal to the maximum BLE transmission distance.
According to another aspect of the present application, there is provided a networking system for an electrical device, including: the terminal equipment is used for executing any networking method of the electrical equipment; and the electrical equipment comprises BLE modules and WiFi modules, wherein the BLE modules of the electrical equipment are used for realizing BLE communication with the terminal equipment, and the electrical equipment realizes WiFi communication through the WiFi modules of the electrical equipment.
According to another aspect of the present application, there is provided a terminal device, including: an obtaining unit, configured to obtain identification information of a plurality of electrical apparatuses in a predetermined space, where the identification information is used to uniquely identify the electrical apparatuses; the execution unit is used for respectively establishing BLE connection with each electrical device according to the identification information of each electrical device so as to establish a BLE networking, and establishing a WiFi Mesh network according to the BLE networking so as to enable any two electrical devices to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal device, and sub-nodes of the WiFi Mesh network are the electrical devices in one-to-one correspondence; and the sending unit is used for sending the first instruction data packet to an intermediate device by adopting BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electric equipment by adopting WiFi communication to control the first type of electric equipment, wherein the distance between the first type of electric equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate device is one of a plurality of electric equipment except the first type of electric equipment.
According to another aspect of the present application, there is provided a computer readable storage medium, where the computer readable storage medium includes a stored program, and when the program runs, the device where the computer readable storage medium is located is controlled to execute any one of the networking methods of the electrical device.
By applying the technical scheme, the networking method of the electrical equipment comprises the steps that firstly, the terminal equipment obtains identification information of a plurality of electrical equipment in a preset space, and the identification information is used for uniquely identifying the electrical equipment; secondly, the terminal equipment respectively establishes BLE connection with each electrical equipment according to the identification information of each electrical equipment so as to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking so as to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence; and finally, the terminal equipment adopts BLE communication to send the first instruction data packet to the intermediate equipment, so that the intermediate equipment adopts WiFi communication to forward the first instruction data packet to the first type electrical equipment to control the first type electrical equipment, wherein the distance between the first type electrical equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate equipment is one of a plurality of electrical equipment except the first type electrical equipment. According to the method, the terminal equipment BLE is connected with each electrical equipment to be configured, each equipment is directly connected through Wi-Fi to form a local Mesh network, wiFi communication is achieved among the electrical equipment without a router, a user can configure and control the remote electrical equipment by connecting any electrical equipment through BLE, the problems that the existing BLE communication distance is short, router equipment is needed in WiFi networking are solved, and the method has more cost advantages.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a block diagram showing a hardware configuration of a mobile terminal for performing a networking method of an electrical device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a networking method of an electrical device according to an embodiment of the present application;
fig. 3 is a schematic diagram of a communication manner between a terminal device and an electrical device according to an embodiment of the present application;
fig. 4 is a schematic flow chart of another networking method of an electrical device according to an embodiment of the present application;
fig. 5 shows a block diagram of a terminal device according to an embodiment of the present application.
Wherein the above figures include the following reference numerals:
102. a processor; 104. a memory; 106. a transmission device; 108. and an input/output device.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described in the background, wiFi networking in the prior art may be remote but requires networking and requires router equipment; in order to solve the problems that the existing BLE communication distance is short and the router equipment is needed for WiFi networking, the embodiment of the application provides a networking method of electrical equipment, a networking system of the electrical equipment, terminal equipment and a computer readable storage medium.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the operation on the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a networking method of an electrical device according to an embodiment of the present invention. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. 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 to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a display method of identification information in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-described method. 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 remotely located relative to the processor 102, which may be connected to the mobile terminal 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. The transmission device 106 is used to receive or transmit 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 (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In the present embodiment, a networking method of an electrical device operating on a mobile terminal, a computer terminal, or a similar computing device is provided, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
Fig. 2 is a flowchart of a networking method of an electrical device according to an embodiment of the present application. As shown in fig. 2, the method comprises the steps of:
step S201, terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment;
specifically, the identification information generally includes information such as ID, IP, etc. of an electrical apparatus, and the terminal apparatus is generally a mobile phone, a computer, a tablet, etc., and the electrical apparatus may be an air conditioner, a humidifier, a refrigerator, etc.
Step S202, the terminal equipment establishes BLE connection with the electrical equipment according to the identification information of the electrical equipment respectively to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence;
Specifically, when the terminal device is a mobile phone and the electrical device is an air conditioner, a user can use the mobile phone APP or an applet to bind and connect each air conditioner with the mobile phone through BLE, set the mobile phone as a main node in the WiFi Mesh network, and set the air conditioner as a sub-node to complete networking, wherein the specific process of establishing the WiFi Mesh network by the mobile phone according to the BLE networking is as follows: firstly, a networking APP or networking applet is used, a networking is firstly established in the APP or the applet, then mobile phones and electrical equipment are bound and connected one by one in the networking through BLE, the mobile phones are set as main nodes in the WiFi-Mesh network, all the electrical equipment are set as sub-nodes, and a local WiFi Mesh can be formed after connection is completed.
In step S202, the specific implementation steps of the terminal device to establish the WiFi Mesh network according to the BLE networking are as follows:
step S2021, the terminal device receives first request information of each of the electrical devices, where the first request information is information that the electrical device requests to establish the WiFi communication with the terminal device;
step S2022, the terminal device establishes a WiFi Mesh network according to the first request information and the BLE networking.
Specifically, after the WiFi Mesh network is established, the WiFi of the electrical equipment (for example, an air conditioner) needs to be continuously connected to the Mesh network manually, that is, the user manually selects the electrical equipment on the terminal equipment (for example, a mobile phone), searches for the WiFi Mesh network, and then manually joins the WiFi Mesh network, so that BLE communication and WiFi communication can be simultaneously realized.
In step S203, the terminal device sends a first instruction data packet to an intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by using WiFi communication to control the first type of electrical device, where a distance between the first type of electrical device and the terminal device is greater than a BLE maximum transmission distance, and the intermediate device is one of a plurality of electrical devices except the first type of electrical device.
Specifically, the BLE maximum transmission distance is typically 10 meters, and the WIFI maximum transmission distance is 50 meters but the actual BLE maximum transmission distance is lower than this value under the influence of interference of the environment, obstacles, electrical devices, and the like. But after networking, the control instruction can be forwarded by other devices in the local network to realize control over a longer distance (for example, the distance between the target air conditioner and the terminal device is greater than 50 meters, but other air conditioners are arranged between the terminal device and the target air conditioner, so that the instruction can be forwarded by the intermediate air conditioner to reach the target air conditioner to realize control).
As shown in fig. 3, in the above embodiment, BLE communication can be implemented between a terminal device and an electrical device, and WiFi communication can be implemented between any two electrical devices.
The specific implementation steps of step S203 are as follows:
step S301, the terminal device obtains a plurality of transmission paths, where each transmission path starts from the terminal device, ends at the first type of electrical device via the intermediate device, and includes a plurality of nodes, where the plurality of nodes include a terminal device node, at least one intermediate device node, and a first type of electrical device node, where the terminal device node is used to represent the terminal device, the intermediate device node is used to represent the intermediate device, and the first type of electrical device node is used to represent the first type of electrical device;
step S302, the terminal equipment determines the transmission path with the least intermediate equipment node from a plurality of transmission paths as a target transmission path;
wherein the number of the transmission paths with the minimum number of the intermediate devices is plural, the implementation steps of the step S302 are as follows:
step S3021, the terminal device obtains a plurality of target distances, where each target distance is a distance between an initial intermediate device node and the terminal device node, and the initial intermediate device node is a next node of the terminal device node;
In step S3022, the terminal device determines the transmission path corresponding to the shortest target distance among the plurality of target distances as the target transmission path.
For example: the intermediate equipment on the two paths is only one, and the path of the intermediate equipment, which is closer to the terminal equipment, is selected, so that the signal is stronger and the transmission is facilitated because the intermediate equipment is closer to the terminal equipment.
In step S303, the terminal device sends the first instruction packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction packet to the first type electrical device through the WiFi communication to control the first type electrical device.
In general, a user can directly select an electrical device to be controlled from a terminal, and after sending an instruction, the instruction is forwarded to a target air conditioner through a Mesh network to realize control.
Specifically, there may be different numbers of intermediate devices on different transmission paths, and more intermediate devices prove that the first instruction data packet is received and sent for more forwarding times, and thus there is a risk of packet loss, so that in order to reduce the risk of packet loss, a transmission path with fewer intermediate devices is generally selected.
In another embodiment, the implementation of step S203 further includes:
step S401, the terminal equipment obtains the path hop count of the first instruction data packet sent from the terminal equipment to the first type electrical equipment on each transmission path, wherein the path hop count represents the number of the nodes on the transmission path, and each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment;
step S402, the terminal equipment determines the transmission path with the minimum path hop number as a target transmission path according to each path hop number;
in step S403, the terminal device sends the first instruction packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction packet to the first type electrical device through the WiFi communication to control the first type electrical device.
Specifically, the number of path hops is generally 1 less than the number of nodes on the path, so that the number of corresponding nodes on different paths can be obtained by comparing the path hops, and the target transmission path can be obtained, thereby realizing rapid energy-saving transmission.
In the case that there is a newly added device to be connected to the WiFi Mesh network, the method further includes:
step S501, the terminal equipment acquires the identification information of the newly added equipment;
step S502, the terminal device establishes BLE connection with the newly added device according to the identification information of the newly added device, so that the newly added device joins the WiFi Mesh network;
step S503, the terminal device sends the identification information of the newly added device to each of the electrical devices in the WiFi Mesh network.
Specifically, the newly added device can join the WiFi Mesh network only by connecting and binding with the WiFi configuration network, configuration information is only a password (set in the establishment process) for joining the WiFi Mesh network, and basic information such as device names, addresses and the like can be synchronized to other devices on the local area after joining the WiFi Mesh network. The control of the newly added device can be realized. And the user can realize local networking without accessing the Internet, and the problem of short BLE communication distance and the problem of multi-device control are solved, so that the method has strong cost advantage and convenience.
Illustratively, the above method further comprises: the terminal equipment directly sends a second instruction data packet to second-type electrical equipment by adopting the BLE communication so as to control the second-type electrical equipment, wherein the second-type electrical equipment is the electrical equipment with the distance from the terminal equipment being smaller than or equal to the maximum transmission distance of the BLE.
Specifically, under the condition that the electrical equipment is close to the terminal equipment, the terminal equipment can directly control the electrical equipment through BLE communication without intermediate equipment, so that power consumption and cost are reduced.
Based on the above, the user can also establish a plurality of local networks, and access the Internet by using the mobile phone as a gateway, so as to realize the rapid networking among the local devices and the rapid composition of a large cross-domain network among the local networks, and synchronize the device information among the plurality of local networks, thereby realizing remote control.
According to the networking method of the electrical equipment, firstly, terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, and the identification information is used for uniquely identifying the electrical equipment; secondly, the terminal equipment respectively establishes BLE connection with each electrical equipment according to the identification information of each electrical equipment so as to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking so as to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence; and finally, the terminal equipment adopts BLE communication to send the first instruction data packet to the intermediate equipment, so that the intermediate equipment adopts WiFi communication to forward the first instruction data packet to the first type electrical equipment to control the first type electrical equipment, wherein the distance between the first type electrical equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate equipment is one of a plurality of electrical equipment except the first type electrical equipment. According to the method, the terminal equipment BLE is connected with each electrical equipment to be configured, each equipment is directly connected through Wi-Fi to form a local Mesh network, wiFi communication is achieved among the electrical equipment without a router, a user can configure and control the remote electrical equipment by connecting any electrical equipment through BLE, the problems that the existing BLE communication distance is short, router equipment is needed in WiFi networking are solved, and the method has more cost advantages.
In order to enable those skilled in the art to more clearly understand the technical solutions of the present application, the implementation process of the networking method of the electrical device of the present application will be described in detail below with reference to specific embodiments.
The embodiment relates to a specific networking method of electrical equipment, as shown in fig. 4, comprising the following steps:
step S1: a user communicates with an air conditioner through a mobile phone BLE, establishes binding with the air conditioner one by one, and establishes a Wi-Fi local Mesh network.
Step S2: the air conditioner after binding can search the local Mesh network through Wi-Fi and join the Mesh network.
Step S3: after a user connects any air conditioner through a mobile phone BLE and configures the network, configuration information of the user can be synchronized to other air conditioning equipment on a local network through Wi-Fi of the air conditioner.
Step S4: at this time, the user mobile phone can also control other air conditioners by connecting any air conditioner through BLE, and the air conditioner can forward the control command to other air conditioners through Wi-Fi network, so that remote (the distance beyond normal BLE communication) control response is realized.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a networking system of the electrical equipment, which comprises: the terminal equipment is used for executing any one of the networking methods of the electrical equipment; and the electrical equipment comprises BLE modules and WiFi modules, wherein the BLE modules of the electrical equipment are used for realizing BLE communication with the terminal equipment, and the electrical equipment realizes WiFi communication through the WiFi modules of the electrical equipment.
The networking system of the electrical equipment of the application comprises: the terminal equipment is used for executing any one of the networking methods of the electrical equipment; and the electrical equipment comprises BLE modules and WiFi modules, wherein the BLE modules of the electrical equipment are used for realizing BLE communication with the terminal equipment, and the electrical equipment realizes WiFi communication through the WiFi modules of the electrical equipment. According to the system, the terminal equipment BLE is connected with each electrical equipment to be configured, each equipment is directly connected through Wi-Fi to form a local Mesh network, wiFi communication is achieved among the electrical equipment without a router, a user can configure and control the remote electrical equipment by connecting any electrical equipment through BLE, the problems that the existing BLE communication distance is short, router equipment is needed for WiFi networking are solved, and the system has more cost advantages.
The embodiment of the application also provides a terminal device, and it should be noted that the terminal device of the embodiment of the application can be used for executing the networking method for the electrical equipment provided by the embodiment of the application. The device is used for realizing the above embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The following describes a terminal device provided in an embodiment of the present application.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device includes: the device comprises an acquisition unit 10, an execution unit 20 and a sending unit 30, wherein the acquisition unit 10 is used for acquiring identification information of a plurality of electrical equipment in a predetermined space, and the identification information is used for uniquely identifying the electrical equipment; the execution unit 20 is configured to establish BLE connection with each electrical device according to the identification information of each electrical device, so as to establish BLE networking, and establish a WiFi Mesh network according to the BLE networking, so that any two electrical devices are connected through WiFi communication, a main node of the WiFi Mesh network is the terminal device, and sub-nodes of the WiFi Mesh network are the electrical devices in one-to-one correspondence; the sending unit 30 is configured to send a first instruction packet to an intermediate device by using BLE communication, so that the intermediate device forwards the first instruction packet to a first type of electrical device by using WiFi communication to control the first type of electrical device, where a distance between the first type of electrical device and the terminal device is greater than a BLE maximum transmission distance, and the intermediate device is one of a plurality of electrical devices except the first type of electrical device.
The networking device of the electrical equipment comprises an acquisition unit, an execution unit and a sending unit, wherein the acquisition unit is used for acquiring identification information of a plurality of electrical equipment in a preset space, and the identification information is used for uniquely identifying the electrical equipment; the execution unit is used for respectively establishing BLE connection with each electrical device according to the identification information of each electrical device so as to establish a BLE networking, and establishing a WiFi Mesh network according to the BLE networking so as to enable any two electrical devices to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is terminal equipment, and sub-nodes of the WiFi Mesh network are electrical devices in one-to-one correspondence; the sending unit is used for sending the first instruction data packet to the intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to the first type electrical equipment by using WiFi communication to control the first type electrical equipment, wherein the distance between the first type electrical equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate device is one of a plurality of electrical equipment except the first type electrical equipment. The device is connected with each electrical equipment through the terminal equipment BLE to be configured, each device is directly connected through Wi-Fi to form a local Mesh network, so that each electrical equipment is communicated through WiFi, a router is not needed, a user can be connected with any electrical equipment through BLE to configure and control the remote electrical equipment, the problems that the existing BLE communication distance is short and the router equipment is needed in WiFi networking are solved, and the device has more cost advantages.
The transmitting unit includes a first acquiring module, a first determining module, and a first transmitting module, where the first acquiring module is configured to acquire a plurality of transmission paths, each of the transmission paths is a path starting from the terminal device and ending in the first type electrical device via the intermediate device, each of the transmission paths includes a plurality of nodes, each of the plurality of nodes includes a terminal device node, at least one intermediate device node, and a first type electrical device node, the terminal device node is configured to represent the terminal device, the intermediate device node is configured to represent the intermediate device, and the first type electrical device node is configured to represent the first type electrical device; the first determining module is configured to determine, from among the plurality of transmission paths, the transmission path with the least number of intermediate device nodes as a target transmission path; the first sending module is configured to send the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device. The risk of packet loss can be reduced.
As an alternative scheme, the transmission paths with the minimum intermediate devices are provided with a plurality of transmission paths, the determining module comprises an obtaining subunit and a determining subunit, the obtaining subunit is used for obtaining a plurality of target distances, each target distance is a distance between an initial intermediate device node and the terminal device node, and the initial intermediate device node is a next node of the terminal device node; the determination subunit is configured to determine, as the target transmission path, the transmission path corresponding to the shortest target distance among the plurality of target distances. The target transmission path signal is stronger, and is more beneficial to transmission.
In an alternative example, the sending unit includes a second obtaining module, a second determining module, and a second sending module, where the second obtaining module is configured to obtain, for each transmission path, a path hop count of the first instruction packet sent from the terminal device to the first type electrical device, where the path hop count indicates a number of the nodes on the transmission path, and each of the transmission paths starts from the terminal device, ends, via the intermediate device, with a path of the first type electrical device; the second determining module is used for determining the transmission path with the minimum path hop number as a target transmission path according to each path hop number; the second sending module is configured to send the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device. This allows for fast energy efficient transmission.
In an optional embodiment, the apparatus further includes an acquiring subunit, an executing subunit, and a sending subunit, where the acquiring subunit is configured to acquire identification information of the added device; the execution subunit is configured to establish BLE connection with the added device according to the identification information of the added device, so that the added device joins the WiFi Mesh network; the sending subunit is used for sending the identification information of the newly added equipment to each electrical equipment in the WiFi Mesh network.
As an alternative scheme, the execution unit comprises a receiving module and an execution module, wherein the receiving module is used for receiving first request information of each electrical equipment, and the first request information is information that the electrical equipment requests to establish the WiFi communication with the terminal equipment; and the execution module is used for establishing a WiFi Mesh network according to the first request information and the BLE networking. BLE communication and WIFI communication can be achieved simultaneously.
The apparatus further includes a third sending module, configured to send a second instruction packet directly to a second type of electrical device using the BLE communication to control the second type of electrical device, where the second type of electrical device is the electrical device having a distance from the terminal device that is less than or equal to the BLE maximum transmission distance. The control of the newly added device can be realized. And the user can realize local networking without accessing the Internet, and the problem of short BLE communication distance and the problem of multi-device control are solved, so that the method has strong cost advantage and convenience.
The terminal device includes a processor and a memory, the acquisition unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions. The modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the problems that the existing BLE communication distance is short and router equipment is needed for WiFi networking are solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, which comprises a stored program, wherein the program is used for controlling a device where the computer readable storage medium is located to execute a networking method of the electrical equipment.
Specifically, the networking method of the electrical equipment comprises the following steps:
step S201, terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment;
specifically, the identification information generally includes information such as ID, IP, etc. of an electrical apparatus, and the terminal apparatus is generally a mobile phone, a computer, a tablet, etc., and the electrical apparatus may be an air conditioner, a humidifier, a refrigerator, etc.
Step S202, the terminal equipment establishes BLE connection with the electrical equipment according to the identification information of the electrical equipment respectively to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence;
specifically, when the terminal device is a mobile phone and the electrical device is an air conditioner, a user can use the mobile phone APP or an applet to bind and connect each air conditioner with the mobile phone through BLE, set the mobile phone as a main node in the WiFi Mesh network, and set the air conditioner as a sub-node to complete networking, wherein the specific process of establishing the WiFi Mesh network by the mobile phone according to the BLE networking is as follows: firstly, a networking APP or networking applet is used, a networking is firstly established in the APP or the applet, then mobile phones and electrical equipment are bound and connected one by one in the networking through BLE, the mobile phones are set as main nodes in the WiFi-Mesh network, all the electrical equipment are set as sub-nodes, and a local WiFi Mesh can be formed after connection is completed.
In step S203, the terminal device sends a first instruction data packet to an intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by using WiFi communication to control the first type of electrical device, where a distance between the first type of electrical device and the terminal device is greater than a BLE maximum transmission distance, and the intermediate device is one of a plurality of electrical devices except the first type of electrical device.
Specifically, the BLE maximum transmission distance is typically 10 meters, and the WIFI maximum transmission distance is 50 meters but the actual BLE maximum transmission distance is lower than this value under the influence of interference of the environment, obstacles, electrical devices, and the like. But after networking, the control instruction can be forwarded by other devices in the local network to realize control over a longer distance (for example, the distance between the target air conditioner and the terminal device is greater than 50 meters, but other air conditioners are arranged between the terminal device and the target air conditioner, so that the instruction can be forwarded by the intermediate air conditioner to reach the target air conditioner to realize control).
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires a plurality of transmission paths, wherein each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment, each transmission path comprises a plurality of nodes, each node comprises a terminal equipment node, at least one intermediate equipment node and a first type electrical equipment node, the terminal equipment node is used for representing the terminal equipment, the intermediate equipment node is used for representing the intermediate equipment, and the first type electrical equipment node is used for representing the first type electrical equipment; the terminal device determines the transmission path with the least intermediate device node as a target transmission path from a plurality of transmission paths; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type of electrical equipment through the WiFi communication to control the first type of electrical equipment.
Optionally, the plurality of transmission paths with the minimum intermediate device are provided, and the terminal device determines the transmission path with the minimum intermediate device node from the plurality of transmission paths as a target transmission path, including: the terminal equipment acquires a plurality of target distances, wherein each target distance is the distance between an initial intermediate equipment node and the terminal equipment node, and the initial intermediate equipment node is the next node of the terminal equipment node; the terminal device determines the transmission path corresponding to the shortest target distance among the plurality of target distances as the target transmission path.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires the path hop count of the first instruction data packet sent from the terminal equipment to the first type electrical equipment on each transmission path, wherein the path hop count represents the number of the nodes on the transmission paths, and each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment; the terminal equipment determines the transmission path with the minimum path hop number as a target transmission path according to each path hop number; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
Optionally, the method further comprises: the terminal equipment acquires the identification information of the newly added equipment; the terminal equipment establishes BLE connection with the newly-added equipment according to the identification information of the newly-added equipment so that the newly-added equipment joins the WiFi Mesh network; and the terminal equipment sends the identification information of the newly added equipment to each electrical equipment in the WiFi Mesh network.
Optionally, the establishing, by the terminal device, a WiFi Mesh network according to the BLE networking includes: the terminal equipment receives first request information of each electrical equipment, wherein the first request information is information of the electrical equipment requesting to establish the WiFi communication with the terminal equipment; and the terminal equipment establishes a WiFi Mesh network according to the first request information and the BLE networking.
Optionally, the method further comprises: the terminal equipment directly sends a second instruction data packet to second-type electrical equipment by adopting the BLE communication so as to control the second-type electrical equipment, wherein the second-type electrical equipment is the electrical equipment with the distance from the terminal equipment being smaller than or equal to the maximum transmission distance of the BLE.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program runs to execute the networking method of the electrical equipment.
Specifically, the networking method of the electrical equipment comprises the following steps:
step S201, terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment;
specifically, the identification information generally includes information such as ID, IP, etc. of an electrical apparatus, and the terminal apparatus is generally a mobile phone, a computer, a tablet, etc., and the electrical apparatus may be an air conditioner, a humidifier, a refrigerator, etc.
Step S202, the terminal equipment establishes BLE connection with the electrical equipment according to the identification information of the electrical equipment respectively to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence;
specifically, when the terminal device is a mobile phone and the electrical device is an air conditioner, a user can use the mobile phone APP or an applet to bind and connect each air conditioner with the mobile phone through BLE, set the mobile phone as a main node in the WiFi Mesh network, and set the air conditioner as a sub-node to complete networking, wherein the specific process of establishing the WiFi Mesh network by the mobile phone according to the BLE networking is as follows: firstly, a networking APP or networking applet is used, a networking is firstly established in the APP or the applet, then mobile phones and electrical equipment are bound and connected one by one in the networking through BLE, the mobile phones are set as main nodes in the WiFi-Mesh network, all the electrical equipment are set as sub-nodes, and a local WiFi Mesh can be formed after connection is completed.
In step S203, the terminal device sends a first instruction data packet to an intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by using WiFi communication to control the first type of electrical device, where a distance between the first type of electrical device and the terminal device is greater than a BLE maximum transmission distance, and the intermediate device is one of a plurality of electrical devices except the first type of electrical device.
Specifically, the BLE maximum transmission distance is typically 10 meters, and the WIFI maximum transmission distance is 50 meters but the actual BLE maximum transmission distance is lower than this value under the influence of interference of the environment, obstacles, electrical devices, and the like. But after networking, the control instruction can be forwarded by other devices in the local network to realize control over a longer distance (for example, the distance between the target air conditioner and the terminal device is greater than 50 meters, but other air conditioners are arranged between the terminal device and the target air conditioner, so that the instruction can be forwarded by the intermediate air conditioner to reach the target air conditioner to realize control).
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires a plurality of transmission paths, wherein each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment, each transmission path comprises a plurality of nodes, each node comprises a terminal equipment node, at least one intermediate equipment node and a first type electrical equipment node, the terminal equipment node is used for representing the terminal equipment, the intermediate equipment node is used for representing the intermediate equipment, and the first type electrical equipment node is used for representing the first type electrical equipment; the terminal device determines the transmission path with the least intermediate device node as a target transmission path from a plurality of transmission paths; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type of electrical equipment through the WiFi communication to control the first type of electrical equipment.
Optionally, the plurality of transmission paths with the minimum intermediate device are provided, and the terminal device determines the transmission path with the minimum intermediate device node from the plurality of transmission paths as a target transmission path, including: the terminal equipment acquires a plurality of target distances, wherein each target distance is the distance between an initial intermediate equipment node and the terminal equipment node, and the initial intermediate equipment node is the next node of the terminal equipment node; the terminal device determines the transmission path corresponding to the shortest target distance among the plurality of target distances as the target transmission path.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires the path hop count of the first instruction data packet sent from the terminal equipment to the first type electrical equipment on each transmission path, wherein the path hop count represents the number of the nodes on the transmission path, and each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment; the terminal equipment determines the transmission path with the minimum path hop number as a target transmission path according to each path hop number; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
Optionally, the method further comprises: the terminal equipment acquires the identification information of the newly added equipment; the terminal equipment establishes BLE connection with the newly-added equipment according to the identification information of the newly-added equipment so that the newly-added equipment joins the WiFi Mesh network; and the terminal equipment sends the identification information of the newly added equipment to each electrical equipment in the WiFi Mesh network.
Optionally, the establishing, by the terminal device, a WiFi Mesh network according to the BLE networking includes: the terminal equipment receives first request information of each electrical equipment, wherein the first request information is information of the electrical equipment requesting to establish the WiFi communication with the terminal equipment; and the terminal equipment establishes a WiFi Mesh network according to the first request information and the BLE networking.
Optionally, the method further comprises: the terminal equipment directly sends a second instruction data packet to second-type electrical equipment by adopting the BLE communication so as to control the second-type electrical equipment, wherein the second-type electrical equipment is the electrical equipment with the distance from the terminal equipment being smaller than or equal to the maximum transmission distance of the BLE.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes at least the following steps when executing the program:
step S201, terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment;
step S202, the terminal equipment establishes BLE connection with the electrical equipment according to the identification information of the electrical equipment respectively to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence;
in step S203, the terminal device sends a first instruction data packet to an intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by using WiFi communication to control the first type of electrical device, where a distance between the first type of electrical device and the terminal device is greater than a BLE maximum transmission distance, and the intermediate device is one of a plurality of electrical devices except the first type of electrical device.
The device herein may be a server, PC, PAD, cell phone, etc.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires a plurality of transmission paths, wherein each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment, each transmission path comprises a plurality of nodes, each node comprises a terminal equipment node, at least one intermediate equipment node and a first type electrical equipment node, the terminal equipment node is used for representing the terminal equipment, the intermediate equipment node is used for representing the intermediate equipment, and the first type electrical equipment node is used for representing the first type electrical equipment; the terminal device determines the transmission path with the least intermediate device node as a target transmission path from a plurality of transmission paths; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type of electrical equipment through the WiFi communication to control the first type of electrical equipment.
Optionally, the plurality of transmission paths with the minimum intermediate device are provided, and the terminal device determines the transmission path with the minimum intermediate device node from the plurality of transmission paths as a target transmission path, including: the terminal equipment acquires a plurality of target distances, wherein each target distance is the distance between an initial intermediate equipment node and the terminal equipment node, and the initial intermediate equipment node is the next node of the terminal equipment node; the terminal device determines the transmission path corresponding to the shortest target distance among the plurality of target distances as the target transmission path.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires the path hop count of the first instruction data packet sent from the terminal equipment to the first type electrical equipment on each transmission path, wherein the path hop count represents the number of the nodes on the transmission paths, and each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment; the terminal equipment determines the transmission path with the minimum path hop number as a target transmission path according to each path hop number; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
Optionally, the method further comprises: the terminal equipment acquires the identification information of the newly added equipment; the terminal equipment establishes BLE connection with the newly-added equipment according to the identification information of the newly-added equipment so that the newly-added equipment joins the WiFi Mesh network; and the terminal equipment sends the identification information of the newly added equipment to each electrical equipment in the WiFi Mesh network.
Optionally, the establishing, by the terminal device, a WiFi Mesh network according to the BLE networking includes: the terminal equipment receives first request information of each electrical equipment, wherein the first request information is information of the electrical equipment requesting to establish the WiFi communication with the terminal equipment; and the terminal equipment establishes a WiFi Mesh network according to the first request information and the BLE networking.
Optionally, the method further comprises: the terminal equipment directly sends a second instruction data packet to second-type electrical equipment by adopting the BLE communication so as to control the second-type electrical equipment, wherein the second-type electrical equipment is the electrical equipment with the distance from the terminal equipment being smaller than or equal to the maximum transmission distance of the BLE.
The present application also provides a computer program product adapted to perform a program initialized with at least the following method steps when executed on a data processing device:
step S201, terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment;
step S202, the terminal equipment establishes BLE connection with the electrical equipment according to the identification information of the electrical equipment respectively to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence;
in step S203, the terminal device sends a first instruction data packet to an intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by using WiFi communication to control the first type of electrical device, where a distance between the first type of electrical device and the terminal device is greater than a BLE maximum transmission distance, and the intermediate device is one of a plurality of electrical devices except the first type of electrical device.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires a plurality of transmission paths, wherein each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment, each transmission path comprises a plurality of nodes, each node comprises a terminal equipment node, at least one intermediate equipment node and a first type electrical equipment node, the terminal equipment node is used for representing the terminal equipment, the intermediate equipment node is used for representing the intermediate equipment, and the first type electrical equipment node is used for representing the first type electrical equipment; the terminal device determines the transmission path with the least intermediate device node as a target transmission path from a plurality of transmission paths; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type of electrical equipment through the WiFi communication to control the first type of electrical equipment.
Optionally, the plurality of transmission paths with the minimum intermediate device are provided, and the terminal device determines the transmission path with the minimum intermediate device node from the plurality of transmission paths as a target transmission path, including: the terminal equipment acquires a plurality of target distances, wherein each target distance is the distance between an initial intermediate equipment node and the terminal equipment node, and the initial intermediate equipment node is the next node of the terminal equipment node; the terminal device determines the transmission path corresponding to the shortest target distance among the plurality of target distances as the target transmission path.
Optionally, the terminal device sends a first instruction data packet to an intermediate device by BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electrical device by WiFi communication to control the first type of electrical device, and the method includes: the terminal equipment acquires the path hop count of the first instruction data packet sent from the terminal equipment to the first type electrical equipment on each transmission path, wherein the path hop count represents the number of the nodes on the transmission paths, and each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment; the terminal equipment determines the transmission path with the minimum path hop number as a target transmission path according to each path hop number; the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
Optionally, the method further comprises: the terminal equipment acquires the identification information of the newly added equipment; the terminal equipment establishes BLE connection with the newly-added equipment according to the identification information of the newly-added equipment so that the newly-added equipment joins the WiFi Mesh network; and the terminal equipment sends the identification information of the newly added equipment to each electrical equipment in the WiFi Mesh network.
Optionally, the establishing, by the terminal device, a WiFi Mesh network according to the BLE networking includes: the terminal equipment receives first request information of each electrical equipment, wherein the first request information is information of the electrical equipment requesting to establish the WiFi communication with the terminal equipment; and the terminal equipment establishes a WiFi Mesh network according to the first request information and the BLE networking.
Optionally, the method further comprises: the terminal equipment directly sends a second instruction data packet to second-type electrical equipment by adopting the BLE communication so as to control the second-type electrical equipment, wherein the second-type electrical equipment is the electrical equipment with the distance from the terminal equipment being smaller than or equal to the maximum transmission distance of the BLE.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps 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.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
1) Firstly, terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment; secondly, the terminal equipment respectively establishes BLE connection with each electrical equipment according to the identification information of each electrical equipment so as to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking so as to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence; and finally, the terminal equipment adopts BLE communication to send the first instruction data packet to the intermediate equipment, so that the intermediate equipment adopts WiFi communication to forward the first instruction data packet to the first type electrical equipment to control the first type electrical equipment, wherein the distance between the first type electrical equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate equipment is one of a plurality of electrical equipment except the first type electrical equipment. According to the method, the terminal equipment BLE is connected with each electrical equipment to be configured, each equipment is directly connected through Wi-Fi to form a local Mesh network, wiFi communication is achieved among the electrical equipment without a router, a user can configure and control the remote electrical equipment by connecting any electrical equipment through BLE, the problems that the existing BLE communication distance is short, router equipment is needed in WiFi networking are solved, and the method has more cost advantages.
2) The networking system of the electrical equipment of the application comprises: the terminal equipment is used for executing any one of the networking methods of the electrical equipment; and the electrical equipment comprises BLE modules and WiFi modules, wherein the BLE modules of the electrical equipment are used for realizing BLE communication with the terminal equipment, and the electrical equipment realizes WiFi communication through the WiFi modules of the electrical equipment. According to the system, the terminal equipment BLE is connected with each electrical equipment to be configured, each equipment is directly connected through Wi-Fi to form a local Mesh network, wiFi communication is achieved among the electrical equipment without a router, a user can configure and control the remote electrical equipment by connecting any electrical equipment through BLE, the problems that the existing BLE communication distance is short, router equipment is needed for WiFi networking are solved, and the system has more cost advantages.
3) The networking device of the electrical equipment comprises an acquisition unit, an execution unit and a sending unit, wherein the acquisition unit is used for acquiring identification information of a plurality of electrical equipment in a preset space, and the identification information is used for uniquely identifying the electrical equipment; the execution unit is used for respectively establishing BLE connection with each electrical device according to the identification information of each electrical device so as to establish a BLE networking, and establishing a WiFi Mesh network according to the BLE networking so as to enable any two electrical devices to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is terminal equipment, and sub-nodes of the WiFi Mesh network are electrical devices in one-to-one correspondence; the sending unit is used for sending the first instruction data packet to the intermediate device by using BLE communication, so that the intermediate device forwards the first instruction data packet to the first type electrical equipment by using WiFi communication to control the first type electrical equipment, wherein the distance between the first type electrical equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate device is one of a plurality of electrical equipment except the first type electrical equipment. The device is connected with each electrical equipment through the terminal equipment BLE to be configured, each device is directly connected through Wi-Fi to form a local Mesh network, so that each electrical equipment is communicated through WiFi, a router is not needed, a user can be connected with any electrical equipment through BLE to configure and control the remote electrical equipment, the problems that the existing BLE communication distance is short and the router equipment is needed in WiFi networking are solved, and the device has more cost advantages.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A networking method for an electrical device, comprising:
the terminal equipment acquires identification information of a plurality of electrical equipment in a preset space, wherein the identification information is used for uniquely identifying the electrical equipment;
the terminal equipment establishes BLE connection with each electrical equipment according to the identification information of each electrical equipment so as to establish BLE networking, and establishes a WiFi Mesh network according to the BLE networking so as to enable any two electrical equipment to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal equipment, and sub-nodes of the WiFi Mesh network are the electrical equipment in one-to-one correspondence;
the terminal equipment adopts BLE communication to send a first instruction data packet to the intermediate equipment, so that the intermediate equipment adopts WiFi communication to forward the first instruction data packet to first type electrical equipment to control the first type electrical equipment, wherein the distance between the first type electrical equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate equipment is one of a plurality of electrical equipment except the first type electrical equipment.
2. The networking method of claim 1, wherein the terminal device sends a first instruction packet to an intermediary device using BLE communication to cause the intermediary device to forward the first instruction packet to a first type of appliance device using WiFi communication to control the first type of appliance device, comprising:
the terminal equipment acquires a plurality of transmission paths, wherein each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the first type electrical equipment, each transmission path comprises a plurality of nodes, each node comprises a terminal equipment node, at least one intermediate equipment node and a first type electrical equipment node, the terminal equipment node is used for representing the terminal equipment, the intermediate equipment node is used for representing the intermediate equipment, and the first type electrical equipment node is used for representing the first type electrical equipment;
the terminal equipment determines the transmission path with the least intermediate equipment node from a plurality of transmission paths as a target transmission path;
the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
3. The networking method of claim 2, wherein the transmission path with the least number of intermediate devices has a plurality of transmission paths, and the terminal device determines the transmission path with the least number of intermediate device nodes from the plurality of transmission paths as a target transmission path, comprising:
the terminal equipment acquires a plurality of target distances, wherein each target distance is the distance between an initial intermediate equipment node and the terminal equipment node, and the initial intermediate equipment node is the next node of the terminal equipment node;
the terminal device determines the transmission path corresponding to the shortest target distance among the plurality of target distances as the target transmission path.
4. The networking method of claim 1, wherein the terminal device sends a first instruction packet to an intermediary device using BLE communication to cause the intermediary device to forward the first instruction packet to a first type of appliance device using WiFi communication to control the first type of appliance device, comprising:
the terminal equipment acquires the path hop number of the first instruction data packet sent from the terminal equipment to the first type electrical equipment on each transmission path, wherein the path hop number represents the number of the nodes on the transmission paths, and each transmission path starts from the terminal equipment, passes through the intermediate equipment and ends at the path of the first type electrical equipment;
The terminal equipment determines the transmission path with the minimum path hop number as a target transmission path according to each path hop number;
the terminal device sends the first instruction data packet to the intermediate device through the BLE communication based on the target transmission path, so that the intermediate device forwards the first instruction data packet to the first type electrical device through the WiFi communication to control the first type electrical device.
5. The networking method of claim 1, wherein the method further comprises:
the terminal equipment acquires the identification information of the newly added equipment;
the terminal equipment establishes BLE connection with the newly-added equipment according to the identification information of the newly-added equipment so that the newly-added equipment joins the WiFi Mesh network;
and the terminal equipment sends the identification information of the newly-added equipment to each electrical equipment in the WiFi Mesh network.
6. The networking method according to claim 1, wherein the terminal device establishes a WiFi Mesh network according to the BLE networking, comprising:
the terminal equipment receives first request information of each electrical equipment, wherein the first request information is information of the electrical equipment requesting to establish the WiFi communication with the terminal equipment;
And the terminal equipment establishes a WiFi Mesh network according to the first request information and the BLE networking.
7. The networking method of any one of claims 1 to 6, further comprising:
the terminal equipment adopts BLE communication to directly send a second instruction data packet to second-type electrical equipment so as to control the second-type electrical equipment, wherein the second-type electrical equipment is the electrical equipment with the distance from the terminal equipment being smaller than or equal to the maximum BLE transmission distance.
8. A networking system for an electrical device, comprising:
a terminal device configured to execute the networking method of the electrical device according to any one of claims 1 to 7;
and the electrical equipment comprises BLE modules and WiFi modules, wherein the BLE modules of the electrical equipment are used for realizing BLE communication with the terminal equipment, and the electrical equipment realizes WiFi communication through the WiFi modules of the electrical equipment.
9. A terminal device, comprising:
an obtaining unit, configured to obtain identification information of a plurality of electrical apparatuses in a predetermined space, where the identification information is used to uniquely identify the electrical apparatuses;
The execution unit is used for respectively establishing BLE connection with each electrical device according to the identification information of each electrical device so as to establish a BLE networking, and establishing a WiFi Mesh network according to the BLE networking so as to enable any two electrical devices to be connected through WiFi communication, wherein a main node of the WiFi Mesh network is the terminal device, and sub-nodes of the WiFi Mesh network are the electrical devices in one-to-one correspondence;
and the sending unit is used for sending the first instruction data packet to an intermediate device by adopting BLE communication, so that the intermediate device forwards the first instruction data packet to a first type of electric equipment by adopting WiFi communication to control the first type of electric equipment, wherein the distance between the first type of electric equipment and the terminal equipment is larger than the maximum BLE transmission distance, and the intermediate device is one of a plurality of electric equipment except the first type of electric equipment.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer-readable storage medium is located to perform the networking method of the electrical device according to any one of claims 1 to 7.
CN202310332903.9A 2023-03-29 2023-03-29 Networking method and system of electrical equipment, terminal equipment and readable storage medium Pending CN116367355A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310332903.9A CN116367355A (en) 2023-03-29 2023-03-29 Networking method and system of electrical equipment, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310332903.9A CN116367355A (en) 2023-03-29 2023-03-29 Networking method and system of electrical equipment, terminal equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116367355A true CN116367355A (en) 2023-06-30

Family

ID=86919331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310332903.9A Pending CN116367355A (en) 2023-03-29 2023-03-29 Networking method and system of electrical equipment, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116367355A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025025580A1 (en) * 2023-07-31 2025-02-06 美的集团武汉制冷设备有限公司 Indoor communication node, air conditioner outdoor unit network access system, and air conditioner outdoor unit network access method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025025580A1 (en) * 2023-07-31 2025-02-06 美的集团武汉制冷设备有限公司 Indoor communication node, air conditioner outdoor unit network access system, and air conditioner outdoor unit network access method

Similar Documents

Publication Publication Date Title
CN102461288B (en) The enhanced debugging of Radio Network System
CN112787685B (en) Method, apparatus and system for supporting wireless communication
CN110636483A (en) Network distribution method and system
US9204390B2 (en) Energy-saving mobile node control method using wireless multi-interfaces
CN105959906B (en) Network equipment communication method and device and network equipment communication method and device
CN111741509A (en) Network distribution method and device, storage medium and processor
CN105185085A (en) Data communication system, method and device
CN112738785B (en) Device connection method and apparatus, storage medium, and electronic apparatus
US11765749B2 (en) Distributed transmission resource allocation
CN113794996B (en) Device communication, device control method, device, electronic device, and storage medium
US11233540B2 (en) Apparatus and methods for G3-PLC bootstrap in a hybrid network
CN112202652A (en) Method and device for displaying information of equipment to be networked, storage medium and electronic device
CN112637931A (en) Method and device for establishing network connection
CN111913397A (en) Device control method, device, storage medium, and electronic apparatus
US20190320016A1 (en) Method and apparatus for determining network central node, and node equipment
CN116367355A (en) Networking method and system of electrical equipment, terminal equipment and readable storage medium
CN114585052A (en) Networking method, networking device, networking gateway and storage medium based on LoRa
US20160204953A1 (en) Network system and control method thereof
CN111866856A (en) Mesh device control method and system, storage medium and electronic device
CN104754749A (en) Communication control method and central control device
CN117319106A (en) Virtual gateway management method, device and system
CN110798815A (en) Intelligent household system, electric appliance control method and device and router
CN106851685A (en) A kind of method and system of control mobile terminal bandwidth
CN111163463A (en) Method, device, equipment and storage medium for accessing wireless equipment to router
CN115150796B (en) Intelligent device, network connection method thereof, routing device and storage medium

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