CN115987607A - Equipment network distribution method and device, storage medium and electronic device - Google Patents

Equipment network distribution method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115987607A
CN115987607A CN202211635112.5A CN202211635112A CN115987607A CN 115987607 A CN115987607 A CN 115987607A CN 202211635112 A CN202211635112 A CN 202211635112A CN 115987607 A CN115987607 A CN 115987607A
Authority
CN
China
Prior art keywords
address information
equipment
distribution network
distributed
distribution
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
CN202211635112.5A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211635112.5A priority Critical patent/CN115987607A/en
Publication of CN115987607A publication Critical patent/CN115987607A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a method and a device for equipment network distribution, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the method for equipment network distribution comprises the following steps: acquiring a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed from a cloud platform; sending the public key of the secret key, the first address information, the second address information and the equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information; under the condition that response information sent by equipment to be distributed is received, the equipment distribution network information is determined to be used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on a secret key, the first address information and response information sent when the second address information is successfully matched with the equipment to be distributed.

Description

Equipment network distribution method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of smart homes, in particular to a device network distribution method, a device, a storage medium and an electronic device.
Background
Currently, when a master device in the same local area network needs to be connected to a controlled device for network distribution, device information such as an IP address of the controlled device needs to be acquired. In the related art, generally, the control main control device performs an inquiry in a local area network by sending a broadcast packet, and then the controlled device replies device information such as an IP address to the main control device after receiving the broadcast packet. However, if the number of controlled devices in the local area network is large and there are unauthorized controlled devices, the controlled devices in the local area network reply device information such as an IP address, which may cause network congestion and leakage of device information.
Therefore, in the related art, there is a technical problem how to efficiently complete the directional distribution network of the device.
Aiming at the technical problem of how to efficiently finish the directional distribution of equipment in the related technology, an effective solution is not provided.
Disclosure of Invention
The embodiment of the application provides a method and a device for equipment distribution, a storage medium and an electronic device, so as to at least solve the technical problem of how to efficiently finish equipment directional distribution in the related technology.
According to an embodiment of the present application, a method for a device distribution network is provided, including: acquiring a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed from a cloud platform; sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information; and under the condition of receiving response information sent by the equipment to be distributed, determining that the equipment distribution network information is used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information and the second address information, and the response information is sent when the matching of the second address information and the equipment to be distributed is successful.
In an exemplary embodiment, sending the public key of the secret key, the first address information, the second address information and device distribution network information to the device to be distributed, so that the device to be distributed is matched with the distribution network device based on the public key of the secret key, the first address information and the second address information, includes: encrypting second address information of the network equipment to be configured by using a private key of the secret key to obtain a first address hash value of the network equipment to be configured; and sending a first directional distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the first address hash value in the first directional distribution network instruction by using the public key to obtain decrypted third address information, matching the decrypted third address information with the stored second address information, and matching the fourth address information of the equipment to be distributed in the first directional distribution network instruction with the stored first address information.
In an exemplary embodiment, sending the public key of the secret key, the first address information, the second address information and device distribution network information to the device to be distributed, so that the device to be distributed is matched with the distribution network device based on the public key of the secret key, the first address information and the second address information, includes: encrypting the first address information of the distribution network equipment by using a private key of the secret key to obtain a second address hash value of the distribution network equipment; and sending a second directional distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the second address hash value in the second directional distribution network instruction by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the equipment to be distributed in the second directional distribution network instruction with the stored second address information.
In an exemplary embodiment, after sending the public key of the secret key, the first address information, the second address information and device distribution network information to the device to be distributed, so that the device to be distributed is based on the public key of the secret key, the first address information, and the second address information, and the distribution network device are matched, the method further includes: encrypting a preset broadcast protocol by using a private key of the secret key to obtain an encryption result; and sending a global distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the encryption result in the global distribution network instruction by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to a protocol required by a distribution network.
According to another embodiment of the present application, there is provided a device network distribution method, including: receiving a key required by a distribution network sent by distribution network equipment, first address information of the distribution network equipment and second address information of equipment to be distributed; matching the first address information and the second address information with the distribution network equipment based on a public key of the secret key; and sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution.
In an exemplary embodiment, matching the first address information and the second address information with the distribution network device based on a public key of the secret key includes: receiving a first directional distribution network instruction sent by the distribution network equipment, wherein the first directional distribution network instruction comprises a first address hash value obtained after the distribution network equipment encrypts second address information of the equipment to be distributed by using a private key of the secret key, and fourth address information of the distribution network equipment; and decrypting the first address hash value by using the public key to obtain decrypted third address information, matching the decrypted third address information with the stored second address information, and matching the fourth address information of the distribution network equipment with the stored first address information.
In an exemplary embodiment, matching the first address information and the second address information with the distribution network device based on a public key of the secret key includes: receiving a second directional distribution network instruction sent by the distribution network equipment, wherein the second directional distribution network instruction comprises a second address hash value obtained after the distribution network equipment encrypts first address information of the distribution network equipment by using a private key of the secret key, and sixth address information of the distribution network equipment; and decrypting the second address hash value by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the distribution network equipment with the stored second address information.
In an exemplary embodiment, after the public key based on the secret key, the first address information, and the second address information are matched with the distribution network device, the method further includes: encrypting a preset broadcast protocol by using a private key of the secret key to obtain an encryption result; receiving a global distribution network instruction sent by the equipment to be distributed, wherein the global distribution network instruction comprises the encryption result; and decrypting the encryption result by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to a protocol required by a distribution network.
According to another embodiment of the present application, there is also provided an apparatus network distribution device, including: the acquisition module is used for acquiring a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed from the cloud platform; the first matching module is used for sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information; the first network distribution module is used for determining that the equipment network distribution information is used for carrying out network distribution on the equipment to be distributed under the condition that response information sent by the equipment to be distributed is received, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information, the second address information and response information sent when the matching of the equipment to be distributed is successful.
According to another embodiment of the present application, there is provided an apparatus network distribution device, including: the device comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a key required by a distribution network sent by distribution network equipment, and first address information of the distribution network equipment and second address information of equipment to be distributed; the second matching module is used for matching the first address information and the second address information with the distribution network equipment based on a public key of the secret key; and the second distribution network module is used for sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution.
According to another aspect of the embodiments of the present application, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the above-mentioned device distribution network method when the computer program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above device network distribution method through the computer program.
In the embodiment of the application, a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed are obtained from a cloud platform; sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information; under the condition that response information sent by the equipment to be distributed is received, determining that the equipment distribution network information is used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information and the second address information, and the response information is sent when the matching of the second address information and the equipment to be distributed is successful; by adopting the technical scheme, the technical problem of how to efficiently finish the directional distribution of the equipment is solved, so that the directional distribution of the equipment is realized, and the distribution efficiency of the equipment is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic hardware environment diagram of a device distribution network method according to an embodiment of the present application;
fig. 2 is a flowchart (one) of a device network distribution method according to an embodiment of the present application;
fig. 3 is a flowchart (ii) of a device network distribution method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a device distribution method according to an embodiment of the present application;
fig. 5 is a block diagram (one) of a configuration network apparatus of a device according to an embodiment of the present application;
fig. 6 is a block diagram (ii) of a configuration network device of an apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or 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.
According to one aspect of the embodiment of the application, a method for distributing a network to equipment is provided. The equipment distribution network method is widely applied to full-House intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent Home (Intelligent House) ecology and the like. Optionally, in this embodiment, the device network distribution method may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity ), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, an apparatus network distribution method is provided, which is applied to the computer terminal, and fig. 2 is a flowchart (one) of the apparatus network distribution method according to the embodiment of the present application, where the flowchart includes the following steps:
step S202, a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed are obtained from a cloud platform;
optionally, a relationship between control and controlled may exist between the distribution network device and the device to be distributed, so that the distribution network device may also be understood as a master device of the distribution network device to be controlled, and the distribution network device to be controlled may also be understood as a controlled device of the distribution network device.
It should be noted that the above-mentioned secret key may include a public key pair and a private key pair, and the algorithm of secret key generation is not limited in this application.
The first address information and the second address information may be, for example, IP addresses, MAC addresses, or the like, but are not limited thereto.
Step S204, sending the public key of the secret key, the first address information, the second address information and the equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information;
step S206, under the condition that response information sent by the equipment to be distributed is received, determining that the equipment distribution network information is used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information, the second address information and the response message sent when the matching of the equipment to be distributed and the network distribution equipment is successful.
Through the steps, a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed are obtained from the cloud platform; sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information; under the condition that response information sent by the equipment to be distributed is received, the equipment distribution network information is determined to be used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information and the response information sent when the matching of the second address information and the distribution network equipment is successful, the technical problem of how to efficiently finish the directional distribution of the equipment in the related technology is solved, the directional distribution of the equipment is further realized, and the distribution network efficiency of the equipment is improved.
In an exemplary embodiment, in order to better understand how to send the public key of the key, the first address information, the second address information, and the device distribution network information to the device to be configured in step S204, so that the device to be configured is based on the public key of the key, the first address information, the second address information, and the distribution network device, the following technical solution is proposed, which specifically includes: encrypting second address information of the network equipment to be configured by using a private key of the secret key to obtain a first address hash value of the network equipment to be configured; and sending a first directional distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the first address hash value in the first directional distribution network instruction by using the public key to obtain decrypted third address information, matching the decrypted third address information with the stored second address information, and matching the fourth address information of the equipment to be distributed in the first directional distribution network instruction with the stored first address information.
Through the embodiment, the hash value of the equipment to be distributed can be encrypted and sent by using the private key in a directional search mode, so that the equipment to be distributed in the same local area network receives the hash value, decrypts the hash value by using the public key and verifies the hash value, and the matching process of the equipment to be distributed is realized.
In an exemplary embodiment, further describing an execution process of sending the public key of the key, the first address information, the second address information, and the device distribution network information to the device to be configured in step S204, so that the device to be configured is based on the public key of the key, the first address information, the second address information, and the distribution network device, specifically including: encrypting the first address information of the distribution network equipment by using a private key of the secret key to obtain a second address hash value of the distribution network equipment; sending a second directional distribution network instruction to the equipment to be distributed, so that the equipment to be distributed decrypts the second address hash value in the second directional distribution network instruction by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the distribution network equipment in the second directional distribution network instruction with the stored second address information.
In an exemplary embodiment, further after sending the public key of the secret key, the first address information, the second address information, and the device distribution network information to the device to be distributed, so that the device to be distributed is based on the public key of the secret key, the first address information, and the second address information, and the distribution network device are matched, the following technical solutions are further proposed, and specifically include: encrypting a preset broadcast protocol by using a private key of the secret key to obtain an encryption result; and sending a global distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the encrypted result in the global distribution network instruction by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to the protocol required by the distribution network.
It should be noted that the protocol required by the distribution network may be preset manually, and the acquisition source of the protocol required by the distribution network is not limited in the present application.
Through the embodiment, the protocol required by the distribution network can be encrypted and sent by using the private key in a whole network searching mode, so that the equipment to be distributed in the same local area network receives the encrypted protocol and decrypts the encrypted protocol by using the public key to obtain the decrypted broadcast protocol, and the response message is sent under the condition that the decrypted broadcast protocol belongs to the protocol required by the distribution network, so that the matching process of the equipment to be distributed is realized.
According to another embodiment of the present application, there is further provided a device network distribution method, as shown in fig. 3, fig. 3 is a flowchart (ii) of the device network distribution method according to the embodiment of the present application, where the flowchart includes the following steps:
step S302: receiving a key required by a distribution network sent by distribution network equipment, first address information of the distribution network equipment and second address information of equipment to be distributed;
step S304: based on a public key of the secret key, the first address information and the second address information are matched with the distribution network equipment;
step S306: and sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution.
Through the steps, the key required by the distribution network, the first address information of the distribution network equipment and the second address information of the equipment to be distributed are received, wherein the key is sent by the distribution network equipment; matching the first address information and the second address information with the distribution network equipment based on a public key of the secret key; and sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution. The technical problem of how to efficiently finish the directional distribution of the equipment in the related technology is solved, so that the directional distribution of the equipment is realized, and the distribution efficiency of the equipment is improved.
In an exemplary embodiment, in order to better understand the public key based on the secret key in step S304, the implementation process of matching the first address information and the second address information with the distribution network device includes the following specific steps: receiving a first directional distribution network instruction sent by the distribution network equipment, wherein the first directional distribution network instruction comprises a first address hash value obtained after the distribution network equipment encrypts second address information of the equipment to be distributed by using a private key of the secret key, and fourth address information of the distribution network equipment; and decrypting the first address hash value by using the public key to obtain decrypted third address information, matching the decrypted third address information with stored second address information, and matching the fourth address information of the distribution network equipment with the stored first address information.
In an exemplary embodiment, a technical solution is further provided for matching the public key based on the secret key, the first address information, and the second address information with the distribution network device, and specifically includes: receiving a second directional distribution network instruction sent by the distribution network equipment, wherein the second directional distribution network instruction comprises a second address hash value obtained after the distribution network equipment encrypts first address information of the distribution network equipment by using a private key of the secret key, and sixth address information of the distribution network equipment; and decrypting the second address hash value by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the distribution network equipment with the stored second address information.
In an exemplary embodiment, after the public key based on the secret key, the first address information, and the second address information are matched with the distribution network device, further, a private key of the secret key may be used to encrypt a preset broadcast protocol, so as to obtain an encryption result; receiving a global distribution network instruction sent by the equipment to be distributed, wherein the global distribution network instruction comprises the encryption result; and decrypting the encrypted result by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to the protocol required by the distribution network.
In order to better understand the process of the device distribution network method, the following describes a flow of the implementation method of the device distribution network with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present application.
In this embodiment, an apparatus network distribution method is provided, and fig. 4 is a schematic flowchart of an apparatus network distribution method according to an embodiment of the present application, where as shown in fig. 4, the following steps are specifically performed:
step S301: obtaining equipment MAC at a soft AP or Bluetooth network distribution stage;
step S302: returning to the equipment MAC;
step S303: uploading the MAC of the main control equipment (namely the distribution network equipment) and the MAC of the controlled equipment (namely the to-be-distributed network equipment) to a platform;
step S304: the cloud generates a public key pair, a private key pair and a hash value of the MAC of the master control device and the controlled device;
step S305: transmitting the public key pair, the private key pair and the hash value to the master control equipment;
step S306: storing the private key pair and the hash value;
step S307: transmitting the hash value of the public key pair to the controlled equipment along with the distribution network information;
step S308: the controlled device stores;
it should be noted that, based on steps S301 to S308, the master control device can obtain the public and private keys and the hash values of the MACs of the master control device and the controlled device from the cloud in the distribution process, and transmit the hash values to the controlled device along with the distribution network information, and the master control device stores the information and serves as a subsequent local area network broadcast search device of the master control device, and the controlled device replies a filter condition of a search request of the master control device.
Step S309: the directional broadcast searching device searches the hash value of the required answering device and the MAC of the main control device in a packet, and encrypts the hash value and the MAC by using a private key;
step S310: the controlled equipment uses the public key to decrypt and verify the hash value, and if the hash value is matched with the hash value, the controlled equipment carries out search response;
step S311: replying a search response;
further, through the above steps, when the master control device searches for the controlled device, and when the master control device wants to search for a certain controlled device, a directional search mode is adopted, that is, the hash value of the controlled device is encrypted by using a private key, a broadcast packet is sent, after the device in the local area network receives the hash value, the public key is used for decryption and verifying the hash value, if the MAC matches, a reply is made, and if the MAC does not match or the decryption fails, the search packet is discarded.
Step S312: the whole network broadcast searching equipment searches a broadcast protocol containing private key encryption in a packet;
step S313: and the controlled equipment uses the public key to decrypt and discover that the protocol is a full network search protocol, and all the controlled equipment configured by the main control equipment replies.
It should be noted that, based on the above steps, when the master control device searches for the controlled device, and when it is desired to search for all configured controlled devices, a global network search mode is adopted, that is, a global network search protocol (equivalent to the protocol required by the distribution network) is encrypted by using a private key, a broadcast packet is sent, after the controlled device in the local network receives the broadcast packet, the broadcast packet is decrypted by using a public key, if the decryption is successful, the search packet is replied, and if the decryption is failed, the broadcast packet is discarded.
Through the embodiment, in the searching process of the main control device, the controlled device uses the public key to authenticate the main control device, and only the legal main control device is searched and responded by the controlled device, and other main control devices initiating the searching are not replied, so that the data packet communication in the network is reduced, the network congestion is reduced, and the safety of the controlled device is improved. In addition, in the searching process of the master control device, because the master control device uses a directional searching mode, only the controlled device matched with the device MAC required by the master control device replies a searching response, thereby reducing data packet communication in the network, reducing the occurrence of network congestion, and solving the problems that the master control device cannot directionally inquire the device information of a certain controlled device and a large number of controlled devices in the network reply to cause network congestion. Especially, when the number of the controlled devices in the local area network is large, a large number of controlled devices in the network reply data packets, so that network congestion is caused, message interaction with the controlled devices can be accurately oriented, and the distribution network efficiency is improved. Even if unauthorized controlled equipment exists in the local area network, the unauthorized controlled equipment cannot recover information, the risk of information leakage is reduced, meanwhile, data packets in the network are reduced, and the probability of network congestion is reduced.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 5 is a block diagram (one) of a configuration network apparatus of a device according to an embodiment of the present application; as shown in fig. 5, includes:
the obtaining module 52 is configured to obtain, from the cloud platform, a key required by the distribution network, first address information of the distribution network device, and second address information of the device to be distributed;
optionally, a relationship between control and controlled may exist between the distribution network device and the device to be distributed, so that the distribution network device may also be understood as a master device of the distribution network device to be controlled, and the distribution network device to be controlled may also be understood as a controlled device of the distribution network device.
It should be noted that the above-mentioned secret key may include a public key pair and a private key pair, and the algorithm of secret key generation is not limited in this application.
The first address information and the second address information may be, for example, an IP address, a MAC address, or the like, but are not limited thereto.
A first matching module 54, configured to send a public key of the secret key, the first address information, the second address information, and device distribution network information to the device to be configured, so that the device to be configured is based on the public key of the secret key, the first address information, and the second address information, and the distribution network device are matched;
the first distribution network module 56 is configured to determine that the device distribution network information is used to distribute a distribution network to the device to be distributed under the condition that response information sent by the device to be distributed is received, where the response information is a public key of the device to be distributed based on the secret key, the first address information, and the second address information are response messages sent when the matching of the distribution network device is successful.
By the device, a key required by the distribution network, first address information of the distribution network equipment and second address information of the equipment to be distributed are obtained from the cloud platform; sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information; under the condition that response information sent by the equipment to be distributed is received, the equipment distribution network information is determined to be used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information and the response information sent when the matching of the second address information and the distribution network equipment is successful, the technical problem of how to efficiently finish the directional distribution of the equipment in the related technology is solved, the directional distribution of the equipment is further realized, and the distribution network efficiency of the equipment is improved.
In an exemplary embodiment, the first matching module 54 is further configured to: encrypting second address information of the network equipment to be configured by using a private key of the secret key to obtain a first address hash value of the network equipment to be configured; and sending a first directional distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the first address hash value in the first directional distribution network instruction by using the public key to obtain decrypted third address information, matching the decrypted third address information with the stored second address information, and matching the fourth address information of the equipment to be distributed in the first directional distribution network instruction with the stored first address information.
Through the embodiment, the hash value of the equipment to be distributed can be encrypted and sent by using the private key in a directional search mode, so that the equipment to be distributed in the same local area network receives the hash value, decrypts the hash value by using the public key, and verifies the hash value, thereby realizing the matching process of the equipment to be distributed.
In an exemplary embodiment, the first matching module 54 is further configured to: encrypting the first address information of the distribution network equipment by using a private key of the secret key to obtain a second address hash value of the distribution network equipment; sending a second directional distribution network instruction to the equipment to be distributed, so that the equipment to be distributed decrypts the second address hash value in the second directional distribution network instruction by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the distribution network equipment in the second directional distribution network instruction with the stored second address information.
In an exemplary embodiment, the device network distribution apparatus further includes a first sending module, configured to: encrypting a preset broadcast protocol by using a private key of the secret key to obtain an encryption result; and sending a global distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the encrypted result in the global distribution network instruction by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to the protocol required by the distribution network.
It should be noted that the protocol required by the distribution network may be preset manually, and the acquisition source of the protocol required by the distribution network is not limited in the present application.
Through the embodiment, the protocol required by the distribution network can be encrypted and sent by using the private key in a whole network searching mode, so that the equipment to be distributed in the same local area network receives the encrypted protocol and decrypts the encrypted protocol by using the public key to obtain the decrypted broadcast protocol, and the response message is sent under the condition that the decrypted broadcast protocol belongs to the protocol required by the distribution network, so that the matching process of the equipment to be distributed is realized.
According to another embodiment of the present application, there is further provided an apparatus distribution network apparatus, as shown in fig. 6, fig. 6 is a block diagram (ii) of a structure of the apparatus distribution network apparatus according to the embodiment of the present application, where the block diagram includes:
a receiving module 62, configured to receive a key required by a distribution network sent by a distribution network device, where the key is first address information of the distribution network device and second address information of a device to be distributed;
a second matching module 64, configured to match the first address information and the second address information with the distribution network device based on a public key of the secret key;
and the second distribution network module 66 is configured to send a response message to the distribution network device when the matching is successful, so that the distribution network device uses the device distribution network information to perform distribution.
Through the steps, the key required by the distribution network, the first address information of the distribution network equipment and the second address information of the equipment to be distributed are received, wherein the key is sent by the distribution network equipment; matching the first address information and the second address information with the distribution network equipment based on a public key of the secret key; and sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution. The technical problem of how to efficiently finish the directional distribution of the equipment in the related technology is solved, so that the directional distribution of the equipment is realized, and the distribution efficiency of the equipment is improved.
In an exemplary embodiment, the second matching module 64 is further configured to: receiving a first directional distribution network instruction sent by the distribution network equipment, wherein the first directional distribution network instruction comprises a first address hash value obtained after the distribution network equipment encrypts second address information of the equipment to be distributed by using a private key of the secret key, and fourth address information of the distribution network equipment; and decrypting the first address hash value by using the public key to obtain decrypted third address information, matching the decrypted third address information with stored second address information, and matching the fourth address information of the distribution network equipment with the stored first address information.
In an exemplary embodiment, the second matching module 64 is further configured to: : receiving a second directional distribution network instruction sent by the distribution network equipment, wherein the second directional distribution network instruction comprises a second address hash value obtained after the distribution network equipment encrypts first address information of the distribution network equipment by using a private key of the secret key, and sixth address information of the distribution network equipment; and decrypting the second address hash value by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the distribution network equipment with the stored second address information.
In an exemplary embodiment, the device network distribution apparatus further includes a second sending module, configured to: after the public key based on the secret key, the first address information and the second address information are matched with the distribution network equipment, further encrypting a preset broadcast protocol by using a private key of the secret key to obtain an encryption result; receiving a global distribution network instruction sent by the equipment to be distributed, wherein the global distribution network instruction comprises the encryption result; and decrypting the encryption result by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to a protocol required by a distribution network.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, obtaining a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed from a cloud platform;
s2, sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information;
and S3, under the condition that response information sent by the equipment to be distributed is received, determining that the equipment distribution network information is used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information, the second address information and the response message sent when the matching of the equipment to be distributed and the network distribution equipment is successful.
Optionally, in other embodiments, the storage medium may be further configured to store program code for performing the following steps:
s1, receiving a key required by a distribution network sent by a distribution network device, first address information of the distribution network device and second address information of a device to be distributed;
s2, matching the first address information and the second address information with the distribution network equipment based on a public key of the secret key;
and S3, sending a response message to the distribution network equipment when the matching is successful, so that the distribution network equipment uses the equipment distribution network information to carry out distribution.
Embodiments of the present application further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, obtaining a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed from a cloud platform;
s2, sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information;
and S3, under the condition that response information sent by the equipment to be distributed is received, determining that the equipment distribution network information is used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information, the second address information and the response message sent when the matching of the equipment to be distributed and the network distribution equipment is successful.
Optionally, in other embodiments, the processor may be further configured to execute, by the computer program, the following steps:
s1, receiving a key required by a distribution network sent by a distribution network device, first address information of the distribution network device and second address information of a device to be distributed;
s2, matching the first address information and the second address information with the distribution network equipment based on a public key of the secret key;
and S3, sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that, as will be apparent to those skilled in the art, numerous modifications and adaptations can be made without departing from the principles of the present application and such modifications and adaptations are intended to be considered within the scope of the present application.

