Client and device interactive network distribution method and device, electronic device and medium

By using the CoAP protocol between the client and the device for key negotiation and authentication, the problems of low security and high power consumption of wireless distribution network information in the prior art are solved, and safe and efficient distribution network information transmission is achieved.

CN119402993APending Publication Date: 2025-02-07E-SURFING DIGITAL LIFE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411522304.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, the wireless distribution networks between devices and clients have problems such as low information security and high power consumption of equipment.

Method used

By establishing a wireless connection between the client and the device, using the Restricted Application Protocol (CoAP) for key negotiation and authentication, an initial vector is generated for encryption of device registration code and distribution information.

Benefits of technology

It improves the security of distribution network information transmission, reduces the power consumption of equipment on WiFi distribution networks, and solves the problem of low information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402993A_ABST
    Figure CN119402993A_ABST
Patent Text Reader

Abstract

The invention discloses a client and equipment interactive network distribution method and device, electronic equipment and a medium, and the method comprises the steps: responding to an equipment registration request, and returning an equipment registration code to a client; establishing a wireless connection between the client and the target device; generating an initial vector through the interaction authentication information of the client and the target equipment; encrypting the equipment registration code and the distribution network information by using the shared key and the initial vector to obtain encrypted data; sending the encrypted data to a target device, so that the target device decrypts the encrypted data by using the shared key and the initial vector to obtain a device registration code and distribution network information; performing network distribution operation based on the network distribution information through the target equipment; and after equipment network distribution succeeds, successful networking is reported to the target platform. And the client inquires the actual networking state of the equipment from the platform through the equipment registration code. The security of distribution network information transmission can be improved, and the method can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and medium for interactive network configuration between a client and a device. Background Art

[0002] Currently, there are two common network connection methods: one is wired connection, which uses twisted pair or fiber optic transmission media to connect devices to a local area network or uses serial communication interfaces such as RS-485, RS-232 and USB to achieve wired networking, but it is necessary to consider the hardware support and interface limitations of the device, as well as the lack of flexibility due to physical connection limitations; the other is wireless connection, which uses near-field communication technologies such as Bluetooth or NFC to transmit WiFi information, but this has certain requirements for device hardware, will increase the cost of Bluetooth and other hardware, and is easily affected by transmission distance; the second is ZigBee networking, but it is incompatible with wireless network technologies such as WiFi, and requires special equipment for gateway connection, which increases the complexity and cost of the equipment; the third is WiFi networking, which has high power requirements and the device consumes a lot of power. In addition, the security of WiFi also requires extra attention. Summary of the invention

[0003] The present invention proposes a method, device, electronic device and medium for interactive network configuration between a client and a device, aiming to solve one of the technical problems in the related art at least to a certain extent. The embodiments of the present invention can conveniently and safely realize interactive network configuration between a client and a device.

[0004] On the one hand, an embodiment of the present invention provides a method for interactive network configuration between a client and a device, including:

[0005] In response to a device registration request initiated by the client, the device registration code is returned to the client via the target platform;

[0006] In response to a connection operation of a wireless access point issued by the client to the target device, establishing a wireless connection between the client and the target device;

[0007] Based on the wireless connection, an initialization vector is generated through the interactive authentication information between the client and the target device;

[0008] The interactive authentication information is transmitted between the client and the target device through a restricted application protocol; the interactive authentication information includes a public key for key negotiation between the client and the target device;

[0009] The client uses a shared key and an initial vector to encrypt the device registration code and network configuration information to obtain encrypted data; the shared key is generated based on the private key of the current participant in the key negotiation and the public key transmitted by another participant;

[0010] Send the encrypted data to the target device, so that the target device decrypts the encrypted data using the shared key and the initial vector to obtain the device registration code and network configuration information;

[0011] Perform network configuration operations based on network configuration information through the target device.

[0012] Optionally, in response to a connection operation of a wireless access point issued by the client to the target device, establishing a wireless connection between the client and the target device includes the following steps:

[0013] Powering on the target device so that the target device enters a network configuration state, and opening a wireless access point of the target device in response to the network configuration state;

[0014] The client connects to the wireless access point of the target device to establish a wireless connection between the client and the target device.

[0015] Optionally, based on the wireless connection, generating an initial vector through interactive authentication information between the client and the target device includes the following steps:

