Device binding method, electronic device, and readable storage medium

CN122824531APending Publication Date: 2026-09-25GUANGZHOU HEMI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610908633.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种设备绑定方法、电子设备及可读存储介质,用于解决在绑定流程繁琐,绑定效率低下的技术问题

Benefits of technology

通过接收管理终端发送的待出库的至少一个第一设备的设备标识,由于设备标识是管理端对第一设备对应的设备码进行扫描后获得的,因此,物联网平台实现了根据实际的待出库情况来确定当前待与网关进行绑定的第二设备的设备标识;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122824531A_ABST
    Figure CN122824531A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a device binding method, an electronic device and a readable storage medium, and relate to the field of Internet of Things. The method is applied to an Internet of Things platform, and comprises: receiving a device identifier of a first device to be discharged from a warehouse sent by a management end, the device identifier of each first device being obtained by the management end scanning a device code corresponding to the first device; obtaining a gateway identifier of a gateway, and establishing and storing a first mapping relationship between the gateway identifier and the device identifier according to an identifier set; when the first device comprises the gateway, a second device is any device in the first device except the gateway; when the first device does not comprise the gateway, the second device is the first device; in response to completion of binding between the gateway identifier and a user identifier of a user, if it is determined that the first mapping relationship of the gateway is stored, sending indication information to the gateway to indicate that the gateway is powered on on each second device, so that the efficiency of binding of the device and the gateway is improved, and a cumbersome binding process is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) technology, and more specifically, to a device binding method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the rapid development of IoT technology, the number of device nodes in smart home scenarios is growing exponentially. In modern IoT architectures, gateway devices are typically introduced as core hubs. The gateway is responsible for managing multiple sub-devices and establishing persistent connections with the IoT cloud platform.

[0003] However, in the relevant solutions, when the gateway is bound to multiple devices, the binding process is cumbersome and the binding efficiency is low. Summary of the Invention

[0004] This application provides a device binding method, an electronic device, and a readable storage medium to solve the technical problems of cumbersome binding processes and low binding efficiency.

[0005] According to a first aspect of the embodiments of this application, a device binding method is provided, applied to an Internet of Things (IoT) platform, the method comprising: The system receives a set of identifiers sent by the management terminal. The set of identifiers includes the device identifiers of at least one first device to be shipped out. The device identifier of each first device is obtained by the management terminal by scanning the device code corresponding to the first device. The device identifier is the identifier of the first device. Obtain the gateway identifier of the gateway, establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set; if the at least one first device includes a gateway, the second device is any device other than the gateway among the at least one first device; if the at least one first device does not include a gateway, the second device is a first device. In response to the completion of the binding between the gateway identifier and the user identifier, if it is determined that a first mapping relationship of the gateway is stored, an instruction message is sent to the gateway to instruct the gateway to bind each second device when each second device is powered on; the instruction message includes the device identifier of at least one second device, and the user is the user who purchased the second device.

[0006] In one possible implementation, the identifier set also includes a product identifier for the first device, wherein the product identifier is an identifier of the category to which the first device belongs; A first mapping relationship is established and stored based on the identifier set between the gateway identifier of the gateway and the device identifier of at least one second device, including: Obtain the product identification and equipment identification of the first device; For each first device, if the IoT platform stores the product identifier and the device key corresponding to the device identifier of the first device, then a first mapping relationship is established and stored between the gateway identifier of the gateway and at least one second device.

[0007] In another possible implementation, order information sent by the management terminal is received. The order information includes at least one first device and space to be installed in each of the at least one first device. Determine a second mapping relationship between at least one first device and each space based on the order information; Send a second mapping relationship to the management terminal so that the management terminal instructs at least one first device to be classified, packaged, and shipped out according to the second mapping relationship.

[0008] In another possible implementation, if it is determined that the identifier set includes the gateway identifier of the gateway, then a first mapping relationship between the gateway identifier of the gateway and at least one second device is established and stored. If it is determined that the gateway identifier does not include the gateway identifier in the identifier set, then the gateway identifier corresponding to the pre-stored user identifier is obtained, and a first mapping relationship between the gateway identifier and at least one second device is established and stored. The pre-stored mapping between user identifiers and gateway identifiers is sent by the management terminal; The correspondence between user identifiers and gateway identifiers is obtained by the management terminal through the user's terminal when it confirms that the second device does not contain a gateway.

[0009] According to a second aspect of the embodiments of this application, a device binding method is provided, applied to a management terminal, the method comprising: Scan the device code corresponding to at least one first device to be shipped out to obtain an identifier set; the identifier set includes the device identifier of at least one first device; Send an identifier set to the IoT platform so that the IoT platform can establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set; if the at least one first device includes a gateway, the second device is any device other than the gateway among the at least one first device; if the at least one first device does not include a gateway, the second device is a first device.

[0010] In one possible implementation, order information is sent to an IoT platform so that the IoT platform can determine a second mapping relationship between the first device and each space based on the order information; the order information includes at least one first device and the space to be installed for each of the at least one first device; Receive the second mapping relationship sent by the IoT platform; At least one first device is classified and packaged according to the second mapping relationship.

[0011] In another possible implementation, if it is determined that the identifier set contains each device in the second mapping relationship, then the identifier set is sent to the IoT platform; Sending a set of identifiers to the IoT platform, followed by: At least one primary device, after being categorized and packaged, is shipped out of the warehouse.

[0012] In another possible implementation, if it is determined that the set of identifiers does not contain each device in the second mapping relationship, an alarm message is displayed; the alarm message is used to indicate that there is a missing device in the first device to be shipped.

