Equipment configuration method and device, and communication equipment

CN119032541APending Publication Date: 2024-11-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280095111.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing technology cannot enable devices to access cloud platforms across application platforms, requiring devices and cloud platforms to belong to the same application platform, which limits the flexibility of device access.

Method used

The first device obtains certificates and credentials from the server and configures them to the application of the second device. The second device application establishes a secure connection with the server or registers with the server based on the certificate, thereby achieving cross-application platform access.

Benefits of technology

This enables devices to access the cloud platform even if they do not belong to the same application platform, improving the flexibility and adaptability of devices accessing the cloud platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119032541A_ABST
    Figure CN119032541A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a device configuration method and device and a communication device. The method comprises the steps that a first device obtains a first certificate and / or a first voucher from a server; the first device configures the first certificate and / or the first voucher to a first application in a second device; wherein the first certificate is used for establishing secure connection between the first application and the server, and the first certificate is used for registering the first application to the server.
Need to check novelty before this filing date? Find Prior Art

Description

Device configuration method and device, and communication device Technical Field

[0001] The embodiments of the present application relate to the field of Internet of Things technology, and specifically to a device configuration method and apparatus, and communication equipment. Background Art

[0002] When a device wants to access the cloud platform, it needs to use a pre-configured certificate to access the cloud platform. This method of accessing the cloud platform requires that the device and the cloud platform belong to the same application platform. The device needs to pre-configure a certificate that belongs to the same application platform as the cloud platform in advance. Only then can the device use the pre-configured certificate to access the cloud platform.

[0003] However, if the device and the cloud platform do not belong to the same application platform, the device cannot access the cloud platform. Therefore, the current solution cannot achieve cross-application platform device access to the cloud platform.

[0004] Summary of the Invention

[0005] Embodiments of the present application provide a device configuration method and apparatus, communication equipment, a chip, a computer-readable storage medium, a computer program product, and a computer program.

[0006] The device configuration method provided in the embodiment of the present application includes:

[0007] The first device obtains a first certificate and / or a first credential from the server;

[0008] The first device configures the first certificate and / or the first credential to a first application in the second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

[0009] The device configuration method provided in the embodiment of the present application includes:

[0010] A first application of the second device obtains a first certificate and / or a first credential configured on the first device, where the first certificate and / or the first credential are obtained by the first device from a server;

[0011] The first application establishes a secure connection with the server based on the first certificate and / or registers with the server based on the first credential.

[0012] The device configuration method provided in the embodiment of the present application includes:

[0013] The server generates a first certificate and / or a first credential, and sends the first certificate and / or the first credential to the first device; wherein the first certificate and / or the first credential are configured by the first device to the first application in the second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

[0014] The device configuration apparatus provided in an embodiment of the present application is applied to a first device, and the apparatus includes:

[0015] an acquiring unit, configured to acquire a first certificate and / or a first credential from a server;

[0016] A configuration unit is used to configure the first certificate and / or the first credential to the first application in the second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

[0017] The device configuration apparatus provided in the embodiment of the present application is applied to a second device, and the apparatus includes:

[0018] an acquiring unit, configured to acquire a first certificate and / or a first credential configured on the first device, where the first certificate and / or the first credential are obtained by the first device from a server;

[0019] An access unit is configured to establish a secure connection with the server based on the first certificate and / or register with the server based on the first credential.

[0020] The device configuration apparatus provided in an embodiment of the present application is applied to a server, and the apparatus includes:

[0021] A generating unit, configured to generate a first certificate and / or a first credential;

[0022] A communication unit, configured for a first device to send the first certificate and / or first credential; wherein the first certificate and / or first credential are configured by the first device to a first application in a second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

[0023] The communication device provided in the embodiment of the present application includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the above-mentioned device configuration method.

[0024] The chip provided in the embodiment of the present application is used to implement the above-mentioned device configuration method.

[0025] Specifically, the chip includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes the above-mentioned device configuration method.

[0026] The computer-readable storage medium provided in an embodiment of the present application is used to store a computer program, which enables a computer to execute the above-mentioned device configuration method.

[0027] The computer program product provided in the embodiments of the present application includes computer program instructions, which enable a computer to execute the above-mentioned device configuration method.

[0028] The computer program provided in the embodiment of the present application, when executed on a computer, enables the computer to execute the above-mentioned device configuration method.

[0029] Through the above technical solution, the first device applies for a first certificate and / or a first credential from the server for the first application in the second device, and configures the applied first certificate and / or first credential to the first application in the second device. In this way, the first application in the second device can use the first certificate to establish a secure connection with the server and / or use the first credential to register with the server, thereby achieving access to the server. Since the first certificate and / or the first credential are issued by the server to the second device, the first application of the second device uses the first certificate and / or the first credential to access the server, and it does not require the second device and the server to belong to the same application platform. In other words, when the second device and the server do not belong to the same application platform, the technical solution of the embodiment of the present application can be used to enable the second device to access the server, thereby enabling the device to access the server across application platforms. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0031] FIG1 is a schematic diagram of communication between devices provided in an embodiment of the present application;

[0032] FIG2 is a schematic diagram of a communication architecture provided in an embodiment of the present application;

[0033] Figure 3 is a flow chart of a device accessing a cloud platform;

[0034] FIG4 is a flow chart of a device configuration method according to an embodiment of the present application;

[0035] FIG5 is a second flow chart of the device configuration method provided in an embodiment of the present application;

[0036] FIG6 is a third flow chart of the device configuration method provided in an embodiment of the present application;

[0037] FIG7 is a fourth flow chart of a device configuration method according to an embodiment of the present application;

[0038] FIG8 is a schematic diagram of the first structure of the device configuration apparatus provided in an embodiment of the present application;

[0039] FIG9 is a second schematic diagram of the structure of the device configuration apparatus provided in an embodiment of the present application;

[0040] FIG10 is a third schematic diagram of the structure of the device configuration apparatus provided in an embodiment of the present application;

[0041] FIG11 is a schematic structural diagram of a communication device provided in an embodiment of the present application;

[0042] FIG12 is a schematic structural diagram of a chip according to an embodiment of the present application. DETAILED DESCRIPTION

[0043] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following relevant technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all fall within the protection scope of the embodiments of the present application.

[0044] Business interactions between clients and servers are achieved through Representational State Transfer (RESTful) operations on resources. RESTful operations can be Create-Retrieve-Update-Delete-Notify (CRUDN) operations. CRUDN operations can be any one or more of the following: Create, Retrieve, Update, Delete, and Notify. The client is the initiator of RESTful operations, and the server is the responder. The client sends a resource operation request to the server, requesting an operation on a resource on the server. The server performs the resource operation and returns a response to the client, which carries the content and description of the resource. It should be noted that the client and server are logical functional entities; a device can be a client, a server, or both.

[0045] Figure 1 is a schematic diagram of communication between devices provided by an embodiment of the present application. As shown in Figure 1, device 1 acts as a client and device 2 acts as a server. At the resource model layer, the interaction between the client and the server is implemented through CRUDN operations. At the transport protocol layer, the interaction between device 1 and device 2 is implemented through request messages or response messages. Between the resource model layer and the transport protocol layer, by mapping the CRUDN operations to specific transport protocols, the CRUDN operations are converted into entity messages and transmitted between devices, providing a means for interconnection and interoperability between devices. Among them, the transport protocol uses the Constrained Application Protocol (CoAP) to carry CRUDN operations, and each CRUDN operation is mapped to a CoAP request message or response message.

[0046] FIG2 is a schematic diagram of a communication architecture provided by an embodiment of the present application. As shown in FIG2 , the communication architecture includes device 1, device 2, and an Internet of Things (IoT) cloud platform (hereinafter referred to as the IoT cloud platform). Device 1 acts as a server, device 2 acts as a client, and devices 1 and 2 interact via the cloud platform. The cloud platform includes the following three entities:

[0047] Cloud interface: The cloud interface is an anchor point on the cloud platform, responsible for device access management (e.g., device 1 and device 2) and message routing for remote communication between devices (e.g., device 1 and device 2). The cloud interface provides an address, namely the cloud platform address. For example, the cloud platform address can be a Uniform Resource Locator (URL).

[0048] Authorization server: The authorization server is responsible for the registration and authentication of devices (such as device 1 and device 2).

[0049] Resource directory: The resource directory includes the resource index of the server; the client can obtain the server's resources by searching the resource directory.

[0050] It should be noted that the authorization server can be implemented as an entity in the cloud platform, or can be implemented as a separate entity independent of the cloud platform.

[0051] Before device 1 and device 2 can interact with each other through the cloud platform, they need to access the cloud platform. FIG3 is a flowchart of device access to the cloud platform, as shown in FIG3 , including the following steps:

[0052] Step 301: The user applies to the authorization server through the configurator in device 2 to create a cloud platform account for the user, and the authorization server returns an access token (Access Token) 1 to the configurator.

[0053] Here, the user can select the Create Account option in the configurator on device 2 and enter their username and password. These username and password are then configured in the configurator. The configurator also configures the cloud platform address. Based on the cloud platform address, the configurator can then send the user's username and password to the authorization server, allowing the authorization server to authenticate the user. After successfully authenticating the user, the authorization server generates an access token 1 for the user based on their username and password and sends it to the configurator.

[0054] Step 302: The configurator registers with the cloud platform using access token 1.

[0055] Here, the configurator provides the cloud platform with an access token 1. After the cloud platform verifies the access token 1, it assigns a user ID to the configurator. The user ID is used to identify the user corresponding to the configurator.

[0056] Here, when the same user uses different configurators, the authorization server will provide different access tokens, but any configurator used by the same user corresponds to the same user ID.

[0057] Step 303: The configurator configures the cloud configuration resources in device 1.

[0058] Here, the provisioner connects to device 1 through the device discovery process and then requests access token 2 from the cloud platform for device 1. The provisioner configures access token 2, the cloud platform's address, and the cloud platform's identity into the cloud configuration resource in device 1. As an example, the cloud configuration resource in device 1 can be the "oic.r.coapcloudconf" resource.

[0059] Step 304: Device 1 uses the preset certificate to establish a secure connection with the cloud platform.