[0016] The client uses a restricted application protocol to initiate an interaction request to the target device, so that the target device returns its security capability information to the client;

[0017] The client uses the restricted application protocol to negotiate a key with the target device based on the security capability information to obtain a shared key.

[0018] The client uses a restricted application protocol to initiate an authentication request to the target device, so that the client and the target device perform multiple rounds of request responses based on a shared key to generate an initial vector.

[0019] Optionally, the interactive authentication information further includes a device-side random number, device-side authentication information, a client-side random number, and client-side authentication information; initiating an authentication request to a target device by the client using a restricted application protocol so that the client and the target device perform multiple rounds of request responses based on a shared key to generate an initial vector, including the following steps:

[0020] Initiate an authentication request to the target device using a restricted application protocol through the client;

[0021] In response to the authentication request, a device-side random number is generated by the target device, and then device-side authentication information is generated based on the device-side random number and the shared key, and the device-side authentication information is sent to the client through the restricted application protocol as a first response parameter;

[0022] In response to the first response parameter, generating a client random number by the client, further generating client authentication information based on the client random number and the shared key, and sending the client authentication information as a second request parameter to the target device through the restricted application protocol;

[0023] In response to the second request parameter, sending the device-side random number as a second response parameter to the client through the restricted application protocol via the target device;

[0024] In response to the second response parameter, sending, by the client, the client random number as a third request parameter to the target device via the restricted application protocol;

[0025] In response to the third request parameter, the target device verifies the client authentication information using the client random number and the shared key, generates an initial vector, and sends the initial vector as a third response parameter to the client through the restricted application protocol.

[0026] Optionally, the client sends the encrypted data as a fourth request parameter to the target device through a restricted application protocol; the method further comprises the following steps:

[0027] When the target device fails to decrypt the encrypted data, the decryption result of the failed decryption is sent to the client through the restricted application protocol as the fourth response parameter; otherwise, the decryption result of the successful decryption is sent to the client through the restricted application protocol as the fourth response parameter.

[0028] Optionally, performing a network configuration operation based on the network configuration information by the target device includes the following steps:

[0029] Shut down the wireless access point of the target device, and then perform network configuration operations on the target device based on the network configuration information;

[0030] When the target device is successfully networked, the target device uses the device registration code to report the successful network configuration information to the target platform.

[0031] Optionally, the method further comprises the following steps:

[0032] The client uses the device registration code to initiate a device networking status query to the target platform to obtain the network status of the target device.

[0033] On the other hand, an embodiment of the present invention provides a client and device interactive network configuration device, including:

[0034] The first module is used to respond to the device registration request initiated by the client and return the device registration code to the client through the target platform;

[0035] The second module is used to establish a wireless connection between the client and the target device in response to a connection operation of a wireless access point issued by the client to the target device;

[0036] The third module is used to generate an initial vector through interactive authentication information between the client and the target device based on the wireless connection;

[0037] The interactive authentication information is transmitted between the client and the target device through a restricted application protocol; the interactive authentication information includes a public key for key negotiation between the client and the target device;

[0038] The fourth module is used to encrypt the device registration code and network configuration information by using a shared key and an initial vector through the client to obtain encrypted data; the shared key is generated based on the private key of the current participant in the key negotiation and the public key transmitted by another participant;

[0039] The fifth module is used to send the encrypted data to the target device, so that the target device decrypts the encrypted data using the shared key and the initial vector to obtain the device registration code and network configuration information;

[0040] The sixth module is used to perform network configuration operations based on the network configuration information through the target device.

[0041] Optionally, the client sends the encrypted data as a fourth request parameter to the target device through a restricted application protocol; the apparatus further includes:

[0042] The seventh module is used to send the decryption result of the failed decryption to the client as the fourth response parameter through the restricted application protocol when the target device fails to decrypt the encrypted data; otherwise, send the decryption result of the successful decryption to the client as the fourth response parameter through the restricted application protocol.

[0043] Optionally, the sixth module is specifically used for:

[0044] Shut down the wireless access point of the target device, and then perform network configuration operations on the target device based on the network configuration information;

[0045] When the target device is successfully networked, the target device uses the device registration code to report the successful network configuration information to the target platform.

[0046] Furthermore, the device also includes:

[0047] The eighth module is used to initiate a device networking status query to the target platform using the device registration code through the client to obtain the networking status of the target device.