[0013] According to a third aspect of the embodiments of this application, a device binding apparatus is provided, applied to an Internet of Things (IoT) platform, the apparatus comprising: The receiving module is used to receive a set of identifiers sent by the management terminal. The set of identifiers includes the device identifiers of at least one first device to be shipped out. The device identifier of each first device is obtained by the management terminal by scanning the device code corresponding to the first device. The device identifier is the identifier of the first device. The acquisition module is used to acquire the gateway identifier of the gateway, establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set; when the at least one first device includes a gateway, the second device is any device other than the gateway among the at least one first device; when the at least one first device does not include a gateway, the second device is the first device. The instruction module is used to respond to the binding between the gateway identifier and the user identifier. If it is determined that a first mapping relationship of the gateway is stored, the instruction module sends instruction information to the gateway to instruct the gateway to bind each second device when each second device is powered on. The instruction information includes the device identifier of at least one second device, and the user is the user who purchased the second device.

[0014] According to a fourth aspect of the embodiments of this application, a device binding apparatus is provided, applied to a management terminal, the apparatus comprising: The scanning module is used to scan the device code corresponding to at least one first device to be shipped out, and obtain an identifier set; the identifier set includes the device identifier of at least one first device; The sending module is used to send an identifier set to the IoT platform so that the IoT platform can establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set; if the at least one first device includes a gateway, the second device is any device other than the gateway among the at least one first device; if the at least one first device does not include a gateway, the second device is a first device.

[0015] According to a fifth aspect of the present application, an electronic device is provided, the electronic device including a memory, a processor and a computer program stored in the memory, wherein the processor executes the program to implement the steps of the method provided in the first aspect.

[0016] According to a sixth aspect of the embodiments of this application, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the method provided in the first aspect.

[0017] According to a seventh aspect of the present application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, wherein when a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, causing the computer device to perform steps implementing the method provided in the first aspect.

[0018] The beneficial effects of the technical solutions provided in this application are: By receiving the device identifier of at least one first device to be shipped from the management terminal, since the device identifier is obtained by the management terminal after scanning the device code corresponding to the first device, the IoT platform can determine the device identifier of the second device to be bound to the gateway based on the actual shipping situation. Obtain the gateway identifier of the gateway, establish and store the first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set. Since the second device is any device other than the gateway among the first devices when the at least one device includes the gateway, and the second device is the first device when the first device does not include the gateway, the gateway corresponding to the gateway identifier that establishes the first mapping relationship with the device identifier of the second device can be either the gateway to be shipped together with the second device or a pre-determined gateway, ensuring that the first mapping relationship can be pre-established in both of the above cases. Once the binding between the gateway identifier and the user's user identifier is completed, it indicates that the first device has been installed in the home. If the first mapping relationship of the gateway is stored, the second device that the gateway needs to bind can be determined based on the first mapping relationship. Therefore, an instruction message is sent to the gateway to instruct the gateway to bind each second device when it is powered on. This avoids the problem of the installation technician configuring each second device to bind with the gateway one by one, which leads to a cumbersome binding process and operational errors. This improves the efficiency of binding the gateway with multiple devices. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0020] Figure 1 A flowchart illustrating a device binding method applied to an Internet of Things (IoT) platform, as provided in an embodiment of this application; Figure 2 A flowchart illustrating an order information processing method in a device binding method applied to an Internet of Things platform, provided in an embodiment of this application; Figure 3 A flowchart illustrating a device binding method applied to a management terminal, as provided in an embodiment of this application; Figure 4 An interactive flowchart of a device binding method provided in an embodiment of this application; Figure 5 This is a schematic diagram of the system architecture for implementing the device binding method provided in the embodiments of this application; Figure 6 A schematic diagram of a device binding device applied to an Internet of Things (IoT) platform provided in this application embodiment; Figure 7 A schematic diagram of a device binding device for an IoT platform applied to a management terminal, provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0021] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0022] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0024] The relevant technologies are explained below: In related technologies, installers need to configure the network and binding relationships of each device on-site, which is cumbersome and prone to errors. Therefore, there is a problem of high complexity in device installation and binding. In related technologies, the order, warehousing, installation and configuration stages are fragmented, and matching devices with users' home spaces relies on manual labor, which can easily lead to incorrect delivery and omissions. In related technologies, binding devices and gateways relies on manual pairing on-site, which cannot achieve pre-configuration and automated networking, thus prolonging the installation cycle.

[0025] In view of the above-mentioned technical problems or areas that need improvement in the related technologies, this application proposes a device binding method. This method receives the device identifier of at least one first device to be shipped out from the warehouse sent by the management terminal. Since the device identifier is obtained by the management terminal after scanning the device code corresponding to the first device, the IoT platform can determine the device identifier of the second device to be bound to the gateway based on the actual situation of the device to be shipped out. Obtain the gateway identifier of the gateway, establish and store the first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set. Since the second device is any device other than the gateway among the first devices when the at least one device includes the gateway, and the second device is the first device when the first device does not include the gateway, the gateway corresponding to the gateway identifier that establishes the first mapping relationship with the device identifier of the second device can be either the gateway to be shipped together with the second device or a pre-determined gateway, ensuring that the first mapping relationship can be pre-established in both of the above cases. Once the binding between the gateway identifier and the user's user identifier is completed, it indicates that the first device has been installed in the home. If the first mapping relationship of the gateway is stored, the second device that the gateway needs to bind can be determined based on the first mapping relationship. Therefore, an instruction message is sent to the gateway to instruct the gateway to bind each second device when it is powered on. This avoids the problem of the installation technician configuring each second device to bind to the gateway one by one, which leads to a cumbersome binding process and operational errors, and improves the efficiency of binding the gateway to multiple devices.