[0060] Here, device 1 establishes a physical connection (i.e., underlying connection) with the cloud platform based on the address and identifier of the cloud platform; device 1 uses a preset certificate to authenticate each other with the cloud platform based on the physical connection. After the authentication is completed, device 1 and the cloud platform obtain each other's public keys, and then generate a shared key based on their own private key and the other party's public key, thereby completing the establishment of a secure connection.

[0061] As an example: the secure connection may be a Transport Layer Security (TLS) connection.

[0062] Step 305: Device 1 registers with the cloud platform using access token 2 based on a secure connection, and publishes the resources of device 1 to the cloud platform.

[0063] Here, device 1 sends an update operation request to the account resource on the cloud platform. The update operation request includes device 1's access token 2 and, in addition, the device ID of device 1. The cloud platform maintains a unique instance of the account resource for each device. For example, the instance corresponding to device 1 includes access token 2 (e.g., A0001), device ID of device 1 (e.g., 0xA71CE), and user ID corresponding to device 1 (e.g., u001).

[0064] As an example: the account resource on the cloud platform can be the " / oic / sec / account" resource.

[0065] Here, after device 1 registers with the cloud platform, it needs to log in to the cloud platform to publish its resources. Device 1 can log in to the cloud platform in the following way: Device 1 sends an update operation request to the session resource on the cloud platform. After the cloud platform successfully verifies the update operation request, device 1 is logged in to the cloud platform.

[0066] As an example: the session resource on the cloud platform may be the “ / oic / sec / session” resource.

[0067] After device 1 logs in to the cloud platform, it makes its hosted resources public in the resource directory of the cloud platform so that other devices (such as device 2) can remotely access these resources.

[0068] When device 2 requests to perform a CRUDN operation on a resource referenced by a resource index (such as a resource link) in the cloud platform's resource directory, the cloud platform forwards the CRUDN operation request to device 1, which actually hosts the resource. Device 1 sends a CRUDN operation response to the cloud platform, which then forwards the CRUDN operation response to device 2. That is, the communication path between device 2 and device 1 is: device 2 → cloud platform → device 1 → cloud platform → device 2.

[0069] The above process is described with device 1 as the server. Of course, when device 1 is the client, the above process can also be used to register device 1 to the cloud platform.

[0070] It should be noted that if the authorization server is implemented as a separate entity independent of the cloud platform, after the cloud platform authenticates the device 1, the cloud platform shares the authentication result of the device 1 with the authorization server.

[0071] In the above process, if device 1 wants to access the cloud platform, it needs to use a preset certificate to establish a secure connection with the cloud platform (i.e., step 304 above). This way of accessing the cloud platform requires that device 1 and the cloud platform belong to the same application platform. Only then can device 1 use the preset certificate to access the cloud platform. However, if device 1 and the cloud platform do not belong to the same application platform, device 1 cannot access the cloud platform. It can be seen that the current solution cannot enable devices to access the cloud platform across application platforms. To this end, the following technical solution of the embodiment of the present application is proposed.

[0072] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.

[0073] In the embodiment of the present application, the description of the server can also be replaced by a cloud platform, and the cloud platform can also be simply referred to as a cloud.

[0074] In an embodiment of the present application, the first device has a configurator, and the first device can configure other devices (such as the second device) to access the server through the configurator, and the first device with the configurator serves as a client. The description of "first device" can also be replaced with "configuration device", and this application does not limit the name of the first device. As an example: the first device can be a terminal device such as a mobile phone or a tablet computer. The first device and the server belong to the same application platform. As an example: the first device and the server both belong to the application platform developed by manufacturer A.

[0075] In an embodiment of the present application, the second device has a first application, and the second device can control a part of the Internet of Things (IoT) devices that belong to the same application platform as itself through the first application, and the second device with the first application serves as a client. As an example: the second device can be an IoT device, such as a car. The second device and the server belong to different application platforms. As an example: the server belongs to the application platform developed by manufacturer A, and the second device belongs to the application platform developed by manufacturer B. After the first device configures the first application of the second device to access the server through its configurator, the second device can control another part of the IoT devices that belong to the same application platform as the first device through its first application. As an example: the first application in the second device can be a smart home application (SmartHome APP). This application does not limit the name of the first application in the second device.

[0076] In the embodiment of the present application, in terms of bottom-layer communication, the communication between the first device and the second device refers to the communication between the communication module of the first device and the communication module of the second device, and the communication module may be a Bluetooth module or a WiFi module, etc. In terms of application layer communication, the communication between the first device and the second device refers to the communication between the configurator of the first device and the first application of the second device. Here, the configurator and the first application both belong to the application (APP) category, wherein the configurator of the first device may be a system application of the first device or a third-party application, and the first application of the second device may be a system application of the second device or a third-party application. The configurator of the first device and the first application of the second device respectively call their respective communication modules to realize communication with each other. Before the first device communicates with the second device, the first device needs to establish a connection with the second device. Here, the establishment of a connection between the first device and the second device refers to the establishment of a connection between the communication module of the first device and the communication module of the second device. Relative to the first application of the second device, the configurator of the first device can also be described as the second application.

[0077] It should be noted that the interaction between the first device and the first application of the second device described in the following embodiments refers to the interaction between the configurator of the first device and the first application of the second device.

[0078] It should be noted that although the technical solution of the embodiment of the present application is described by configuring the first application access server in the second device with the first device (that is, the second device as the client), when the second device acts as the server, the technical solution of the embodiment of the present application can also realize the first device configuring the second device to access the server.

[0079] FIG4 is a flow chart of a device configuration method according to an embodiment of the present application. As shown in FIG4 , the device configuration method includes the following steps:

[0080] Step 401: The server generates a first certificate and / or a first credential, and sends the first certificate and / or the first credential to a first device; the first device obtains the first certificate and / or the first credential from the server.

[0081] In some embodiments, a first application of a second device generates a second certificate signing request (CSR) message and sends the second certificate signing request message to the first device; the first device receives the second certificate signing request message sent by the first application, and the first device determines the first certificate signing request message based on the second certificate signing request message. Here, the first device can directly use the second certificate signing request message as the first certificate signing request message, or can modify the second certificate signing request message (for example, add relevant information of the first device) to generate the first certificate signing request message; the first device sends a first certificate signing request message and / or a credential request message to a server, wherein the first certificate signing request message is used to request the server to generate a first certificate for the first application, and the credential request message is used to request the server to allocate a first credential for the first application; the server receives the first certificate signing request message and / or the credential request message sent by the first device, generates a first certificate and / or a first credential, and sends the first certificate and / or the first credential to the first device; the first device receives the first certificate and / or the first credential sent by the server. Here, the first certificate and / or the first credential are carried in a CSR response message (CSRResponse), that is, the server provides the first certificate and / or the first credential to the first device via the CSR response message.

[0082] Here, after the first device receives the second certificate request message sent by the first application of the second device, it can be determined that the first application of the second device wants to access the server. Considering the prerequisites for the first application of the second device to access the server, there are: Condition 1: The first application establishes a secure connection with the server; Condition 2: The first application is registered with the server. To this end, for condition 1, the first device needs to apply for a certificate (i.e., the first certificate) from the server for the first application, so that the first application can establish a secure connection with the server based on the certificate; for condition 2, the first device needs to apply for a credential (i.e., the first credential) from the server for the first application, so that the first application can register with the server based on the credential.

[0083] Before the first device interacts with the first application in the second device, the first device and the second device need to establish a connection first, and the first application in the second device needs to be started.

[0084] In some implementations, the first device and the second device may establish a connection via Bluetooth or WiFi.

[0085] In some implementations, the method for starting the first application in the second device may be, but is not limited to, the following methods:

[0086] Method 1: The first device sends a startup instruction to the second device, where the startup instruction is used to trigger the second device to start the first application; the second device receives the startup instruction sent by the first device and starts the first application under the triggering of the startup instruction.

[0087] As an example: the start instruction may be a CSR start instruction.

[0088] Optionally, before the first device sends a startup instruction to the second device, the first device outputs a first prompt message, where the first prompt message is used to prompt the user whether to agree to start the first application; after obtaining the user's input confirmation operation for the first prompt message, the first device sends a startup instruction to the second device.

[0089] Optionally, before the first device sends a startup instruction to the second device, the first device determines whether the second device supports the ability to control IoT devices. Here, the first device can query the capabilities of the second device to determine whether the second device supports the ability to control IoT devices. Alternatively, the second device reports its own capabilities (i.e., the ability to support controlling IoT devices) to the first device, so that the first device determines whether the second device supports the ability to control IoT devices. It should be pointed out that the "ability to control IoT devices" is supported by the first application in the second device, and the "ability to control IoT devices" can also be referred to as the first application capability, such as the smart home application capability.

[0090] Method 2: The second device starts the first application based on the obtained startup operation.

[0091] Optionally, after the second device launches the first application based on the obtained startup operation, the first application of the second device determines that the first device supports the capability to configure IoT devices and outputs a second prompt message, which prompts the user whether to connect to the IoT device configured by the first device. After the first application receives a confirmation operation input by the user in response to the second prompt message, it executes the step of sending a second certificate request message to the first device. It should be noted that the "capability to configure IoT devices" is supported by the configurator in the first device and can also be referred to as the configurator capability.

[0092] In some implementations, after the first application in the second device is started, the first application generates a key pair, ie, a public key and a private key pair, for subsequent use.

[0093] In some embodiments, the first certificate request message and the second certificate request message (hereinafter collectively referred to as the certificate request message) in the above scheme conform to the CSR data format defined by PKCS#10 and follow the following principles: the certificate request message carries certificate request information and a first signature, and the first signature is obtained by signing the certificate request information based on the private key of the first application; wherein,

[0094] The certificate request information includes version information, subject information, and public key information. The version information includes the version number of the certificate request information, the subject information includes feature information of the second device, and the public key information includes the public key of the first application.

[0095] Here, the characteristic information of the second device includes at least one of the following: a vendor identifier (Vendor ID) of the second device, a product identifier (Product ID) of the second device, and a device serial number (Device Serial Number or Device ID) of the second device.