[0048] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned client and device interactive network configuration method.

[0049] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned client and device interactive network configuration method.

[0050] The embodiment of the present invention responds to a device registration request initiated by a client and returns a device registration code to the client through a target platform; establishes a wireless connection between the client and the target device in response to a connection operation of a wireless access point issued by the client to the target device; generates an initial vector based on the wireless connection through interactive authentication information between the client and the target device; wherein the interactive authentication information is transmitted between the client and the target device through a restricted application protocol, and the interactive authentication information includes a public key for key negotiation between the client and the target device; encrypts the device registration code and network configuration information by the client using a shared key and an initial vector to obtain encrypted data; the shared key is generated based on a private key of a current participant in the key negotiation and a public key transmitted by another participant; the encrypted data is sent to the target device, so that the target device decrypts the encrypted data using the shared key and the initial vector to obtain the device registration code and network configuration information; and performs a network configuration operation based on the network configuration information by the target device. The present invention initiates device registration to the platform before formal network configuration, so as to realize device authentication on the platform, and performs key negotiation with the device based on a restricted application protocol, so as to encrypt and transmit network configuration information later. This solves the technical problem of low information security in the aforementioned invention, improves the security of network configuration information transmission, and makes up for the deficiency of large power consumption of devices due to WiFi network configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0052] Figure 1 A schematic diagram of an implementation environment for interactive network configuration between a client and a device provided in an embodiment of the present invention;

[0053] Figure 2 A schematic diagram of a flow chart of a method for interactive network configuration between a client and a device provided in an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of the expansion process of step S200 provided in an embodiment of the present invention;

[0055] Figure 4A schematic diagram of the expansion process of step S300 provided in an embodiment of the present invention;

[0056] Figure 5 A schematic diagram of the expansion process of step S303 provided in an embodiment of the present invention;

[0057] Figure 6 A schematic diagram of an extended process of a method for interactive network configuration between a client and a device provided in an embodiment of the present invention;

[0058] Figure 7 A schematic diagram of the expansion process of step S600 provided in an embodiment of the present invention;

[0059] Figure 8 A schematic diagram of an example of a business process of a method for interactive network configuration between a client and a device provided in an embodiment of the present invention;

[0060] Fig. 9 A schematic diagram of the structure of a client and device interactive network configuration device provided by an embodiment of the present invention;

[0061] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0063] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0064] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present invention may be combined with other embodiments.

[0065] To facilitate the understanding of the technical solution of the present invention, the following is an explanation of the specific names of the technical features that may appear in the technical solution of the present invention:

[0066] Network distribution: the process of connecting smart home devices to the Internet;

[0067] CoAP (Constrained Application Protocol) is an application layer protocol designed for IoT devices and resource-constrained networks. It was born because most IoT devices are resource-constrained, such as CPU, RAM, Flash, network bandwidth, etc. The traditional HTTP protocol is based on TCP. For these resource-constrained devices, it is unrealistic to directly use the existing TCP and HTTP to implement device information exchange. Therefore, the CoAP protocol came into being. It is developed based on the transport layer UDP and is suitable for resource-constrained IoT devices.

[0068] AP hotspot refers to a wireless access point (AP), which is a bridge connecting wired and wireless networks. Its main function is to connect various wireless network clients together and then connect the wireless network to the Ethernet. APs with access point client mode can be connected wirelessly, thereby expanding the coverage of WiFi shared Internet access. Specifically, AP is an access point of a wireless network, commonly known as a "hotspot". It mainly has two types: routing, switching and access integrated devices and pure access point devices. The integrated device performs access and routing work, while the pure access device is only responsible for the access of wireless clients and is usually used for wireless network expansion. For example, a camera with an AP hotspot can send out a WiFi hotspot, through which a mobile phone or computer can connect and view the surveillance screen.

[0069] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.

[0070] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0071] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0072] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.

[0073] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a method for interactive network configuration between a client and a device. The following is explained using the example of the method for interactive network configuration between a client and a device applied in a terminal 102. It can be understood that the method for interactive network configuration between a client and a device can also be applied to a server 101.

[0074] Reference Figure 2 , Figure 2 The flowchart of the client-device interactive network configuration method applied to the terminal provided by the embodiment of the present invention, the execution subject of the client-device interactive network configuration method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:

[0075] S100, in response to a device registration request initiated by the client, returning a device registration code to the client via the target platform;