[0026] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0027] This application provides a device binding method for an Internet of Things (IoT) platform, such as... Figure 1 As shown, the method includes: S101, Receive the set of identifiers sent by the management terminal.

[0028] In this embodiment of the application, the identifier set includes the device identifier of at least one first device to be shipped out. The device identifier of each first device is obtained by the management terminal scanning the device code corresponding to the first device. The device identifier is the identifier of the first device.

[0029] In this embodiment of the application, the management terminal is the warehouse management terminal of the first device, which is used to release the first device according to the user's purchase operation for the first device. The management terminal obtains the device identifier corresponding to each first device by scanning the device code corresponding to at least one first device to be released.

[0030] In this embodiment of the application, after scanning each first device is completed, all the acquired device identifiers are combined into an identifier set and sent to the Internet of Things platform, so that the Internet of Things platform receives the identifier set sent by the management terminal.

[0031] In this embodiment of the application, the IoT platform can determine the specific identity of the first device to be shipped out based on the device identifier of each first device.

[0032] S102, obtain the gateway identifier of the gateway, and establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set.

[0033] In the embodiments of this application, if at least one first device includes a gateway, the second device is any one of the at least one first device other than the gateway; if at least one first device does not include a gateway, the second device is a first device.

[0034] In this embodiment of the application, if the first device includes a gateway, it means that the first device purchased by the current user includes a gateway. Therefore, the gateway identifier of the gateway can be directly obtained from the identifier set.

[0035] In this embodiment of the application, if the first device does not include a gateway, it means that the first device purchased by the current user does not include a gateway. Therefore, the gateway identifier is determined from the pre-stored correspondence between the user's identifier and the gateway identifier.

[0036] In this embodiment of the application, when the management terminal processes the user's purchase operation for the first device, if it determines that the user has not currently purchased a gateway, it means that the user already owns a gateway. Therefore, the gateway identifier of the gateway that the user currently owns can be determined by interacting with the user, so as to establish a first mapping relationship between the gateway identifier and the device identifier of the second device in advance. This ensures that even if the user has not purchased a gateway, the first mapping relationship between the gateway identifier of the gateway and the device identifier of the second device can be established in advance.

[0037] In this embodiment of the application, the gateway purchased by the user can be a smart speaker.

[0038] In this embodiment of the application, after establishing a first mapping relationship between the gateway identifier and the device identifier, the correspondence between the gateway and the first mapping relationship is stored.

[0039] S103, in response to the completion of the binding between the gateway identifier and the user identifier, if it is determined that the first mapping relationship of the gateway is stored, an indication message is sent to the gateway to instruct the gateway to bind each second device when each second device is powered on.

[0040] In this embodiment of the application, once the gateway identifier is bound to the user's user identifier, it indicates that the second device has been installed in the home and is in the process of binding. Therefore, the IoT platform first confirms whether the gateway has a corresponding first mapping relationship. If it does, it indicates that the gateway has a second device to be bound. Therefore, it sends an instruction message to the gateway.

[0041] In this embodiment of the application, the indication information includes the device identifier of at least one second device, and the user is the user who purchased the second device.

[0042] In this embodiment of the application, since the instruction information includes the device identifier of the second device to be bound, the gateway automatically starts the binding process with the second device when the second device is powered on after receiving the instruction information, thus avoiding the need for manual binding of each second device with the gateway.

[0043] The device binding method for an IoT platform provided in this application embodiment receives the device identifier of at least one first device to be shipped out from the warehouse sent by the management terminal. Since the device identifier is obtained by the management terminal after scanning the device code corresponding to the first device, the IoT platform can determine the device identifier of the second device to be bound to the gateway based on the actual shipping situation. Obtain the gateway identifier of the gateway, establish and store the first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set. Since the second device is any device other than the gateway among the first devices when the at least one device includes the gateway, and the second device is the first device when the first device does not include the gateway, the gateway corresponding to the gateway identifier that establishes the first mapping relationship with the device identifier of the second device can be either the gateway to be shipped together with the second device or a pre-determined gateway, ensuring that the first mapping relationship can be pre-established in both of the above cases. Once the binding between the gateway identifier and the user's user identifier is completed, it indicates that the first device has been installed in the home. If the first mapping relationship of the gateway is stored, the second device that the gateway needs to bind can be determined based on the first mapping relationship. Therefore, an instruction message is sent to the gateway to instruct the gateway to bind each second device when it is powered on. This avoids the problem of the installation technician configuring each second device to bind with the gateway one by one, which leads to a cumbersome binding process and operational errors. This improves the efficiency of binding the gateway with multiple devices.

[0044] Based on the above embodiments, as an optional embodiment, the identifier set further includes the product identifier of the first device, which is the identifier of the category to which the first device belongs; the product identifier and device identifier of the first device are obtained; for each first device, if the IoT platform stores the device key corresponding to the product identifier and device identifier of the first device, a first mapping relationship between the gateway identifier of the gateway and at least one second device is established and stored.

[0045] In this embodiment, the identifier set includes the product identifier and device identifier of the first device. The management terminal packages the product identifier and device identifier of each first device into the identifier set and sends it to the IoT platform. If the IoT platform detects a corresponding device key based on the device identifier and product identifier, it determines that the first device has been registered on the IoT platform. When each device has a corresponding device key, it means that all first devices are registered on the IoT platform. Therefore, a first mapping relationship between the gateway identifier of the gateway and at least one second device can be established and stored, avoiding the need to pre-establish a first mapping relationship between devices that the IoT platform cannot control and the gateway.