[0096] Here, the first application's public key is used by the server to verify the first signature and, upon successful verification, to generate a first certificate for the first application. Specifically, after receiving the first certificate request message, the server obtains the first application's public key based on the first certificate request information (i.e., obtains the first application's public key from the certificate request information in the first certificate request message), verifies the first signature based on the first application's public key, and, upon successful verification, generates the first certificate.

[0097] In an embodiment of the present application, the server generates a first certificate based on the public key of the first application; or, the server generates the first certificate based on the public key of the first application and a first application identifier, where the first application identifier is an identifier of the first application.

[0098] Here, the first application identifier is generated by the server, or the first application identifier is generated by the first device.

[0099] As an implementation manner, the first application identifier is generated by the server. Specifically, the server generates the first application identifier for the first application after receiving the first certificate request message sent by the first device.

[0100] As another implementation, the first application identifier is generated by the first device. Specifically, after receiving the second certificate request message sent by the first application, the first device generates the first application identifier for the first application, and the first device sends the generated first application identifier to the server; the server receives the first application identifier generated by the first device.

[0101] In the embodiment of the present application, after receiving the credential application message, the server generates a first credential for the first application.

[0102] As an implementation, the server allocates a first access token to the first application as the first credential. Here, the first credential is the first access token, which is allocated by the server to the first application.

[0103] In another implementation, the server allocates a first access token to the first application, and encrypts the first access token based on the public key of the first application to obtain a first encrypted token as the first credential. Here, the first credential is the first encrypted token, which is obtained by the server encrypting the first access token based on the public key of the first application, and the first access token is allocated by the server to the first application.

[0104] In some embodiments, after the server generates a first access token for the first application, the server establishes a first binding relationship between the first user identifier, the first access token, and the first application identifier, where the first user identifier is a user identifier corresponding to the first device.

[0105] The first application identifier is the identifier of the first application; the first binding relationship is used by the server to determine whether to accept registration and / or login for the first application. Here, the first user identifier is assigned to the first device by the server when the first device registers with the server. When the first device interacts with the server, the first device provides the server with the application identifier corresponding to the first device (referred to as the second application identifier, which can be understood as the identifier of the configurator in the first device). The server can determine the user identifier corresponding to the first device based on the application identifier corresponding to the first device.

[0106] It should be noted that the credential application message and the first certificate request message in the above solution can be the same message, or they can be two different messages. In the case where the credential application message and the first certificate request message are the same message, they can be collectively referred to as a certificate request message, which is used to request the server to generate a first certificate for the first application and / or allocate a first credential to the first application.

[0107] Step 402: The first device configures the first certificate and / or first credential to the first application in the second device, and the first application of the second device obtains the first certificate and / or first credential configured by the first device.

[0108] In an embodiment of the present application, a first device sends a configuration command to a first application on a second device, the configuration command carrying a first certificate and / or a first credential. Upon receiving the configuration command, the first application locally configures the first certificate and / or first credential carried in the configuration command. In some embodiments, the configuration command may be an AddCloudRequest command.

[0109] In some embodiments, the first device configures the server address to the first application on the second device; the server address is used by the first application to establish a physical connection with the server, and the first certificate is used to establish a secure connection between the first application and the server based on the physical connection. For example, the secure connection may be a TLS connection. For example, the server address may be a URL or a URI.

[0110] Here, optionally, the first device may further configure the server identifier to the first application in the second device; wherein the server address and the server identifier are used for the first application to establish a physical connection with the server.

[0111] In some embodiments, if the first device does not obtain the first credential from the server, the first device configures a second application identifier for the first application; the second application identifier is an application identifier corresponding to the first device, and the second application identifier is used to register the first application with the server. Here, the second application identifier is assigned to the first device by the server when the first device registers with the server.

[0112] Here, the reasons why the first device fails to obtain the first credential from the server may be: 1. The first device does not apply to the server for allocation of the first credential for the first application; 2. The server is unable to allocate the first credential for the first application; 3. The server allocates the first credential for the first application but fails to successfully send it to the first device.

[0113] Step 403: The first application establishes a secure connection with the server based on the first certificate and / or registers with the server based on the first credential.

[0114] In the embodiment of the present application, after the first application obtains the first certificate, it establishes a secure connection with the server based on the first certificate.

[0115] In some embodiments, the first application and the server exchange their respective certificates. After the certificate is authenticated by the certificate receiving end, the certificate receiving end is used to obtain the public key of the certificate sending end and generate a shared key based on the private key of the certificate receiving end and the public key of the certificate sending end to complete the establishment of a secure connection; wherein, the certificate of the first application is the first certificate.

[0116] Specifically, the first application sends a first certificate to the server. Since the first certificate is generated based on the public key of the first application, the server can obtain the public key of the first application from the first certificate after obtaining the first certificate and passing the authentication of the first certificate. Similarly, the server will also send its own certificate (hereinafter referred to as the second certificate) to the first application. Since the second certificate is generated based on the public key of the server, the first application can obtain the public key of the server from the second certificate after obtaining the second certificate and passing the authentication of the second certificate. For the first application, the first application uses its own private key and the public key of the server to generate a first shared key, and uses the first shared key to encrypt data sent to the server and decrypt data received from the server. Similarly, for the server, the server uses its own private key and the public key of the first application to generate a second shared key, and uses the second shared key to encrypt data sent to the first application and decrypt data received from the first application.

[0117] In some implementations, before the first application exchanges their respective certificates with the server, the first application obtains the address of the server configured on the first device; the first application establishes a physical connection with the server based on the server address, and exchanges their respective certificates with the server based on the physical connection.

[0118] In the embodiments of the present application, after the first application establishes a secure connection with the server, it can securely interact with the server based on the secure connection. For example, the first application can initiate registration and / or login with the server based on the secure connection. In other words, the data exchanged between the first application and the server during registration and / or login is encrypted using a shared key.

[0119] In the embodiment of the present application, after obtaining the first credential, the first application registers with the server based on the first credential.

[0120] As an implementation manner, when the first credential is a first access token, the first application registers with the server using the first access token.

[0121] As another implementation, when the first credential is a first encrypted token, the first application decrypts the first encrypted token based on the private key of the first application to obtain a first access token, and the first application registers with the server using the first access token.

[0122] In some embodiments, the first application also obtains a first application identifier, and the first application can register with the server using the first application identifier and the first credential. Here, when the first certificate is generated by the server based on the public key of the first application and the first application identifier, the first application obtains the first application identifier based on the first certificate. Specifically, the server receives a registration request message sent by the first application, and the registration request message carries the first application identifier and the first access token; based on the first application identifier, the first access token, and the first binding relationship, the server determines that the user identifier corresponding to the first application is the first user identifier, and accepts the registration of the first application.

[0123] Furthermore, in some embodiments, after the first application registers with the server using the first application identifier and the first access token, the first application then logs into the server using the first application identifier and the first access token. Specifically, the server receives a login request message sent by the first application, the login request message carrying the first application identifier and the first access token; based on the first application identifier, the first access token, and the first binding relationship, the server determines that the user identifier corresponding to the first application is the first user identifier, and accepts the login request from the first application.

[0124] Furthermore, in some embodiments, after the first application registers with the server using the first application identifier and the first access token, the first application receives a second access token sent by the server and logs in to the server using the first application identifier and the second access token. Specifically, the server generates the second access token and updates the first access token in the first binding relationship to the second access token; the server sends the second access token to the first application; the server receives a login request message from the first application, the login request message carrying the first application identifier and the second access token; based on the first application identifier, the second access token, and the first binding relationship, the server determines that the user identifier corresponding to the first application is the first user identifier, and accepts the first application's login.

[0125] In some embodiments, when the first application of the second device does not obtain the first credential configured by the first device, the first application obtains the second application identifier configured by the first device, where the second application identifier is the application identifier corresponding to the first device (i.e., the identifier of the configurator of the second device); the first application registers to the server based on the second application identifier.

[0126] In some embodiments, the first application also obtains a first application identifier, and the first application can register with the server using the first application identifier and the second application identifier. Here, when the first certificate is generated by the server based on the public key and the first application identifier of the first application, the first application obtains the first application identifier based on the first certificate. Specifically, the server receives a registration request message sent by the first application, and the registration request message carries the first application identifier and the second application identifier; the first application identifier is the identifier of the first application; the second application identifier is the application identifier corresponding to the first device, and is provided by the first device to the first application; the server determines the first user identifier corresponding to the second application identifier based on the second application identifier and accepts the registration of the first application.

[0127] Furthermore, in some embodiments, after the first application registers with the server using the first application identifier and the second application identifier, the server generates a second access token and sends the second access token to the first application; the first application receives the second access token sent by the server and logs in to the server using the first application identifier and the second access token.

[0128] In some embodiments, after the server generates a second access token for the first application, the server establishes a second binding relationship between the first user identifier, the second access token, and the first application identifier, where the first application identifier is the identifier of the first application; the second binding relationship is used by the server to determine whether to accept login from the first application. Specifically, the server receives a login request message from the first application, the login request message carrying the first application identifier and the second access token; based on the first application identifier, the second access token, and the second binding relationship, the server determines that the user identifier corresponding to the first application is the first user identifier, and authorizes login to the first application.

[0129] The above solution enables a first device to configure a second device's first application to access a server. After the second device's first application accesses the server, the second device can use its first application to control a portion of IoT devices that belong to the same application platform as the first device.

[0130] In the above solution, IoT devices can be but are not limited to smart home devices.

[0131] The following uses specific application examples to illustrate the technical solutions of the embodiments of this application. In the following application examples, the first device is a mobile phone, the second device is a car, the first application in the second device is a smart home application, and the server implements a cloud platform. It should be noted that the car as the second device refers to an in-vehicle terminal.

[0132] Application Example 1

[0133] FIG5 is a second flow chart of a device configuration method according to an embodiment of the present application. As shown in FIG5 , the device configuration method includes the following steps:

[0134] Step 501: The car establishes a connection with the mobile phone, and the mobile phone obtains the car's support for smart home applications.

[0135] Here, the car and the mobile phone can be connected via Bluetooth or WiFi.

[0136] Here, the phone can query the car's capabilities and discover whether it supports smart home applications. Alternatively, the car can report its smart home application capabilities to the phone. Smart home application capabilities refer to the capabilities supported by smart home applications, specifically the ability to control smart home devices.

[0137] Step 502: The user confirms on the mobile phone that the car will be used to control the smart home device.

[0138] Here, a dialogue interface pops up on the phone, prompting the user whether they agree to use the car to control smart home devices.

[0139] Step 503: The mobile phone sends a start command to the car, triggering the car to start the smart home application.

[0140] Here, after the mobile phone obtains the user's confirmation operation that agrees to use the car to control the smart home device, it sends a start command to the car, triggering the car to start the smart home application.

[0141] Step 504: After the smart home application of the car is started, a key pair is generated.

[0142] Here, a key pair refers to a public key and a private key pair. The smart home application stores its own private key in a secure area.

[0143] Step 505: The smart home application of the car generates a CSR message and sends the CSR message to the mobile phone.

[0144] Here, the CSR message conforms to the CSR data format defined by PKCS#10 and follows the following principles: the CSR message carries certificate request information and a first signature, where the first signature is obtained by signing the certificate request information based on the private key of the smart home application (i.e., the private key generated in step 504); the certificate request information includes version information, subject information, and public key information, where the version information includes the version number of the certificate request information, the subject information includes vehicle feature information, and the public key information includes the public key of the smart home application (i.e., the public key generated in step 504). Optionally, the subject information includes at least one of the following vehicle feature information: the vehicle's vendor ID, the vehicle's product ID, and the vehicle's device serial number (Device Serial Number or Device ID).

[0145] Step 506: The mobile phone forwards the CSR message to the cloud platform and applies for an access token (Access Token) for the smart home application to register with the cloud platform.

[0146] Step 507: The cloud platform assigns an application identifier (APPID) to the smart home application, and uses the application identifier and the public key of the smart home application to generate a certificate for the smart home application, as well as an access token for the smart home application, and encrypts the access token with the public key of the smart home application to obtain an encrypted token (CToken).

[0147] Here, in step 506 , the mobile phone may also allocate an application identifier (APPID) for the smart home application and send the application identifier to the cloud platform.

[0148] Here, after receiving the CSR message, the cloud platform verifies the CSR message and executes step 507 after the verification is successful. The cloud platform verifies the CSR message by obtaining the public key of the smart home application from the certificate request information in the CSR message and verifying the first signature with the public key of the smart home application. Successful verification indicates that the verification is successful.

[0149] Step 508: The cloud platform establishes a binding relationship between the user ID (userID), the application ID (APPID) and the access token (AccessToken).

[0150] Step 509: The cloud platform returns the smart home application certificate and encryption token to the mobile phone.

[0151] Here, the parameters returned by the cloud platform to the mobile phone are shown in Table 1 below, including: encryption token (CToken), certificate chain (CertChain), and token validity period (TokenExpiration). Among them, the certificate chain includes at least two levels of certificates. For example, the certificate chain includes a root certificate and a target certificate. The target certificate is the certificate of the smart home application, and the target certificate is issued by the root certificate. For example, the certificate chain includes a root certificate, one or more intermediate certificates, and a target certificate. The target certificate is the certificate of the smart home application. The target certificate is issued by one or more intermediate certificates, and the intermediate certificate is issued by the root certificate. In the certificate-based authentication process, each level of the certificate in the certificate chain needs to be authenticated. After the authentication is passed, it can be determined that the identity of the certificate owner is legal.

[0152]

[0153] Table 1

[0154] Step 510: The mobile phone configures the smart home application with the certificate and encryption token of the smart home application and the address of the cloud platform.

[0155] Here, the mobile phone configures the smart home application's certificate and encryption token, as well as the cloud platform address, to the smart home application through a configuration command. The configuration parameters carried in the configuration command are shown in Table 2 below, including: Smart Home Application Certificate (SmartHomeAPPCert), Intermediate Certificate (IntermediateCert), Root Certificate (RootCert), Cloud Platform Address (CloudAddress), Encrypted Token (CToken), and Token Expiration. SmartHomeAPPCert, IntermediateCert, and RootCert form the certificate chain (CertChain).

[0156]

[0157] Table 2

[0158] Step 511: The car's smart home application decrypts the encrypted token using the private key to obtain an access token, completing the configuration.

[0159] Step 512: The smart home application of the car establishes a physical connection with the cloud platform based on the configured address of the cloud platform, and establishes a secure connection with the cloud platform using the configured certificate based on the physical connection.

[0160] Step 513: The car's smart home application registers with the cloud platform using the application identifier and access token based on a secure connection.

[0161] Optionally, the cloud platform returns a new access token to the car's smart home application.

[0162] Here, the cloud platform will propose a registration interface. The description of the registration interface is shown in Table 3 below. The HTTP method used by the registration interface is POST, and the interface access address corresponding to the registration interface is " / account".

[0163] HTTP method interface access address POST / account

[0164] Table 3

[0165] The parameters involved in the cloud platform registration interface include registration request interface parameters and registration response interface parameters. The registration request interface parameters are described in Table 4 below. The registration request interface parameters are located in the body of the POST request message and include the access token (AccessToken) and application identifier (APPID). The registration response interface parameters are described in Table 5 below. The registration response interface parameters are located in the body of the POST response message and include the access token (AccessToken) and token expiration time (TokenExpiration).

[0166] Position Parameter Value Type Required Description BodyAccessToken string is the access token of the smart home application BodyAPPID string is the application ID of the smart home application

[0167] Table 4

[0168]

[0169] Table 5

[0170] Step 514: The car's smart home application logs into the cloud platform using the application identifier and access token (or a new access token if there is one).

[0171] Here, after the car's smart home application logs in to the cloud platform, users can use the car's smart home application to control the smart home devices connected to the cloud platform through the cloud platform.

[0172] Application Example 2

[0173] FIG6 is a flow chart of a device configuration method according to an embodiment of the present application. As shown in FIG6 , the device configuration method includes the following steps:

[0174] Step 601: The car establishes a connection with the mobile phone.

[0175] Here, the car and the mobile phone can be connected via Bluetooth or WiFi.

[0176] Step 602: The user starts the smart home application in the car.

[0177] Step 603: The car's smart home application discovers the configurator capability of the mobile phone and displays a prompt message on its interface, prompting the user through the prompt message whether to connect to the smart home device registered with the cloud platform.

[0178] Step 604: The user enters a confirmation connection operation on the interface of the car's smart home application.

[0179] Step 605: The car's smart home application generates a key pair.

[0180] Here, a key pair refers to a public key and a private key pair. The smart home application stores its own private key in a secure area.

[0181] Step 606: The smart home application of the car generates a CSR message and sends the CSR message to the mobile phone.

[0182] Here, the CSR message conforms to the CSR data format defined by PKCS#10 and follows the following principles: the CSR message carries certificate request information and a first signature, where the first signature is obtained by signing the certificate request information based on the private key of the smart home application (i.e., the private key generated in step 604); the certificate request information includes version information, subject information, and public key information; the version information includes the version number of the certificate request information, the subject information includes the characteristic information of the vehicle, and the public key information includes the public key of the smart home application (i.e., the public key generated in step 604). Optionally, the subject information includes at least one of the following characteristic information of the vehicle: the vehicle's vendor ID, the vehicle's product ID, and the vehicle's device serial number (Device Serial Number or Device ID).

[0183] Step 607: The user confirms on the mobile phone that the car will be used to control the smart home device.

[0184] Here, a dialogue interface pops up on the phone, prompting the user whether they agree to use the car to control smart home devices.

[0185] Step 608: The mobile phone forwards the CSR message to the cloud platform and applies for an access token (Access Token) for the smart home application to register with the cloud platform.

[0186] Here, after the mobile phone obtains the user's confirmation operation that agrees to use the car to control the smart home device, it forwards the CSR message to the cloud platform and applies for an access token (Access Token) for the smart home application to register with the cloud platform.

[0187] Step 609: The cloud platform assigns an application identifier (APPID) to the smart home application, and uses the application identifier and the public key of the smart home application to generate a certificate for the smart home application, as well as an access token for the smart home application, and encrypts the access token with the public key of the smart home application to obtain an encrypted token (CToken).

[0188] Here, in step 608 , the mobile phone may also allocate an application identifier (APPID) for the smart home application and send the application identifier to the cloud platform.

[0189] Here, after receiving the CSR message, the cloud platform verifies the CSR message and executes step 609 after the verification is successful. The cloud platform verifies the CSR message by obtaining the public key of the smart home application from the certificate request information in the CSR message and verifying the first signature with the public key of the smart home application. Successful verification indicates that the verification is successful.

[0190] Step 610: The cloud platform establishes a binding relationship between the user ID (userID), the application ID (APPID) and the access token (AccessToken).

[0191] Step 611: The cloud platform returns the smart home application's certificate and encrypted token to the mobile phone.

[0192] Here, the parameters returned by the cloud platform to the mobile phone are shown in Table 1 above, including: encryption token (CToken), certificate chain (CertChain), and token validity period (TokenExpiration).

[0193] Step 612: The mobile phone configures the smart home application with the certificate and encryption token of the smart home application and the address of the cloud platform.

[0194] Here, the mobile phone configures the smart home application's certificate and encryption token, as well as the cloud platform address, to the smart home application through a configuration command. The configuration parameters carried in the configuration command are shown in Table 2 above, including: Smart Home Application Certificate (SmartHomeAPPCert), Intermediate Certificate (IntermediateCert), Root Certificate (RootCert), Cloud Platform Address (CloudAddress), Encrypted Token (CToken), and Token Expiration. Among them, SmartHomeAPPCert, IntermediateCert, and RootCert form the certificate chain (CertChain).

[0195] Step 613: The car's smart home application decrypts the encrypted token using the private key to obtain an access token, completing the configuration.

[0196] Step 614: The smart home application of the car establishes a physical connection with the cloud platform based on the configured cloud platform address, and establishes a secure connection with the cloud platform using the configured certificate based on the physical connection.

[0197] Step 615: The car's smart home application registers with the cloud platform using the application identifier and access token based on a secure connection.

[0198] Optionally, the cloud platform returns a new access token to the car's smart home application.

[0199] Here, the cloud platform will propose a registration interface. The description of the registration interface is shown in Table 3 above. The HTTP method used by the registration interface is POST, and the interface access address corresponding to the registration interface is " / account".

[0200] The parameters involved in the cloud platform registration interface include registration request interface parameters and registration response interface parameters. The registration request interface parameters are described in Table 4 above. The registration request interface parameters are located in the body of the POST request message and include the access token (AccessToken) and application identifier (APPID). The registration response interface parameters are described in Table 5 above. The registration response interface parameters are located in the body of the POST response message and include the access token (AccessToken) and token expiration time (TokenExpiration).

[0201] Step 616: The car's smart home application logs into the cloud platform using the application identifier and access token (or a new access token if there is one).

[0202] Here, after the car's smart home application logs in to the cloud platform, users can use the car's smart home application to control the smart home devices connected to the cloud platform through the cloud platform.

[0203] Application Example 3

[0204] FIG7 is a fourth flow chart of a device configuration method according to an embodiment of the present application. As shown in FIG7 , the device configuration method includes the following steps:

[0205] Step 701: The car establishes a connection with the mobile phone, and the mobile phone obtains the car's support for smart home applications.

[0206] Here, the car and the mobile phone can be connected via Bluetooth or WiFi.

[0207] Here, the phone can query the car's capabilities and discover whether it supports smart home applications. Alternatively, the car can report its smart home application capabilities to the phone. Smart home application capabilities refer to the capabilities supported by smart home applications, specifically the ability to control smart home devices.

[0208] Step 702: The user confirms on the mobile phone that the car will be used to control the smart home device.

[0209] Here, a dialogue interface pops up on the phone, prompting the user whether they agree to use the car to control smart home devices.

[0210] Step 703: The mobile phone sends a start command to the car, triggering the car to start the smart home application.

[0211] Here, after the mobile phone obtains the user's confirmation operation that agrees to use the car to control the smart home device, it sends a start command to the car, triggering the car to start the smart home application.

[0212] Step 704: After the smart home application of the car is started, a key pair is generated.

[0213] Here, a key pair refers to a public key and a private key pair. The smart home application stores its own private key in a secure area.

[0214] Step 705: The smart home application of the car generates a CSR message and sends the CSR message to the mobile phone.

[0215] Here, the CSR message conforms to the CSR data format defined by PKCS#10 and follows the following principles: the CSR message carries certificate request information and a first signature, where the first signature is obtained by signing the certificate request information based on the private key of the smart home application (i.e., the private key generated in step 704); the certificate request information includes version information, subject information, and public key information; the version information includes the version number of the certificate request information, the subject information includes the vehicle's characteristic information, and the public key information includes the smart home application's public key (i.e., the public key generated in step 704). Optionally, the subject information includes at least one of the following vehicle characteristic information: the vehicle's vendor ID, the vehicle's product ID, and the vehicle's device serial number (Device Serial Number or Device ID).

[0216] Step 706: The mobile phone forwards the CSR message to the cloud platform.

[0217] Step 707: The cloud platform assigns an application identifier 1 (APPID1) to the smart home application, and generates a certificate for the smart home application using the application identifier 1 and the public key of the smart home application.

[0218] Here, in step 706 , the mobile phone may also allocate an application identifier 1 (client ID 1 ) for the smart home application and send the application identifier 1 to the cloud platform.

[0219] Here, after receiving the CSR message, the cloud platform verifies the CSR message and executes step 707 after the verification is successful. The cloud platform verifies the CSR message by obtaining the public key of the smart home application from the certificate request information in the CSR message and verifying the first signature with the public key of the smart home application. Successful verification indicates that the verification is successful.

[0220] Step 708: The cloud platform returns the smart home application certificate to the mobile phone.

[0221] Here, the parameters returned by the cloud platform to the mobile phone are shown in Table 6 below, including: Certificate Chain (CertChain). Among them, the certificate chain includes at least 2 levels of certificates. For example, the certificate chain includes a root certificate and a target certificate. The target certificate is the certificate of the smart home application, and the target certificate is issued by the root certificate. For example, the certificate chain includes a root certificate, one or more intermediate certificates, and a target certificate. The target certificate is the certificate of the smart home application. The target certificate is issued by one or more intermediate certificates, and the intermediate certificate is issued by the root certificate. In the certificate-based authentication process, each level of the certificate chain needs to be authenticated. After the authentication is passed, it can be determined that the identity of the certificate owner is legal.

[0222]

[0223] Table 6

[0224] Step 709: The mobile phone configures the smart home application certificate, the mobile phone's application identifier 2 (APPID2), and the address of the cloud platform to the smart home application.

[0225] Here, the mobile phone configures the smart home application's certificate, the mobile phone's application ID 2, and the cloud platform address to the smart home application through a configuration command. The configuration parameters carried in the configuration command are shown in Table 7 below, including: Smart Home Application Certificate (SmartHomeAPPCert), Intermediate Certificate (IntermediateCert), Root Certificate (RootCert), Cloud Platform Address (CloudAddress), and Application ID 2 (APPID2). Among them, SmartHomeAPPCert, IntermediateCert, and RootCert form the certificate chain (CertChain).

[0226]

[0227]

[0228] Table 7

[0229] Step 710: The smart home application of the car establishes a physical connection with the cloud platform based on the configured cloud platform address, and establishes a secure connection with the cloud platform using the configured certificate based on the physical connection.

[0230] Step 711: The car's smart home application registers with the cloud platform using application ID 1 and the mobile phone's application ID 2 based on a secure connection.

[0231] Here, the cloud platform will propose a registration interface. The description of the registration interface is shown in Table 3 above. The HTTP method used by the registration interface is POST, and the interface access address corresponding to the registration interface is " / account".

[0232] The parameters involved in the registration interface of the cloud platform include registration request interface parameters and registration response interface parameters. Among them, the description of the registration request interface parameters is shown in Table 8 below. The registration request interface parameters are located in the body (Body) of the POST request message, including application identifier 2 (APPID2) and application identifier 1 (APPID1). The description of the registration response interface parameters is shown in Table 9 below. The registration response interface parameters are located in the header (Header) and body of the POST response message. The header includes the content type (Content-Type), and the body includes the access token (AccessToken) and the token validity period (TokenExpiration).

[0233] Position Parameter Value Type Required Description The BodyAPPID2 string is the application ID of the phone's configurator. The BodyAPPID1 string is the application ID of the smart home application.

[0234] Table 8

[0235]

[0236] Table 9

[0237] Step 712: The cloud platform finds the corresponding user ID (userID) according to the application ID 2 of the mobile phone and allocates an access token for the smart home application of the car.

[0238] Step 713: The cloud platform establishes a binding relationship between the user ID (userID), application ID 1 (APPID1) and access token (AccessToken).

[0239] Step 714: The cloud platform issues an access token to the car's smart home application.

[0240] Step 715: The car's smart home application logs into the cloud platform using the application ID 1 and the access token.

[0241] Here, after the car's smart home application logs in to the cloud platform, users can use the car's smart home application to control the smart home devices connected to the cloud platform through the cloud platform.

[0242] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will no longer describe the various possible combinations separately. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the idea of ​​the present application, they should also be regarded as the contents disclosed in the present application. For another example, under the premise of no conflict, the various embodiments and / or the technical features in each embodiment described in the present application can be arbitrarily combined with the prior art, and the technical solution obtained after the combination should also fall within the scope of protection of the present application.

[0243] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0244] FIG8 is a schematic diagram of the first structure of a device configuration apparatus provided in an embodiment of the present application, which is applied to a first device, as shown in FIG8 , and includes:

[0245] An acquiring unit 801 is configured to acquire a first certificate and / or a first credential from a server;

[0246] The configuration unit 802 is used to configure the first certificate and / or the first credential to the first application in the second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

[0247] In some embodiments, the apparatus further includes: a communication unit 803; the acquisition unit 801 acquires the first certificate and / or the first credential through the communication unit 803. The communication unit 803 is configured to send a first certificate request message and / or a credential application message to the server, where the first certificate request message is used to request the server to generate a first certificate for the first application, and the credential application message is used to request the server to allocate a first credential for the first application; and receive the first certificate and / or first credential sent by the server.

[0248] In some implementations, the communication unit 803 is further configured to receive a second certificate request message sent by the first application, where the second certificate request message is generated by the first application, and the first certificate request message is determined based on the second certificate request message.

[0249] In some embodiments, the first certificate request message carries certificate request information and a first signature, and / or the second certificate request message carries certificate request information and a first signature; the first signature is obtained by signing the certificate request information based on the private key of the first application; the certificate request information includes version information, subject information and public key information, the version information includes the version number of the certificate request information, the subject information includes characteristic information of the second device, and the public key information includes the public key of the first application.

[0250] In some embodiments, the characteristic information of the second device includes at least one of the following: a manufacturer identification of the second device, a product identification of the second device, and a device serial number of the second device.