[0076] For example, in some specific implementations, taking the client as a mobile client as an example, the mobile client scans or manually enters a unique device identifier to initiate device registration to the platform, and the platform returns the device registration code to the mobile client.

[0077] S200, in response to a connection operation of a wireless access point issued by the client to the target device, establishing a wireless connection between the client and the target device;

[0078] It should be noted that in some embodiments, Figure 3 As shown, in response to a connection operation of a wireless access point issued by a client to a target device, establishing a wireless connection between the client and the target device may include the following steps: S201, powering on the target device so that the target device enters a network configuration state, and turning on the wireless access point of the target device in response to the network configuration state; S202, connecting the wireless access point of the target device through the client to establish a wireless connection between the client and the target device.

[0079] For example, in some specific implementations, the smart device (ie, the target device) is powered on to enter the AP network configuration state, and the mobile client connects to the AP hotspot emitted by the device in the network settings.

[0080] S300, based on the wireless connection, generating an initial vector through interactive authentication information between the client and the target device;

[0081] The interactive authentication information is transmitted between the client and the target device through a restricted application protocol; the interactive authentication information includes a public key for key negotiation between the client and the target device;

[0082] It should be noted that in some embodiments, Figure 4 As shown, based on the wireless connection, generating an initial vector through interactive authentication information between the client and the target device may include the following steps: S301, initiating an interactive request to the target device by the client using a restricted application protocol, so that the target device returns its security capability information to the client; S302, performing key negotiation with the target device by the client using a restricted application protocol according to the security capability information to obtain a shared key; S303, initiating an authentication request to the target device by the client using a restricted application protocol, so that the client and the target device perform multiple rounds of request responses based on the shared key to generate an initial vector.

[0083] Exemplarily, in some specific implementations, the mobile client uses the CoAP protocol to initiate an interaction request to the device to request device information and security capabilities; then, the mobile client uses the CoAP protocol to negotiate a key with the device based on the security capabilities and other information returned by the device; subsequently, the mobile client initiates an authentication request to the device through the CoAP protocol to perform multiple rounds of request responses between the mobile client and the device, which are ultimately used to generate an initial vector.

[0084] In some embodiments, the interactive authentication information further includes a device-side random number, device-side authentication information, a client-side random number, and client-side authentication information; Figure 5As shown, the client uses the restricted application protocol to initiate an authentication request to the target device, so that the client and the target device perform multiple rounds of request responses based on the shared key to generate an initial vector, which may include the following steps: S3031, the client uses the restricted application protocol to initiate an authentication request to the target device; S3032, in response to the authentication request, the target device generates a device-side random number, and then generates device-side authentication information based on the device-side random number and the shared key, and sends the device-side authentication information to the client through the restricted application protocol as a first response parameter; S3033, in response to the first response parameter, the client generates a client random number, and then generates a client-side authentication information based on the client random number and the shared key The method comprises: generating client authentication information by using a key, and sending the client authentication information as a second request parameter to a target device through a restricted application protocol; S3034, in response to the second request parameter, sending a device-side random number as a second response parameter to a client through a restricted application protocol through a target device; S3035, in response to the second response parameter, sending a client random number as a third request parameter to a target device through a client through a restricted application protocol; S3036, in response to the third request parameter, verifying the client authentication information by using the client random number and the shared key through a target device, generating an initial vector, and sending the initial vector as a third response parameter to the client through a restricted application protocol.

[0085] Exemplarily, in some specific implementations, after the mobile client initiates an authentication request (which can be regarded as the first request) to the device through the CoAP protocol, the device side generates a device-side random number, and generates device-side authentication information together with the shared key obtained through key negotiation, and sends the device-side authentication information as a response parameter to the mobile client through the CoAP protocol; then, the mobile client generates a client random number, and generates client authentication information together with the shared key obtained through key negotiation, and sends the client authentication information as a request parameter to the device through the CoAP protocol; then, the device sends the device-side random number as a response parameter to the mobile client through the CoAP protocol; then, the mobile client sends the client random number as a request parameter to the device through the CoAP protocol; finally, the device uses the client random number and shared key to verify the client authentication information, generates an initial vector, and sends the initial vector as a response parameter to the mobile client through the CoAP protocol.

[0086] S400, encrypting the device registration code and network configuration information by using a shared key and an initial vector through the client to obtain encrypted data;