[0046] In the above scheme, when the set of identifiers is received, it is first confirmed whether the first device has been registered to the IoT platform based on the device identifier and product identifier. Only when it is confirmed that the first device has been registered will the first mapping relationship be established and stored, which avoids processing unauthorized devices and ensures the security of use.

[0047] Based on the above embodiments, as an optional embodiment, a method for processing order information is also provided, such as... Figure 2 As shown, the specific content is as follows: S201, Receive order information sent by the management terminal; S202, determine a second mapping relationship between at least one first device and each space based on the order information; S203, send the second mapping relationship to the management terminal so that the management terminal instructs at least one first device to be classified, packaged and shipped out according to the second mapping relationship.

[0048] In S201 of this application embodiment, the order information includes at least one first device and the space to be installed for each of the at least one first device. That is, after the IoT platform obtains the order information, it can parse the order information to determine the space to be installed for each first device in the current order information.

[0049] In S202 of this application embodiment, since the order information indicates the space to be installed for each first device, in order to facilitate efficient installation after the first device is delivered to the home, the space corresponding to each first device is determined according to the order information to obtain a second mapping relationship. That is, the Internet of Things platform classifies each first device according to the space so that the first devices installed in the same space correspond to the same space.

[0050] In S203 of this application embodiment, a second mapping relationship is sent to the management terminal. Since the second mapping relationship classifies the second devices according to space, the management terminal can instruct the staff to classify and pack them according to the second mapping relationship when packing. For example, the first devices corresponding to the same space are packed in one packaging box and the corresponding space label is affixed.

[0051] In this embodiment, order information can be presented as a note, that is, when the user performs a purchase operation through the user terminal, the user indicates the space where each first device is to be installed through a note, for example: Master bedroom: downlight 1. Curtain switch 1. Gateway 1. Therefore, the IoT platform can determine the second mapping relationship through order notes.

[0052] In this embodiment of the application, a space option is provided on the user order interface of each first device, allowing the user to determine the space to be installed on the first device currently being purchased. This results in order information representing the space to be installed on each of the at least one first devices. The IoT platform determines the second mapping relationship by analyzing the order information obtained in the above manner.

[0053] In the above solution, the IoT platform receives order information sent by the management terminal, determines the second mapping relationship between the first device and the space based on the order information, and sends the second mapping relationship to the management terminal. This allows the management terminal to instruct the first device to be classified and packaged according to different spaces, realizing the pre-matching of the first device and the space. After the first device is put into storage, the installers can quickly install it according to the classified and packaged second device, reducing the time spent searching for the first device required in each space on-site and improving the work efficiency of the installers.

[0054] Based on the above embodiments, as an optional embodiment, if it is determined that the identifier set includes the gateway identifier of the gateway, then a first mapping relationship between the gateway identifier of the gateway and at least one second device is established and stored.

[0055] In this embodiment of the application, if the identifier set includes the gateway identifier of the gateway, it means that at least one first device purchased by the user contains a gateway. Any device other than the gateway in the first device is taken as a second device, a first mapping relationship is established between the gateway identifier of the gateway and at least one second device, and the correspondence between the gateway and the first mapping relationship is stored. Thus, after the first device is installed in the home, it is possible to quickly determine which devices the gateway needs to be bound to.

[0056] In this embodiment of the application, if it is determined that the gateway identifier does not include the gateway identifier in the identifier set, then the gateway identifier corresponding to the pre-stored user identifier is obtained, and a first mapping relationship between the gateway identifier and at least one second device is established and stored.

[0057] In this embodiment of the application, if the identifier set does not include the gateway identifier of the gateway, it means that the first device purchased by the user does not have a gateway. Any first device can be directly used as the second device. That is to say, the user already has a gateway. It is only necessary to establish a first mapping relationship between the gateway identifier of the user's existing gateway and the device identifier of the second device, and store the first mapping relationship. When the first device is installed in the home, the user's existing gateway can be instructed to bind the second device.

[0058] In this embodiment of the application, the pre-stored correspondence between user identifiers and gateway identifiers is sent by the management terminal; the correspondence between user identifiers and gateway identifiers is obtained by the management terminal through the user's user terminal when it is confirmed that the first device does not contain a gateway.

[0059] In this embodiment, when the management terminal confirms that the first device purchased by the user does not include a gateway, it interacts with the user's user terminal to obtain the gateway identifier of the gateway that the user currently owns, establishes a correspondence between the user's user identifier and the gateway identifier, and sends the correspondence between the user identifier and the gateway identifier to the IoT platform. The IoT platform stores the correspondence between the user identifier and the gateway identifier, and when it cannot obtain the gateway identifier of the gateway from the identifier set, it obtains it from the correspondence between the user identifier and the gateway identifier.

[0060] In the above scheme, when the identifier set includes a gateway identifier, it indicates that the current user has purchased a gateway. Therefore, it is necessary to establish and store a first mapping relationship between the gateway identifier of the currently purchased gateway and the second device. When the identifier set does not include a gateway identifier, it indicates that the user already owns a gateway. Therefore, the gateway identifier corresponding to the pre-stored user identifier is obtained, and a first mapping relationship between the gateway identifier of the user's owned gateway and the device identifier of the second device is established. The above scheme ensures that regardless of whether the first device purchased by the user includes a gateway, the first mapping relationship between the gateway identifier of the gateway and the device identifier of the second device can be established and stored, thus realizing the pre-determination of the second device to be bound to the gateway before the first device is installed in the home.

