Method, device, electronic device and storage medium for securely accessing the Internet of Things
By integrating SDKs that match their characteristics on IoT devices and using SDKs to create devices on IoT platforms, the problem of limitations in device access in the existing technology is solved, and the safe and universal access of devices is achieved Internet of Things platform.
Patent Information
- Application Number
- CN202111593364.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-12-23
AI Technical Summary
In the prior art, the device connected to the Internet of Things must be a device that can run an MQTT client and has a complete TCP/IP protocol stack, which is not universal to other devices and has great limitations.
By pre-integrating the SDK matching its characteristics on the target device, using the SDK to create devices on the IoT platform based on device information and device identification, and generating and using keys through a series of registration, activation, pre-check-in and check-in operations Device access.
It realizes the secure access of the Internet of Things platform for devices, without the need for devices to have an MQTT client and a complete TCP/IP protocol stack, which expands the universality of device access.
Smart Images

Figure CN114285583B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more specifically, to a method, device, electronic device and storage medium for securely accessing a device to the Internet of Things. Background Art
[0002] With the development of IoT technology, the scenarios of IoT applications in the financial field are becoming more and more abundant, and the types and numbers of terminal devices are also increasing. How to achieve unified management and security control of IoT terminal devices accessing the IoT is an important issue. In traditional IoT application scenarios, each equipment manufacturer uses its own access method, and various types and brands of equipment are incompatible with each other. Therefore, it is necessary to integrate and unify the management of various devices. Among them, the Internet of Things refers to connecting any device to the network through information sensing devices according to the agreed protocol, and the devices exchange and communicate information through information transmission media to achieve intelligent identification, positioning, tracking, supervision and other functions.
[0003] The existing IoT platform is a server that supports the MQTT protocol and can provide device access servers for devices. However, devices connected to the IoT must be devices that can run the MQTT client and have a complete TCP / IP protocol stack. It is not universal for other devices and has great limitations. Summary of the invention
[0004] Based on the above-mentioned deficiencies in the prior art, the present application provides a method, apparatus, electronic device and storage medium for securely accessing a device to the Internet of Things, so as to solve the problem in the prior art that the device accessing the Internet of Things must be a device that can run the MQTT client and have a complete TCP / IP protocol stack, which is not universal to other devices and has great limitations.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] The first aspect of the present invention discloses a method for securely accessing an Internet of Things (IoT) device, which is applied to an IoT platform. The method comprises:
[0007] In response to a registration request sent by a target device through an IoT application, a key corresponding to the target device is generated; wherein the target device is a device pre-integrated with an SDK matching its characteristics and created on the IoT platform through the SDK according to corresponding device information and corresponding device identification;
[0008] In response to the activation request initiated by the target device by calling the SDK, the key corresponding to the target device is fed back to the target device, so that the target device completes the activation by using the key and then initiates the pre-sign-in request by calling the SDK;
[0009] In response to the pre-sign-in request initiated by the target device by calling the SDK, pre-sign-in the target device, and feed back the obtained pre-sign-in credential to the target device;
[0010] In response to a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, feeding back a sign-in credential to the target device;
[0011] When it is detected that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the target device is signed in using the sign-in credential uploaded by the target device, and the target device is connected to the Internet of Things platform.
[0012] Optionally, the IoT platform includes an IoT device management platform and an IoT security management platform, and the step of responding to a registration request sent by a target device through an IoT application to generate a key corresponding to the target device includes:
[0013] When the registration request sent by the target device through the IoT application is received through the IoT device management platform, the IoT security management platform is called to generate and store a key corresponding to the target device.
[0014] Optionally, in response to the activation request initiated by the target device by calling the SDK, feeding back the key corresponding to the target device to the target device, so that after the target device completes the activation by using the key, the pre-sign-in request initiated by calling the SDK includes:
[0015] When receiving an activation request initiated by the target device by calling the SDK through the IoT device management platform, sending an activation application for the target device to the IoT security management platform;
[0016] Acquire the key based on the activation application through the IoT security management platform, and feed the key back to the IoT device management platform;
[0017] The key corresponding to the target device is fed back to the target device through the IoT device management platform, so that after the target device completes activation using the key, it initiates a pre-sign-in request by calling the SDK.
[0018] Optionally, the responding to the pre-signing request initiated by the target device by calling the SDK, pre-signing in the target device, and feeding back the obtained pre-signing credential to the target device, includes:
[0019] When the IoT device management platform receives a pre-sign-in request initiated by the target device calling the SDK, calling the device authentication module in the IoT security management platform to pre-sign-in the target device;
[0020] When the pre-sign-in of the target device is completed through the IoT security management platform, the generated pre-sign-in credential is fed back to the IoT device management platform;
[0021] The pre-sign-in credential is fed back to the target device through the IoT device management platform.
[0022] Optionally, the responding to the sign-in request initiated by the target device based on the pre-sign-in credential by calling the SDK to feed back the sign-in credential to the target device includes:
[0023] When receiving, through the IoT device management platform, a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, calling a device authentication module in the IoT security management platform to sign in the target device;
[0024] Feeding back the check-in credential obtained by checking in the target device based on the pre-check-in credential to the IoT security management platform through the IoT security management platform;
[0025] The sign-in credential is fed back to the target device through the IoT device management platform.
[0026] Optionally, after connecting the target device to the Internet of Things platform, the method further includes:
[0027] When the IoT device management platform receives the encrypted data sent by the target device by calling the SDK, the IoT security management platform is called to decrypt the encrypted data; wherein the encrypted data is obtained by encrypting the data to be sent by the security control of the SDK.
[0028] Optionally, after connecting the target device to the Internet of Things platform, the method further includes:
[0029] When the device operating environment information sent by the target device is received through the IoT device management platform, the operating environment information is sent to the IoT device security management platform; wherein the device operating environment information is obtained by the target device based on the SDK collecting the operating environment of the target device;
[0030] Determine, by the IoT device security management platform, whether there is an abnormality in the current operating environment of the target device based on the device environment information;
[0031] If it is determined that there is an abnormality in the operating environment of the target device, the target device is kicked out of the Internet of Things platform through the Internet of Things device security management platform.
[0032] A second aspect of the present invention discloses a device for securely accessing the Internet of Things, which is applied to an Internet of Things platform. The method includes:
[0033] A registration unit, for responding to a registration request sent by a target device through an IoT application, and generating a key corresponding to the target device; wherein the target device is a device pre-integrated with an SDK matching its characteristics, and created on the IoT platform through the SDK according to corresponding device information and corresponding device identification;
[0034] An activation unit, configured to respond to an activation request initiated by the target device by calling the SDK, and feed back a key corresponding to the target device to the target device, so that the target device completes the activation by using the key and then initiates a pre-sign-in request by calling the SDK;
[0035] A pre-sign-in unit, configured to respond to the pre-sign-in request initiated by the target device by calling the SDK, perform pre-sign-in on the target device, and feed back the obtained pre-sign-in credential to the target device;
[0036] A sign-in request processing unit, configured to respond to a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, and to feed back a sign-in credential to the target device;
[0037] The device access unit is used to check in the target device using the check-in credential uploaded by the target device and connect the target device to the Internet of Things platform when it is detected that the target device calls the SDK to perform a check-in operation based on the check-in credential.
[0038] The third aspect of the present invention discloses an electronic device, which includes a processor and a memory, wherein the memory is used to store program code and data for the device to securely access the Internet of Things, and the processor is used to call the program instructions in the memory to execute a method for securely accessing the device to the Internet of Things as disclosed in the first aspect of the present invention.
[0039] The fourth aspect of the present invention discloses a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute a method for securely accessing an Internet of Things to a device as disclosed in the first aspect of the present invention.
[0040] The present invention provides a method, an apparatus, and an electronic device, namely, a storage medium, for securely accessing an Internet of Things (IoT) device. The method is applied to an IoT platform, and is used to generate a key corresponding to the target device in response to a registration request sent by a target device through an IoT application; wherein the target device is a device pre-integrated with an SDK that matches its characteristics, and is created on the IoT platform through the SDK according to corresponding device information and a corresponding device identifier; in response to an activation request initiated by the target device through calling the SDK, the key corresponding to the target device is fed back to the target device, so that after the target device completes activation using the key, a pre-sign-in request initiated by calling the SDK is made; in response to the pre-sign-in request initiated by the target device through calling the SDK, the target device is pre-signed in, and the obtained pre-sign-in credential is fed back to the target device; in response to a sign-in request initiated by the target device through calling the SDK based on the pre-sign-in credential, the sign-in credential is fed back to the target device; when it is detected that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the sign-in credential uploaded by the target device is used to sign in the target device, and the target device is connected to the IoT platform. The technical solution provided by the present invention pre-integrates an SDK that matches the characteristics of the device on the device, so that the device can be created on the Internet of Things platform through the SDK according to the device information and device identification corresponding to the device. Since the SDK internally supports the Internet of Things protocol connected to the Internet of Things platform, the device created on the Internet of Things platform can access the Internet of Things platform through the SDK integrated in itself, without having to be a device that can run the MQTT client and has a complete TCP / IP protocol stack to access the Internet of Things platform as in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0042] Figure 1 An architecture diagram of an Internet of Things platform provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of the structure of an Internet of Things platform provided by an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of a flow chart of a method for connecting a device to the Internet of Things provided by an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of the structure of an apparatus for connecting a device to the Internet of Things provided by an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0049] See also Figure 1 , showing an architecture diagram of an Internet of Things platform provided by an embodiment of the present invention, the Internet of Things platform includes four layers, namely, an application layer, a cloud platform layer, an edge layer and a terminal layer.
[0050] Among them, the end layer mainly includes functions such as device registration, device activation, security authentication, data collection, and command reception; the edge layer mainly includes functions such as edge gateway access, data analysis, and cloud-edge collaboration; the cloud platform layer mainly includes functions such as IoT device management, IoT security management, IoT data analysis, and video services; the application layer includes various application scenarios, such as smart parks, smart outlets, passenger flow statistics, and smart security.
[0051] See also Figure 2 , showing a structural schematic diagram of an Internet of Things platform provided by an embodiment of the present invention, the Internet of Things platform includes an Internet of Things device management platform and an Internet of Things security management platform.
[0052] In the embodiment of the present application, for each device, an SDK matching its characteristics is pre-integrated on the device, and after the device is created on the IoT platform through the SDK according to the device information and device identification corresponding to the device, the user can send a corresponding registration request to the IoT device management platform based on the device by calling the relevant interface of the SDK, and the IoT device management platform calls the registration request to call the IoT security management platform to generate and store the key corresponding to the device;
[0053] Based on the device, the user can send a corresponding activation request to the IoT device management platform by calling the integrated SDK (for the sake of convenience in distinguishing, the device that sends the activation request to the IoT device management platform is called the target device). The IoT device management platform can send a corresponding activation application to the IoT security management platform based on the received activation request, so that the IoT security management platform can obtain and generate the key corresponding to the target device based on the activation application, and send the obtained key to the IoT device management platform, so that the IoT device management platform can return the password to the device.
[0054] After receiving the key, the target device uses the key to complete the activation, and sends a corresponding pre-sign-in request to the IoT device management platform by calling the SDK, so that the IoT device management platform can call the IoT security management platform to pre-sign in the target device and feedback the corresponding pre-sign-in credentials.
[0055] After receiving the pre-sign-in credential, the target device calls the SDK to send a corresponding sign-in request to the IoT device management platform based on the pre-sign-in credential; after receiving the sign-in request, the IoT device management platform calls the IoT security management platform to sign in the device and feedback to the corresponding sign-in platform so that when it is detected that the target device calls the SDK to sign in based on the sign-in credential, the sign-in credential uploaded by the target device is used to sign in the user and connect the target device to the IoT platform.
[0056] See also Figure 3 , shows a schematic diagram of a process of a method for securely accessing an Internet of Things for a device provided by an embodiment of the present invention, wherein the method for securely accessing an Internet of Things for a device is applied to Figure 2 The IoT platform shown in the figure, the method for securely accessing the device to the IoT specifically includes the following steps:
[0057] S301: Respond to a registration request sent by a target device through an IoT application and generate a key corresponding to the target device.
[0058] The target device is a device that is pre-integrated with an SDK that matches its characteristics and is created on the IoT platform through the SDK according to corresponding device information and a corresponding device identifier.
[0059] In an embodiment of the present application, for each device, the device environment corresponding to the device is determined, and the SDK corresponding to the device environment corresponding to the device is determined based on the correspondence between the pre-set device environment and the SDK; the device application code written by the technician based on the device information of the device and the corresponding device identifier is obtained, and the device application code obtained by calling the SDK is used to start the device application deployed on the device to log in to the Internet of Things platform. When the login is successful, it is determined that the device is successfully created on the Internet of Things platform.
[0060] Among them, security controls are integrated into the SDK.
[0061] It should be noted that the device environment information of the device includes at least the hardware platform, operating system and development language deployed on the device.
[0062] During the specific execution of step S301, when the user wants to connect the device to the IoT platform, the user can use the device to send a registration request to the IoT device management platform in the IoT platform through the IoT application deployed on the device (for the sake of distinction, the device that sends the registration request to the IoT platform is called the target device). After receiving the registration request sent by the target device through the IoT application, the IoT device management platform can obtain the device information corresponding to the target device, and call the IoT security management platform to use the corresponding key algorithm to generate a key corresponding to the target device according to the device information and random number corresponding to the target device, and store the generated key corresponding to the target device.
[0063] S302: In response to the activation request initiated by the target device by calling the SDK, the key corresponding to the target device is fed back to the target device, so that the target device completes the activation by using the key and then initiates the pre-sign-in request by calling the SDK.
[0064] In the specific execution process of step S302, after the user sends a corresponding registration request to the IoT platform through the IoT application based on the target device, the user can initiate a corresponding activation request based on the target device by calling the IoT device management platform in the SDK IoT platform integrated on the target device.
[0065] When the IoT device management platform receives an activation request initiated by the target device by calling the SDK, it sends an activation application for the target device to the IoT security management platform. The IoT security management platform obtains the key corresponding to the target device from the pre-generated keys based on the target device indicated by the activation application, and returns the key corresponding to the target device to the IoT device management platform, so that the IoT device management platform can send the key returned by the IoT security management platform to the target device, so that the target device can use the key to complete device activation.
[0066] S303: In response to the pre-signing request initiated by the target device by calling the SDK, pre-sign in the target device, and feed back the obtained pre-sign in credential to the target device.
[0067] In the specific process of executing step S303, after the target device completes activation using the corresponding key, it can send a corresponding pre-sign-in request to the IoT device management platform by calling the security control in the pre-integrated SDK, wherein the pre-sign-in request at least includes the device information corresponding to the target device.
[0068] After receiving the corresponding pre-sign-in request, the IoT device management platform calls the device authentication module in the IoT security management platform to pre-sign in the target device according to the device information corresponding to the target device. When the IoT security management platform completes the pre-sign-in for the target device, it feeds back the generated pre-sign-in certificate to the IoT device management platform; the IoT device management platform feeds back the pre-sign-in certificate to the target device.
[0069] In an embodiment of the present application, the IoT device management platform calls the device authentication module in the IoT security management platform to determine whether there is an activation application and key corresponding to the target device based on the device information corresponding to the target device. If so, the target device is pre-signed in and a corresponding pre-sign-in credential is generated.
[0070] If it does not exist, it is determined that there is an abnormality in the target device and the target device is denied access to the IoT platform.
[0071] S304: In response to the sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, the sign-in credential is fed back to the target device.
[0072] In the specific process of executing step S304, after receiving the pre-sign-in credential fed back by the IoT device management platform, the target device can initiate a corresponding sign-in request to the IoT device platform based on the received pre-sign-in credential by calling the SDK. The sign-in request includes at least the device information of the target device and the pre-sign-in credential.
[0073] After receiving the corresponding sign-in request, the IoT device management platform calls the device authentication module in the IoT security management platform to sign in the target device. The IoT security management platform will feed back the sign-in credential obtained by signing in the target device based on the pre-sign-in credential to the IoT security management platform; the IoT device management platform will feed back the sign-in credential to the target device.
[0074] In an embodiment of the present application, after receiving the corresponding sign-in request, the IoT device management platform calls the device authentication module in the IoT security management platform to determine whether there is a pre-sign-in credential for the target device based on the device information corresponding to the target device. If so, the pre-sign-in credential of the target device is compared with the pre-sign-in credential in the sign-in request. If they are consistent, the target device is signed in and the obtained sign-in credential is sent to the target device.
[0075] If it does not exist, or the pre-signed credentials of the target device are inconsistent with the pre-signed credentials in the sign-in request, it is determined that there is an abnormality in the target device, and the target device is denied access to the Internet of Things platform.
[0076] S305: When it is detected that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the target device is signed in using the sign-in credential uploaded by the target device, and the target device is connected to the Internet of Things platform.
[0077] In the specific execution process of step S305, after receiving the sign-in credential returned by the IoT device management platform, the target device can sign in based on the received sign-in credential by calling the SDK. When the IoT device management platform detects that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the IoT security management platform is called to use the target device information written to the sign-in credential uploaded by the target device to determine whether there is a sign-in credential consistent with the sign-in credential, and whether the target device has previously performed a pre-sign-in on the IoT security management platform. If so and the target device has previously signed in on the IoT security platform, the corresponding sign-in operation is performed on the target device, and the target device is connected to the IoT platform.
[0078] Furthermore, in an embodiment of the present application, when the target device is connected to the IoT platform and is operating normally, the data to be sent can be encrypted by calling the SDK, and after obtaining the encrypted data, the encrypted data can be sent to the IoT device management platform.
[0079] When the IoT device management platform receives the encrypted data sent by the target device by calling the SDK, it calls the IoT security management platform to decrypt the encrypted data to obtain the data to be sent.
[0080] Further, in the embodiment of the present application, after the target device is connected to the IoT platform, it can collect its own operating environment information by calling the security control in the SDK, and send the operating environment information to the IoT device management platform by calling the SDK;
[0081] When the IoT device management platform receives the device operating environment information sent by the target device, it sends the operating environment information to the IoT device security management platform; the IoT device security management platform determines whether there is any abnormality in the current operating environment of the target device based on the device environment information; if it is determined that there is no abnormality in the operating environment of the target device, the IoT device security management platform allows the target device to continue to access the IoT platform.
[0082] If it is determined that there is an abnormality in the operating environment of the target device, the IoT device security management platform will kick the target device out of the IoT platform. That is to say, when the target device subsequently initiates a transaction request to the IoT platform, it will be rejected by the IoT security management platform.
[0083] The invention provides a method for securely accessing an Internet of Things (IoT) device. The method is applied to an IoT platform, and responds to a registration request sent by a target device through an IoT application to generate a key corresponding to the target device; wherein the target device is a device pre-integrated with an SDK matching its characteristics, and is created on the IoT platform through the SDK according to corresponding device information and a corresponding device identifier; responds to an activation request initiated by the target device through calling the SDK, and feeds back the key corresponding to the target device to the target device, so that after the target device completes activation using the key, it can initiate a pre-sign-in request by calling the SDK; responds to the pre-sign-in request initiated by the target device through calling the SDK, pre-signs in the target device, and feeds back the obtained pre-sign-in credential to the target device; responds to a sign-in request initiated by the target device through calling the SDK based on the pre-sign-in credential, and feeds back the sign-in credential to the target device; when it is detected that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the sign-in credential uploaded by the target device is used to sign in the target device, and the target device is connected to the IoT platform. The technical solution provided by the present invention pre-integrates an SDK that matches the characteristics of the device on the device, so that the device can be created on the Internet of Things platform through the SDK according to the device information and device identification corresponding to the device. Since the SDK internally supports the Internet of Things protocol connected to the Internet of Things platform, the device created on the Internet of Things platform can access the Internet of Things platform through the SDK integrated in itself, without having to be a device that can run the MQTT client and has a complete TCP / IP protocol stack to access the Internet of Things platform as in the prior art.
[0084] Corresponding to the method for securely accessing the Internet of Things disclosed in the above embodiment of the present invention, reference is made to Figure 4 The embodiment of the present invention further provides a schematic diagram of a structure of a device for securely accessing the Internet of Things. The device for securely accessing the Internet of Things is applied to an Internet of Things platform. The device for securely accessing the Internet of Things includes:
[0085] The registration unit 41 is used to respond to the registration request sent by the target device through the IoT application and generate a key corresponding to the target device; wherein the target device is a device pre-integrated with an SDK matching its characteristics and created on the IoT platform through the SDK according to the corresponding device information and the corresponding device identifier;
[0086] The activation unit 42 is used to respond to the activation request initiated by the target device by calling the SDK, and feed back the key corresponding to the target device to the target device, so that the target device completes the activation by using the key and then initiates the pre-sign-in request by calling the SDK;
[0087] The pre-sign-in unit 43 is used to respond to the pre-sign-in request initiated by the target device by calling the SDK, pre-sign in the target device, and feed back the obtained pre-sign-in credential to the target device;
[0088] A sign-in request processing unit 44 is used to respond to a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, and to feed back the sign-in credential to the target device;
[0089] The device access unit 45 is used to check in the target device using the check-in credential uploaded by the target device and connect the target device to the Internet of Things platform when it is detected that the target device calls the SDK to perform a check-in operation based on the check-in credential.
[0090] The specific principles and execution processes of each unit in the device for securely accessing the Internet of Things disclosed in the above embodiment of the present invention are similar to those of the above embodiment of the present invention. Figure 3 The disclosed method for securely accessing the Internet of Things to a device is the same as that disclosed in the embodiments of the present invention. Figure 3 The corresponding parts of the disclosed method for securely accessing the Internet of Things to a device will not be described in detail here.
[0091] The present invention provides a device for securely accessing an Internet of Things (IoT). The device is applied to an IoT platform and responds to a registration request sent by a target device through an IoT application to generate a key corresponding to the target device. The target device is a device pre-integrated with an SDK matching its characteristics and created on the IoT platform through the SDK according to corresponding device information and a corresponding device identifier. The device responds to an activation request initiated by the target device through calling the SDK and feeds back the key corresponding to the target device to the target device, so that after the target device completes activation using the key, it can initiate a pre-sign-in request by calling the SDK. The device responds to the pre-sign-in request initiated by the target device through calling the SDK and pre-signs in the target device, and feeds back the obtained pre-sign-in credential to the target device. The device responds to a sign-in request initiated by the target device through calling the SDK based on the pre-sign-in credential and feeds back the sign-in credential to the target device. The device responds to a sign-in request initiated by the target device through calling the SDK based on the pre-sign-in credential and feeds back the sign-in credential to the target device. When it is detected that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the sign-in credential uploaded by the target device is used to sign in the target device, and the target device is connected to the IoT platform. The technical solution provided by the present invention pre-integrates an SDK that matches the characteristics of the device on the device, so that the device can be created on the Internet of Things platform through the SDK according to the device information and device identification corresponding to the device. Since the SDK internally supports the Internet of Things protocol connected to the Internet of Things platform, the device created on the Internet of Things platform can access the Internet of Things platform through the SDK integrated in itself, without having to be a device that can run the MQTT client and has a complete TCP / IP protocol stack to access the Internet of Things platform as in the prior art.
[0092] Optionally, the IoT platform includes an IoT device management platform and an IoT security management platform, and the registration unit includes:
[0093] The registration subunit is used to call the IoT security management platform to generate and store the key corresponding to the target device when the IoT device management platform receives a registration request sent by the target device through the IoT application.
[0094] Optionally, an activation unit, including:
[0095] The activation application unit is used to send the activation application of the target device to the IoT security management platform when receiving the activation request initiated by the target device by calling the SDK through the IoT device management platform;
[0096] A key acquisition unit, used to acquire a key based on an activation application through the IoT security management platform, and feed the key back to the IoT device management platform;
[0097] The activation subunit is used to feed back the key corresponding to the target device to the target device through the IoT device management platform, so that the target device can complete the activation by using the key and then initiate a pre-sign-in request by calling the SDK.
[0098] Optional, pre-signed-in unit, including:
[0099] The pre-sign-in subunit is used to call the device authentication module in the IoT security management platform to pre-sign in the target device when receiving the pre-sign-in request initiated by the target device calling the SDK through the IoT device management platform;
[0100] A pre-sign-in credential generation unit is used to feed back the generated pre-sign-in credential to the IoT device management platform when the pre-sign-in of the target device is completed through the IoT security management platform;
[0101] The pre-sign-in credential feedback unit is used to feed back the pre-sign-in credential to the target device through the IoT device management platform.
[0102] Optional, a sign-in request processing unit, used to:
[0103] The sign-in unit is used to call the device authentication module in the IoT security management platform to sign in the target device when receiving the sign-in request initiated by the target device through calling the SDK based on the pre-sign-in credential through the IoT device management platform;
[0104] A sign-in credential generating unit, used to feed back the sign-in credential obtained by signing in the target device based on the pre-sign-in credential to the IoT security management platform through the IoT security management platform;
[0105] The sign-in credential feedback unit is used to feed back the sign-in credential to the target device through the IoT device management platform.
[0106] Optionally, the device for connecting a device to the Internet of Things provided by the present invention further includes:
[0107] The decryption unit is used to call the IoT security management platform to decrypt the encrypted data when the target device receives the encrypted data sent by calling the SDK through the IoT device management platform; wherein the encrypted data is obtained by encrypting the data to be sent by the SDK's security control.
[0108] Optionally, the device for connecting a device to the Internet of Things provided by the present invention further includes:
[0109] The operating environment information sending unit is used to send the operating environment information to the IoT device security management platform when receiving the device operating environment information sent by the target device through the IoT device management platform; wherein the device operating environment information is obtained by the target device based on the SDK to collect the target device's operating environment;
[0110] A judgment unit, used to determine whether there is an abnormality in the current operating environment of the target device based on the device environment information through the IoT device security management platform;
[0111] The kick-out unit is used to kick the target device out of the IoT platform through the IoT device security management platform if it is determined that the operating environment of the target device is abnormal.
[0112] An embodiment of the present application also provides an electronic device, which includes: a processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; and the memory is used to store a program, which is used to implement a method for securely accessing a device to the Internet of Things.
[0113] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the disclosed embodiment of the present invention. The electronic device in the disclosed embodiment of the present invention may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments disclosed in the present invention.
[0114] like Figure 5 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 506 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0115] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0116] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method of secure device access to the Internet of Things shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of secure device access to the Internet of Things in the embodiment disclosed in the present invention are executed.
[0117] Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are used to execute a method for securely accessing a device to the Internet of Things.
[0118] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: responds to a registration request sent by a target device through an IoT application, and generates a key corresponding to the target device; wherein the target device is a device pre-integrated with an SDK matching its characteristics, and is created on the IoT platform through the SDK according to corresponding device information and corresponding device identification; responds to an activation request initiated by the target device by calling the SDK, and feeds back the key corresponding to the target device to the target device, so that after the target device completes activation using the key, it can initiate a pre-sign-in request by calling the SDK; responds to the pre-sign-in request initiated by the target device by calling the SDK, pre-signs in the target device, and feeds back the obtained pre-sign-in credential to the target device; responds to a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, and feeds back a sign-in credential to the target device; when it is detected that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the sign-in credential uploaded by the target device is used to sign in the target device, and the target device is connected to the IoT platform.
[0119] In the context disclosed by the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0120] It should be noted that the computer-readable medium disclosed in 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 or flash memory), an optical fiber, a portable compact disk read-only memory (CD-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 that can 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, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program 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: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0121] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0122] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0123] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0124] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0125] The above are only preferred embodiments of the present invention. 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 invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for securely accessing an Internet of Things device, characterized in that: Applied to the Internet of Things platform, the method includes: In response to a registration request sent by a target device through an IoT application, a key corresponding to the target device is generated; the target device is a device that is pre-integrated with an SDK that matches its characteristics, and is created on the IoT platform through the SDK according to corresponding device information and corresponding device identification; the SDK is integrated with security controls; wherein, when the SDK calls a device application code written based on the device information and device identification of the device to start the device application deployed on the device, and successfully logs in to the IoT platform through the device application, the device is successfully created on the IoT platform; In response to an activation request initiated by the target device by calling the SDK, the key corresponding to the target device is fed back to the target device, so that after the target device completes the activation using the key, a pre-sign-in request is initiated by calling the security control in the SDK; In response to the pre-sign-in request initiated by the target device by calling the SDK, pre-sign-in the target device, and feed back the obtained pre-sign-in credential to the target device; In response to a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, feeding back a sign-in credential to the target device; When it is detected that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, the target device is signed in using the sign-in credential uploaded by the target device, and the target device is connected to the Internet of Things platform; When the encrypted data sent by the target device by calling the SDK is received through the IoT device management platform, the IoT security management platform is called to decrypt the encrypted data; wherein the encrypted data is obtained by encrypting the data to be sent by the security control of the SDK.
2. The method according to claim 1, characterized in that The IoT platform includes an IoT device management platform and an IoT security management platform, and the step of responding to a registration request sent by a target device through an IoT application and generating a key corresponding to the target device includes: When the registration request sent by the target device through the IoT application is received through the IoT device management platform, the IoT security management platform is called to generate and store a key corresponding to the target device.
3. The method according to claim 2, characterized in that The responding to the activation request initiated by the target device by calling the SDK, feeding back the key corresponding to the target device to the target device, so that after the target device completes the activation by using the key, the pre-sign-in request initiated by calling the SDK includes: When receiving an activation request initiated by the target device by calling the SDK through the IoT device management platform, sending an activation application for the target device to the IoT security management platform; Acquire the key based on the activation application through the IoT security management platform, and feed the key back to the IoT device management platform; The key corresponding to the target device is fed back to the target device through the IoT device management platform, so that after the target device completes activation using the key, it initiates a pre-sign-in request by calling the SDK.
4. The method according to claim 2, characterized in that: The responding to the pre-signing request initiated by the target device by calling the SDK, pre-signing in the target device, and feeding back the obtained pre-signing credential to the target device, includes: When the IoT device management platform receives a pre-sign-in request initiated by the target device calling the SDK, the device authentication module in the IoT security management platform is called to pre-sign-in the target device; When the pre-sign-in of the target device is completed through the IoT security management platform, the generated pre-sign-in credential is fed back to the IoT device management platform; The pre-sign-in credential is fed back to the target device through the IoT device management platform.
5. The method according to claim 2, characterized in that: The step of responding to the sign-in request initiated by the target device based on the pre-sign-in credential by calling the SDK to feed back the sign-in credential to the target device includes: When receiving, through the IoT device management platform, a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, calling a device authentication module in the IoT security management platform to sign in the target device; Feeding back the check-in credential obtained by checking in the target device based on the pre-check-in credential to the IoT security management platform through the IoT security management platform; The sign-in credential is fed back to the target device through the IoT device management platform.
6. The method according to claim 2, characterized in that After connecting the target device to the Internet of Things platform, the method further includes: When the device operating environment information sent by the target device is received through the IoT device management platform, the operating environment information is sent to the IoT device security management platform; wherein the device operating environment information is obtained by the target device based on the SDK collecting the operating environment of the target device; Determine, by the IoT device security management platform, whether there is an abnormality in the current operating environment of the target device based on the device environment information; If it is determined that there is an abnormality in the operating environment of the target device, the target device is kicked out of the Internet of Things platform through the Internet of Things device security management platform.
7. A device for securely accessing the Internet of Things, characterized in that: Applied to the Internet of Things platform, the device includes: A registration unit, for responding to a registration request sent by a target device through an IoT application, and generating a key corresponding to the target device; the target device is a device pre-integrated with an SDK matching its characteristics, and created on the IoT platform through the SDK according to corresponding device information and corresponding device identification; the SDK is integrated with security controls; wherein, when the SDK calls a device application code written based on the device information and device identification of the device to start the device application deployed on the device, and successfully logs in to the IoT platform through the device application, the device is successfully created on the IoT platform; An activation unit, configured to respond to an activation request initiated by the target device by calling the SDK, and feed back a key corresponding to the target device to the target device, so that after the target device completes activation using the key, it initiates a pre-sign-in request by calling the security control in the SDK; A pre-sign-in unit, configured to respond to the pre-sign-in request initiated by the target device by calling the SDK, perform pre-sign-in on the target device, and feed back the obtained pre-sign-in credential to the target device; A sign-in request processing unit, configured to respond to a sign-in request initiated by the target device by calling the SDK based on the pre-sign-in credential, and to feed back a sign-in credential to the target device; A device access unit, configured to, when detecting that the target device calls the SDK to perform a sign-in operation based on the sign-in credential, sign in the target device using the sign-in credential uploaded by the target device, and connect the target device to the Internet of Things platform; A decryption unit is used to call the IoT security management platform to decrypt the encrypted data when the target device receives the encrypted data sent by calling the SDK through the IoT device management platform; wherein the encrypted data is obtained by encrypting the data to be sent by the security control of the SDK.
8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store program codes and data for the device to securely access the Internet of Things, and the processor is used to call program instructions in the memory to execute a method for securely accessing the device to the Internet of Things as described in any one of claims 1-6.
9. A storage medium, characterized in that: The storage medium includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute a method for securely accessing an Internet of Things to a device as described in any one of claims 1-6.
Citation Information
Patent Citations
Internet of Things platform device access and configuration method
CN108377207A