[0087] The shared key is generated based on the private key of the current participant in the key negotiation and the public key transmitted by another participant;

[0088] Exemplarily, in some specific implementations, the mobile client uses the shared key and the received initial vector to encrypt the device registration code and network configuration information (WiFi SSID and password).

[0089] S500, sending the encrypted data to the target device, so that the target device decrypts the encrypted data using the shared key and the initial vector to obtain the device registration code and network configuration information;

[0090] Optionally, in some embodiments, the client sends the encrypted data as a fourth request parameter to the target device via a restricted application protocol; Figure 6 As shown, the method may further include the following steps: T100, when the result of the target device decrypting the encrypted data is failure, the decryption result of the failed decryption is sent to the client through the restricted application protocol as a fourth response parameter; T200, otherwise (that is, when the result of the target device decrypting the encrypted data is success), the decryption result of the successful decryption is sent to the client through the restricted application protocol as the fourth response parameter.

[0091] Exemplarily, in some specific implementations, the device uses a shared key and an initial vector to decrypt the encrypted data, obtains the device registration code, the WiFi ssid and password, and sends the decryption result (whether the decryption is successful) as a response parameter to the mobile client through the CoAP protocol.

[0092] S600: Perform network configuration operations based on the network configuration information through the target device.

[0093] It should be noted that in some embodiments, Figure 7 As shown, performing network configuration operation based on network configuration information by the target device may include the following steps: S601, shutting down the wireless access point of the target device, and then performing network configuration operation on the target device based on the network configuration information; S602, when the target device is successfully networked, using the device registration code to report the successful network configuration information to the target platform through the target device.

[0094] For example, in some specific implementations, the device turns off the AP hotspot (the mobile client switches to another network), and after connecting to the network, uses the device registration code to report the network configuration success to the platform.

[0095] Optionally, in some embodiments, the method may further include the following steps: using the device registration code to initiate a device networking status query to the target platform by the client to obtain the networking status of the target device.

[0096] For example, in some specific implementations, the mobile client uses the device registration code to initiate a device networking status query to the platform to confirm whether the device is successfully connected to the network.

[0097] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.

[0098] First of all, it should be noted that resource-constrained smart home devices often face limitations in computing, power, and storage resources when connected to the Internet. Figure 8 As shown, the present invention provides a client and device interactive network configuration method based on the CoAP protocol, which can be implemented as follows:

[0099] 1. The mobile client scans or manually enters the unique device identifier to initiate device registration on the platform, and the platform returns the device registration code to the mobile client.

[0100] 2. Power on the smart device to put it into AP configuration mode.

[0101] 3. The mobile client connects to the AP hotspot emitted by the device in the network settings.

[0102] 4. The mobile client uses the CoAP protocol to initiate an interaction request to the device to request device information and security capabilities.

[0103] 5. The mobile client uses the CoAP protocol to negotiate keys with the device based on the security capabilities and other information returned by the device.

[0104] 6. The mobile client initiates an authentication request to the device through the CoAP protocol.

[0105] 7. The device generates a random number on the device side, and uses it together with the shared key obtained through key negotiation to generate device authentication information, and then sends the device authentication information as a response parameter to the mobile client through the CoAP protocol.

[0106] 8. The mobile client generates a client random number, and uses it together with the shared key obtained through key negotiation to generate client authentication information, and then sends the client authentication information as a request parameter to the device through the CoAP protocol.

[0107] 9. The device sends the device-side random number as a response parameter to the mobile client through the CoAP protocol.

[0108] 10. The mobile client sends the client random number as a request parameter to the device through the CoAP protocol.

[0109] 11. The device uses the client random number and shared key to verify the client authentication information, generate an initial vector, and send the initial vector as a response parameter to the mobile client through the CoAP protocol.

[0110] 12. The mobile client uses the shared key and the received initial vector to encrypt the device registration code and network configuration information (WiFi SSID and password), and sends the encrypted data as a request parameter to the device through the CoAP protocol.

[0111] 13. The device uses the shared key and initial vector to decrypt the encrypted data, obtain the device registration code, WiFi SSID and password, and sends the decryption result (whether the decryption is successful) as a response parameter to the mobile client through the CoAP protocol.

[0112] 14. Turn off the AP hotspot on the device, and after connecting to the network, use the device registration code to report the network configuration success to the platform.