[0061] In this embodiment, after the IoT platform determines that the gateway has a corresponding first mapping relationship, it sends a confirmation message to the gateway to confirm whether it needs to bind each second device. After confirming that the second devices need to be bound, the gateway sends a request to the IoT platform to obtain the first mapping relationship. After obtaining the first mapping relationship, the gateway binds each second device according to the first mapping relationship. After the binding between the gateway and each second device is completed, the binding result is returned to the IoT platform. After receiving the binding result, the IoT platform updates each second device in the first mapping relationship to a bound state. This application also provides a device binding method applied to the management terminal, such as... Figure 3 As shown, the specific content is as follows: S301, Scan the device code corresponding to at least one first device to be shipped out, and obtain the identifier set; the identifier set includes the device identifier of at least one first device.

[0062] In this embodiment of the application, in order to determine the device identity of each first device to be shipped out, the device code corresponding to each first device to be shipped out is scanned to obtain the URL access address of the first device, and the identity identifier of the first device is obtained according to the URL link.

[0063] In this embodiment of the application, for all first devices purchased by the user, after scanning the device IDs of all first devices to be shipped, an identifier set is constructed based on the device IDs of each first device obtained.

[0064] In this embodiment of the application, the device code of the first device is located on the packaging box of the first device, and the staff at the management end can obtain the device identifier corresponding to the first device by scanning the code using a mini program or application.

[0065] In one example, the URL consists of the protocol (https), domain name, path, query parameters, etc. The parameter part in the URL begins with a question mark (?) and uses an ampersand (&) to separate different outputs; each parameter consists of a key and a value, which are connected by an equal sign (=).

[0066] In one example, the URL includes the following parameters: product model, product identifier, and device identifier. The product model consists of a set of letters, numbers, and symbols, and is a product number designed to distinguish the product based on its channel, category, appearance, function, color, and other characteristics. For example, the model number for a wireless rotary switch is HM-WS01. The product identifier consists of 10 letters and numbers and is one of the device certificate information information. It is a globally unique identifier issued by the IoT platform when the product is created. For example, the device identifier for a wireless rotary switch is KH606P4VO6. The device identifier consists of 12 letters and numbers and is a unique device identifier, such as FF040000C98F. Therefore, the parameters constitute the following part of the URL access address: ?model=HM-WS01&pk=KH6O6P4VO6&dn=FF040000C98F.

[0067] S302, send an identifier set to the IoT platform so that the IoT platform can establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set.

[0068] In the embodiments of this application, if at least one first device includes a gateway, the second device is any one of the at least one first device other than the gateway; if at least one first device does not include a gateway, the second device is a first device.

[0069] In this embodiment of the application, an identifier set is sent to the Internet of Things (IoT) platform so that the IoT platform can establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set. When it is determined that the gateway identifier of the gateway is successfully bound to the user identifier of the user, the IoT platform sends an instruction message to the gateway based on the first mapping relationship so as to instruct the gateway to establish a binding relationship with the second device after the second device is powered on.

[0070] The device binding method for management terminals provided in this application embodiment obtains an identifier set by scanning the device code corresponding to at least one first device to be shipped out. This enables the determination of the device identifier of the first device to be delivered to the user based on the actual shipment situation. By sending the identifier set to the IoT platform, the IoT platform can determine the device identifier of the device to be bound to the gateway in advance. This establishes and stores a first mapping relationship between the gateway identifier and the device identifier of at least one second device, providing strong data support for the configuration of the gateway-second device binding process and enabling the IoT platform to configure according to the actual shipment situation.

[0071] Based on the above embodiments, as an optional embodiment, before scanning the device code corresponding to at least one first device to be shipped, order information is sent to the IoT platform so that the IoT platform determines the second mapping relationship between the first device and each space according to the order information. The order information includes at least one first device and the space to be installed for each of the at least one first device; receiving the second mapping relationship sent by the IoT platform; and classifying and packaging the at least one first device according to the second mapping relationship.

[0072] In this embodiment of the application, since the order information includes at least one first device and the space to be installed for each of the at least one first device, the order information is sent to the Internet of Things (IoT) platform so that the IoT platform can determine the second mapping relationship between the first device and each space based on the order information. That is, after obtaining the order information, the IoT platform classifies the first devices according to the different spaces so that the devices installed in the same space correspond to the same space.

[0073] In this embodiment of the application, the IoT platform sends a second mapping relationship to the management terminal. After receiving the second mapping relationship, the management terminal classifies and packages the first devices to be shipped out. That is, according to the correspondence between space and first device in the second mapping relationship, the first devices corresponding to the same space are grouped into one category and packaged together. This makes it easier for the installation personnel to install the first devices efficiently after they are delivered to the home. For example, the first devices corresponding to the same space are packaged in one box and the corresponding space label is affixed.

[0074] In this embodiment of the application, the order information can be generated by the management terminal based on the home furnishing customization order placed by the user. In the home furnishing customization order, the user will not only indicate the first device that needs to be purchased, but also indicate the space to be installed for each purchased first device through remarks or the corresponding space options for each device.

[0075] In the above solution, by sending order information to the IoT platform, the IoT platform can determine the second mapping relationship between the first device and the space based on the order information. After receiving the second mapping relationship sent by the IoT platform, the management terminal can classify and package the first device according to different spaces based on the second mapping relationship, realizing the pre-matching of the first device and the space. This allows the installation personnel to quickly install the first device after it is put into storage, reducing the time spent searching for the first device required in each space on-site and improving the work efficiency of the installation personnel.

[0076] Based on the above embodiments, as an optional embodiment, if it is determined that the identifier set contains each device in the second mapping relationship, the identifier set is sent to the Internet of Things platform to release at least one first device after classification and packaging.