[0251] In some implementations, the public key of the first application is used by the server to verify the first signature, and generate a first certificate for the first application after the verification is successful.

[0252] In some implementations, the first certificate is generated by the server based on the public key of the first application; or, the first certificate is generated by the server based on the public key of the first application and a first application identifier, where the first application identifier is an identifier of the first application.

[0253] In some implementations, the first application identifier is generated by the server for the first application after receiving the first certificate request message sent by the first device.

[0254] In some implementations, the first application identifier is generated for the first application by the first device after receiving the second certificate request message sent by the first application. The communication unit 803 is further configured to send the generated first application identifier to the server.

[0255] In some embodiments, the first credential is a first access token, which is allocated by the server to the first application; or, the first credential is a first encryption token, which is obtained by the server encrypting the first access token based on the public key of the first application, and the first access token is allocated by the server to the first application.

[0256] In some embodiments, when the first device does not obtain the first credential from the server, the configuration unit 802 is further used to configure the second application identifier to the first application; the second application identifier is the application identifier corresponding to the first device, and the second application identifier is used to register the first application to the server.

[0257] In some embodiments, the configuration unit 802 is further used to configure the address of the server to the first application in the second device; wherein the address of the server is used for the first application to establish a physical connection with the server, and the first certificate is used to establish a secure connection between the first application and the server based on the physical connection.

[0258] In some implementations, the communication unit 803 is further configured to send a startup instruction to the second device, where the startup instruction is configured to trigger the second device to start the first application.