Claims (12)

1. The method for distributing the network to the equipment is applied to the network distribution equipment and comprises the following steps:
acquiring a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed from a cloud platform;
sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information;
and under the condition of receiving response information sent by the equipment to be distributed, determining that the equipment distribution network information is used for distributing the network to the equipment to be distributed, wherein the response information is a public key of the equipment to be distributed based on the secret key, the first address information and the second address information, and the response information is sent when the matching of the second address information and the equipment to be distributed is successful.
2. The device network distribution method according to claim 1, wherein sending the public key of the secret key, the first address information, the second address information and device network distribution information to the device to be configured, so that the device to be configured is matched with the network distribution device based on the public key of the secret key, the first address information and the second address information, comprises:
encrypting second address information of the network equipment to be configured by using a private key of the secret key to obtain a first address hash value of the network equipment to be configured;
and sending a first directional distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the first address hash value in the first directional distribution network instruction by using the public key to obtain decrypted third address information, matching the decrypted third address information with the stored second address information, and matching the fourth address information of the equipment to be distributed in the first directional distribution network instruction with the stored first address information.
3. The device network distribution method according to claim 1, wherein sending the public key of the secret key, the first address information, the second address information and device network distribution information to the device to be configured, so that the device to be configured is matched with the network distribution device based on the public key of the secret key, the first address information and the second address information, comprises:
encrypting the first address information of the distribution network equipment by using a private key of the secret key to obtain a second address hash value of the distribution network equipment;
sending a second directional distribution network instruction to the equipment to be distributed, so that the equipment to be distributed decrypts the second address hash value in the second directional distribution network instruction by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the distribution network equipment in the second directional distribution network instruction with the stored second address information.
4. The device network distribution method according to claim 1, wherein after sending the public key of the secret key, the first address information, the second address information and device network distribution information to the device to be networked, so that the device to be networked is based on the public key of the secret key, the first address information, the second address information and the network distribution device, the method further comprises:
encrypting a preset broadcast protocol by using a private key of the secret key to obtain an encryption result;
and sending a global distribution network instruction to the equipment to be distributed so that the equipment to be distributed decrypts the encryption result in the global distribution network instruction by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to a protocol required by a distribution network.
5. The method for distributing the network to the equipment is characterized by being applied to the equipment to be distributed, and comprises the following steps:
receiving a key required by a distribution network sent by distribution network equipment, first address information of the distribution network equipment and second address information of equipment to be distributed;
based on a public key of the secret key, the first address information and the second address information are matched with the distribution network equipment;
and sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution.
6. The device network distribution method according to claim 5, wherein the matching of the first address information and the second address information with the network distribution device based on a public key of the secret key comprises:
receiving a first directional distribution network instruction sent by the distribution network equipment, wherein the first directional distribution network instruction comprises a first address hash value obtained after the distribution network equipment encrypts second address information of the equipment to be distributed by using a private key of the secret key, and fourth address information of the distribution network equipment;
and decrypting the first address hash value by using the public key to obtain decrypted third address information, matching the decrypted third address information with stored second address information, and matching the fourth address information of the distribution network equipment with the stored first address information.
7. The device network distribution method according to claim 5, wherein the matching of the first address information and the second address information with the network distribution device based on a public key of the secret key comprises:
receiving a second directional distribution network instruction sent by the distribution network equipment, wherein the second directional distribution network instruction comprises a second address hash value obtained after the distribution network equipment encrypts first address information of the distribution network equipment by using a private key of the secret key, and sixth address information of the distribution network equipment;
and decrypting the second address hash value by using the public key to obtain decrypted fifth address information, matching the decrypted fifth address information with the stored first address information, and matching the sixth address information of the distribution network equipment with the stored second address information.
8. The device distribution network method according to claim 5, wherein after matching the first address information and the second address information with the distribution network device based on a public key of the secret key, the method further comprises:
encrypting a preset broadcast protocol by using a private key of the secret key to obtain an encryption result;
receiving a global distribution network instruction sent by the equipment to be distributed, wherein the global distribution network instruction comprises the encryption result;
and decrypting the encryption result by using the public key to obtain a decrypted broadcast protocol, and sending the response message under the condition that the decrypted broadcast protocol belongs to a protocol required by a distribution network.
9. An equipment distribution network apparatus, comprising:
the acquisition module is used for acquiring a key required by a distribution network, first address information of distribution network equipment and second address information of equipment to be distributed from the cloud platform;
the first matching module is used for sending the public key of the secret key, the first address information, the second address information and equipment distribution network information to the equipment to be distributed, so that the equipment to be distributed is matched with the distribution network equipment based on the public key of the secret key, the first address information and the second address information;
the first network distribution module is configured to determine that the device to be distributed is distributed with network distribution information when response information sent by the device to be distributed is received, where the response information is a public key of the device to be distributed based on the secret key, the first address information, and the second address information, and the response message sent when the matching of the network distribution device is successful.
10. An equipment distribution network apparatus, comprising:
the device comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a key required by a distribution network sent by distribution network equipment, and first address information of the distribution network equipment and second address information of equipment to be distributed;
the second matching module is used for matching the first address information and the second address information with the distribution network equipment based on a public key of the secret key;
and the second distribution network module is used for sending a response message to the distribution network equipment when the matching is successful so that the distribution network equipment uses the equipment distribution network information to carry out distribution.
11. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 8.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 8 by means of the computer program.
CN202211635112.5A 2022-12-19 2022-12-19 Equipment network distribution method and device, storage medium and electronic device Pending CN115987607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211635112.5A CN115987607A (en) 2022-12-19 2022-12-19 Equipment network distribution method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211635112.5A CN115987607A (en) 2022-12-19 2022-12-19 Equipment network distribution method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115987607A true CN115987607A (en) 2023-04-18