[0077] In this embodiment, the management terminal determines whether the first device to be shipped out is consistent with the first device purchased by the user through the mapping relationship sent by the IoT platform. If it is determined that the identifier set contains each device in the second mapping relationship, it means that the device to be shipped out is consistent with the device purchased by the user, and there is no omission or mismatch. Therefore, the current identifier set is sent to the IoT platform so that the IoT platform pre-configures the first mapping relationship between the gateway and the second device, ensuring that the first device used by the IoT platform to build the first mapping relationship is completely consistent with the first device purchased by the user in terms of quantity and device type.

[0078] In this embodiment of the application, since the identifier set contains each device in the second mapping relationship, it means that the device to be shipped out is consistent with the device purchased by the user, and there is no missing or mismatched situation. Therefore, it means that the current classification and packaging can be directly shipped out to the user. Thus, shipping out at least one first device after classification and packaging ensures that the first device to be shipped out is complete and accurate before shipping out, reducing the situation of missing and mismatched situations and improving the overall user satisfaction.

[0079] In this embodiment, staff can scan the first device according to the second mapping relationship. For example, the second mapping relationship is displayed in a visual form on the management terminal held by the staff. For example, the visual interface classifies different devices according to space, such as bedroom, living room, toilet, custom space, etc. The first device corresponding to each space is located under the corresponding space category, so that the staff can determine whether the displayed first device is consistent with the first device to be shipped by scanning the classified and packaged first devices to be shipped one by one.

[0080] In this embodiment of the application, if it is determined that the identifier set does not contain each device in the second mapping relationship, an alarm message is displayed; the alarm message is used to indicate that there is a missing device in the first device to be shipped out.

[0081] In this embodiment of the application, if it is determined that the identifier set does not contain each device in the second mapping relationship, it means that the first device to be shipped out is inconsistent with the first device already purchased by the user. Therefore, an alarm message is displayed to indicate that there is a missing device in the first device to be shipped out, so as to instruct the staff to handle it.

[0082] In the above scheme, before sending the identifier set, the identifier set will only be sent to the IoT device and at least one first device after classification and packaging will be shipped out if it is confirmed that the identifier set contains each device in the second mapping relationship. This ensures that the first device used by the IoT platform to build the first mapping relationship is completely consistent with the first device purchased by the user in terms of quantity and device type. It also ensures that the first device to be shipped out will only be shipped out if the first device to be shipped out is complete and accurate. This achieves complete consistency between the first device in the built first mapping relationship and the first device actually shipped out, avoiding the occurrence of missing first devices, missing configurations, and missing binding between the subsequent gateway and the second device.

[0083] like Figure 4 The diagram shows an interactive flowchart of a device binding method, the details of which are as follows: S401, The management terminal generates order information based on the purchase operation of the user terminal; S402, The management terminal sends order information to the IoT platform; S403, The IoT platform generates a second mapping relationship between the first device and each space based on the order information; S404, The IoT platform sends the second mapping relationship to the management terminal; S405. The management terminal classifies and packages the first device according to the second mapping relationship; S406. The management terminal scans the device identifier of the first device to obtain the identifier set; S407. If the management terminal determines that the identifier set contains each device in the second mapping relationship, then the first device is issued from the warehouse. S408, The management terminal sends the identifier set to the IoT platform; S409. The IoT platform constructs a first mapping relationship between the gateway and the second device based on the identifier set; S410. If the IoT platform determines that the gateway has completed the binding with the user's user identifier, it determines whether the first mapping relationship corresponding to the gateway is stored. S411. After determining that the first mapping relationship corresponding to the gateway is stored, the IoT platform sends an instruction message to the gateway. S412. The gateway binds the second device in the first mapping relationship according to the instruction information.

[0084] In one example, a user places an order for the first device through a user terminal. The management terminal generates order information based on the user's order and sends it to the IoT platform. The IoT platform generates a second mapping relationship between the first device and its location based on the order information and returns this second mapping relationship to the management terminal. The management terminal then categorizes and packages the first devices according to this second mapping relationship. It scans the device codes of the first devices awaiting shipment using a mini-program, obtains an identifier set, and sends it to the IoT platform. The IoT platform generates a triplet for each first device based on the identifier set, obtains the gateway identifier, and establishes a first mapping relationship between the gateway identifier and the second device identifier. After the first devices arrive at the user's home, installers install each device according to the second mapping relationship and check the device's network connectivity. The IoT platform establishes a binding relationship between user identifiers and gateway identifiers by scanning the gateway through the corresponding application. In response to confirming the binding is complete, the IoT platform checks whether the gateway has a corresponding first mapping relationship. If the first mapping relationship is confirmed, the IoT platform sends an MQTT command to the gateway to confirm whether to bind the second device to be bound. After receiving the MQTT command, if the gateway decides to bind the second device, it sends a request to the IoT platform to obtain the first mapping relationship. The IoT platform sends the first mapping relationship to the gateway, and the gateway binds to each second device according to the first mapping relationship. After confirming that the binding with all second devices is complete, the gateway returns the binding result to the IoT platform for the IoT platform to register the binding relationship between the gateway and each second device.

[0085] The device binding method provided in this application is a multi-smart device networking binding method for home users, such as smart lighting, curtains, security, and sensing devices, which can be batch bound to a gateway. It is suitable for whole-house smart home renovation and new home decoration scenarios. It achieves end-to-end collaboration between order processing, warehousing, installation, and networking, solving the installation efficiency problem of integrated delivery of customized furniture and smart devices. It reduces the complexity of on-site installation and binding, lowers the professional requirements for installers, and achieves automated networking between the gateway and devices, improving networking efficiency and adaptability. It provides a standardized smart device installation and delivery process for home improvement companies and whole-house customization.

