Device network configuration method, device, storage medium, and electronic device
By using the encryption and decryption process of public and private keys in device network configuration, targeted device configuration is achieved, solving the problems of network congestion and information leakage, and improving network configuration efficiency.
Patent Information
- Application Number
- CN202211635112.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-12-19
AI Technical Summary
In the prior art, when devices are configured in a local area network, especially when faced with a large number of unauthorized controlled devices, network congestion and information leakage are likely to occur.
By obtaining the key, the address information of the network configuration device and the device to be configured from the cloud platform, and using the encryption and decryption process of the public key and private key, the targeted network configuration of the device is achieved, ensuring that only legitimate devices interact with each other.
It improves the efficiency of device network configuration and reduces the risk of network congestion and information leakage, especially when there are a large number of controlled devices in the local area network.
Smart Images

Figure CN115987607B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a device network configuration method, device, storage medium, and electronic device. Background Art
[0002] Currently, when a master device in the same local area network (LAN) needs to connect to a controlled device for network configuration, it needs to obtain the controlled device's IP address and other device information. In related technologies, this typically involves the master device sending a broadcast packet within the LAN to query the device. Upon receiving the broadcast packet, the controlled device then responds with its IP address and other device information. However, if this approach involves a large number of controlled devices in the LAN and unauthorized devices, the responses from the controlled devices, including their IP addresses, can cause network congestion and potentially leak device information.
[0003] Therefore, in the related art, there is a technical problem of how to efficiently complete the directional distribution of equipment.
[0004] Regarding the technical problem of how to efficiently complete the directional distribution of equipment in related technologies, no effective solution has been proposed yet. Summary of the Invention
[0005] The embodiments of the present application provide a device network configuration method, apparatus, storage medium, and electronic device to at least solve the technical problem of how to efficiently complete device directional network configuration in the related art.
[0006] According to one embodiment of the embodiments of the present application, a device network configuration method is provided, including: obtaining a key required for network configuration, first address information of a network configuration device, and second address information of a device to be configured from a cloud platform; sending the public key of the key, the first address information, the second address information, and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information, and the second address information; upon receiving a response information sent by the device to be configured, determining to use the device network configuration information to configure the device to be configured, wherein the response information is a response message sent by the device to be configured when the public key of the key, the first address information, and the second address information successfully match the network configuration device.
[0007] In an exemplary embodiment, the public key of the key, the first address information, the second address information and the device network configuration information are sent to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information and the second address information, including: using the private key of the key to encrypt the second address information of the device to be configured to obtain the first address hash value of the device to be configured; sending a first directed network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the first address hash value in the first directed network configuration instruction to obtain the decrypted third address information, using the decrypted third address information to match the stored second address information, and using the fourth address information of the network configuration device in the first directed network configuration instruction to match the stored first address information.
[0008] In an exemplary embodiment, the public key of the key, the first address information, the second address information and the device network configuration information are sent to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information and the second address information, including: using the private key of the key to encrypt the first address information of the network configuration device to obtain the second address hash value of the network configuration device; sending a second directed network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the second address hash value in the second directed network configuration instruction to obtain the decrypted fifth address information, using the decrypted fifth address information to match the stored first address information, and using the sixth address information of the network configuration device in the second directed network configuration instruction to match the stored second address information.
[0009] In an exemplary embodiment, after sending the public key of the key, the first address information, the second address information and the device configuration information to the device to be configured so that the device to be configured matches the configuration device based on the public key of the key, the first address information and the second address information, the method further includes: encrypting the preset broadcast protocol using the private key of the key to obtain an encryption result; sending a global configuration instruction to the device to be configured so that the device to be configured uses the public key to decrypt the encryption result in the global configuration instruction to obtain the decrypted broadcast protocol, and sending the response message when it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration.
[0010] According to another embodiment of the embodiments of the present application, a device network configuration method is also provided, including: receiving a key required for network configuration sent by a network configuration device, the first address information of the network configuration device and the second address information of the device to be configured; based on the public key of the key, the first address information, and the second address information are matched with the network configuration device; when the match is successful, a response message is sent to the network configuration device so that the network configuration device uses the device network configuration information for network configuration.
[0011] In an exemplary embodiment, based on the public key of the key, the first address information, the second address information and the network distribution device are matched, including: receiving a first directed network distribution instruction sent by the network distribution device, wherein the first directed network distribution instruction includes the first address hash value obtained by the network distribution device using the private key of the key to encrypt the second address information of the device to be distributed, and the fourth address information of the network distribution device; using the public key to decrypt the first address hash value to obtain the decrypted third address information, using the decrypted third address information to match the stored second address information, and using the fourth address information of the network distribution device to match the stored first address information.
[0012] In an exemplary embodiment, based on the public key of the key, the first address information and the second address information are matched with the network distribution device, including: receiving a second directed network distribution instruction sent by the network distribution device, wherein the second directed network distribution instruction includes the second address hash value obtained by the network distribution device after encrypting the first address information of the network distribution device using the private key of the key, and the sixth address information of the network distribution device; using the public key to decrypt the second address hash value to obtain the decrypted fifth address information, using the decrypted fifth address information to match the stored first address information, and using the sixth address information of the network distribution device to match the stored second address information.
[0013] In an exemplary embodiment, after the first address information and the second address information are matched with the network configuration device based on the public key of the key, the method further includes: encrypting the preset broadcast protocol using the private key of the key to obtain an encryption result; receiving a global network configuration instruction sent by the device to be configured, wherein the global network configuration instruction includes the encryption result; decrypting the encryption result using the public key to obtain a decrypted broadcast protocol, and sending the response message when it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration.
[0014] According to another embodiment of the embodiments of the present application, a device network configuration device is also provided, including: an acquisition module for obtaining the key required for network configuration, the first address information of the network configuration device and the second address information of the device to be configured from a cloud platform; a first matching module for sending the public key of the key, the first address information, the second address information and the device network configuration information to the device to be configured, so that the device to be configured is matched with the network configuration device based on the public key of the key, the first address information and the second address information; a first network configuration module for determining to use the device network configuration information to configure the device to be configured when receiving a response information sent by the device to be configured, wherein the response information is a response message sent by the device to be configured when the public key of the key, the first address information and the second address information are successfully matched with the network configuration device.
[0015] According to another embodiment of the embodiments of the present application, a device network configuration device is also provided, including: a receiving module, used to receive the key required for network configuration sent by the network configuration device, the first address information of the network configuration device and the second address information of the device to be configured; a second matching module, used to match the network configuration device based on the public key of the key, the first address information, and the second address information; the second network configuration module is used to send a response message to the network configuration device when the match is successful, so that the network configuration device uses the device network configuration information for network configuration.
[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned device network configuration method when running.
[0017] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the device network configuration method through the computer program.
[0018] In an embodiment of the present application, the key required for network configuration, the first address information of the network configuration device and the second address information of the device to be configured are obtained from the cloud platform; the public key of the key, the first address information, the second address information and the device network configuration information are sent to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information and the second address information; upon receiving the response information sent by the device to be configured, it is determined to use the device network configuration information to configure the device to be configured, wherein the response information is a response message sent by the device to be configured when the public key of the key, the first address information and the second address information are successfully matched with the network configuration device; the above technical solution is adopted to solve the technical problem of how to efficiently complete the directional network configuration of the device, thereby realizing the directional network configuration of the device and improving the network configuration efficiency of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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 present application.
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 This is a schematic diagram of the hardware environment of a device network configuration method according to an embodiment of the present application;
[0022] Figure 2 Flowchart (1) of a device network configuration method according to an embodiment of the present application;
[0023] Figure 3 Flowchart (2) of the device network configuration method according to an embodiment of the present application;
[0024] Figure 4 1 is a flow chart of a device network configuration method according to an embodiment of the present application;
[0025] Figure 5 This is a structural block diagram of a device network distribution device according to an embodiment of the present application (I);
[0026] Figure 6 This is a structural block diagram (II) of a device distribution network device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] According to one aspect of the embodiment of the present application, a device network configuration method is provided. The device network configuration method is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (IntelligenceHouse) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned device network configuration method can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0030] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth. The terminal device 102 may be, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing machine, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, smart curtains, smart audio and video, a smart socket, a smart speaker, a smart fresh air device, smart kitchen and bathroom equipment, smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purifier, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0031] In this embodiment, a device network configuration method is provided, which is applied to the above-mentioned computer terminal. Figure 2 Flowchart (1) of a device network configuration method according to an embodiment of the present application, the process includes the following steps:
[0032] Step S202: Obtain the key required for network configuration, the first address information of the network configuration device, and the second address information of the device to be configured from the cloud platform;
[0033] Among them, optionally, there may be a control and controlled relationship between the above-mentioned network distribution device and the network device to be distributed, so the above-mentioned network distribution device can also be understood as the master control device of the above-mentioned network device to be distributed, and the above-mentioned network device to be distributed can also be understood as the controlled device of the above-mentioned network distribution device.
[0034] It should be noted that the above-mentioned keys may include a public key pair and a private key pair, and this application does not limit the key generation algorithm.
[0035] It should be noted that the first address information and the second address information may be, for example, an IP address, a MAC address, etc., but are not limited thereto.
[0036] Step S204: Send the public key of the key, the first address information, the second address information, and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information, and the second address information;
[0037] Step S206: Upon receiving the response information sent by the device to be networked, determine to use the device network configuration information to configure the device to be networked, wherein the response information is a response message sent by the device to be networked when the public key of the key, the first address information, and the second address information are successfully matched with the network configuration device.
[0038] Through the above steps, the key required for network configuration, the first address information of the network configuration device and the second address information of the device to be configured are obtained from the cloud platform; the public key of the key, the first address information, the second address information and the device network configuration information are sent to the device to be configured, so that the device to be configured is matched with the network configuration device based on the public key of the key, the first address information and the second address information; when the response information sent by the device to be configured is received, it is determined to use the device network configuration information to configure the device to be configured, wherein the response information is a response message sent by the device to be configured when the public key of the key, the first address information and the second address information are successfully matched with the network configuration device, which solves the technical problem of how to efficiently complete the directional network configuration of the device in the related art, thereby realizing the directional network configuration of the device and improving the network configuration efficiency of the device.
[0039] 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 configuration information to the device to be configured in the above-mentioned step S204, so that the device to be configured is matched with the configuration device based on the public key of the key, the first address information, and the second address information, the following technical solution is proposed, specifically including: using the private key of the key to encrypt the second address information of the device to be configured to obtain the first address hash value of the device to be configured; sending a first directed configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the first address hash value in the first directed configuration instruction to obtain the decrypted third address information, using the decrypted third address information to match the stored second address information, and using the fourth address information of the configuration device in the first directed configuration instruction to match the stored first address information.
[0040] Through the above embodiment, a directional search method can be used, that is, the hash value of the device to be configured can be encrypted using a private key and sent, so that after the device to be configured in the same local area network receives it, it can use the public key to decrypt and verify the hash value, thereby realizing the matching process of the device to be configured.
[0041] In an exemplary embodiment, the execution process of sending the public key of the key, the first address information, the second address information and the device network configuration information to the device to be configured in the above-mentioned step S204 so that the device to be configured matches the network configuration device based on the public key of the key, the first address information and the second address information is further described, specifically including: encrypting the first address information of the network configuration device using the private key of the key to obtain the second address hash value of the network configuration device; sending a second directed network configuration instruction to the device to be configured so that the device to be configured uses the public key to decrypt the second address hash value in the second directed network configuration instruction to obtain the decrypted fifth address information, using the decrypted fifth address information to match the stored first address information, and using the sixth address information of the network configuration device in the second directed network configuration instruction to match the stored second address information.
[0042] In an exemplary embodiment, after sending the public key of the key, the first address information, the second address information and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information, and the second address information, the following technical solution is also proposed, specifically including: using the private key of the key to encrypt the preset broadcast protocol to obtain an encryption result; sending a global network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the encryption result in the global network configuration instruction to obtain the decrypted broadcast protocol, and sending the response message when it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration.
[0043] It should be noted that the protocols required for the above-mentioned network configuration can be preset manually, and this application does not limit the source of obtaining the protocols required for the network configuration.
[0044] Through the above embodiment, the whole network search method can be used, that is, the protocol required for network configuration can be encrypted with a private key and sent, so that after the network device to be configured in the same local area network receives it, it can be decrypted using the public key to obtain the decrypted broadcast protocol. When it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration, the response message is sent, thereby realizing the matching process of the network device to be configured.
[0045] According to another embodiment of the present application, a device network configuration method is also provided, such as Figure 3 As shown, Figure 3 Flowchart (2) of the device network configuration method according to an embodiment of the present application, the process includes the following steps:
[0046] Step S302: receiving a key required for network configuration sent by a network configuration device, the first address information of the network configuration device, and the second address information of the device to be configured;
[0047] Step S304: Matching the first address information and the second address information with the network distribution device based on the public key of the key;
[0048] Step S306: When the matching is successful, a response message is sent to the network configuration device, so that the network configuration device uses the device network configuration information to perform network configuration.
[0049] Through the above steps, the key required for network configuration, the first address information of the network configuration device, and the second address information of the device to be configured are received from the network configuration device; the first address information and the second address information are matched with the network configuration device based on the public key of the key; and a response message is sent to the network configuration device when the match is successful, so that the network configuration device uses the device configuration information to perform network configuration. This solves the technical problem of how to efficiently complete targeted device configuration in the related art, thereby realizing targeted device configuration and improving device configuration efficiency.
[0050] In an exemplary embodiment, in order to better understand the implementation process of matching the first address information, the second address information and the distribution network device based on the public key of the key in the above-mentioned step S304, the specific steps are as follows: receiving a first directed distribution network instruction sent by the distribution network device, wherein the first directed distribution network instruction includes the first address hash value obtained after the distribution network device uses the private key of the key to encrypt the second address information of the device to be distributed, and the fourth address information of the distribution network device; using the public key to decrypt the first address hash value to obtain the decrypted third address information, using the decrypted third address information to match the stored second address information, and using the fourth address information of the distribution network device to match the stored first address information.
[0051] In an exemplary embodiment, a technical solution is also proposed for matching the public key of the key, the first address information, the second address information and the distribution network device, specifically including: receiving a second directed distribution network instruction sent by the distribution network device, wherein the second directed distribution network instruction includes the second address hash value obtained by the distribution network device using the private key of the key to encrypt the first address information of the distribution network device, and the sixth address information of the distribution network device; using the public key to decrypt the second address hash value to obtain the decrypted fifth address information, using the decrypted fifth address information to match the stored first address information, and using the sixth address information of the distribution network device to match the stored second address information.
[0052] In an exemplary embodiment, after the first address information and the second address information are matched with the network configuration device based on the public key of the key, the preset broadcast protocol can be further encrypted using the private key of the key to obtain an encryption result; a global network configuration instruction sent by the device to be configured is received, wherein the global network configuration instruction includes the encryption result; the encryption result is decrypted using the public key to obtain a decrypted broadcast protocol, and when it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration, the response message is sent.
[0053] In order to better understand the process of the above-mentioned device network configuration method, the implementation method flow of the above-mentioned device network configuration is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of this application.
[0054] In this embodiment, a device network configuration method is provided. Figure 4 Schematic diagram of the device network configuration method according to an embodiment of the present application. Figure 4 As shown, the specific steps are as follows:
[0055] Step S301: obtaining the device MAC address during the soft AP or Bluetooth network configuration phase;
[0056] Step S302: Return device MAC;
[0057] Step S303: Upload the MAC address of the master device (i.e. the network configuration device) and the MAC address of the controlled device (i.e. the device to be configured) to the platform;
[0058] Step S304: The cloud generates a public key pair, a private key pair, and hash values of the MAC addresses of the master and controlled devices;
[0059] Step S305: transmit the public key pair, private key pair and hash value to the master control device;
[0060] Step S306: storing the private key pair and hash value;
[0061] Step S307: transmit the hash value of the public key to the controlled device along with the network configuration information;
[0062] Step S308: The controlled device performs storage;
[0063] It should be noted that based on steps S301 to S308, the master device can obtain the public and private keys and the hash values of the MACs of the master and controlled devices from the cloud during the network configuration process, and transmit them to the controlled devices along with the network configuration information. The master device itself stores this information as a filtering condition for subsequent master device LAN broadcast search devices and controlled devices to reply to the master device search request.
[0064] Step S309: Directed broadcast search for devices, the search packet contains the hash value of the required response device and the MAC of the master device, and is encrypted using a private key;
[0065] Step S310: The controlled device uses the public key to decrypt and verify the hash value. If a match is found, a search response is performed.
[0066] Step S311: reply to the search response;
[0067] Furthermore, through the above steps, when the master device searches for a controlled device, when the master device hopes to search for a certain controlled device, a directed search method is adopted, that is, the hash value of the controlled device is encrypted with a private key and a broadcast packet is sent. When the device in the local area network receives it, it uses the public key to decrypt and verify the hash value. If the MAC matches, a reply is given. If it does not match or the decryption fails, the search packet is discarded.
[0068] Step S312: The network-wide broadcast search device search package contains a broadcast protocol encrypted with a private key;
[0069] Step S313: The controlled device uses the public key to decrypt and finds that it is a full network search protocol, then all the controlled devices configured by the master device reply.
[0070] It should be noted that, based on the above steps, when the master device searches for the controlled device, when it hopes to search for all configured controlled devices, the whole network search method is adopted, that is, the whole network search protocol (equivalent to the protocol required for the above-mentioned network configuration) is encrypted with a private key and a broadcast packet is sent. When the controlled device in the local area network receives it, it uses the public key to decrypt it. If the decryption is successful, it replies to the search packet. If the decryption fails, it is discarded.
[0071] Through the above-described embodiment, during the master device search process, the controlled device uses a public key to authenticate the master device. The controlled device only responds to searches for legitimate master devices and does not respond to other master devices that initiated the search. This reduces network packet traffic, reduces network congestion, and improves the security of the controlled device. Furthermore, during the master device search process, because the master device uses a targeted search method, only controlled devices whose MAC addresses match the desired device will respond to the search. This reduces network packet traffic and network congestion, resolving the issues of the master device being unable to query a specific controlled device for device information and the network congestion caused by a large number of controlled devices responding. This solution is particularly effective when there are a large number of controlled devices in a local area network (LAN), which can cause network congestion due to a large number of controlled device responses. This solution enables precise and targeted message interaction with controlled devices, improving network configuration efficiency. Even if unauthorized controlled devices exist in the LAN, they will not respond, reducing the risk of information leakage, while also reducing network packet traffic and the probability of network congestion.
[0072] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0073] Figure 5 This is a structural block diagram of a device network distribution device according to an embodiment of the present application (I); Figure 5 Shown, including:
[0074] An acquisition module 52 is configured to acquire the key required for network configuration, the first address information of the network configuration device, and the second address information of the device to be configured from the cloud platform;
[0075] Among them, optionally, there may be a control and controlled relationship between the above-mentioned network distribution device and the network device to be distributed, so the above-mentioned network distribution device can also be understood as the master control device of the above-mentioned network device to be distributed, and the above-mentioned network device to be distributed can also be understood as the controlled device of the above-mentioned network distribution device.
[0076] It should be noted that the above-mentioned keys may include a public key pair and a private key pair, and this application does not limit the key generation algorithm.
[0077] It should be noted that the first address information and the second address information may be, for example, an IP address, a MAC address, etc., but are not limited thereto.
[0078] A first matching module 54 is configured to send the public key of the key, the first address information, the second address information, and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information, and the second address information;
[0079] The first network configuration module 56 is used to determine whether to use the device network configuration information to configure the device to be configured when receiving the response information sent by the device to be configured, wherein the response information is a response message sent by the device to be configured when the public key of the key, the first address information, and the second address information are successfully matched with the configuration device.
[0080] Through the above-mentioned device, the key required for network configuration, the first address information of the network configuration device and the second address information of the device to be configured are obtained from the cloud platform; the public key of the key, the first address information, the second address information and the device network configuration information are sent to the device to be configured, so that the device to be configured is matched with the network configuration device based on the public key of the key, the first address information and the second address information; when the response information sent by the device to be configured is received, it is determined to use the device network configuration information to configure the device to be configured, wherein the response information is a response message sent by the device to be configured when the public key of the key, the first address information and the second address information are successfully matched with the network configuration device, which solves the technical problem of how to efficiently complete the directional network configuration of the device in the related art, thereby realizing the directional network configuration of the device and improving the network configuration efficiency of the device.
[0081] In an exemplary embodiment, the above-mentioned first matching module 54 is also used to: use the private key of the key to encrypt the second address information of the device to be configured to obtain the first address hash value of the device to be configured; send a first directed configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the first address hash value in the first directed configuration instruction to obtain the decrypted third address information, use the decrypted third address information to match the stored second address information, and use the fourth address information of the configuration device in the first directed configuration instruction to match the stored first address information.
[0082] Through the above embodiment, a directional search method can be used, that is, the hash value of the device to be configured can be encrypted using a private key and sent, so that after the device to be configured in the same local area network receives it, it can use the public key to decrypt and verify the hash value, thereby realizing the matching process of the device to be configured.
[0083] In an exemplary embodiment, the above-mentioned first matching module 54 is also used to: use the private key of the key to encrypt the first address information of the network configuration device to obtain the second address hash value of the network configuration device; send a second directed network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the second address hash value in the second directed network configuration instruction to obtain the decrypted fifth address information, use the decrypted fifth address information to match the stored first address information, and use the sixth address information of the network configuration device in the second directed network configuration instruction to match the stored second address information.
[0084] In an exemplary embodiment, the above-mentioned device network configuration device also includes a first sending module, which is used to: encrypt a preset broadcast protocol using the private key of the key to obtain an encryption result; send a global network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the encryption result in the global network configuration instruction to obtain the decrypted broadcast protocol, and send the response message when it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration.
[0085] It should be noted that the protocols required for the above-mentioned network configuration can be preset manually, and this application does not limit the source of obtaining the protocols required for the network configuration.
[0086] Through the above embodiment, the whole network search method can be used, that is, the protocol required for network configuration can be encrypted with a private key and sent, so that after the network device to be configured in the same local area network receives it, it can be decrypted using the public key to obtain the decrypted broadcast protocol. When it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration, the response message is sent, thereby realizing the matching process of the network device to be configured.
[0087] According to another embodiment of the present application, a device network distribution device is also provided, such as Figure 6 As shown, Figure 6 This is a structural block diagram (II) of a device network distribution device according to an embodiment of the present application, including:
[0088] A receiving module 62 is configured to receive a key required for network configuration, the first address information of the network configuration device, and the second address information of the device to be configured, sent by the network configuration device;
[0089] A second matching module 64 is configured to match the network distribution device based on the public key of the key, the first address information, and the second address information;
[0090] The second network configuration module 66 is configured to send a response message to the network configuration device when the matching is successful, so that the network configuration device uses the device network configuration information to perform network configuration.
[0091] Through the above steps, the key required for network configuration, the first address information of the network configuration device, and the second address information of the device to be configured are received from the network configuration device; the first address information and the second address information are matched with the network configuration device based on the public key of the key; and a response message is sent to the network configuration device when the match is successful, so that the network configuration device uses the device configuration information to perform network configuration. This solves the technical problem of how to efficiently complete targeted device configuration in the related art, thereby realizing targeted device configuration and improving device configuration efficiency.
[0092] In an exemplary embodiment, the above-mentioned second matching module 64 is also used to: receive a first directed network configuration instruction sent by the network configuration device, wherein the first directed network configuration instruction includes the first address hash value obtained after the network configuration device uses the private key of the key to encrypt the second address information of the device to be configured, and the fourth address information of the network configuration device; use the public key to decrypt the first address hash value to obtain the decrypted third address information, use the decrypted third address information to match the stored second address information, and use the fourth address information of the network configuration device to match the stored first address information.
[0093] In an exemplary embodiment, the above-mentioned second matching module 64 is also used to: receive a second directed network configuration instruction sent by the network configuration device, wherein the second directed network configuration instruction includes a second address hash value obtained by the network configuration device using the private key of the key to encrypt the first address information of the network configuration device, and the sixth address information of the network configuration device; use the public key to decrypt the second address hash value to obtain the decrypted fifth address information, use the decrypted fifth address information to match the stored first address information, and use the sixth address information of the network configuration device to match the stored second address information.
[0094] In an exemplary embodiment, the above-mentioned device network configuration device also includes a second sending module, which is used to: after matching the first address information, the second address information and the network configuration device based on the public key of the key, further use the private key of the key to encrypt the preset broadcast protocol to obtain an encryption result; receive the global network configuration instruction sent by the device to be configured, wherein the global network configuration instruction includes the encryption result; use the public key to decrypt the encryption result to obtain the decrypted broadcast protocol, and send the response message when it is determined that the decrypted broadcast protocol belongs to the protocol required for network configuration.
[0095] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0096] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0097] S1, obtain the key required for network configuration, the first address information of the network configuration device and the second address information of the device to be configured from the cloud platform;
[0098] S2, sending the public key of the key, the first address information, the second address information and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information and the second address information;
[0099] S3. Upon receiving the response information sent by the device to be networked, determine to use the device network configuration information to configure the device to be networked, wherein the response information is a response message sent by the device to be networked when the public key of the key, the first address information, and the second address information are successfully matched with the network configuration device.
[0100] Optionally, in other embodiments, the storage medium may also be configured to store program codes for executing the following steps:
[0101] S1, receiving the key required for network configuration sent by the network configuration device, the first address information of the network configuration device and the second address information of the device to be configured;
[0102] S2, matching the first address information and the second address information with the network distribution device based on the public key of the key;
[0103] S3. When the matching is successful, a response message is sent to the network configuration device, so that the network configuration device uses the device network configuration information to perform network configuration.
[0104] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0105] Optionally, the electronic device 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.
[0106] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0107] S1, obtain the key required for network configuration, the first address information of the network configuration device and the second address information of the device to be configured from the cloud platform;
[0108] S2, sending the public key of the key, the first address information, the second address information and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information and the second address information;
[0109] S3. Upon receiving the response information sent by the device to be networked, determine to use the device network configuration information to configure the device to be networked, wherein the response information is a response message sent by the device to be networked when the public key of the key, the first address information, and the second address information are successfully matched with the network configuration device.
[0110] Optionally, in other embodiments, the processor may be configured to execute the following steps through a computer program:
[0111] S1, receiving the key required for network configuration sent by the network configuration device, the first address information of the network configuration device and the second address information of the device to be configured;
[0112] S2, matching the first address information and the second address information with the network distribution device based on the public key of the key;
[0113] S3. When the matching is successful, a response message is sent to the network configuration device, so that the network configuration device uses the device network configuration information to perform network configuration.
[0114] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0115] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0116] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0117] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A device network configuration method, characterized in that: Applicable to distribution network equipment, including: Obtain the key required for network configuration, the first address information of the network configuration device, and the second address information of the device to be configured from the cloud platform; Sending the public key of the key, the first address information, the second address information and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information and the second address information; Upon receiving the response information sent by the device to be networked, determining to use the device network configuration information to configure the device to be networked, wherein the response information is a response message sent by the device to be networked when the public key of the key, the first address information, and the second address information are successfully matched with the network configuration device; Sending the public key of the key, the first address information, the second address information, and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information, and the second address information, includes one of the following: Using the private key of the key to encrypt the second address information of the device to be configured, to obtain the first address hash value of the device to be configured; sending a first directed network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the first address hash value in the first directed network configuration instruction to obtain decrypted third address information, using the decrypted third address information to match the stored second address information, and using the fourth address information of the network configuration device in the first directed network configuration instruction to match the stored first address information; Use the private key of the key to encrypt the first address information of the network configuration device to obtain the second address hash value of the network configuration device; send a second directed network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the second address hash value in the second directed network configuration instruction to obtain the decrypted fifth address information, use the decrypted fifth address information to match the stored first address information, and use the sixth address information of the network configuration device in the second directed network configuration instruction to match the stored second address information.
2. The device network configuration method according to claim 1, wherein: After sending the public key of the key, the first address information, the second address information, and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information, and the second address information, the method further includes: Encrypting the preset broadcast protocol using the private key of the key to obtain an encryption result; Send a global network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the encryption result in the global network configuration instruction to obtain the decrypted broadcast protocol, and send the response message when it is determined that the decrypted broadcast protocol is the protocol required for network configuration.
3. A device network configuration method, characterized in that: Applicable to devices to be networked, including: Receive the key required for network configuration sent by the network configuration device, the first address information of the network configuration device and the second address information of the device to be configured; Matching the first address information and the second address information with the network distribution device based on the public key of the key; When the matching is successful, a response message is sent to the network configuration device, so that the network configuration device uses the device network configuration information to perform network configuration; Matching the first address information, the second address information, and the network distribution device based on the public key of the key includes one of the following: Receive a first directed network configuration instruction sent by the network configuration device, wherein the first directed network configuration instruction includes a first address hash value obtained by the network configuration device using the private key of the key to encrypt the second address information of the device to be configured, and fourth address information of the network configuration device; decrypt the first address hash value using the public key to obtain decrypted third address information, match the decrypted third address information with the stored second address information, and match the fourth address information of the network configuration device with the stored first address information; Receive a second directed network configuration instruction sent by the network configuration device, wherein the second directed network configuration instruction includes a second address hash value obtained by the network configuration device using the private key of the key to encrypt the first address information of the network configuration device, and the sixth address information of the network configuration device; use the public key to decrypt the second address hash value to obtain decrypted fifth address information, use the decrypted fifth address information to match the stored first address information, and use the sixth address information of the network configuration device to match the stored second address information.
4. The device network configuration method according to claim 3, characterized in that: After matching the first address information and the second address information with the network distribution device based on the public key of the key, the method further includes: Encrypting the preset broadcast protocol using the private key of the key to obtain an encryption result; Receiving a global network configuration instruction sent by the device to be network configured, wherein the global network configuration instruction includes the encryption result; The encryption result is decrypted using the public key to obtain a decrypted broadcast protocol, and when it is determined that the decrypted broadcast protocol is a protocol required for network configuration, the response message is sent.
5. A device network distribution device, characterized in that: include: An acquisition module is used to obtain the key required for network configuration, the first address information of the network configuration device, and the second address information of the device to be configured from the cloud platform; A first matching module is configured to send the public key of the key, the first address information, the second address information, and the device network configuration information to the device to be configured, so that the device to be configured matches the network configuration device based on the public key of the key, the first address information, and the second address information; A first network configuration module is configured to determine, upon receiving a response message sent by the device to be configured, to use the device network configuration information to configure the device to be configured, wherein the response information is a response message sent by the device to be configured when the public key, the first address information, and the second address information of the device to be configured successfully match the network configuration device; The first matching module is further configured to implement one of the following solutions: Using the private key of the key to encrypt the second address information of the device to be configured, to obtain the first address hash value of the device to be configured; sending a first directed network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the first address hash value in the first directed network configuration instruction to obtain decrypted third address information, using the decrypted third address information to match the stored second address information, and using the fourth address information of the network configuration device in the first directed network configuration instruction to match the stored first address information; Use the private key of the key to encrypt the first address information of the network configuration device to obtain the second address hash value of the network configuration device; send a second directed network configuration instruction to the device to be configured, so that the device to be configured uses the public key to decrypt the second address hash value in the second directed network configuration instruction to obtain the decrypted fifth address information, use the decrypted fifth address information to match the stored first address information, and use the sixth address information of the network configuration device in the second directed network configuration instruction to match the stored second address information.
6. A device network distribution device, characterized in that: include: A receiving module, configured to receive a key required for network configuration sent by a network configuration device, the first address information of the network configuration device, and the second address information of the device to be configured; A second matching module, configured to match the network distribution device based on the public key of the key, the first address information, and the second address information; A second network configuration module is configured to send a response message to the network configuration device when the matching is successful, so that the network configuration device uses the device network configuration information to perform network configuration; The second matching module is further configured to implement one of the following solutions: Receive a first directed network configuration instruction sent by the network configuration device, wherein the first directed network configuration instruction includes a first address hash value obtained by the network configuration device using the private key of the key to encrypt the second address information of the device to be configured, and fourth address information of the network configuration device; decrypt the first address hash value using the public key to obtain decrypted third address information, match the decrypted third address information with the stored second address information, and match the fourth address information of the network configuration device with the stored first address information; Receive a second directed network configuration instruction sent by the network configuration device, wherein the second directed network configuration instruction includes a second address hash value obtained by the network configuration device using the private key of the key to encrypt the first address information of the network configuration device, and the sixth address information of the network configuration device; use the public key to decrypt the second address hash value to obtain decrypted fifth address information, use the decrypted fifth address information to match the stored first address information, and use the sixth address information of the network configuration device to match the stored second address information.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 2, or the method described in any one of claims 3 to 4 when the program is executed.
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 2, or the method according to any one of claims 3 to 4, through the computer program.
Citation Information
Patent Citations
Equipment distribution network processing method, equipment distribution network processing device and electronic device
CN112019409A
Identity encryption-based data transmission method and apparatus, and electronic device and storage medium
WO2021239034A1