Family

ID=85971629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211635112.5A Pending CN115987607A (en) 2022-12-19 2022-12-19 Equipment network distribution method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115987607A (en)

Similar Documents

Publication Publication Date Title
US10951400B2 (en) Authentication method, authentication system, and controller
US7162634B2 (en) Method for providing security on a powerline-modem network
CN106656547B (en) Method and device for updating network configuration of household electrical appliance
CN108366362A (en) MESH network and its MESH equipment safeties match network method
EP3180933A1 (en) Network-enabled device provisioning
EP3537652B1 (en) Method for securely controlling smart home appliance and terminal device
CN111490916B (en) Method, system, device and medium for binding ZigBee sub-devices of ZigBee
US6703923B2 (en) Apparatus for providing security on a powerline-modem network
CN113630727B (en) Intelligent household network distribution method, device and system, electronic equipment and storage medium
CN111510919A (en) Network configuration method, device, equipment and system
CN112737902A (en) Network configuration method and device, storage medium and electronic equipment
US20160373260A1 (en) Public Key Based Network
CN112600820A (en) Network connection method, device, computer equipment and storage medium
CN110716441B (en) Method for controlling intelligent equipment, intelligent home system, equipment and medium
CN108306793B (en) Intelligent device, intelligent home gateway, and method and system for establishing connection
CN101697522A (en) Virtual private network networking method, communication system and related equipment
CN112512064A (en) Wireless network distribution method, wireless gateway and equipment to be accessed
JP5721183B2 (en) Wireless LAN communication system, wireless LAN base unit, communication connection establishment method, and program
CN115987607A (en) Equipment network distribution method and device, storage medium and electronic device
US8082444B1 (en) System and method for adding new network devices to an existing network
CN112487455A (en) Data processing method and device and data interaction system
CN113194471B (en) Wireless network access method, device and terminal based on block chain network
CN114501473B (en) Mesh network distribution method, electronic equipment and computer readable storage medium
CN115694893A (en) Resource transmission method and device, storage medium and electronic device
CN116233210A (en) Session establishment method and system, storage medium and electronic device

Legal Events

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