[0259] In some embodiments, the apparatus further includes: a human-computer interaction unit configured to output a first prompt message, the first prompt message being used to prompt the user whether to agree to start the first application; and after obtaining a confirmation operation input by the user for the first prompt message, sending a start instruction to the second device.

[0260] In some embodiments, the apparatus further includes: a determining unit configured to determine whether the second device supports a capability of controlling an IoT device.

[0261] In some implementations, before the first device receives the certificate request message sent by the first application, the second device starts the first application based on the obtained startup operation.

[0262] In some implementations, the first device and the server belong to the same application platform, and the second device and the server belong to different application platforms.

[0263] Those skilled in the art should understand that the relevant description of the above-mentioned device configuration apparatus in the embodiment of the present application can be understood with reference to the relevant description of the device configuration method in the embodiment of the present application.

[0264] FIG9 is a second schematic diagram of the structure of the device configuration apparatus provided in an embodiment of the present application, which is applied to a second device (specifically, a first application of the second device). As shown in FIG9 , the apparatus includes:

[0265] An acquiring unit 901 is configured to acquire a first certificate and / or a first credential configured on a first device, where the first certificate and / or the first credential are obtained by the first device from a server;

[0266] The access unit 902 is configured to establish a secure connection with the server based on the first certificate and / or register with the server based on the first credential.

[0267] In some embodiments, the apparatus further includes: a generation unit 903 and a communication unit 904; the generation unit 903 is used to generate a second certificate request message; the communication unit 904 is used to send a second certificate request message to the first device; the second certificate request message is used by the first device to determine the first certificate request message, and the first certificate request message is forwarded by the first device to the server to request the server to generate a first certificate for the first application.

[0268] In some embodiments, the first certificate request message carries certificate request information and a first signature, and / or the second certificate request message carries certificate request information and a first signature; the first signature is obtained by signing the certificate request information based on the private key of the first application; the certificate request information includes version information, subject information and public key information, the version information includes the version number of the certificate request information, the subject information includes characteristic information of the second device, and the public key information includes the public key of the first application.

[0269] In some embodiments, the characteristic information of the second device includes at least one of the following: a manufacturer identification of the second device, a product identification of the second device, and a device serial number of the second device.

[0270] In some implementations, the public key of the first application is used by the server to verify the first signature, and generate a first certificate for the first application after the verification is successful.

[0271] In some implementations, the first certificate is generated by the server based on the public key of the first application; or, the first certificate is generated by the server based on the public key of the first application and a first application identifier, where the first application identifier is an identifier of the first application.

[0272] In some implementations, the first application identifier is generated by the server for the first application after receiving the first certificate request message sent by the first device.

[0273] In some implementations, the first application identifier is generated for the first application by the first device after receiving the second certificate request message sent by the first application, and is sent by the first device to the server.

[0274] In some embodiments, the access unit 902 is used to exchange respective certificates with the server. After the certificate is authenticated by the certificate receiving end, the certificate receiving end is used to obtain the public key of the certificate sending end and generate a shared key based on the private key of the certificate receiving end and the public key of the certificate sending end to complete the establishment of a secure connection; wherein, the certificate of the first application is the first certificate.

[0275] In some implementations, the acquiring unit 901 is further configured to acquire the address of a server configured on the first device; the accessing unit 902 is configured to establish a physical connection with the server based on the server address, and to exchange respective certificates with the server based on the physical connection.

[0276] In some implementations, when the first certificate is generated by the server based on the public key and the first application identifier of the first application, the obtaining unit 901 is further configured to obtain the first application identifier based on the first certificate, where the first application identifier is used to register the first application with the server.

[0277] In some embodiments, the first credential is a first access token, which is allocated by the server to the first application; or, the first credential is a first encryption token, which is obtained by the server encrypting the first access token based on the public key of the first application, and the first access token is allocated by the server to the first application.

[0278] In some embodiments, the access unit 902 is used to register with the server using the first access token when the first credential is a first access token; or, when the first credential is a first encryption token, decrypt the first encryption token based on the private key of the first application to obtain the first access token, and register with the server using the first access token.

[0279] In some implementations, the access unit 902 is configured to register with the server using a first application identifier and a first access token, where the first application identifier is obtained based on the first certificate.

[0280] In some embodiments, the access unit 902 is configured to log in to the server using the first application identifier and the first access token; or, receive a second access token sent by the server, and log in to the server using the first application identifier and the second access token.

[0281] In some embodiments, the acquisition unit 901 is further used to obtain the second application identifier configured for the first device when the first credential configured for the first device is not obtained, where the second application identifier is the application identifier corresponding to the first device; the access unit 902 is further used to register with the server based on the second application identifier.

[0282] In some implementations, the access unit 902 is configured to register with the server using a first application identifier and a second application identifier, where the first application identifier is obtained based on the first certificate.

[0283] In some implementations, the communication unit 904 is configured to receive a second access token sent by the server; and the access unit 902 is configured to log in to the server using the first application identifier and the second access token.

[0284] In some embodiments, the starting unit is configured to receive a starting instruction sent by the first device, and start the first application when triggered by the starting instruction, or start the first application based on an obtained starting operation.

[0285] In some embodiments, the device further includes: a human-computer interaction unit, used to determine the ability of the first device to support the configuration of the IoT device, and output a second prompt message, the second prompt message being used to prompt the user whether to connect to the IoT device configured by the first device; after obtaining the user's input confirmation operation for the second prompt message, triggering the communication unit 904 to execute the step of sending a certificate request message to the first device.

[0286] In some implementations, the first device and the server belong to different application platforms, or the first device and the server belong to the same application platform.

[0287] Those skilled in the art should understand that the relevant description of the above-mentioned device configuration apparatus in the embodiment of the present application can be understood with reference to the relevant description of the device configuration method in the embodiment of the present application.

[0288] FIG10 is a third structural diagram of the device configuration apparatus provided in an embodiment of the present application, which is applied to a server, as shown in FIG10 , including:

[0289] A generating unit 1001 is configured to generate a first certificate and / or a first credential;

[0290] Communication unit 1002 is used to send the first certificate and / or first credential; wherein, the first certificate and / or first credential are configured by the first device to the first application in the second device; wherein, the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

[0291] In some embodiments, the communication unit 1002 is further used to receive a first certificate request message and / or a credential application message sent by the first device, where the first certificate request message is used to request the server to generate a first certificate for the first application, and the credential application message is used to request the server to allocate a first credential for the first application.

[0292] In some embodiments, the first certificate request message carries certificate request information and a first signature, and the first signature is obtained by signing the certificate request information based on the private key of the first application; the certificate request information includes version information, subject information and public key information, the version information includes the version number of the certificate request information, the subject information includes the characteristic information of the second device, and the public key information includes the public key of the first application.

[0293] In some embodiments, the characteristic information of the second device includes at least one of the following: a manufacturer identification of the second device, a product identification of the second device, and a device serial number of the second device.

[0294] In some embodiments, the device also includes: a verification unit 1003, which is used to obtain the public key of the first application based on the first certificate request information, verify the first signature based on the public key of the first application, and trigger the generation unit 1001 to execute the step of generating the first certificate after the verification is successful.

[0295] In some implementations, the generating unit 1001 is configured to generate a first certificate based on a public key of the first application; or to generate the first certificate based on the public key of the first application and a first application identifier, where the first application identifier is an identifier of the first application.

[0296] In some implementations, the generating unit 1001 is further configured to generate a first application identifier for the first application after receiving the first certificate request message sent by the first device.

[0297] In some implementations, the first application identifier is generated for the first application by the first device after receiving the second certificate request message sent by the first application. The communication unit 1002 is further configured to receive the first application identifier generated by the first device.

[0298] In some embodiments, the generation unit 1001 is used to allocate a first access token to the first application as a first credential; or, allocate a first access token to the first application, encrypt the first access token based on the public key of the first application to obtain a first encrypted token as the first credential.

[0299] In some embodiments, the device also includes: an establishment unit for establishing a first binding relationship between a first user identifier, a first access token, and a first application identifier, the first user identifier being the user identifier corresponding to the first device, and the first application identifier being the identifier of the first application; wherein the first binding relationship is used by the server to determine whether to accept registration and / or login of the first application.

[0300] In some embodiments, the communication unit 1002 is also used to receive a registration request message sent by the first application, which carries the first application identifier and the first access token; the verification unit 1003 is also used to determine that the user identifier corresponding to the first application is the first user identifier based on the first application identifier, the first access token and the first binding relationship, and accept the registration of the first application.

[0301] In some embodiments, the communication unit 1002 is also used to receive a login request message sent by the first application, which carries the first application identifier and the first access token; the verification unit 1003 is also used to determine that the user identifier corresponding to the first application is the first user identifier based on the first application identifier, the first access token and the first binding relationship, and accept the login of the first application.

[0302] In some embodiments, the generation unit 1001 is also used to generate a second access token and update the first access token in the first binding relationship to the second access token; the communication unit 1002 is also used to send the second access token to the first application; receive a login request message sent by the first application, the login request message carries the first application identifier and the second access token; the verification unit 1003 is also used to determine that the user identifier corresponding to the first application is the first user identifier based on the first application identifier, the second access token and the first binding relationship, and accept the login of the first application.

[0303] In some embodiments, the communication unit 1002 is also used to receive a registration request message sent by the first application, the registration request message carries a first application identifier and a second application identifier; the first application identifier is the identifier of the first application; the second application identifier is the application identifier corresponding to the first device, and is provided to the first application by the first device; the verification unit 1003 is also used to determine the first user identifier corresponding to the second application identifier based on the second application identifier, and accept the registration of the first application.

[0304] In some embodiments, the generating unit 1001 is further configured to generate a second access token; the communicating unit 1002 is further configured to send the second access token to the first application; and the second access token is used by the first application to log in to the server.

[0305] In some embodiments, the establishing unit is further used to establish a second binding relationship between the first user identifier, the second access token and the first application identifier, where the first application identifier is the identifier of the first application; wherein the second binding relationship is used by the server to determine whether to accept login of the first application.