[0113] 15. The mobile client switches to another network.

[0114] 16. The mobile client uses the device registration code to initiate a device networking status query to the platform to confirm whether the device is successfully connected to the network.

[0115] In summary, the present invention initiates device registration to the platform before formal network configuration, which is used to realize device authentication on the platform, and negotiates keys with the device based on the CoAP protocol, which is used to encrypt and transmit network configuration information later, solving the technical problem of low information security in the aforementioned invention. The device network configuration method of the present invention implements the interactive network configuration process between the client and the resource-constrained device based on the CoAP protocol, improves the security of network configuration information transmission, and makes up for the deficiency of large power consumption of the device due to WiFi network configuration.

[0116] Compared with the prior art, the present invention has at least the following beneficial effects:

[0117] The method of the present invention realizes the network configuration of resource-constrained smart devices based on the CoAP protocol, and completes the subsequent encrypted transmission of network configuration information by means of key negotiation during the network configuration process, which is conducive to solving the resource occupation problem of smart devices during WiFi network configuration and improves the security of network configuration information transmission.

[0118] On the other hand, Fig. 9 As shown, an embodiment of the present invention provides a client and device interactive network configuration device 900, including:

[0119] The first module 901 is used to respond to the device registration request initiated by the client and return the device registration code to the client through the target platform;

[0120] The second module 902 is used to establish a wireless connection between the client and the target device in response to a connection operation of a wireless access point issued by the client to the target device;

[0121] The third module 903 is used to generate an initial vector through interactive authentication information between the client and the target device based on the wireless connection;

[0122] The interactive authentication information is transmitted between the client and the target device through a restricted application protocol; the interactive authentication information includes a public key for key negotiation between the client and the target device;

[0123] The fourth module 904 is used to encrypt the device registration code and the network configuration information by using the shared key and the initial vector through the client to obtain encrypted data; the shared key is generated based on the private key of the current participant in the key negotiation and the public key transmitted by another participant;

[0124] The fifth module 905 is used to send the encrypted data to the target device, so that the target device decrypts the encrypted data using the shared key and the initial vector to obtain the device registration code and network configuration information;

[0125] The sixth module 906 is used to perform network configuration operation based on the network configuration information through the target device.

[0126] In some embodiments, the client sends the encrypted data as a fourth request parameter to the target device via a restricted application protocol; the apparatus may also include:

[0127] The seventh module is used to send the decryption result of the failed decryption to the client as the fourth response parameter through the restricted application protocol when the target device fails to decrypt the encrypted data; otherwise, send the decryption result of the successful decryption to the client as the fourth response parameter through the restricted application protocol.

[0128] In some embodiments, the sixth module may be specifically used for:

[0129] Shut down the wireless access point of the target device, and then perform network configuration operations on the target device based on the network configuration information;

[0130] When the target device is successfully networked, the target device uses the device registration code to report the successful network configuration information to the target platform.

[0131] Furthermore, the device may also include:

[0132] The eighth module is used to initiate a device networking status query to the target platform using the device registration code through the client to obtain the networking status of the target device.

[0133] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0134] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above sensitive information method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0135] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0136] like Fig.10 As shown, Fig.10 A specific example of the hardware structure of an electronic device 1000 according to an embodiment is shown. The electronic device 1000 includes:

[0137] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0138] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;

[0139] Input / output interface 1003, used to implement information input and output;

[0140] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0141] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );

[0142] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .

[0143] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0144] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0145] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.

[0146] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0147] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0148] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0150] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0151] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.

[0152] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented by the present invention. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.

[0153] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of various functional modules in the device disclosed in the present invention, the actual implementation of the module will be understood within the conventional skills of engineers. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0154] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0155] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.

[0156] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0157] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0158] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0159] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0160] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A method for interactive network configuration between a client and a device, characterized in that: The following steps are involved: In response to a device registration request initiated by a client, returning a device registration code to the client via a target platform; In response to a connection operation of a wireless access point issued by the client to the target device, establishing a wireless connection between the client and the target device; Based on the wireless connection, generating an initialization vector through interactive authentication information between the client and the target device; The interactive authentication information is transmitted between the client and the target device through a restricted application protocol; the interactive authentication information includes a public key for key negotiation between the client and the target device; The client encrypts the device registration code and the network configuration information using a shared key and the initial vector to obtain encrypted data; the shared key is generated based on the private key of the current participant in the key negotiation and the public key transmitted by another participant; Sending the encrypted data to the target device, so that the target device decrypts the encrypted data using the shared key and the initial vector to obtain the device registration code and the network configuration information; A network configuration operation is performed by the target device based on the network configuration information.