[0086] like Figure 5 As shown, a schematic diagram of a device binding system is provided, the details of which are as follows: The device binding system includes: user terminal 501, management terminal 502, IoT platform 503, and device terminal 504.

[0087] User terminal 501 is the terminal operated by the user, such as a mobile phone or computer. Its core functions are to initiate the purchase request for the first device and view the purchase order and the device installation and networking progress. The management terminal 502 includes the SAP system and warehouse management functions. The SAP system is used to generate order information containing home space information and the first device based on the first device purchased by the user terminal. The warehouse management function is used to scan the device code of the first device to be shipped to obtain the identification set and send the identification set to the IoT platform. Based on the second mapping relationship, it is confirmed whether there is any missing shipment. The IoT platform 503 includes an IoT SaaS platform and an IoT PaaS platform. The SaaS platform is used to realize order synchronization, generate a second mapping relationship based on order messages, and generate a first mapping relationship based on device identifiers. The PaaS platform is used to realize the generation of device triplet information, protocol conversion (HTTP→MQTT), and when the gateway identifier and user identifier are bound, instruct the gateway to bind each second device when each second device is powered on.

[0088] Device 504 includes a gateway and a second device. The gateway is used to bind the second device when it is powered on according to the instruction information. The gateway receives instructions from the IoT platform and broadcasts networking signals. The device responds to the signal to complete the self-organization and binding, and supports low power consumption and long-distance communication.

[0089] This application provides a device binding device for use on an Internet of Things (IoT) platform, such as... Figure 6 As shown, the device binding device 60 may include: a receiving module 601, an acquisition module 602, and an indication module 603.

[0090] Specifically, the receiving module 601 is used to receive an identifier set sent by the management terminal. The identifier set includes the device identifier of at least one first device to be shipped out. The device identifier of each first device is obtained by the management terminal scanning the device code corresponding to the first device. The device identifier is an identifier of the first device. The acquisition module 602 is used to acquire the gateway identifier of the gateway, establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set; when the at least one first device includes the gateway, the second device is any device other than the gateway among the at least one first device; when the at least one first device does not include the gateway, the second device is the first device. The instruction module 603 is used to respond to the completion of the binding between the gateway identifier and the user identifier. If it is determined that a first mapping relationship of the gateway is stored, the instruction module sends instruction information to the gateway to instruct the gateway to bind each second device when each second device is powered on. The instruction information includes the device identifier of at least one second device, and the user is the user who purchased the second device.

[0091] This application also provides a device binding device for use in management systems, such as... Figure 7As shown, the device binding device 70 may include a scanning module 701 and a sending module 702.

[0092] Scanning module 701 is used to scan the device code corresponding to at least one first device to be shipped out, and obtain an identifier set; the identifier set includes the device identifier of at least one first device; The sending module 702 is used to send an identifier set to the Internet of Things (IoT) platform, so that the IoT platform can establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set; if the at least one first device includes a gateway, the second device is any device other than the gateway among the at least one first device; if the at least one first device does not include a gateway, the second device is a first device.

[0093] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0094] This application provides an electronic device (computer device / equipment / system) including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the device binding method. Compared with related technologies, it can achieve the following: by receiving the device identifier of at least one first device to be shipped out from the warehouse sent by the management terminal, since the device identifier is obtained by the management terminal after scanning the device code corresponding to the first device, the IoT platform can determine the device identifier of the second device to be bound to the gateway based on the actual shipping situation. Obtain the gateway identifier of the gateway, establish and store the first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set. Since the second device is any device other than the gateway among the first devices when the at least one device includes the gateway, and the second device is the first device when the first device does not include the gateway, the gateway corresponding to the gateway identifier that establishes the first mapping relationship with the device identifier of the second device can be either the gateway to be shipped together with the second device or a pre-determined gateway, ensuring that the first mapping relationship can be pre-established in both of the above cases. Once the binding between the gateway identifier and the user's user identifier is completed, it indicates that the first device has been installed in the home. If the first mapping relationship of the gateway is stored, the second device that the gateway needs to bind can be determined based on the first mapping relationship. Therefore, an instruction message is sent to the gateway to instruct the gateway to bind each second device when it is powered on. This avoids the problem of the installation technician configuring each second device to bind to the gateway one by one, which leads to a cumbersome binding process and operational errors, and improves the efficiency of binding the gateway to multiple devices.

[0095] In one alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0096] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0097] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0098] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0099] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0100] The electronic device package may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0101] This application provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program can implement the steps and corresponding content of the aforementioned method embodiments. Compared with the prior art, it can achieve the following: by receiving the device identifier of at least one first device to be shipped from the warehouse sent by the management terminal, since the device identifier is obtained by the management terminal scanning the device code corresponding to the first device, the IoT platform can determine the device identifier of the second device to be bound to the gateway based on the actual shipment situation. Obtain the gateway identifier of the gateway, establish and store the first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set. Since the second device is any device other than the gateway among the first devices when the at least one device includes the gateway, and the second device is the first device when the first device does not include the gateway, the gateway corresponding to the gateway identifier that establishes the first mapping relationship with the device identifier of the second device can be either the gateway to be shipped together with the second device or a pre-determined gateway, ensuring that the first mapping relationship can be pre-established in both of the above cases. Once the binding between the gateway identifier and the user's user identifier is completed, it indicates that the first device has been installed in the home. If the first mapping relationship of the gateway is stored, the second device that the gateway needs to bind can be determined based on the first mapping relationship. Therefore, an instruction message is sent to the gateway to instruct the gateway to bind each second device when it is powered on. This avoids the problem of the installation technician configuring each second device to bind to the gateway one by one, which leads to a cumbersome binding process and operational errors, and improves the efficiency of binding the gateway to multiple devices.