[0306] In some embodiments, the communication unit 1002 is also used to receive a login request message sent by the first application, which carries the first application identifier and the second access token; the verification unit 1003 is also used to determine that the user identifier corresponding to the first application is the first user identifier based on the first application identifier, the second access token and the second binding relationship, and authorize the login of the first application.

[0307] In some implementations, the server and the first device belong to the same application platform, and the server and the second device belong to different application platforms.

[0308] Those skilled in the art should understand that the relevant description of the above-mentioned device configuration apparatus in the embodiment of the present application can be understood with reference to the relevant description of the device configuration method in the embodiment of the present application.

[0309] Figure 11 is a schematic structural diagram of a communication device 1100 provided in an embodiment of the present application. The communication device can be a first device, a second device, or a server. The communication device 1100 shown in Figure 11 includes a processor 1110, which can call and execute a computer program from a memory to implement the method in the embodiment of the present application.

[0310] Optionally, as shown in FIG11 , the communication device 1100 may further include a memory 1120. The processor 1110 may call and execute a computer program from the memory 1120 to implement the method in the embodiment of the present application.

[0311] The memory 1120 may be a separate device independent of the processor 1110 , or may be integrated into the processor 1110 .

[0312] Optionally, as shown in FIG11 , the communication device 1100 may further include a transceiver 1130 , and the processor 1110 may control the transceiver 1130 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices.

[0313] The transceiver 1130 may include a transmitter and a receiver. The transceiver 1130 may further include an antenna, and the number of antennas may be one or more.

[0314] Optionally, the communication device 1100 may specifically be the first device of an embodiment of the present application, and the communication device 1100 may implement the corresponding processes implemented by the first device in each method of the embodiment of the present application. For the sake of brevity, they will not be repeated here.

[0315] Optionally, the communication device 1100 may specifically be the second device of the embodiment of the present application, and the communication device 1100 may implement the corresponding processes implemented by the second device in each method of the embodiment of the present application. For the sake of brevity, they will not be repeated here.

[0316] Optionally, the communication device 1100 may specifically be a server in an embodiment of the present application, and the communication device 1100 may implement the corresponding processes implemented by the server in each method in the embodiment of the present application. For the sake of brevity, they will not be repeated here.

[0317] Figure 12 is a schematic structural diagram of a chip according to an embodiment of the present application. The chip 1200 shown in Figure 12 includes a processor 1210, which can call and run a computer program from a memory to implement the method according to the embodiment of the present application.

[0318] Optionally, as shown in FIG12 , the chip 1200 may further include a memory 1220. The processor 1210 may call and execute a computer program from the memory 1220 to implement the method in the embodiment of the present application.

[0319] The memory 1220 may be a separate device independent of the processor 1210 , or may be integrated into the processor 1210 .

[0320] Optionally, the chip 1200 may further include an input interface 1230. The processor 1210 may control the input interface 1230 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.

[0321] Optionally, the chip 1200 may further include an output interface 1240. The processor 1210 may control the output interface 1240 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.

[0322] Optionally, the chip can be applied to the first device in the embodiment of the present application, and the chip can implement the corresponding processes implemented by the first device in each method of the embodiment of the present application. For the sake of brevity, it will not be repeated here.

[0323] Optionally, the chip can be applied to the second device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the second device in each method of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0324] Optionally, the chip can be applied to the server in the embodiment of the present application, and the chip can implement the corresponding processes implemented by the server in each method of the embodiment of the present application. For the sake of brevity, it will not be repeated here.

[0325] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0326] It should be understood that the processor of the embodiments of the present application may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by hardware integrated logic circuits in the processor or software instructions. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0327] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0328] It should be understood that the above-mentioned memories are exemplary but not restrictive. For example, the memories in the embodiments of the present application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM RAM (DR RAM), etc. In other words, the memories in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0329] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.

[0330] Optionally, the computer-readable storage medium can be applied to the first device in the embodiment of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the first device in the various methods of the embodiment of the present application. For the sake of brevity, they are not repeated here.

[0331] Optionally, the computer-readable storage medium can be applied to the second device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the second device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0332] Optionally, the computer-readable storage medium can be applied to the server in the embodiment of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the server in the various methods of the embodiment of the present application. For the sake of brevity, they are not repeated here.

[0333] An embodiment of the present application also provides a computer program product, including computer program instructions.

[0334] Optionally, the computer program product can be applied to the first device in the embodiment of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the first device in the various methods of the embodiment of the present application. For the sake of brevity, they are not repeated here.

[0335] Optionally, the computer program product can be applied to the second device in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the second device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0336] Optionally, the computer program product can be applied to the server in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the server in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0337] The embodiment of the present application also provides a computer program.

[0338] Optionally, the computer program can be applied to the first device in the embodiment of the present application. When the computer program runs on the computer, the computer executes the corresponding processes implemented by the first device in the various methods of the embodiment of the present application. For the sake of brevity, they are not repeated here.

[0339] Optionally, the computer program can be applied to the second device in the embodiments of the present application. When the computer program runs on the computer, the computer executes the corresponding processes implemented by the second device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0340] Optionally, the computer program can be applied to the server in the embodiments of the present application. When the computer program runs on a computer, the computer executes the corresponding processes implemented by the server in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0341] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0342] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0343] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0344] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0345] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0346] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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 and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0347] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A device configuration method, the method comprising: The first device obtains a first certificate and / or a first credential from the server; The first device configures the first certificate and / or the first credential to a first application in the second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

2. The method according to claim 1, wherein The first device obtains a first certificate and / or a first credential from a server, including: The first device sends a first certificate request message and / or a credential application message to the server, where the first certificate request message is used to request the server to generate a first certificate for the first application, and the credential application message is used to request the server to allocate a first credential for the first application; The first device receives a first certificate and / or a first credential sent by the server.

3. The method according to claim 2, wherein: Before the first device sends the first certificate request message and / or credential request message to the server, the method further includes: The first device receives a second certificate request message sent by the first application, where the second certificate request message is generated by the first application and the first certificate request message is determined based on the second certificate request message.

4. The method according to claim 3, wherein: The first certificate request message carries certificate request information and a first signature, and / or the second certificate request message carries certificate request information and the first signature; The first signature is obtained by signing the certificate request information based on the private key of the first application; the certificate request information includes version information, subject information and public key information, the version information includes the version number of the certificate request information, the subject information includes the characteristic information of the second device, and the public key information includes the public key of the first application.

5. The method according to claim 4, wherein The characteristic information of the second device includes at least one of the following: a manufacturer identification of the second device, a product identification of the second device, and a device serial number of the second device.

6. The method according to claim 4 or 5, wherein: The public key of the first application is used by the server to verify the first signature, and generate the first certificate for the first application after the verification is successful.

7. The method according to any one of claims 4 to 6, wherein The first certificate is generated by the server based on the public key of the first application; or, The first certificate is generated by the server based on the public key of the first application and a first application identifier, where the first application identifier is an identifier of the first application.

8. The method according to claim 7, wherein: The first application identifier is generated by the server for the first application after receiving the first certificate request message sent by the first device.

9. The method according to claim 7, wherein: The first application identifier is generated for the first application by the first device after receiving the second certificate request message sent by the first application. The method further includes: The first device sends the generated first application identifier to the server.

10. The method according to any one of claims 1 to 9, wherein The first credential is a first access token, which is allocated by the server to the first application; or The first credential is a first encrypted token, which is obtained by the server encrypting a first access token based on the public key of the first application. The first access token is allocated by the server to the first application.

11. The method according to any one of claims 1 to 9, wherein In a case where the first device fails to obtain the first credential from the server, the method further includes: The first device configures a second application identifier to the first application; the second application identifier is an application identifier corresponding to the first device, and the second application identifier is used to register the first application with the server.

12. The method according to any one of claims 1 to 11, wherein The method further comprises: The first device configures the address of the server to the first application in the second device; wherein the address of the server is used for the first application to establish a physical connection with the server, and the first certificate is used to establish a secure connection between the first application and the server based on the physical connection.

13. The method according to claim 3, wherein: Before the first device receives the certificate request message sent by the first application, the method further includes: The first device sends a startup instruction to the second device, where the startup instruction is used to trigger the second device to start the first application.

14. The method according to claim 13, wherein Before the first device sends the start instruction to the second device, the method further includes: the first device outputting first prompt information, where the first prompt information is used to prompt the user whether to agree to start the first application; The first device sending the start instruction to the second device includes: the first device sending the start instruction to the second device after obtaining a confirmation operation input by a user for the first prompt information.

15. The method according to claim 13 or 14, wherein: Before the first device sends the start instruction to the second device, the method further includes: The first device determines that the second device supports a capability of controlling an Internet of Things (IoT) device.

16. The method according to claim 3, wherein Before the first device receives the certificate request message sent by the first application, the second device starts the first application based on the obtained start operation.

17. The method according to any one of claims 1 to 16, wherein The first device and the server belong to the same application platform, and the second device and the server belong to different application platforms.

18. A device configuration method, the method comprising: A first application of the second device obtains a first certificate and / or a first credential configured on the first device, where the first certificate and / or the first credential are obtained by the first device from a server; The first application establishes a secure connection with the server based on the first certificate and / or registers with the server based on the first credential.

19. The method according to claim 18, wherein Before the first application of the second device obtains the first certificate and / or first credential configured on the first device, the method further includes: The first application generates a second certificate request message and sends the second certificate request message to the first device; the second certificate request message is used by the first device to determine the first certificate request message, and the first certificate request message is sent by the first device to the server to request the server to generate a first certificate for the first application.

20. The method according to claim 19, wherein The first certificate request message carries certificate request information and a first signature, and / or the second certificate request message carries certificate request information and the first signature; The first signature is obtained by signing the certificate request information based on the private key of the first application; the certificate request information includes version information, subject information and public key information, the version information includes the version number of the certificate request information, the subject information includes the characteristic information of the second device, and the public key information includes the public key of the first application.

21. The method according to claim 20, wherein The characteristic information of the second device includes at least one of the following: a manufacturer identification of the second device, a product identification of the second device, and a device serial number of the second device.

22. The method according to claim 20 or 21, wherein The public key of the first application is used by the server to verify the first signature, and generate the first certificate for the first application after the verification is successful.