2. The client and device interactive network configuration method according to claim 1, characterized in that: The step of establishing a wireless connection between the client and the target device in response to a connection operation of the wireless access point issued by the client to the target device comprises the following steps: Powering on the target device so that the target device enters a network configuration state, and in response to the network configuration state, turning on the wireless access point of the target device; The wireless connection between the client and the target device is established by connecting the client to the wireless access point of the target device.

3. The client and device interactive network configuration method according to claim 1, characterized in that: The step of generating an initial vector based on the wireless connection through interactive authentication information between the client and the target device comprises the following steps: Initiating an interaction request to the target device by the client using the restricted application protocol, so that the target device returns its security capability information to the client; The client uses the restricted application protocol to perform the key negotiation with the target device according to the security capability information to obtain the shared key; The client initiates an authentication request to the target device using the restricted application protocol, so that the client and the target device perform multiple rounds of request responses based on the shared key to generate the initial vector.

4. The client and device interactive network configuration method according to claim 3, characterized in that: The interactive authentication information also includes a device-side random number, device-side authentication information, a client-side random number, and client-side authentication information; the initiating an authentication request to the target device by the client using the restricted application protocol so that the client and the target device perform multiple rounds of request responses based on the shared key to generate the initial vector includes the following steps: Initiating the authentication request to the target device by the client using the restricted application protocol; In response to the authentication request, generating the device-side random number through the target device, further generating the device-side authentication information based on the device-side random number and the shared key, and sending the device-side authentication information as a first response parameter to the client through the restricted application protocol; In response to the first response parameter, generating the client random number by the client, further generating the client authentication information based on the client random number and the shared key, and sending the client authentication information as a second request parameter to the target device through the restricted application protocol; In response to the second request parameter, sending the device-side random number as a second response parameter to the client through the restricted application protocol via the target device; In response to the second response parameter, sending, by the client, the client random number as a third request parameter to the target device through the restricted application protocol; In response to the third request parameter, the target device verifies the client authentication information using the client random number and the shared key, generates the initial vector, and sends the initial vector as a third response parameter to the client through the restricted application protocol.

5. The client and device interactive network configuration method according to claim 1, characterized in that: The client sends the encrypted data as a fourth request parameter to the target device through the restricted application protocol; the method further comprises the following steps: When the target device fails to decrypt the encrypted data, the decryption result of the failed decryption is sent to the client through the restricted application protocol as the fourth response parameter; otherwise, the decryption result of the successful decryption is sent to the client through the restricted application protocol as the fourth response parameter.

6. The client and device interactive network configuration method according to claim 1, characterized in that: The performing a network configuration operation based on the network configuration information by the target device comprises the following steps: Shutting down the wireless access point of the target device, and then performing network configuration operation on the target device based on the network configuration information; When the target device is successfully networked, the target device uses the device registration code to report network configuration success information to the target platform.

7. The client-device interactive network configuration method according to claim 6, characterized in that: The method further comprises the following steps: The client uses the device registration code to initiate a device networking status query to the target platform to obtain the networking status of the target device.

8. A client and device interactive network configuration device, characterized in that: include: The first module is used to respond to a device registration request initiated by a client and return a device registration code to the client through a target platform; A second module is used to establish a wireless connection between the client and the target device in response to a connection operation of a wireless access point issued by the client to the target device; A third module is used to generate an initial vector based on the wireless connection through the interactive authentication information between the client and the target device; The interactive authentication information is transmitted between the client and the target device through a restricted application protocol; the interactive authentication information includes a public key for key negotiation between the client and the target device; The fourth module is used to encrypt the device registration code and the network configuration information by the client using a shared key and the initial vector to obtain encrypted data; the shared key is generated based on the private key of the current participant in the key negotiation and the public key transmitted by another participant; A fifth module is used to send the encrypted data to the target device, so that the target device decrypts the encrypted data using the shared key and the initial vector to obtain the device registration code and the network configuration information; The sixth module is used to perform a network configuration operation based on the network configuration information through the target device.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.

10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.