[0102] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium, a computer-readable medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0103] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments. Compared with the prior art, it can achieve: By receiving the device identifier of at least one first device to be shipped from the management terminal, since the device identifier is obtained by the management terminal after scanning the device code corresponding to the first device, the IoT platform can determine the device identifier of the second device to be bound to the gateway based on the actual shipping situation. Obtain the gateway identifier of the gateway, establish and store the first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device according to the identifier set. Since the second device is any device other than the gateway among the first devices when the at least one device includes the gateway, and the second device is the first device when the first device does not include the gateway, the gateway corresponding to the gateway identifier that establishes the first mapping relationship with the device identifier of the second device can be either the gateway to be shipped together with the second device or a pre-determined gateway, ensuring that the first mapping relationship can be pre-established in both of the above cases. Once the binding between the gateway identifier and the user's user identifier is completed, it indicates that the first device has been installed in the home. If the first mapping relationship of the gateway is stored, the second device that the gateway needs to bind can be determined based on the first mapping relationship. Therefore, an instruction message is sent to the gateway to instruct the gateway to bind each second device when it is powered on. This avoids the problem of the installation technician configuring each second device to bind to the gateway one by one, which leads to a cumbersome binding process and operational errors, and improves the efficiency of binding the gateway to multiple devices.

[0104] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the illustrations or text descriptions.

[0105] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0106] The above are only optional implementation methods for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application, without departing from the technical concept of this application, also fall within the protection scope of the embodiments of this application.

Claims

1. A device binding method, characterized in that, Applied to an Internet of Things (IoT) platform, the method includes: The system receives a set of identifiers sent by the management terminal. The set of identifiers includes the device identifiers of at least one first device to be shipped out. The device identifier of each first device is obtained by the management terminal scanning the device code corresponding to the first device. The device identifier is an identifier of the first device. Obtain the gateway identifier of the gateway, establish and store a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set; if the at least one first device includes a gateway, the second device is any device other than the gateway among the at least one first device; if the at least one first device does not include a gateway, the second device is the first device. In response to the binding between the gateway identifier and the user identifier, if a first mapping relationship of the gateway is determined to be stored, an indication message is sent to the gateway to instruct the gateway to bind each second device when each second device is powered on; the indication message includes the device identifier of the at least one second device, and the user is the user who purchased the second device.

2. The method according to claim 1, characterized in that, The identifier set also includes the product identifier of the first device, wherein the product identifier is the identifier of the category to which the first device belongs; Establishing and storing a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set includes: Obtain the product identifier and device identifier of the first device; For each first device, if the IoT platform stores the product identifier and device key corresponding to the device identifier of the first device, then a first mapping relationship is established and stored between the gateway identifier of the gateway and at least one second device.

3. The method according to claim 1, characterized in that, The set of identifiers sent by the receiving management terminal previously included: Receive order information sent by the management terminal, the order information including the at least one first device, and the space to be installed in each of the at least one first device; Determine the second mapping relationship between the at least one first device and each space based on the order information; The second mapping relationship is sent to the management terminal so that the management terminal instructs the at least one first device to be classified, packaged, and shipped out according to the second mapping relationship.

4. The method according to claim 1, characterized in that, The step of establishing and storing a first mapping relationship between the gateway identifier and at least one second device based on the identifier set includes: If it is determined that the identifier set includes the gateway identifier of the gateway, then a first mapping relationship between the gateway identifier of the gateway and at least one second device is established and stored; If it is determined that the gateway identifier does not include the gateway identifier in the identifier set, then the gateway identifier corresponding to the pre-stored user identifier is obtained, and a first mapping relationship between the gateway identifier and at least one second device is established and stored. The pre-stored correspondence between user identifiers and gateway identifiers is sent by the management terminal; The correspondence between the user identifier and the gateway identifier is obtained by the management terminal through the user's user terminal when it is confirmed that the first device does not contain a gateway.

5. A device binding method, characterized in that, Applied to the management end, the method includes: Scan the device code corresponding to at least one first device to be shipped out to obtain an identifier set; the identifier set includes the device identifier of the at least one first device. The identifier set is sent to the IoT platform so that the IoT platform establishes and stores a first mapping relationship between the gateway identifier of the gateway and the device identifier of at least one second device based on the identifier set; if the at least one first device includes a gateway, the second device is any device other than the gateway among the at least one first device; if the at least one first device does not include a gateway, the second device is the first device.

6. The method according to claim 5, characterized in that, The step of scanning the device code corresponding to at least one first device to be shipped out also includes: Order information is sent to the IoT platform so that the IoT platform can determine a second mapping relationship between the first device and each space based on the order information; the order information includes the at least one first device and the space to be installed for each of the at least one first device; Receive the second mapping relationship sent by the IoT platform; The at least one first device is classified and packaged according to the second mapping relationship.

7. The method according to claim 6, characterized in that, Sending the identifier set to the IoT platform includes: If it is determined that the identifier set contains each device in the second mapping relationship, then the identifier set is sent to the IoT platform; The step of sending the identifier set to the IoT platform further includes: At least one first device after being classified and packaged is shipped out of the warehouse.

8. The method according to claim 7, characterized in that, The method further includes: If it is determined that the set of identifiers does not contain each device in the second mapping relationship, an alarm message is displayed; the alarm message is used to indicate that there is a missing device in the first device to be shipped out.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-8.