23. The method according to any one of claims 20 to 22, wherein The first certificate is generated by the server based on the public key of the first application; or, The first certificate is generated by the server based on the public key of the first application and a first application identifier, where the first application identifier is an identifier of the first application.

24. The method according to claim 23, wherein The first application identifier is generated by the server for the first application after receiving the first certificate request message sent by the first device.

25. The method according to claim 23, wherein The first application identifier is generated for the first application by the first device after receiving the second certificate request message sent by the first application, and is sent by the first device to the server.

26. The method according to any one of claims 23 to 25, wherein The first application establishes a secure connection with the server based on the first certificate, including: The first application and the server exchange their respective certificates. After the certificate is authenticated by the certificate receiving end, the certificate receiving end is used to obtain the public key of the certificate sending end and generate a shared key based on the private key of the certificate receiving end and the public key of the certificate sending end to complete the establishment of a secure connection; wherein, the certificate of the first application is the first certificate.

27. The method according to claim 26, wherein Before the first application and the server exchange respective certificates, the method further includes: the first application obtaining the address of the server configured on the first device; The first application exchanges respective certificates with the server, including: the first application establishes a physical connection with the server based on the address of the server, and exchanges respective certificates with the server based on the physical connection.

28. The method according to any one of claims 23 to 27, wherein When the first certificate is generated by the server based on the public key and the first application identifier of the first application, the method further includes: The first application obtains the first application identifier based on the first certificate, and the first application identifier is used for registering the first application with the server.

29. The method according to any one of claims 18 to 28, wherein The first credential is a first access token, which is allocated by the server to the first application; or The first credential is a first encrypted token, which is obtained by the server encrypting a first access token based on the public key of the first application. The first access token is allocated by the server to the first application.

30. The method according to claim 29, wherein Registering the first application with the server based on the first credential includes: When the first credential is a first access token, the first application registers with the server using the first access token; or When the first credential is a first encrypted token, the first application decrypts the first encrypted token based on the private key of the first application to obtain the first access token, and the first application registers with the server using the first access token.

31. The method according to claim 30, wherein Registering, by the first application, with the server using the first access token includes: The first application is registered with the server using a first application identifier and the first access token, where the first application identifier is obtained based on the first certificate.

32. The method according to claim 31, wherein After the first application is registered with the server using the first application identifier and the first access token, the method further includes: The first application logs in to the server using the first application identifier and the first access token; or, The first application receives the second access token sent by the server, and logs in to the server using the first application identifier and the second access token.

33. The method according to any one of claims 18 to 28, wherein: In a case where the first application of the second device fails to obtain the first credential configured on the first device, the method further includes: The first application obtains, by the first device, a second application identifier configured on the first device, where the second application identifier is an application identifier corresponding to the first device; The first application is registered with the server based on the second application identifier.

34. The method according to claim 33, wherein: The first application is registered with the server based on the second application identifier, including: The first application is registered with the server using a first application identifier and the second application identifier, where the first application identifier is obtained based on the first certificate.

35. The method according to claim 34, wherein: After the first application is registered with the server using the first application identifier and the second application identifier, the method further includes: The first application receives the second access token sent by the server, and logs in to the server using the first application identifier and the second access token.

36. A method according to any one of claims 19 to 28, wherein Before sending the certificate request message to the first device, the method further includes: The second device receives the startup instruction sent by the first device, and starts the first application under the triggering of the startup instruction.

37. The method according to any one of claims 19 to 28, wherein Before sending the certificate request message to the first device, the method further includes: The second device starts the first application based on the obtained start operation.

38. The method according to claim 37, wherein: After the second device starts the first application based on the obtained startup operation, the method further includes: The first application of the second device determines that the first device supports the capability of configuring an IoT device, and outputs second prompt information, where the second prompt information is used to prompt a user whether to connect to the IoT device configured by the first device; After the first application obtains a confirmation operation input by the user for the second prompt information, the first application executes the step of sending the certificate request message to the first device.

39. The method according to any one of claims 18 to 38, wherein The first device and the server belong to different application platforms, and the first device and the server belong to the same application platform.

40. A device configuration method, the method comprising: The server generates a first certificate and / or a first credential, and sends the first certificate and / or the first credential to the first device; wherein the first certificate and / or the first credential are configured by the first device to the first application in the second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

41. The method according to claim 40, wherein Before the server generates the first certificate and / or the first credential, the method further includes: The server receives a first certificate request message and / or a credential application message sent by the first device, where the first certificate request message is used to request the server to generate a first certificate for the first application, and the credential application message is used to apply to the server for allocating a first credential for the first application.

42. The method according to claim 41, wherein The first certificate request message carries certificate request information and a first signature, where the first signature is obtained by signing the certificate request information based on the private key of the first application; the certificate request information includes version information, subject information and public key information, where the version information includes the version number of the certificate request information, the subject information includes feature information of the second device, and the public key information includes the public key of the first application.

43. The method according to claim 42, wherein The characteristic information of the second device includes at least one of the following: a manufacturer identification of the second device, a product identification of the second device, and a device serial number of the second device.

44. The method according to claim 42 or 43, wherein The method further comprises: The server obtains the public key of the first application based on the first certificate request information, verifies the first signature based on the public key of the first application, and executes the step of generating the first certificate after the verification is successful.

45. The method according to any one of claims 42 to 44, wherein The server generates a first certificate, including: The server generates the first certificate based on the public key of the first application; or, The server generates the first certificate based on the public key of the first application and a first application identifier, where the first application identifier is an identifier of the first application.

46. ​​The method of claim 45, wherein The method further comprises: The server generates the first application identifier for the first application after receiving the first certificate request message sent by the first device.

47. The method of claim 45, wherein The first application identifier is generated for the first application by the first device after receiving a second certificate request message sent by the first application. The method further includes: The server receives the first application identifier generated by the first device.

48. The method according to any one of claims 40 to 47, wherein The server generates a first credential, including: The server allocates a first access token to the first application as the first credential; or The server allocates a first access token to the first application, and encrypts the first access token based on the public key of the first application to obtain a first encrypted token as the first credential.

49. The method according to claim 48, wherein The method further comprises: The server establishes a first binding relationship between a first user identifier, the first access token, and a first application identifier, wherein the first user identifier is the user identifier corresponding to the first device, and the first application identifier is the identifier of the first application; wherein the first binding relationship is used by the server to determine whether to accept registration and / or login of the first application.

50. The method of claim 49, wherein The method further comprises: The server receives a registration request message sent by the first application, where the registration request message carries the first application identifier and the first access token; The server determines, based on the first application identifier, the first access token, and the first binding relationship, that the user identifier corresponding to the first application is the first user identifier, and accepts registration of the first application.

51. The method of claim 50, wherein: The method further comprises: The server receives a login request message sent by the first application, where the login request message carries the first application identifier and the first access token; The server determines, based on the first application identifier, the first access token, and the first binding relationship, that the user identifier corresponding to the first application is the first user identifier, and accepts login of the first application.

52. The method of claim 50, wherein: The method further comprises: The server generates a second access token and updates the first access token in the first binding relationship to the second access token; The server sends the second access token to the first application; The server receives a login request message sent by the first application, where the login request message carries the first application identifier and the second access token; The server determines, based on the first application identifier, the second access token, and the first binding relationship, that the user identifier corresponding to the first application is the first user identifier, and accepts login of the first application.

53. The method according to any one of claims 40 to 47, wherein If the server does not generate the first credential, the method further includes: The server receives a registration request message sent by the first application, where the registration request message carries a first application identifier and a second application identifier; the first application identifier is an identifier of the first application; the second application identifier is an application identifier corresponding to the first device and is provided by the first device to the first application; The server determines the first user identifier corresponding to the second application identifier based on the second application identifier, and accepts registration of the first application.

54. The method of claim 53, wherein: The method further comprises: The server generates a second access token and sends the second access token to the first application; the second access token is used by the first application to log in to the server.

55. The method of claim 54, wherein The method further comprises: The server establishes a second binding relationship between the first user identifier, the second access token and the first application identifier, where the first application identifier is the identifier of the first application; wherein the second binding relationship is used by the server to determine whether to accept login of the first application.

56. The method of claim 55, wherein: The method further comprises: The server receives a login request message sent by the first application, where the login request message carries the first application identifier and the second access token; The server determines, based on the first application identifier, the second access token, and the second binding relationship, that the user identifier corresponding to the first application is the first user identifier, and authorizes login to the first application.

57. The method according to any one of claims 40 to 56, wherein The server and the first device belong to the same application platform, and the server and the second device belong to different application platforms.

58. A device configuration apparatus, applied to a first device, comprising: an acquiring unit, configured to acquire a first certificate and / or a first credential from a server; A configuration unit is used to configure the first certificate and / or the first credential to the first application in the second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

59. A device configuration apparatus, applied to a second device, comprising: an acquiring unit, configured to acquire a first certificate and / or a first credential configured on the first device, where the first certificate and / or the first credential are obtained by the first device from a server; An access unit is configured to establish a secure connection with the server based on the first certificate and / or register with the server based on the first credential.

60. A device configuration apparatus, applied to a server, comprising: A generating unit, configured to generate a first certificate and / or a first credential; A communication unit, configured for a first device to send the first certificate and / or first credential; wherein the first certificate and / or first credential are configured by the first device to a first application in a second device; wherein the first certificate is used for the first application to establish a secure connection with the server, and the first credential is used for the first application to register with the server.

61. A communication device comprising: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to perform the method according to any one of claims 1 to 17, or the method according to any one of claims 18 to 39, or the method according to any one of claims 40 to 57.

62. A chip comprising: A processor, configured to call and run a computer program from a memory so that a device equipped with the chip performs the method according to any one of claims 1 to 17, or the method according to any one of claims 18 to 39, or the method according to any one of claims 40 to 57.

63. A computer-readable storage medium for storing a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 17, or the method according to any one of claims 18 to 39, or the method according to any one of claims 40 to 57.

64. A computer program product comprising computer program instructions, the computer program instructions causing a computer to perform the method of any one of claims 1 to 17, or any one of claims 18 to 39, or any one of claims 40 to 57.

65. A computer program causing a computer to perform the method of any one of claims 1 to 17, or any one of claims 18 to 39, or any one of claims 40 to 57.