Methods and apparatuses for device connection, chip, storage medium and program product

By registering at the device and selecting the device to establish a connection based on the registration situation, the problem of unnecessary connection after the device wakes up is solved, and resource conservation and business continuity are achieved.

WO2024259618A1PCT designated stage expired Publication Date: 2024-12-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/101614
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2024-12-26

AI Technical Summary

Technical Problem

In a communication system, devices may establish unnecessary connections with multiple devices in a connectable state or wake-up state, resulting in waste of resources, especially intermittent sleep or wake-up devices may be randomly or sequentially with multiple devices after wake-up The device establishes a connection, resulting in waste of resources.

Method used

When a second device is successfully registered at the first device, it is decided whether to send a message to it to establish a connection based on the device registration situation, so as to ensure that only a device with a successful registration and information interaction requirement is established.

Benefits of technology

It effectively avoids unnecessary connection establishment, saves resources, and improves business continuity and efficiency after device wake-up.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023101614_26122024_PF_FP_ABST
    Figure CN2023101614_26122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided are methods and apparatuses for device connection, a chip, a storage medium, and a program product. A method for device connection comprises: a first device receives a registration request, the registration request being used for registering a second device, the successful registration of the second device being used for instructing the first device to send to the second device a first message when changing to a connectable state or entering a wake-up state, and the first message being used for instructing the second device to establish a connection with the first device.
Need to check novelty before this filing date? Find Prior Art

Description

Method and apparatus for device connection, chip, storage medium, and program product Technical Field

[0001] The present application relates to the field of communication technology, and more specifically, to a method and apparatus, chip, storage medium, and program product for device connection. Background Art

[0002] In a communication system, a device may establish connections with multiple devices while in a connectable or awake state. For example, an intermittently connected device (ICD) may intermittently sleep or wake up to conserve power. During each wakeup, such a device may establish connections with multiple devices. Alternatively, a device that temporarily goes dormant due to a power outage may also establish connections with multiple devices upon reawakening. However, some connections are unnecessary, for example, when the two parties establishing a connection do not need to exchange information, resulting in a waste of resources.

[0003] To avoid wasting resources, a device can select some of the multiple devices to establish connections with when it is in a connectable or awake state. Therefore, how the device selects some of the devices to establish connections with is a problem that needs to be solved.

[0004] Summary of the Invention

[0005] The present application provides a method and apparatus, a chip, a storage medium, and a program product for device connection. The following introduces various aspects of the present application.

[0006] In a first aspect, a method for device connection is provided, including: a first device receiving a registration request, the registration request being used to register a second device; wherein, successful registration of the second device is used to indicate that the first device changes to a connectable state or enters an awake state and sends a first message to the second device, the first message being used to instruct the second device to establish a connection with the first device.

[0007] In a second aspect, a method for device connection is provided, including: a second device receives a first message sent by a first device, the first message being used to instruct the second device to establish a connection with the first device, the first message being sent when the second device successfully registers at the first device and the first device changes to a connectable state or enters a wake-up state.

[0008] According to a third aspect, a method for device connection is provided, comprising: a third device sends a registration request to a first device, wherein the registration request is used to register a second device; wherein the successful registration of the second device is used to indicate that the first device changes to a connectable state or enters an awake state and sends a first message to the second device, wherein the first message is used to instruct the second device to establish a connection with the first device.

[0009] In a fourth aspect, a device for device connection is provided, which is applied to a first device and includes: a first receiving module for receiving a registration request, which is used to register a second device; wherein the successful registration of the second device is used to indicate that the first device changes to a connectable state or enters a wake-up state and sends a first message to the second device, and the first message is used to instruct the second device to establish a connection with the first device.

[0010] In the fifth aspect, a device for device connection is provided, which is applied to a second device and includes: a receiving module for receiving a first message sent by a first device, the first message being used to instruct the second device to establish a connection with the first device, and the first message being sent when the second device successfully registers at the first device and the first device changes to a connectable state or enters a wake-up state.

[0011] In the sixth aspect, a device for device connection is provided, which is applied to a third device, and the device includes: a sending module for sending a registration request to a first device, and the registration request is used to register a second device; wherein, the successful registration of the second device is used to indicate that the first device changes to a connectable state or enters a wake-up state and sends a first message to the second device, and the first message is used to instruct the second device to establish a connection with the first device.

[0012] In the seventh aspect, a device for device connection is provided, comprising a processor, a memory, and a communication interface, wherein the memory is used to store one or more computer programs, and the processor is used to call the computer program in the memory so that the device performs some or all of the steps in the methods of the above aspects.

[0013] In an eighth aspect, an embodiment of the present application provides a communication system, which includes the above-mentioned device for connecting devices. In another possible design, the system may also include other devices that interact with the device in the solution provided in the embodiment of the present application.

[0014] In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute part or all of the steps in the methods of the above aspects.

[0015] In a tenth aspect, an embodiment of the present application provides a computer program, which enables a computer to execute part or all of the steps in the methods of the above aspects.

[0016] In an eleventh aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform some or all of the steps of the methods described in each of the above aspects. In some implementations, the computer program product may be a software installation package.

[0017] In the twelfth aspect, an embodiment of the present application provides a chip, which includes a memory and a processor. The processor can call and run a computer program from the memory to implement some or all of the steps described in the methods of the above aspects.

[0018] In an embodiment of the present application, a second device can be registered with a first device so that when the first device changes to a connectable state or enters an awake state, a connection can be established with the successfully registered second device. In other words, when the first device changes to a connectable state or enters an awake state, it can choose to establish a connection with the successfully registered second device based on the device registration status. In this way, the embodiment of the present application helps avoid the establishment of unnecessary connections, thereby helping to save resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] FIG1 is a diagram illustrating an example of a system architecture of a wireless communication system to which an embodiment of the present application may be applied.

[0020] FIG2 is a flow chart of a method for device connection provided in an embodiment of the present application.

[0021] FIG3 is a flowchart of a method for registering a second device provided in an embodiment of the present application.

[0022] FIG4 is a possible implementation method for determining whether a subscription relationship exists provided in an embodiment of the present application.

[0023] FIG5 is a flowchart of a method for registering a second device provided in another embodiment of the present application.

[0024] FIG6 is a flowchart of a method for registering a second device provided in yet another embodiment of the present application.

[0025] FIG7 is a flowchart of a method for registering a second device provided in yet another embodiment of the present application.

[0026] FIG8 is a flowchart of a method for registering a second device provided in yet another embodiment of the present application.

[0027] FIG9 is a schematic structural diagram of an apparatus for connecting devices provided in an embodiment of the present application.

[0028] FIG10 is a schematic structural diagram of an apparatus for connecting devices provided in another embodiment of the present application.

[0029] FIG11 is a schematic structural diagram of an apparatus for connecting devices provided in yet another embodiment of the present application.

[0030] FIG12 is a schematic structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0032] FIG1 is a diagram illustrating an exemplary system architecture of a wireless communication system 100 to which embodiments of the present application may be applied. As shown in FIG1 , the wireless communication system 100 may include a first device 110 and a second device 120. The first device 110 and the second device 120 may communicate with each other. As an implementation, the first device 110 and the second device 120 may establish a connection via a wired connection (e.g., a USB interface) or a wireless connection (e.g., Bluetooth or a mobile network) to enable communication.

[0033] The first device 110 and the second device 120 may belong to the same IoT system, or in other words, the first device 110 and the second device 120 may belong to the same ecosystem. In other words, the first device 110 and the second device 120 may be IoT devices in the same IoT system or the same ecosystem.

[0034] The Internet of Things (IoT), or "Internet of Everything," is an extension and expansion of the Internet. Through various information sensing devices (such as radio frequency identification and global positioning systems), any object can be connected to the Internet to form a vast network for information exchange and communication, enabling interconnection and interoperability between all things. In some embodiments, IoT devices can be smart home devices, such as smart air conditioners, smart refrigerators, washing machines, rice cookers, and robot vacuums. In some embodiments, IoT devices can be smart monitoring devices, such as surveillance cameras, temperature sensors, and sound sensors.

[0035] In some embodiments, the first device 110 and the second device 120 may be located in the same network. For example, the first device 110 and the second device 120 may both be located in a home network.

[0036] It should be noted that there are generally multiple home networks within the entire network, and devices within these networks can communicate with each other. A home network primarily consists of two major components: a home smart gateway and the IoT devices associated with the home smart gateway. The home smart gateway serves as a bridge connecting the entire home network with the external network. It receives signals from the external network and transmits them to an IoT device via the home network. In other words, the home smart gateway can be considered the central device for home intelligence. The home smart gateway enables system information collection, input and output, as well as centralized, remote, and coordinated control of various IoT devices. The connection between the home smart gateway and IoT devices can be diverse, including Ethernet, Bluetooth (BT), wireless fidelity (WIFI), ZigBee, and other methods.

[0037] In some embodiments, the first device 110 may be an electronic device capable of intermittent sleep or intermittent wakeup. In other words, the first device 110 may be an electronic device capable of intermittently being in a sleep state or intermittently being in an awake state. Intermittent sleep or intermittent wakeup of the first device 110 may save power.

[0038] In some embodiments, the first device 110 being in a dormant state may also be understood as the first device 110 being in an idle mode or idle state. The first device 110 being in an awake state may also be understood as the first device 110 being in an active mode, an activated state, or a working state.

[0039] In some embodiments, the first device 110 may be put into sleep periodically or regularly. For example, the first device 110 may be put into sleep every 2 minutes.

[0040] In some embodiments, the first device 110 may sleep randomly or irregularly. For example, the first device 110 sleeps once at an interval of 2 minutes, and may sleep at an interval of 3 minutes next time.

[0041] In some embodiments, the sleep or wake-up of the first device 110 may be triggered by an event, or in other words, the first device may enter a sleep state or a wake-up state based on the occurrence of certain events. For example, if the first device 110 is a temperature sensor or a smoke sensor, the temperature sensor or smoke sensor can sense an alarm event (for example, sensing a temperature exceeding a certain threshold, or sensing a smoke concentration exceeding a certain threshold) when in the wake-up state. After the temperature sensor or smoke sensor senses the alarm event, the temperature sensor or smoke sensor may enter a sleep state after reporting the alarm event.

[0042] The embodiments of the present application do not specifically limit the sleep time (or sleep length, sleep duration, etc.) of the first device 110 and / or the wake-up time (or wake-up length, wake-up duration, etc.) of the first device 110. Taking the sleep time as an example, the sleep time of the first device 110 can be the same each time. As an example, the sleep time of the first device 110 is 1 minute each time. In some embodiments, the sleep time of the first device 110 can vary. As an example, the sleep time of the first device 110 is 1 minute on a certain occasion, and the sleep time changes to 2 minutes on the next occasion, etc.

[0043] The embodiment of the present application does not specifically limit the configuration method of the sleep time of the first device 110 and / or the wake-up time of the first device 110. As an implementation method, the sleep time of the first device 110 and / or the wake-up time of the first device 110 can be configured by the configuration device of the first device. This configuration method is more flexible, and the sleep time of the first device 110 and / or the wake-up time of the first device 110 can be modified later by the configuration device. As another implementation method, the sleep time of the first device 110 and / or the wake-up time of the first device 110 can be hard-coded in the first device by firmware or software, that is, the sleep time of the first device 110 and / or the wake-up time of the first device 110 cannot be changed by software configuration. This configuration method can ensure the security of the configuration.

[0044] In some embodiments, the first device 110 can operate on a limited power source. For example, the first device 110 can operate on a battery. Alternatively, the first device 110 can operate on a limited energy scavenging power source.

[0045] In some embodiments, the first device 110 may be an ICD. An ICD needs to periodically go into sleep mode to save power. An ICD is typically powered by a battery.

[0046] In some embodiments, the first device 110 may refer to a resource-constrained device. The embodiments of the present application do not limit the type of resource constraints of a resource-constrained device. For example, the resource constraints of a device may refer to one or more of the device's computing resources, storage resources, network resources, and power resources being constrained. Alternatively, the resource constraints of a device may refer to the device's hardware resources and / or software resources being constrained. For example, the first device 110 may be a device with one or more of computing resources, storage resources, and network resources being constrained; or, the first device 110 may be a device with hardware resources and / or software resources being constrained.

[0047] In some embodiments, the first device 110 may be a low-power device, such as a wearable device.

[0048] As an example, the first device 110 may be a smart sensor that intermittently sleeps or wakes up, such as a smoke sensor or a temperature sensor. For example, if the first device 110 is a smoke sensor, the first device 110 may need to periodically measure smoke data or send an alarm message to the second device 120 when an alarm event occurs. However, when the first device 110 does not need to measure smoke data or send an alarm message, it can sleep.

[0049] In some embodiments, the first device 110 may be a device that does not take energy-saving measures. For example, the first device 110 may be a device that is normally working. The first device 110 may be put into sleep mode due to a sudden power outage or other reasons, and after waking up, it may establish connections with multiple devices.

[0050] The first device 110 may have a communication module, for example, the first device 110 may be an electronic device with a short-range communication function, such as one or more of Bluetooth, WIFI, Zigbee, etc.

[0051] In some embodiments, the first device can establish a connection with other devices in a first state, but cannot establish a connection with other devices in a second state.

[0052] In some embodiments, the first state may include one or more of the following states: connectable state, awake state, power-on state, open state, active state, non-energy-saving state, normal working state, etc.

[0053] In some embodiments, the second state may include one or more of the following states: unconnectable state, sleep state, power-off state, closed state, idle state, energy-saving state, abnormal working state, etc.

[0054] In some embodiments, the state of the first device 110 may include a connectable state and an unconnectable state. When the first device 110 is in the connectable state, it can establish a connection with other devices. When the first device 110 is in the unconnectable state, it cannot establish a connection with other devices, or cannot establish a connection with other devices.

[0055] In some embodiments, the state of the first device 110 may include an awake state and a dormant state. When the first device is in the awake state, it can establish a connection with other devices. When the first device 110 is in the dormant state, it cannot establish a connection with other devices, or cannot establish a connection with other devices.

[0056] The second device 120 can be connected to the first device 110 to exchange information. In some embodiments, the second device 120 can be, for example, a handheld smart terminal, such as a smartphone, a tablet computer, etc. In some embodiments, the second device 120 can also be a wearable device, such as a smart watch, a smart bracelet, etc.

[0057] In some embodiments, the second device 120 can be a hub device for the first device 110, such as a local hub device. When the second device 120 acts as a hub device for the first device 110, the second device 120 can control the first device 110. It should be understood that the "local hub device" mentioned in the embodiments of the present application is used to emphasize that the second device 120 is a local device that can control and manage the first device 110.

[0058] In some embodiments, the hub device may store the request for the first device so as to send the stored request to the first device during the wake-up window of the first device.

[0059] The hub devices mentioned in the embodiments of the present application may include multiple types, and the embodiments of the present application are not limited to this. For example, the hub device may be a terminal device, such as a handheld smart terminal, a computer, a tablet computer, etc. Alternatively, the hub device may be a smart gateway (for example, the home smart gateway mentioned above), a router, or other devices.

[0060] In some embodiments, the second device 120 may include a "shadow device" of the first device 110. For example, the second device 120 may be a hub device that includes a "shadow device" of the first device 110. In this case, after the first device changes to a connectable state or enters an awake state, it will synchronize messages with the "shadow device" so that the user can indirectly operate the first device 110 by operating the "shadow device". In the solution of using a "shadow device" to operate the first device 110, the physical device that carries the "shadow device" is very demanding, and a series of solutions that support data twins are required, including but not limited to the selection of the "shadow device" carrier, the generation of the "shadow device", and the message synchronization solution corresponding to the first device 110 and the "shadow device". The entire system is highly complex.

[0061] It should be understood that the message synchronization between the first device 110 and the "shadow device" can be replaced by the synchronization of messages between the first device 110 and its corresponding "shadow device" (i.e., virtual device). As an implementation method, the first device 110 can send its status information to the "shadow device" through the cloud. The "shadow device" saves the status information of the first device 110 in the cloud and synchronizes it to other applications that have subscribed to the first device 110 to achieve sharing and synchronization of the first device status information. In this way, when a communication problem occurs between the first device 110 and the cloud, the application can still obtain the latest status information of the first device 110, thereby ensuring the reliability and stability of the first device 110.

[0062] In some embodiments, the second device 120 may be a proxy device for the first device 110 .

[0063] In some embodiments, the second device 120 may be a relay device for the first device 110 .

[0064] However, the embodiments of the present application are not limited to this. The second device 120 can be any device that communicates or interacts with the first device 110. For example, the second device 120 can be an administrator device of the first device 110, that is, the second device 120 has administrator authority of the first device 110; or, a subscription relationship can exist between the second device 120 and the first device 110, so that the second device 120 can subscribe to resource data of the first device 110.

[0065] Figure 1 exemplarily shows a first device 110 and a second device 120, but the embodiments of the present application are not limited thereto. Optionally, the wireless communication system 100 may include multiple first devices and / or multiple second devices. For example, a first device may report data to multiple second devices and establish connections with multiple second devices; or a second device may receive data reported by multiple first devices and establish connections with multiple first devices.

[0066] Optionally, the wireless communication system 100 may further include other devices, which are not limited in this embodiment of the present application. For example, the first device 110 may communicate with other devices through the second device 120. For example, the first device 110 may control or access other devices through the second device 120. Optionally, in this scenario, the second device 120 may be understood as a proxy device, relay device, or bridge device.

[0067] It should be understood that the technical solutions of the embodiments of the present application can be applied to various communication systems, such as: fifth generation (5G) system or new radio (NR), long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD) system, Bluetooth system, WIFI system, etc. The technical solutions provided in this application can also be applied to future communication systems, such as the sixth generation mobile communication system, satellite communication system, etc.

[0068] In some embodiments, the first device and the second device in the embodiments of the present application may be referred to as a first terminal device and a second terminal device, respectively. The terminal device may also be referred to as user equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, mobile station (MS), mobile terminal (MT), remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device.

[0069] The first device and the second device in the embodiments of the present application may refer to devices that provide voice and / or data connectivity to users, and may be used to connect people, objects, and machines, such as handheld devices and vehicle-mounted devices with wireless connection capabilities. For example, the first device and / or the second device in the embodiments of the present application may be a mobile phone, a tablet computer (Pad), a laptop computer, a PDA, a mobile internet device (MID), a wearable device, an Internet of Things (IoT) device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc.

[0070] The embodiments of this application do not limit the types of IoT devices. In some embodiments, IoT devices may include smart transportation vehicles, ships, and other smart travel tools. In some embodiments, IoT devices may include smart home appliances such as smart TVs, smart air conditioners, smart refrigerators, and robot vacuums. In some embodiments, IoT devices may include smart monitoring devices such as surveillance cameras, temperature sensors, and sound sensors.

[0071] Furthermore, when the IoT device is a vehicle, the vehicle may be, for example, a family car, a taxi, a bus, a motorcycle, etc.; when the IoT device is a smart air conditioner, the smart air conditioner may be, for example, a floor-standing air conditioner, a wall-mounted air conditioner, etc., and this application does not limit this.

[0072] In some embodiments, the first device 110 and the second device 120 may be different types of devices to enable information exchange between the different types of devices. For example, the first device 110 may be an IoT device (e.g., a smart sensor, a smart air conditioner, etc.), and the second device 120 may be a handheld terminal device such as a mobile phone or a tablet computer. Based on this, the handheld terminal device can control the IoT device (smart sensor, smart air conditioner, etc.).

[0073] In some embodiments, the first device 110 and the second device 120 may be devices from different manufacturers to enable information exchange between devices from different manufacturers. For example, the first device 110 may be a device from a first manufacturer, and the second device 120 may be a device from a second manufacturer (different from the first manufacturer).

[0074] The embodiments of the present application do not limit the scenarios in which the first device and the second device are located. For example, the first device and the second device can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted.

[0075] It should be understood that all or part of the functions of the communication device in this application can also be implemented through software functions running on hardware, or through virtualization functions instantiated on a platform (such as a cloud platform).

[0076] As mentioned above, the first device may be a device that is intermittently dormant or intermittently awakened. When the first device is in the first state (connectable state, awake state, etc.) or the second state (such as unconnectable state, dormant state) mentioned above, some problems may occur. The following takes the first device in the dormant state and the awakened state as an example to introduce the problems that may occur in the first device.

[0077] In some scenarios, when the first device is in a dormant state, the business continuity of the first device and other devices (for example, the second device) will be affected. In other words, the business continuity of the first device and other devices will be disrupted by the dormancy of the first device. This is because the first device needs to close the connection with other devices when it is in a dormant state, and the closure of the connection may cause damage to the continuity of some businesses. Taking the subscription scenario as an example, suppose that the two parties to the subscription have agreed that the subscriber (subscribed device) needs to reply a message to the subscriber (subscribing device) every certain period of time (for example, 1 minute) to confirm the existence of the subscription relationship. Then if the subscriber is a device that is intermittently dormant or intermittently awakened and the subscriber's dormant time exceeds the reply message time negotiated by the two parties to the subscription (such as the 1 minute mentioned above), then the subscriber may think that the subscriber has lost or closed the subscription relationship and may need to re-subscribe, resulting in the disruption of business continuity.

[0078] In some scenarios, after the first device enters the awake state, the first device and another device (e.g., the second device) need to establish a connection (e.g., restore the connection, re-establish a new connection, etc.) to complete information exchange during the first device's awake cycle. For example, after waking up, the first device may need to establish a connection with the hub device in a timely manner to notify the hub device of information or report its online status; or after waking up, the first device may need to establish a connection with the "shadow device" in a timely manner to synchronize messages, etc.

[0079] In some embodiments, after the first device enters the awake state, it can actively establish a connection with another device. For example, the first device can actively send a connection request to the other device. In some embodiments, after the first device enters the awake state, it can receive a connection request from the other device to establish a connection with the other device.

[0080] It should be noted that after the first device enters the awake state, it can restore the connection with the other device if the necessary information for restoring the connection is complete. Otherwise, the connection needs to be re-established. The embodiments of the present application do not specifically limit the necessary information for restoring the connection, for example, including a shared key between devices, a recovery session ID, a device ID, etc.

[0081] As can be seen from the above description, in some scenarios, the first device may establish connections with multiple devices after waking up. For example, an intermittently connected device (ICD) may intermittently sleep or wake up to save power. Such a device may establish connections with multiple devices each time it wakes up. Alternatively, some devices may go into sleep due to a temporary power outage and may establish connections with multiple devices after waking up again. However, some connections are unnecessary, for example, the two parties establishing the connection may not have the need to exchange information, resulting in a waste of resources.

[0082] In order to avoid wasting resources, the first device may choose to establish connections with some of the multiple devices. Therefore, how the first device selects some of the multiple devices to establish connections is a problem that needs to be solved.

[0083] As a possible implementation method, the first device may randomly select some devices to establish a connection. As another possible implementation method, the first device may select some devices to establish a connection based on the principle of "first come, first served". However, when the first device selects the devices to establish a connection in the above manner, it may still lead to the establishment of unnecessary connections, resulting in a waste of resources. For example, considering that the process of establishing a connection is long, the first device may enter a dormant state soon during or after establishing a connection with some of the multiple devices, or there may be no need for information exchange after the two devices are connected, resulting in a waste of resources.

[0084] In addition, if other devices actively establish connections after the first device wakes up, the first device may receive a large number of connection request messages. For other devices, this method is a random collision among a large number of connection requests to determine whether they can receive a response from the first device, which theoretically wastes a lot of network resources.

[0085] In summary, when a device changes to a first state (e.g., a connectable state or an awake state), how to select some devices to establish a connection is a problem that needs to be solved. This is especially true for devices that intermittently sleep or wake up, and how to select some devices from multiple devices to establish a connection after the device wakes up is an urgent problem that needs to be solved.

[0086] To address the above issues, embodiments of the present application provide a method and apparatus, chip, storage medium, and program product for device connection. When a first device changes to a first state, the method can selectively select and establish a connection with a successfully registered device based on the device registration status at the first device. This helps avoid unnecessary connections and thus helps conserve resources. The following describes embodiments of the method of the present application, taking the first state including a connectable state or an awake state as an example, with reference to the accompanying drawings.

[0087] FIG2 is a flow chart of a method for connecting devices according to an embodiment of the present application. The method shown in FIG2 is described from the perspective of interaction between a first device and a second device. The first device and the second device may be, for example, the first device 110 and the second device 120 shown in FIG1 , respectively.

[0088] In some embodiments, the first device may be a device that has implemented certain energy-saving measures. For example, the first device may be a device that is intermittently in a dormant state or an intermittently awake state. As an example, the first device may be an IoT device, such as a wearable device, a smart sensor, or a smart air conditioner.

[0089] However, the embodiments of the present application are not limited thereto, and the first device may refer to any device that needs to establish a connection with another device. For example, in some embodiments, the first device may refer to a device that does not implement energy-saving measures, such as a device that is normally operating but has gone into hibernation due to a sudden power outage or other reasons, and needs to establish a connection with another device after being reawakened.

[0090] The second device may establish a connection with the first device so that the two devices can exchange information. For example, the second device may be a handheld smart terminal, such as a mobile phone, a tablet computer, or the like.

[0091] As an example, the second device can be a proxy device, relay device, bridge device, etc. of the first device. As another example, the second device can be a subscriber device of the first device, that is, the second device can subscribe to the resources of the first device. As another example, the second device can be a "shadow device" of the first device, etc.

[0092] In the embodiment of the present application, the second device refers to a device to be registered at the first device. After the second device successfully registers at the first device, the first device can notify the second device when it changes to a connectable state and enters an awake state, so that the two can establish a connection.

[0093] The method shown in FIG2 may include step S210 , which is described in detail below.

[0094] In step S210, the first device receives a registration request for registering the second device.

[0095] In some embodiments, the registration request for registering the second device can be understood as requesting the first device to send a first message to the second device when it changes to a connectable state or enters an awake state, so that the second device establishes a connection with the first device.

[0096] In some embodiments, the registration request for registering the second device may include: the registration request is used to register relevant information of the second device at the first device, so that the first device sends a first message to the successfully registered second device when the first device changes from an unconnectable state to a connectable state, or so that the first device sends a first message to the successfully registered second device when the first device enters an awake state from a sleep state.

[0097] The embodiments of the present application do not specifically limit the device that sends the registration request (or, the device that sends the registration request, the sender of the registration request, etc.). In some embodiments, the registration request may be sent by the second device itself. In some embodiments, the registration request may be sent by a device other than the second device, for example, the registration request may be sent by a third device. In some embodiments, the third device that sends the registration request may be any device other than the second device, for example, the third device may be any device that has access rights to the first device. As an implementation method, the third device that sends the registration request may be an administrator device of the first device, or in other words, the third device may have administrator rights of the first device. However, the embodiments of the present application are not limited to this, and the third device may also be a device that has operation rights, management rights, or other rights of the first device.

[0098] Other details about registering the second device with the first device will be introduced in detail later. For the sake of brevity, they will not be repeated here.

[0099] In some embodiments, the successful registration of the second device may be used to instruct the first device to send a first message to the second device when the first device changes to a connectable state or enters an awake state. The first message is used to instruct the second device to establish a connection with the first device. In other words, the first device may determine whether to send the first message to the second device when the first device changes to a connectable state or enters an awake state based on the second device's registration status with the first device.

[0100] As an implementation, if the second device successfully registers with the first device, the first device may send the first message to the second device in response to the first device changing to a connectable state or entering an awake state. As another implementation, if the second device fails to register with the first device, the first device does not send the first message to the second device after changing to a connectable state or entering an awake state.

[0101] Therefore, in the embodiments of the present application, in some embodiments, the method may further include a scheme in which the first device determines whether to send the first message to the second device based on the registration status of the second device, which will be described below in conjunction with Figure 2.

[0102] In some embodiments, the method of the embodiment of the present application may further include step S220. In step S220, when the second device is successfully registered, in response to the first device changing to a connectable state or entering an awake state, the first device sends a first message to the second device. The first message is used to instruct the second device to establish a connection with the first device.

[0103] In some embodiments, the first device changing to a connectable state may mean that the first device can currently establish a connection with other devices, that is, the first device can establish a connection with other devices after changing to a connectable state. In some embodiments, the first device changing to a connectable state may be replaced by the first device being in a connecting state.

[0104] In some embodiments, after the first device enters the awake state, the first device may also establish a connection with another device. In some embodiments, the first device entering the awake state can be replaced by the first device being in the awake state. In this case, in some embodiments, the first message can be used to indicate that the first device is in the awake state. In this way, the purpose of the first message can also be interpreted as the first message being used to notify the second device that the first device is in the awake state (awake cycle) and that the second device can establish a connection with the first device if necessary.

[0105] In some embodiments, sending a first message to a second device when the first device changes to a connectable state or enters an awake state may mean that the first device sends the first message to the second device at the same time as it switches from other states (such as the second state mentioned above, including an unconnectable state, a sleep state, etc.) to a connectable state or to an awake state, or in other words, the first device sends the first message to the second device immediately after entering a connectable state or entering an awake state.

[0106] In some embodiments, sending a first message to a second device when the first device changes to a connectable state or enters an awake state may mean that the first device sends the first message to the second device after a period of time after switching from another state (such as the second state mentioned above, including an unconnectable state and a dormant state) to a connectable state or switching to an awake state, or in other words, the first device sends the first message to the second device after a period of time after entering a connectable state or entering an awake state. For example, the first device sends the first message to the second device 10 seconds after entering a connectable state or entering an awake state, or the first device sends the first message to the second device 30 seconds after entering a connectable state or entering an awake state, etc.

[0107] In some embodiments, the first message may be understood as a check-in message, which may be used to remind the second device to establish a connection with the first device.

[0108] The embodiment of the present application does not limit the implementation manner in which the first message is used to instruct the second device to establish a connection with the first device. Two implementation manners are given below as examples.

[0109] As an implementation, the first message can be understood as a notification message, which can be used to notify the second device that the first device is in a connectable state or awake state, so that the second device can initiate a connection request to the first device to establish a connection. In other words, after receiving the first message sent by the first device, the second device can proceed with the next service, such as establishing a connection with the first device to restore the subscription relationship with the first device.

[0110] The embodiments of the present application do not specifically limit the implementation method for the first message to indicate that the first device is in a connectable state or an awake state. For example, the embodiments of the present application may use the message type of the first message to indicate that the first message is a check-in message, thereby indicating that the first device is in a connectable state or an awake state. Alternatively, the embodiments of the present application may add a first field to the first message, and the value of the first field is used to indicate that the first device is in a connectable state or an awake state.

[0111] As another implementation, the first message may be used to initiate a connection request to the second device, that is, the first message may be a connection request message, so that the second device responds to the connection request initiated by the first device, thereby establishing a connection.

[0112] In an embodiment of the present application, a second device can be registered with a first device so that when the first device changes to a connectable state or enters an awake state, a connection can be established with the successfully registered second device. In other words, when the first device changes to a connectable state or enters an awake state, it can choose to establish a connection with the successfully registered second device based on the device registration status. In this way, the embodiment of the present application helps avoid the establishment of unnecessary connections, thereby helping to save resources.

[0113] The following describes in detail how to register the second device at the first device: First, the information included in the registration request is introduced.

[0114] As described above, a registration request can be used to request registration of a second device. Therefore, the registration request can include information related to the device to be registered (the second device). However, the embodiments of the present application are not limited thereto. The registration request can also include other information related to this registration, for example, permission information of the device sending the registration request, information related to the first message sent by the first device to the second device, etc.

[0115] In some embodiments, the registration request may indicate one or more of the following information: identity information of the second device; access control subject information of the second device at the first device; encryption information associated with the first message; verification code information; and first priority information. Each of these pieces of information is described below.

[0116] In the embodiment of the present application, there are multiple ways to implement the identity information of the second device, and the embodiment of the present application is not limited to this. As an implementation method, the identity information of the second device can be indicated by the device identification (device ID) of the second device. It should be noted that the device ID of the second device can be understood as the unique identification of the second device in the ecosystem, such as the unique identification of the second device in a network (fabric). As another implementation method, the identity information of the second device can be indicated by the nickname of the device ID of the second device. The nickname of the device ID of the second device can be bound to the device ID of the second device. In this way, the identity of the second device can be identified by the nickname of the device ID of the second device, and the device ID of the second device is not exposed (that is, the device ID of the second device can be hidden).

[0117] Taking the example of using the device ID of the second device to indicate the identity information of the second device, in some embodiments, the device ID of the second device carried in the registration request can be the same as the device ID of the device sending the registration request, that is, the registration request can be sent by the second device. In some embodiments, the device ID of the second device carried in the registration request can be different from the device ID of the device sending the registration request, that is, the registration request can be sent by a device other than the second device, for example, the administrator device of the first device.

[0118] The embodiment of the present application does not limit the name of the field indicating the identity information of the second device. For example, it can be indicated by the field RegisterClientID, or it can be indicated by the field ClientID, etc.

[0119] The access control subject information of the second device at the first device can be used to determine whether the second device has the authority to interact with the target on the first device, or in other words, the access control subject information of the second device at the first device can be used to determine what kind of authority the second device has over the resources on the first device.

[0120] In some embodiments, the access control subject information of the second device at the first device may refer to a subject identifier of the second device in an access control list (ACL) of the first device. Alternatively, the access control subject information of the second device at the first device may be recorded in the ACL of the first device, for example, in the subject field of the ACL of the first device.

[0121] The ACL can contain access control entries (ACEs) that encode policies. The access control system can check and verify all attempted accesses based on the rules in the ACEs contained in the ACL of the first device. Each ACE can encode a separate permission grant on the first device, and the access control permission grant algorithm uses the ACE to determine whether a subject has permission to interact with a target on the node. In other words, the access control subject information of the second device at the first device can be recorded in an ACE of the first device, and the content indicated by the subject field in the ACE is the access control subject information of the second device at the first device.

[0122] In some embodiments, the subject field in the ACE may include the device ID of the device. That is, the access control subject information of the second device at the first device may be indicated by the device ID of the second device.

[0123] In some embodiments, the subject field in the ACE may include the group ID of the device. That is, the access control subject information of the second device at the first device may be indicated using the group ID of the second device. The embodiment of the present application does not specifically limit the indication method of the group ID of the second device. For example, the group ID of the second device may include a CASE authenticated tag (CAT) corresponding to the second device. It should be noted that the second device may correspond to one or more CATs, and the group ID of the second device mentioned in the embodiment of the present application may be any one or more of the one or more CATs corresponding to the second device.

[0124] The embodiment of the present application does not limit the name of the field indicating the access control subject information of the second device at the first device. For example, it can be indicated by the field AccessSubject, or it can be indicated by the field MonitoredSubject, etc.

[0125] In some embodiments, the content used to indicate the access control subject information of the second device at the first device and the content used to indicate the identity information of the second device can be the same. For example, both can be indicated by the device ID of the second device. In some embodiments, the content used to indicate the access control subject information of the second device at the first device and the content used to indicate the identity information of the second device can be different. For example, the group ID of the second device (e.g., the CAT corresponding to the second device) can be used to indicate the access control subject information of the second device at the first device, and the device ID of the second device can be used to indicate the identity information of the second device.

[0126] In some embodiments, the encryption information associated with the first message can be used to encrypt the first message. For example, the encryption information can be a key. In this way, after the second device successfully registers with the first device, when the first device changes to a connectable state or enters an awake state, the first message encrypted using the encryption information can be sent to the second device.

[0127] In some embodiments, the encryption information may be a symmetric key, so that when the second device subsequently receives the first message sent by the first device, it can use the same encryption information to decrypt the first message.

[0128] In some embodiments, the encrypted information may be an asymmetric key, for example, the encrypted information may be a public key in a key pair. In this way, when the second device subsequently receives the first message sent by the first device, it can use the private key corresponding to the public key to decrypt the first message.

[0129] The embodiment of the present application does not specifically limit the indication field of the encryption information associated with the first message. For example, the field EncryptedKey can be used to indicate the encryption information associated with the first message. Of course, other fields (such as KeyInfo) can also be used to indicate the encryption information associated with the first message.

[0130] The verification code information carried in the registration request can be used to verify the authority (registration authority) of the device sending the registration request. In other words, the verification code information can be used to determine whether the device sending the registration request has the authority to register the second device at the first device.

[0131] The embodiments of the present application do not limit the implementation method of the above-mentioned verification code information. As an implementation method, the verification code information may include the identity code (pincode) of the device sending the registration request, and the first device can determine whether the device sending the registration request has the authority to register the second device based on the identity code. As another implementation method, the verification code information may include the encryption information used when the first device sent the first message to the second device before this registration. In this way, the first device can determine whether the device sending the registration request has the authority to register the second device based on whether the verification code information carried in the registration request is the same as the encryption information used when the first device sent the first message to the second device before this registration. For example, if the verification code information carried in the registration request is the same as the encryption information used when the first device sent the first message to the second device before this registration, the first device can determine that the device sending the registration request has the authority to register the second device; if the verification code information carried in the registration request is different from the encryption information used when the first device sent the first message to the second device before this registration, the first device can determine that the device sending the registration request does not have the authority to register the second device.

[0132] It should be noted that when the verification code information includes the encryption information used when the first device sent the first message to the second device before the current registration, the verification code information may be the same as or different from the encryption information associated with the first message carried in the registration request. For example, if the current registration request is used to request modification of the encryption information associated with the first message, the verification code information may be different from the encryption information associated with the first message carried in the registration request. Alternatively, if the current registration request does not modify the encryption information associated with the first message, the verification code information may be the same as the encryption information associated with the first message carried in the registration request.

[0133] In some embodiments, the first device may also store verification code information so that the first device can compare the stored verification code information with the verification code information carried in the registration request to determine whether the device sending the registration request has the authority to register the second device.

[0134] In some embodiments, if the device sending the registration request has administrator privileges of the first device, the registration request may not carry verification code information. That is, for the device with administrator privileges of the first device, the verification code information is not necessary when sending the registration request.

[0135] In some embodiments, if the device sending the registration request does not have administrator privileges of the first device, the registration request needs to carry verification code information so that the first device can determine the registration privileges of the device sending the registration request.

[0136] In some embodiments, the verification code information can ensure that a device that does not have the administrator privileges of the first device can only modify, update or delete its own registration information, but cannot modify, update or delete the registration information of other devices.

[0137] The embodiment of the present application does not specifically limit the indication field of the verification code information. For example, the field PinCode can be used to indicate the verification code information. Of course, other fields (such as VerificationInfo) can also be used to indicate the verification code information.

[0138] In the embodiment of the present application, the first priority information can be used to indicate the priority of the second device requesting to send the first message. For example, if the second device wants the first device to send the first message to the second device first, the priority indicated by the first priority information can be higher.

[0139] In some embodiments, the first priority information may be omitted. In this case, the first device may assume that the second device has no priority requirements for receiving the first message. In this case, in some embodiments, the first device may set a lower priority for the second device.

[0140] In some embodiments, the fact that the registration request carries the first priority information does not mean that the first device will ultimately send the first message to the second device according to the first priority information. For example, if there are multiple devices to be registered that have the same first priority information, the first device can determine the priority of sending the first message to each successfully registered device. As an example, the first device can send the first message to a successfully registered device (such as the second device) based on the second priority information (for more information about the second priority information, please refer to the following text).

[0141] The embodiment of the present application does not specifically limit the indication field of the first priority information. For example, the field PriorityLevel can be used to indicate the first priority information, or other fields (such as PriorityInfo) can be used to indicate the first priority information.

[0142] In an embodiment of the present application, the registration request may include one or more of the above information. As an example, the registration request may include the identity information of the second device, the access control subject information of the second device at the first device, and the verification code information. For example, the registration request includes the device ID of the second device, the group ID of the second device, and the verification code information. As another example, the registration request may include the identity information of the second device, the access control subject information of the second device at the first device, and the encryption information associated with the first message. As yet another example, the registration request may include the identity information of the second device, the access control subject information of the second device at the first device, the encryption information associated with the first message, the verification code information, and the first priority information, etc.

[0143] In some embodiments, the registration request may carry other information in addition to the information listed above, which is not limited in the embodiments of the present application. For example, the registration request may carry access control subject information of the device sending the registration request at the first device, so that the first device can determine the access rights of the device sending the registration request to the first device, for example, to determine whether the device sending the registration request has administrator privileges on the first device.

[0144] Based on the introduction of the information included in the registration request, the following describes a process of registering the second device at the first device.

[0145] FIG3 is a flow chart of registering a second device at a first device according to an embodiment of the present application. As shown in FIG3 , the registration process may include steps S310 and S320.

[0146] In step S310, the first device receives a registration request for registering the second device.

[0147] In the example of Figure 3, the registration request received by the first device may be sent by the second device or by a third device other than the second device. Taking the case where the registration request is sent by the third device as an example, the registration request may be sent by a device with administrator privileges on the first device, or may be sent by another device that does not have administrator privileges on the first device (e.g., a device that has subscribed to the first device, a device with operation privileges on the first device, etc.).

[0148] The registration request may carry one or more types of information. For details about the information that may be carried in the registration request, please refer to the above description and will not be repeated here.

[0149] In step S320 , the first device determines a registration policy for the second device according to the subscription relationship between the first device and the second device.

[0150] In some embodiments, after receiving the registration request, the first device may determine whether a subscription relationship exists between the first device and the second device before registering the second device, so as to determine the registration policy of the second device according to the subscription relationship between the first device and the second device.

[0151] In some embodiments, the purpose of the first device determining whether a subscription relationship exists between the first device and the second device is to confirm whether registration of the second device is allowed. That is, the registration policy of the second device may include allowing registration of the second device and not allowing (rejecting) registration of the second device. The first device may determine whether registration of the second device is allowed based on the subscription relationship between the first device and the second device. However, the embodiments of the present application are not limited to this. In some embodiments, the registration policy of the second device may include which information of the second device is allowed to be registered (for example, identity information of the second device, access control subject information of the second device at the first device, etc.), and which information of the second device is not allowed to be registered (for example, registration of first priority information, etc.).

[0152] As an implementation method, if the first device determines that a subscription relationship exists between the first device and the second device, the first device may allow the second device to be registered; if the first device determines that no subscription relationship exists between the first device and the second device, the first device may not allow (reject) the registration of the second device. The first device confirms whether to allow the registration of the second device based on whether a subscription relationship exists between the first device and the second device. On the one hand, this helps to ensure that the connection established between the first device and the second device is useful and can avoid unnecessary connections; on the other hand, it helps to avoid operational confusion after the first device subsequently changes to a connectable state or enters an awakened state. The following describes how the first device avoids operational confusion after the first device subsequently changes to a connectable state or enters an awakened state based on whether a subscription relationship exists between the first device and the second device.

[0153] In some embodiments, it can be understood that the purpose of determining whether the first device allows registration of the second device is to avoid operational confusion after the first device subsequently changes to a connectable state or enters an awake state. Alternatively, the purpose of the first device determining whether a subscription relationship exists between the first device and the second device is to avoid operational confusion after the first device subsequently changes to a connectable state or enters an awake state. For example, the purpose of the first device determining whether a subscription relationship exists between the first device and the second device is to determine whether the first device should enter a long sleep cycle or a short sleep cycle next after changing to a connectable state or entering an awake state.

[0154] As an implementation method, if the first device allows registration of the second device, the sleep period corresponding to the first device is a long sleep period; and / or, if the first device does not allow registration of the second device, the sleep period corresponding to the first device is a short sleep period.

[0155] In other words, if the first device allows registration of the second device, then after the first device changes to a connectable state or enters a wake-up state, it can subsequently enter a long sleep cycle; if the first device does not allow registration of the second device, then after the first device changes to a connectable state or enters a wake-up state, it can subsequently enter a short sleep cycle (but not a long sleep cycle) to ensure that the first device can be connected in time.

[0156] In other words, if the first device determines that there is a subscription relationship between the first device and the second device, then after the first device changes to a connectable state or enters an awake state, it can subsequently enter a long sleep cycle; if the first device determines that there is no subscription relationship between the first device and the second device, then after the first device changes to a connectable state or enters an awake state, it can subsequently enter a short sleep cycle.

[0157] In some embodiments, the first device determining whether a subscription relationship exists between the first device and the second device mentioned in the embodiments of the present application means that the first device determines whether a subscription relationship exists between the first device and the second device, or in other words, the first device determines whether a subscription relationship exists between the current first device and the second device.

[0158] The embodiment of the present application does not specifically limit the implementation manner in which the first device determines whether a subscription relationship exists between the first device and the second device. Two implementation manners are exemplified below.

[0159] Implementation method 1:

[0160] In this implementation, the first device may confirm whether the second device has subscribed to the first device by checking the subscription relationship associated with the first device, that is, confirm whether there is a subscription relationship between the first device and the second device.

[0161] It should be understood that, generally, as long as a device (e.g., a second device) subscribes to a first device, the first device can store the corresponding subscription relationship. For example, the first device can store which device subscribes to which resources of the first device, as well as other subscription parameters (e.g., maximum notification message sending interval, minimum notification message sending interval, etc.). In this way, the first device can determine which devices have a subscription relationship with the first device.

[0162] For example, if device A, device B, and device C all subscribe to the first device, the first device can save the subscription relationships corresponding to device A, device B, and device C, so that the first device can also determine that a subscription relationship exists between device A, device B, and device C and the first device. In this way, if the first device needs to determine whether a subscription relationship exists between device B and the first device, it can check based on the subscription relationship to determine whether a subscription relationship exists between device B and the first device. Alternatively, if the first device needs to determine whether a subscription relationship exists between device D and the first device, it can also check based on the subscription relationship to determine whether a subscription relationship exists between device D and the first device.

[0163] The first device determines whether a subscription relationship exists between the first device and the second device by checking the subscription relationship associated with the first device, which reduces the process and is simple to implement.

[0164] Implementation 2:

[0165] In this implementation, the first device may confirm whether the second device has subscribed to the first device through the information of the pre-registered subscription device, that is, confirm whether there is a subscription relationship between the first device and the second device.

[0166] Implementation 2 is described below in conjunction with Figure 4. The method shown in Figure 4 is described from the perspective of interaction between the first device, the subscribing device, and the device sending the registration request. The method shown in Figure 4 may include steps S410 to S440, which are described below.

[0167] In step S410, a first device receives a subscription request sent by a subscription device, wherein the subscription request is used to request subscription to resources of the first device.

[0168] The subscribing device can be any device capable of subscribing to the resources of the first device. For example, the subscribing device can be a proxy device of the first device, or a device with view permission for the first device. As an example, the subscribing device can include the second device mentioned in the embodiments of the present application, or can include other devices other than the second device. As another example, the subscribing device can exclude the second device mentioned in the embodiments of the present application.

[0169] In step S420 , the first device registers the identity information of the subscribing device according to the subscription request sent by the subscribing device.

[0170] In some embodiments, the first device registering the identity information of the subscribing device can be understood as the first device performing a pre-registration, which is used to register the identity information of the subscribing device so as to subsequently determine whether there is a subscription relationship between the first device and the second device based on the pre-registration result.

[0171] As an implementation, the first device registering the identity information of the subscribing device based on the subscription request sent by the subscribing device may include: the first device pre-registering the subscribing device based on the device ID of the sender of the subscription request (the device ID of the subscribing device). For example, the first device may only register the device ID of the subscribing device to indicate that the device corresponding to the device ID has subscribed to the resources of the first device.

[0172] As another implementation, the first device registering the identity information of the subscribing device based on the subscription request sent by the subscribing device may include: the first device pre-registering the subscribing device based on the device ID of the sender of the subscription request (the device ID of the subscribing device) and other parameters carried in the subscription request. For example, the first device may register the device ID of the subscribing device, the resources subscribed by the subscribing device, and the maximum notification message sending interval associated with the subscription.

[0173] The embodiment of the present application does not limit the manner in which the first device stores the identity information of the pre-registered subscription device. For example, the first device may pre-store the identity information of the subscription device at the storage location of the registration information of the device associated with the first message (such as the second device). For relevant content about the registration information of the device associated with the first message, please refer to the relevant content of the registration information for registering the second device mentioned later. It should be noted that the device associated with the first message mentioned here may refer to the device to which the first device can send the first message after the device is successfully registered. As an example, the first device may write the device ID of the subscription device into the field for indicating the identity information of the device associated with the first message in the registration information of the device associated with the first message (such as the RegisterClientID field mentioned in this application). A specific example is given below.

[0174] The first device pre-registering the subscribing device may involve the first device writing the device ID of the subscribing device into a RegisterClient attribute, which is used to store the device ID of a device (e.g., the second device) registered with the first device. As an example, the attribute may be stored in a management cluster of the first device, such as an ICD management cluster of an ICD.

[0175] It should be understood that the first device, as the subscriber in the subscription relationship, can know the subscription relationship, but the preservation and maintenance of the subscription relationship are all managed by the first device itself. In implementation method 2, the first device, as the subscriber, can make a record in the RegisterClient attribute during the subscription process, so when the second device is subsequently registered, the record of the RegisterClient attribute can be directly viewed. Considering that the registration of the second device itself also requires the operation of the RegisterClient attribute, the pre-registration in the subscription process does not need to check other resources related to subscription management, and can directly view the RegisterClient attribute, thereby improving efficiency.

[0176] However, the embodiments of the present application are not limited thereto. In some embodiments, the first device may pre-store the identity information of the subscribing device in another storage location, and then read the relevant information from the storage location.

[0177] In some embodiments, before pre-registering the identity information of the subscriber device according to the subscription request, the first device may further authenticate the subscription request. If the subscription request authentication is successful, the first device may pre-register the identity information of the subscriber device according to the subscription request.

[0178] In step S430, the first device receives a registration request for registering the second device.

[0179] For the introduction of step S430, please refer to the introduction of step S210 or step S310 above, which will not be repeated here for the sake of brevity.

[0180] In step S440 , the first device determines a registration policy for the second device according to the subscription relationship between the first device and the second device.

[0181] For example, the first device may determine whether to allow registration of the second device based on a subscription relationship between the first device and the second device.

[0182] As an implementation, the first device can determine the registration policy for the second device based on the pre-registration result of step S420. For example, based on the pre-registration result of step S420, the first device can determine whether a subscription relationship exists between the first device and the second device, thereby allowing the second device to register if a subscription relationship exists, or disallowing the second device to register if a subscription relationship does not exist. In other words, the first device can determine whether a subscription relationship exists between the first device and the second device based on the identity information of the registered subscriber device, thereby determining whether to allow the second device to register.

[0183] In some embodiments, the first device may determine whether a subscription relationship exists between the first device and the second device based on the identity information of the registered subscription device, which may include: if the identity information of the subscription device registered by the first device includes the identity information of the second device, the first device determines that a subscription relationship exists between the first device and the second device; and / or, if the identity information of the subscription device registered by the first device does not include the identity information of the second device, the first device determines that no subscription relationship exists between the first device and the second device.

[0184] For example, the identity information of the subscription devices pre-registered by the first device includes device A, device B, and device C. If device B and the second device are the same device (such as the same device ID), the first device can determine that a subscription relationship exists between the first device and the second device; if device A, device B, and device C are all different devices from the second device (such as the device IDs are all different), the first device can determine that no subscription relationship exists between the first device and the second device.

[0185] However, the embodiments of the present application are not limited to the above implementation. In some embodiments, even if the first device has pre-registered the identity information of the subscribing device, when determining whether a subscription relationship exists between the first device and the second device, the method of implementation 1 can still be used. In other words, in some embodiments, even if the first device has pre-registered the identity information of the subscribing device, it is not necessary to use the pre-registered information to determine whether a subscription relationship exists between the first device and the second device.

[0186] In some embodiments, if there is a subscription relationship between the first device and the second device, the first device may allow the second device to be registered. In some embodiments, if there is no subscription relationship between the first device and the second device, the first device may not allow (reject) the second device to be registered.

[0187] Continuing to refer to Figure 4, in some embodiments, the method of Figure 4 may further include step S425. In step S425, the first device sends a subscription success notification message to the subscribing device.

[0188] The first device can more conveniently determine whether a subscription relationship exists between the first device and the second device through the information of the pre-registered subscription device.

[0189] Figure 5 is a schematic diagram of a process for registering a second device at a first device according to another embodiment of the present application. As shown in Figure 5 , the registration process may include steps S510 and S520.

[0190] In step S510, the first device receives a registration request for registering the second device.

[0191] In the example of Figure 5, the registration request received by the first device may be sent by the second device or a third device other than the second device. Taking the case where the registration request is sent by the third device as an example, the registration request may be sent by a device with administrator privileges on the first device, or the registration request may be sent by another device that does not have administrator privileges on the first device (e.g., a device that subscribes to the first device, a device with operation privileges on the first device, etc.).

[0192] The registration request may carry one or more types of information. For details about the information that may be carried in the registration request, please refer to the above description and will not be repeated here.

[0193] In step S520, the first device determines whether there is storage space to store the registration information for registering the second device. In other words, the first device determines whether there are sufficient storage resources to store the registration information for registering the second device.

[0194] For ease of understanding, the following first describes the registration information used to register the second device. It should be noted that the registration information for the device associated with the first message mentioned above also applies to the content of the registration information described below. The registration information below can be used to register a device that wants to receive the first message, such as for registering the second device. The following description uses the registration information used to register the second device as an example.

[0195] In some embodiments, the registration information used to register the second device may include one or more of the following information: identity information of the second device, access control subject information of the second device at the first device, encryption information associated with the first message, and second priority information.

[0196] For relevant introductions on the identity information of the second device, the access control subject information of the second device at the first device, and the encryption information associated with the first message, please refer to the relevant descriptions in the information carried in the registration request introduced above. For the sake of brevity, they will not be repeated here.

[0197] In the embodiment of the present application, the second priority information can be used to indicate the priority of the first message sent by the first device to the second device. For example, if the first device determines to send the first message to the second device first, the priority indicated by the second priority information can be higher.

[0198] In some embodiments, the second priority information is determined based on the first priority information carried in the registration request. For example, the second priority information may be the same as the first priority information. However, the embodiments of the present application are not limited thereto. In some embodiments, the second priority information may be different from the first priority information. For example, if there are multiple devices to be registered (including the second device) with the same first priority information, the first device may determine the second priority information corresponding to the second device by itself.

[0199] In some embodiments, when the first priority information is omitted, the first device may determine (assign) the second priority information corresponding to the second device by itself, or may omit the second priority information.

[0200] In some embodiments, the first device may save the registration information for registering the second device, so that after the first device changes to a connectable state or enters an awake state next time, the first device sends the first message to the second device according to the registration information.

[0201] The following describes step S520.

[0202] In some embodiments, if the first device determines that there is storage space to store the registration information for registering the second device, or if the first device determines that there are sufficient storage resources to save the registration information for registering the second device, the first device may allow the second device to be registered. In some embodiments, if the first device determines that there is no storage space to store the registration information for registering the second device, or if the first device determines that there are insufficient storage resources to save the registration information for registering the second device, the first device may not allow (reject) the registration of the second device.

[0203] It should be understood that, in general, the first device will allocate a certain amount of storage space to store the registration information of the device associated with the first message. As an example, the first device can allocate a smaller storage space to store the registration information of the device associated with the first message. For example, the allocated storage space can store the registration information of up to 4 devices. Then, if the allocated storage space is insufficient, the first device can refuse to register the second device. The first device allocates a smaller storage space to store the registration information of the device associated with the first message. On the one hand, it is beneficial to ensure that the devices that have successfully registered can subsequently establish a connection with the first device. On the other hand, it is beneficial to save storage resources. As another example, the first device can allocate a larger storage space to store the registration information of the device associated with the first message. However, the first device has already stored the registration information of a large number of devices. Then, the first device still needs to determine whether the remaining storage space is sufficient to store the registration information of the second device. If the remaining storage space is insufficient, the first device can refuse to register the second device.

[0204] Figure 6 is a schematic diagram of a process of registering a second device at a first device according to another embodiment of the present application. As shown in Figure 6 , the registration process may include steps S610 and S620.

[0205] In step S610, the first device receives a registration request for registering the second device.

[0206] In the example of Figure 6, the registration request received by the first device may be sent by the second device or by a third device other than the second device. Taking the case where the registration request is sent by the third device as an example, the registration request may be sent by a device with administrator privileges on the first device, or may be sent by another device that does not have administrator privileges on the first device (e.g., a device that subscribes to the first device, a device with operation privileges on the first device, etc.).

[0207] The registration request may carry one or more types of information. For details about the information that may be carried in the registration request, please refer to the above description and will not be repeated here.

[0208] In step S620, the first device registers the second device according to the authority of the device that sent the registration request.

[0209] As an implementation manner, if the device sending the registration request has administrator privileges of the first device, the first device may register the second device based on the registration request sent by the device.

[0210] For example, the device sending the registration request is a third device, and the third device is the administrator device of the first device. After the first device receives the registration request sent by the third device and confirms that the third device is the administrator device of the first device, it directly registers the information carried in the registration request, so that the first device can send a first message to the registered device when it changes to a connectable state or enters an awake state.

[0211] As another implementation, if the device sending the registration request does not have administrator authority of the first device, the first device may verify the registration authority of the device sending the registration request and determine whether to allow registration of the second device based on the verification result.

[0212] The embodiment of the present application does not specifically limit the implementation method of the first device verifying the registration authority of the device that sends the registration request. As an implementation method, the first device can determine the registration authority of the device that sends the registration request by determining whether the verification code information in the registration request matches (for example, whether they are consistent with) the verification code information saved by the first device. For example, if the verification code information in the registration request matches the verification code information saved by the first device, the first device can determine that the device that sends the registration request has registration authority, and therefore, the first device can register the second device based on the registration request. Alternatively, if the verification code information in the registration request does not match the verification code information saved by the first device, the first device can determine that the device that sends the registration request does not have registration authority, and therefore, the first device can refuse to register the second device.

[0213] That is to say, if the device sending the registration request does not have administrator authority of the first device, the first device can determine whether the verification code information in the registration request matches the verification code information saved by the first device; in response to the verification code information in the registration request matching the verification code information saved by the first device, the first device can register the second device based on the registration request.

[0214] In some embodiments, the verification code information stored by the first device may include the encryption information used by the first device to send the first message to the second device prior to the current registration. In this way, the first device can determine whether the verification code information carried in the registration request is consistent with the encryption information used by the first device to send the first message to the second device prior to the current registration to determine whether the device sending the registration request has registration permission.

[0215] The embodiments of the present application do not specifically limit the implementation method for determining whether the device sending the registration request has the administrator authority of the first device. As an implementation method, the first device can determine whether the device sending the registration request has the administrator authority of the first device through the access control subject information of the device sending the registration request at the first device. For example, the access control subject information of the device sending the registration request at the first device is used to indicate that the device sending the registration request has the administrator authority of the first device, then the first device determines that the device sending the registration request has the administrator authority of the first device; or, the access control subject information of the device sending the registration request at the first device is used to indicate that the device sending the registration request does not have the administrator authority of the first device (for example, the access control subject information of the device sending the registration request at the first device is used to indicate that the device sending the registration request has the view authority of the first device), then the first device determines that the device sending the registration request does not have the administrator authority of the first device. As another implementation method, the first device can directly use the device ID of the device sending the registration request to determine whether it has the administrator authority of the first device.

[0216] In some embodiments, the initial registration at the first device can be performed by a device with administrator privileges at the first device. Subsequent registrations can be performed by a device with administrator privileges or a device without administrator privileges. As an example, after the device with administrator privileges initially registers at the first device, it can subsequently send a verification code to a device without administrator privileges in some manner. The device without administrator privileges can then use the verification code to modify, update, or delete the registration information.

[0217] It should be noted that the methods for registering a second device at a first device mentioned in different embodiments of this application can be combined in any manner. For example, the steps in the registration methods shown in Figures 3, 5, and 6 can be combined in any manner. As an example, the registration process may include steps S310 to S330, and step S520. As another example, the registration process may include steps S310 to S330, and step S620. As yet another example, the registration process may include steps S310 to S330, step S520, and step S620, etc.

[0218] It should also be noted that when the processes of the registration methods mentioned in different embodiments are arbitrarily combined, the execution order between different steps is not limited. For example, when the registration process includes steps S310 to S330, and step S520, step S520 can be executed before step S320, or after step S320, or simultaneously with step S320. Alternatively, when the registration process includes steps S310 to S330, step S520, and step S620, step S620 can be executed before step S320 or step S520, or after step S320 or step S520, or simultaneously with step S320 and step S520, etc.

[0219] In some embodiments, when the second device successfully registers with the first device, the first device may send a registration success response message to the device that sent the registration request.

[0220] In some embodiments, when the second device fails to register with the first device, the first device may send a registration failure response message to the device that sent the registration request.

[0221] In some embodiments, after the second device successfully registers with the first device and the first device sends a first message to the second device, the second device may establish a connection with the first device based on the first message and subscribe (eg, resubscribe) to the first device.

[0222] As an implementation method, in an embodiment of the present application, after the second device successfully registers at the first device and the first device sends a first message to the second device, the embodiment of the present application may also include the following steps: the first device establishes a connection with the second device based on the connection request sent by the second device; the second device sends a subscription request to the first device, and the subscription request is used to subscribe to the resources of the first device.

[0223] In some embodiments, the connection request sent by the second device to the first device is sent by the second device when the second device determines that it needs to establish a connection with the first device based on the first message. For example, after receiving the first message, the second device determines that it needs to establish a connection with the first device (for example, it needs to update subscription data), and the second device may send a connection request to the first device. Alternatively, after receiving the first message, the second device determines that it does not need to establish a connection with the first device (for example, the subscription data has not been updated), and the second device may not send a connection request to the first device.

[0224] For ease of understanding, the following schematically describes the process of the method of the embodiments of the present application in conjunction with several examples. It should be noted that any content not described in detail in the following embodiments can be referred to the previous description, such as the specific content included in the registration request. It should also be noted that the following embodiments are for illustrative purposes only and are not intended to limit the technical solutions of this application.

[0225] Example 1:

[0226] Figure 7 is a schematic diagram of a process of registering a second device at a first device according to another embodiment of the present application. The method shown in Figure 7 may include steps S701 to S707.

[0227] In step S701, a first device receives a registration request for registering a second device.

[0228] In some embodiments, after the second device is successfully registered, the first device can send a notification message to the successfully registered second device after changing to a connectable state or entering a wake-up cycle, so that the second device can perform the next business according to the notification message, such as restoring the connection with the first device, restoring the subscription relationship with the first device, etc.

[0229] In some embodiments, the registration request may carry one or more of the following information: identity information of the second device, access control subject information of the second device at the first device, encryption information associated with the first message, verification code information, and first priority information.

[0230] The registration request may be sent by the second device, or may be sent by a third device other than the second device (eg, an administrator device of the first device).

[0231] In step S702 , the first device determines whether a subscription relationship exists between the first device and the second device.

[0232] For example, the first device determines whether there is a surviving subscription relationship between the first device and the second device. As an implementation, the first device may determine whether there is a surviving subscription relationship between the first device and the second device based on a stored subscription relationship table.

[0233] In step S703 , the first device determines whether there is storage space to store registration information for registering the second device.

[0234] For example, the first device may determine whether there is sufficient storage resource to store the registration information. The first device generally allocates a certain amount of storage space for storing registration information, for example, space for storing registration information of four devices. Therefore, the first device needs to determine whether there is sufficient storage space to store the registration information corresponding to the current registration request.

[0235] In step S704, the first device determines the registration authority of the device that sends the registration request.

[0236] In some embodiments, if the first device determines that the device sending the registration request has administrator privileges of the first device, the first device performs step S705.

[0237] In some embodiments, if the first device determines that the device sending the registration request does not have administrator privileges of the first device, the first device performs step S706.

[0238] In step S705 , the first device registers the second device based on the registration request.

[0239] For example, the first device modifies, updates, or deletes registration information used to register the second device based on the information carried in the registration request.

[0240] In step S706 , the first device determines whether the verification code information in the registration request matches the verification code information stored in the first device.

[0241] In some embodiments, if the verification code information in the registration request matches the verification code information stored by the first device, the first device executes step S705.

[0242] In some embodiments, if the verification code information in the registration request does not match the verification code information stored by the first device, the first device refuses to register the second device.

[0243] In step S707, the first device sends a response message to the device that sent the registration request.

[0244] In some embodiments, the first device may send a success response message to the device that sent the registration request to indicate that the second device has successfully registered. For example, after executing step S705, the first device may send a success response message to the device that sent the registration request.

[0245] In some embodiments, the first device may send a failure response message to the device that sent the registration request to indicate that the registration of the second device has failed. For example, if the first device determines in step S702 that there is no subscription relationship between the first device and the second device, it may send a failure response message to the device that sent the registration request. For another example, if the first device determines in step S703 that there is no storage space to store the registration information for registering the second device, it may send a failure response message to the device that sent the registration request. For another example, if the first device determines in step S706 that the verification code information in the registration request does not match the verification code information stored by the first device, it may send a failure response message to the device that sent the registration request.

[0246] Example 2:

[0247] Figure 8 is a schematic diagram of a process of registering a second device at a first device according to another embodiment of the present application. The method shown in Figure 8 may include steps S801 to S810.

[0248] In step S801, a first device receives a subscription request sent by a subscription device.

[0249] In step S802, the first device registers and subscribes to the identity information of the device.

[0250] In other words, the first device may perform pre-registration. For example, the first device may pre-register the identity information of the subscribing device and write the device ID of the subscribing device into the field RegisterClientID.

[0251] In step S803, the first device sends a subscription success notification message to the subscribing device.

[0252] In step S804, the first device receives a registration request for registering the second device.

[0253] In some embodiments, after the second device is successfully registered, the first device can send a notification message to the successfully registered second device after changing to a connectable state or entering a wake-up cycle, so that the second device can perform the next business according to the notification message, such as restoring the connection with the first device, restoring the subscription relationship with the first device, etc.

[0254] In some embodiments, the registration request may carry one or more of the following information: identity information of the second device, access control subject information of the second device at the first device, encryption information associated with the first message, verification code information, and first priority information.

[0255] The registration request may be sent by the second device, or may be sent by a third device other than the second device (eg, an administrator device of the first device).

[0256] In step S805 , the first device determines whether a subscription relationship exists between the first device and the second device.

[0257] For example, the first device determines whether a subscription relationship exists between the first device and the second device. As an implementation, the first device may determine whether a subscription relationship exists between the first device and the second device based on the pre-registration result in step S802. As another implementation, the first device may determine whether a subscription relationship exists between the first device and the second device based on a stored subscription relationship table.

[0258] In step S806 , the first device determines whether there is storage space to store registration information for registering the second device.

[0259] For example, the first device may determine whether there is sufficient storage resource to store the registration information. The first device generally allocates a certain amount of storage space for storing registration information, for example, space for storing registration information of four devices. Therefore, the first device needs to determine whether there is sufficient storage space to store the registration information corresponding to the current registration request.

[0260] In step S807 , the first device determines the registration authority of the device that sends the registration request.

[0261] In some embodiments, if the first device determines that the device sending the registration request has administrator privileges of the first device, the first device performs step S808.

[0262] In some embodiments, if the first device determines that the device sending the registration request does not have administrator privileges of the first device, the first device performs step S809.

[0263] In step S808 , the first device registers the second device based on the registration request.

[0264] For example, the first device modifies, updates, or deletes registration information used to register the second device based on the information carried in the registration request.

[0265] In step S809 , the first device determines whether the verification code information in the registration request matches the verification code information stored in the first device.

[0266] In some embodiments, if the verification code information in the registration request matches the verification code information stored by the first device, the first device executes step S808.

[0267] In some embodiments, if the verification code information in the registration request does not match the verification code information stored by the first device, the first device refuses to register the second device.

[0268] In step S810, the first device sends a response message to the device that sent the registration request.

[0269] In some embodiments, the first device may send a success response message to the device that sent the registration request to indicate that the second device has successfully registered. For example, after executing step S808, the first device may send a success response message to the device that sent the registration request.

[0270] In some embodiments, the first device may send a failure response message to the device that sent the registration request to indicate that the registration of the second device has failed. For example, if the first device determines in step S805 that there is no subscription relationship between the first device and the second device, it may send a failure response message to the device that sent the registration request. For another example, if the first device determines in step S806 that there is no storage space to store the registration information for registering the second device, it may send a failure response message to the device that sent the registration request. For another example, if the first device determines in step S809 that the verification code information in the registration request does not match the verification code information stored by the first device, it may send a failure response message to the device that sent the registration request.

[0271] The method embodiment of the present application is described in detail above in conjunction with Figures 1 to 8 . The device embodiment of the present application is described in detail below in conjunction with Figures 9 to 12 . It should be understood that the description of the method embodiment corresponds to the description of the device embodiment. Therefore, for parts not described in detail, reference can be made to the above method embodiment.

[0272] FIG9 is a schematic diagram of a device for connecting devices according to an embodiment of the present application. The device 900 shown in FIG9 can be applied to any of the first devices described above. The device 900 may include a first receiving module 910.

[0273] The first receiving module 910 can be used to receive a registration request, which is used to register a second device; wherein, the successful registration of the second device is used to indicate that the first device changes to a connectable state or enters a wake-up state and sends a first message to the second device, and the first message is used to instruct the second device to establish a connection with the first device.

[0274] Optionally, the apparatus 900 further includes: a first determining module 920, configured to determine a registration policy of the second device according to a subscription relationship between the first device and the second device.

[0275] Optionally, the first determination module is further used to: allow registration of the second device if a subscription relationship exists between the first device and the second device; and / or not allow registration of the second device if no subscription relationship exists between the first device and the second device.

[0276] Optionally, the apparatus 900 further includes: a first registration module, configured to register identity information of the subscription device according to a subscription request sent by the subscription device; wherein the identity information of the registered subscription device is used to determine whether a subscription relationship exists between the first device and the second device.

[0277] Optionally, if the identity information of the registered subscription device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or, if the identity information of the registered subscription device does not include the identity information of the second device, no subscription relationship exists between the first device and the second device.

[0278] Optionally, if the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or if the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

[0279] Optionally, the registration request is used to indicate one or more of the following information: identity information of the second device; access control subject information of the second device at the first device; encryption information associated with the first message; verification code information, the verification code information is used to verify the authority of the device sending the registration request; and first priority information, the first priority information is used to indicate the priority of the second device's request to send the first message.

[0280] Optionally, the access control subject information is indicated by a device identifier of the second device; and / or, the access control subject information is indicated by a group identifier of the second device.

[0281] Optionally, the registration request is sent by the second device; or, the registration request is sent by a third device other than the second device.

[0282] Optionally, the third device has administrator privileges of the first device.

[0283] Optionally, the registration information used to register the second device includes one or more of the following information: identity information of the second device; access control subject information of the second device at the first device; encryption information associated with the first message; and second priority information, wherein the second priority information is used to indicate the priority of the first device sending the first message to the second device.

[0284] Optionally, the apparatus 900 further includes: a second determining module, configured to determine whether there is storage space to store registration information for registering the second device.

[0285] Optionally, the apparatus 900 further includes: a second registration module, configured to register the second device according to the authority of the device that sends the registration request.

[0286] Optionally, the second registration module is further configured to: register the second device based on the registration request if the device sending the registration request has administrator authority for the first device.

[0287] Optionally, the second registration module is further used to: if the device sending the registration request does not have administrator authority for the first device, determine whether the verification code information in the registration request matches the verification code information saved by the first device; in response to the verification code information in the registration request matching the verification code information saved by the first device, register the second device based on the registration request.

[0288] Optionally, the device 900 also includes: a connection module, used to establish a connection with the second device based on a connection request sent by the second device, and the connection request is sent by the second device when it determines that a connection needs to be established with the first device based on the first message; a second receiving module, used to receive a subscription request sent by the second device, and the subscription request sent by the second device is used to subscribe to the resources of the first device.

[0289] Optionally, the first device is a resource-constrained device or an ICD.

[0290] Optionally, the first receiving module 910 may be a transceiver 1230. The apparatus 900 may further include a processor 1210 and a memory 1220, as specifically shown in FIG12 .

[0291] FIG10 is a schematic diagram of a device for connecting devices according to another embodiment of the present invention. The device 1000 shown in FIG10 can be applied to any of the second devices described above. The device 1000 can include a receiving module 1010.

[0292] The receiving module 1010 can be used to receive a first message sent by a first device, where the first message is used to instruct the second device to establish a connection with the first device. The first message is sent when the second device successfully registers with the first device and the first device changes to a connectable state or enters a wake-up state.

[0293] Optionally, the registration policy of the second device is determined according to a subscription relationship between the first device and the second device.

[0294] Optionally, if a subscription relationship exists between the first device and the second device, the second device is allowed to register at the first device; and / or if no subscription relationship exists between the first device and the second device, the second device is not allowed to register at the first device.

[0295] Optionally, whether a subscription relationship exists between the first device and the second device is determined based on identity information of a subscribing device registered at the first device.

[0296] Optionally, if the identity information of the subscription device registered at the first device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or, if the identity information of the subscription device registered at the first device does not include the identity information of the second device, no subscription relationship exists between the first device and the second device.

[0297] Optionally, if the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or if the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

[0298] Optionally, the registration of the second device at the first device is triggered based on a registration request received by the first device, and the registration request is used to indicate one or more of the following information: identity information of the second device; access control subject information of the second device at the first device; encryption information associated with the first message; verification code information, the verification code information is used to verify the authority of the device sending the registration request; and first priority information, the first priority information is used to indicate the priority of the second device's request to send the first message.

[0299] Optionally, the access control subject information is indicated by a device identifier of the second device; and / or, the access control subject information is indicated by a group identifier of the second device.

[0300] Optionally, the registration request is sent by the second device; or, the registration request is sent by a third device other than the second device.

[0301] Optionally, the third device has administrator privileges of the first device.

[0302] Optionally, the registration information used to register the second device includes one or more of the following information: identity information of the second device; access control subject information of the second device at the first device; encryption information associated with the first message; and second priority information, wherein the second priority information is used to indicate the priority of the first device sending the first message to the second device.

[0303] Optionally, whether the second device is allowed to register at the first device is determined according to whether the first device has storage space to store registration information for registering the second device.

[0304] Optionally, the device 1000 also includes: a first sending module 1020, used to send a connection request to the first device, the connection request is used to establish a connection with the first device, and the connection request is sent by the second device when it determines that it is necessary to establish a connection with the first device based on the first message; a second sending module 1030, used to send a subscription request to the first device, the subscription request is used to subscribe to the resources of the first device.

[0305] Optionally, the first device is a resource-constrained device or an ICD.

[0306] Optionally, the receiving module 1010 may be a transceiver 1230. The apparatus 1000 may further include a processor 1210 and a memory 1220, as specifically shown in FIG12 .

[0307] FIG11 is a schematic diagram of a device for connecting devices according to another embodiment of the present application. The device 1100 shown in FIG11 can be applied to any of the third devices described above. The device 1100 can include a sending module 1110.

[0308] The sending module 1110 can be used to send a registration request to the first device, and the registration request is used to register the second device; wherein, the successful registration of the second device is used to indicate that the first device changes to a connectable state or enters a wake-up state and sends a first message to the second device, and the first message is used to instruct the second device to establish a connection with the first device.

[0309] Optionally, the registration policy of the second device is determined according to a subscription relationship between the first device and the second device.

[0310] Optionally, if there is a subscription relationship between the first device and the second device, registration of the second device at the first device is allowed; and / or if there is no subscription relationship between the first device and the second device, registration of the second device at the first device is not allowed.

[0311] Optionally, whether a subscription relationship exists between the first device and the second device is determined based on identity information of a subscribing device registered at the first device.

[0312] Optionally, if the identity information of the subscription device registered at the first device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or, if the identity information of the subscription device registered at the first device does not include the identity information of the second device, no subscription relationship exists between the first device and the second device.

[0313] Optionally, if the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or if the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

[0314] Optionally, the registration request is used to indicate one or more of the following information: identity information of the second device; access control subject information of the second device at the first device; encryption information associated with the first message; verification code information, the verification code information is used to verify the authority of the device sending the registration request; and first priority information, the first priority information is used to indicate the priority of the second device's request to send the first message.

[0315] Optionally, the access control subject information is indicated by a device identifier of the second device; and / or, the access control subject information is indicated by a group identifier of the second device.

[0316] Optionally, the registration information used to register the second device includes one or more of the following information: identity information of the second device; access control subject information of the second device at the first device; encryption information associated with the first message; and second priority information, wherein the second priority information is used to indicate the priority of the first device sending the first message to the second device.

[0317] Optionally, whether the second device is allowed to register at the first device is determined according to whether the first device has storage space to store registration information for registering the second device.

[0318] Optionally, the third device has administrator privileges of the first device.

[0319] Optionally, the first device is a resource-constrained device or an ICD.

[0320] Optionally, the sending module 1110 may be a transceiver 1230. The apparatus 1100 may further include a processor 1210 and a memory 1220, as specifically shown in FIG12 .

[0321] Figure 12 is a schematic block diagram of a communication device according to an embodiment of the present application. The dashed lines in Figure 12 indicate that the unit or module is optional. The device 1200 may be used to implement the method described in the above method embodiment. The device 1200 may be a chip, a terminal device, or a network device.

[0322] The device 1200 may include one or more processors 1210. The processor 1210 may support the device 1200 to implement the method described in the above method embodiment. The processor 1210 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (CPU). Alternatively, the processor may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0323] The apparatus 1200 may further include one or more memories 1220. The memories 1220 store programs that can be executed by the processor 1210, causing the processor 1210 to perform the methods described in the above method embodiments. The memories 1220 may be independent of the processor 1210 or integrated into the processor 1210.

[0324] The apparatus 1200 may further include a transceiver 1230. The processor 1210 may communicate with other devices or chips via the transceiver 1230. For example, the processor 1210 may transmit and receive data with other devices or chips via the transceiver 1230.

[0325] The present application also provides a computer-readable storage medium for storing a program. The computer-readable storage medium can be applied to a terminal or network device provided in the present application, and the program enables a computer to execute the method performed by the terminal or network device in each embodiment of the present application.

[0326] The present application also provides a computer program product. The computer program product includes a program. The computer program product can be applied to a terminal or network device provided in the present application, and the program causes a computer to execute the method performed by the terminal or network device in each embodiment of the present application.

[0327] The embodiments of the present application also provide a computer program. The computer program can be applied to the terminal or network device provided in the embodiments of the present application, and the computer program enables a computer to execute the method performed by the terminal or network device in each embodiment of the present application.

[0328] It should be understood that the terms "system" and "network" in this application can be used interchangeably. In addition, the terms used in this application are only used to explain the specific embodiments of this application and are not intended to limit this application. The terms "first", "second", "third", and "fourth" in the specification and claims of this application and the accompanying drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0329] In the embodiments of this application, the term "indication" may refer to a direct indication, an indirect indication, or an indication of an association. For example, "A indicates B" may refer to a direct indication of B, e.g., B can obtain information through A; it may refer to an indirect indication of B, e.g., A indicates C, e.g., B can obtain information through C; or it may refer to an association between A and B.

[0330] In the embodiment of the present application, "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should be understood that determining B based on A does not mean determining B based solely on A, but B can also be determined based on A and / or other information.

[0331] In the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and indication, configuration and configuration, etc.

[0332] In the embodiments of this application, the term "include" can refer to direct inclusion or indirect inclusion. Alternatively, the term "include" in the embodiments of this application can be replaced with "indicates" or "is used to determine." For example, "A includes B" can be replaced with "A indicates B" or "A is used to determine B."

[0333] In the embodiments of the present application, "pre-definition" or "pre-configuration" may be implemented by pre-storing corresponding codes, tables, or other methods that can be used to indicate relevant information in a device (e.g., a terminal device and a network device). The present application does not limit the specific implementation method. For example, pre-definition may refer to information defined in a protocol.

[0334] In the embodiments of the present application, the “protocol” may refer to a standard protocol in the communications field, for example, it may include an LTE protocol, an NR protocol, and related protocols used in future communication systems, and the present application does not limit this.

[0335] In the embodiments of this application, the term "and / or" is simply a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0336] In various 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.

[0337] 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.

[0338] 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.

[0339] 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.

[0340] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be read by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0341] 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 this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for device connection, characterized in that: include: The first device receives a registration request, where the registration request is used to register the second device; The successful registration of the second device is used to instruct the first device to send a first message to the second device when the first device changes to a connectable state or enters a wake-up state, and the first message is used to instruct the second device to establish a connection with the first device.

2. The method according to claim 1, characterized in that The method further comprises: The first device determines a registration policy for the second device according to a subscription relationship between the first device and the second device.

3. The method according to claim 2, characterized in that The first device determines, according to a subscription relationship between the first device and the second device, a registration policy for the second device, including: In case a subscription relationship exists between the first device and the second device, the first device allows registration of the second device; and / or In the case that there is no subscription relationship between the first device and the second device, the first device does not allow registration of the second device.

4. The method according to claim 2 or 3, characterized in that: The method further comprises: The first device registers the identity information of the subscription device according to the subscription request sent by the subscription device; The identity information of the registered subscription device is used to determine whether a subscription relationship exists between the first device and the second device.

5. The method according to claim 4, characterized in that If the identity information of the registered subscription device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or If the identity information of the registered subscription device does not include the identity information of the second device, then there is no subscription relationship between the first device and the second device.

6. The method according to any one of claims 2 to 5, characterized in that: If the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or If the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

7. The method according to any one of claims 1 to 6, characterized in that The registration request is used to indicate one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; Verification code information, where the verification code information is used to verify the authority of the device sending the registration request; as well as First priority information, where the first priority information is used to indicate the priority of the second device requesting to send the first message.

8. The method according to claim 7, characterized in that The access control subject information is indicated by using a device identifier of the second device; and / or, the access control subject information is indicated by using a group identifier of the second device.

9. The method according to any one of claims 1 to 8, characterized in that The registration request is sent by the second device; or, the registration request is sent by a third device other than the second device.

10. The method according to claim 9, characterized in that The third device has administrator authority of the first device.

11. The method according to any one of claims 1 to 10, characterized in that The registration information used to register the second device includes one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; as well as Second priority information, where the second priority information is used to indicate a priority for the first device to send the first message to the second device.

12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: The first device determines whether there is storage space to store registration information for registering the second device.

13. The method according to any one of claims 1 to 12, characterized in that The method further comprises: The first device registers the second device according to the authority of the device sending the registration request.

14. The method according to claim 13, characterized in that The first device registers the second device according to the authority of the device sending the registration request, including: If the device sending the registration request has administrator privileges for the first device, the first device to register the second device.

15. The method according to claim 13, characterized in that The first device registers the second device according to the authority of the device sending the registration request, including: If the device sending the registration request does not have administrator privileges for the first device, the first device determines whether the verification code information in the registration request matches the verification code information stored by the first device; In response to the verification code information in the registration request matching the verification code information stored by the first device, the first device registers the second device based on the registration request.

16. The method according to any one of claims 1 to 15, characterized in that The method further comprises: The first device establishes a connection with the second device based on a connection request sent by the second device, where the connection request is sent by the second device when the second device determines, according to the first message, that a connection needs to be established with the first device; The first device receives a subscription request sent by the second device, where the subscription request sent by the second device is used to subscribe to resources of the first device.

17. The method according to any one of claims 1 to 16, characterized in that The first device is a resource-constrained device or an intermittently connected device ICD.

18. A method for device connection, characterized in that: include: The second device receives a first message sent by the first device, where the first message is used to instruct the second device to establish a connection with the first device, and the first message is sent when the second device successfully registers at the first device and the first device changes to a connectable state or enters a wake-up state.

19. The method according to claim 18, characterized in that The registration policy of the second device is determined according to a subscription relationship between the first device and the second device.

20. The method according to claim 19, characterized in that If a subscription relationship exists between the first device and the second device, the second device is allowed to register at the first device; and / or If there is no subscription relationship between the first device and the second device, the second device is not allowed to register at the first device.

21. The method according to claim 19 or 20, characterized in that Whether a subscription relationship exists between the first device and the second device is determined based on identity information of a subscribing device registered at the first device.

22. The method according to claim 21, characterized in that If the identity information of the subscription device registered at the first device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or If the identity information of the subscription device registered at the first device does not include the identity information of the second device, then there is no subscription relationship between the first device and the second device.

23. The method according to any one of claims 19 to 22, characterized in that If the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or If the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

24. The method according to any one of claims 18 to 23, characterized in that The registration of the second device at the first device is triggered based on a registration request received by the first device, where the registration request is used to indicate one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; Verification code information, where the verification code information is used to verify the authority of the device sending the registration request; as well as First priority information, where the first priority information is used to indicate the priority of the second device requesting to send the first message.

25. The method according to claim 24, characterized in that The access control subject information is indicated by using a device identifier of the second device; and / or, the access control subject information is indicated by using a group identifier of the second device.

26. The method according to claim 24 or 25, characterized in that The registration request is sent by the second device; or, the registration request is sent by a third device other than the second device.

27. The method according to claim 26, characterized in that The third device has administrator authority of the first device.

28. The method according to any one of claims 18 to 27, characterized in that The registration information used to register the second device includes one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; as well as Second priority information, where the second priority information is used to indicate a priority for the first device to send the first message to the second device.

29. The method according to any one of claims 18 to 28, characterized in that Whether the second device is allowed to register at the first device is determined according to whether the first device has storage space to store registration information for registering the second device.

30. The method according to any one of claims 18 to 29, characterized in that The method further comprises: The second device sends a connection request to the first device, where the connection request is used to establish a connection with the first device, and the connection request is sent by the second device when it is determined according to the first message that a connection needs to be established with the first device; The second device sends a subscription request to the first device, where the subscription request is used to subscribe to resources of the first device.

31. The method according to any one of claims 18 to 30, characterized in that The first device is a resource-constrained device or an intermittently connected device ICD.

32. A method for device connection, characterized in that: include: The third device sends a registration request to the first device, where the registration request is used to register the second device; The successful registration of the second device is used to instruct the first device to send a first message to the second device when the first device changes to a connectable state or enters a wake-up state, and the first message is used to instruct the second device to establish a connection with the first device.

33. The method according to claim 32, characterized in that The registration policy of the second device is determined according to a subscription relationship between the first device and the second device.

34. The method according to claim 33, characterized in that If a subscription relationship exists between the first device and the second device, registration of the second device at the first device is allowed; and / or If there is no subscription relationship between the first device and the second device, registration of the second device at the first device is not permitted.

35. The method according to claim 33 or 34, characterized in that Whether a subscription relationship exists between the first device and the second device is determined based on identity information of a subscribing device registered at the first device.

36. The method according to claim 35, characterized in that If the identity information of the subscription device registered at the first device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or If the identity information of the subscription device registered at the first device does not include the identity information of the second device, then there is no subscription relationship between the first device and the second device.

37. The method according to any one of claims 33 to 36, characterized in that If the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or If the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

38. The method according to any one of claims 32 to 37, characterized in that The registration request is used to indicate one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; Verification code information, where the verification code information is used to verify the authority of the device sending the registration request; as well as First priority information, where the first priority information is used to indicate the priority of the second device requesting to send the first message.

39. The method according to claim 38, characterized in that The access control subject information is indicated by using a device identifier of the second device; and / or, the access control subject information is indicated by using a group identifier of the second device.

40. The method according to any one of claims 32 to 39, characterized in that The registration information used to register the second device includes one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; as well as Second priority information, where the second priority information is used to indicate a priority for the first device to send the first message to the second device.

41. The method according to any one of claims 32 to 40, characterized in that Whether the second device is allowed to register at the first device is determined according to whether the first device has storage space to store registration information for registering the second device.

42. The method according to any one of claims 32 to 41, characterized in that The third device has administrator authority of the first device.

43. The method according to any one of claims 32 to 42, characterized in that The first device is a resource-constrained device or an intermittently connected device ICD.

44. A device for connecting equipment, characterized in that: The device is applied to a first device, and includes: A first receiving module, configured to receive a registration request, where the registration request is used to register a second device; The successful registration of the second device is used to instruct the first device to send a first message to the second device when the first device changes to a connectable state or enters a wake-up state, and the first message is used to instruct the second device to establish a connection with the first device.

45. The device according to claim 44, characterized in that The device also includes: The first determining module is used to determine a registration policy of the second device according to a subscription relationship between the first device and the second device.

46. ​​The device according to claim 45, characterized in that The first determining module is further configured to: If a subscription relationship exists between the first device and the second device, allowing registration of the second device; and / or In the case where there is no subscription relationship between the first device and the second device, registration of the second device is not allowed.

47. The device according to claim 45 or 46, characterized in that The device also includes: A first registration module, configured to register identity information of a subscription device according to a subscription request sent by the subscription device; The identity information of the registered subscription device is used to determine whether a subscription relationship exists between the first device and the second device.

48. The device according to claim 47, characterized in that If the identity information of the registered subscription device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or If the identity information of the registered subscription device does not include the identity information of the second device, then there is no subscription relationship between the first device and the second device.

49. The device according to any one of claims 45 to 48, characterized in that If the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or If the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

50. The device according to any one of claims 44 to 49, characterized in that The registration request is used to indicate one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; Verification code information, where the verification code information is used to verify the authority of the device sending the registration request; as well as First priority information, where the first priority information is used to indicate the priority of the second device requesting to send the first message.

51. The device according to claim 50, characterized in that The access control subject information is indicated by using a device identifier of the second device; and / or, the access control subject information is indicated by using a group identifier of the second device.

52. The device according to any one of claims 44 to 51, characterized in that The registration request is sent by the second device; or, the registration request is sent by a third device other than the second device.

53. The device according to claim 52, characterized in that The third device has administrator authority of the first device.

54. The device according to any one of claims 44 to 53, characterized in that The registration information used to register the second device includes one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; as well as Second priority information, where the second priority information is used to indicate a priority for the first device to send the first message to the second device.

55. The device according to any one of claims 44 to 54, characterized in that The device also includes: The second determining module is used to determine whether there is storage space to store registration information for registering the second device.

56. The device according to any one of claims 44 to 55, characterized in that The device also includes: The second registration module is used to register the second device according to the authority of the device that sends the registration request.

57. The device according to claim 56, characterized in that The second registration module is further used for: If the device sending the registration request has administrator authority for the first device, the second device is registered based on the registration request.

58. The device according to claim 56, characterized in that The second registration module is further used for: If the device sending the registration request does not have administrator privileges for the first device, determining whether the verification code information in the registration request matches the verification code information stored by the first device; In response to the verification code information in the registration request matching the verification code information stored by the first device, registering the second device based on the registration request.

59. The device according to any one of claims 44 to 58, characterized in that The device also includes: a connection module, configured to establish a connection with the second device based on a connection request sent by the second device, wherein the connection request is sent by the second device when the second device determines that a connection needs to be established with the first device according to the first message; The second receiving module is used to receive a subscription request sent by the second device, where the subscription request sent by the second device is used to subscribe to resources of the first device.

60. The device according to any one of claims 44 to 59, characterized in that The first device is a resource-constrained device or an intermittently connected device ICD.

61. A device for connecting a device, characterized in that: The device is applied to a second device, and includes: A receiving module is used to receive a first message sent by a first device, where the first message is used to instruct the second device to establish a connection with the first device, and the first message is sent when the second device successfully registers at the first device and the first device changes to a connectable state or enters a wake-up state.

62. The device according to claim 61, characterized in that The registration policy of the second device is determined according to a subscription relationship between the first device and the second device.

63. The device according to claim 62, characterized in that If a subscription relationship exists between the first device and the second device, the second device is allowed to register at the first device; and / or If there is no subscription relationship between the first device and the second device, the second device is not allowed to register at the first device.

64. The device according to claim 62 or 63, characterized in that Whether a subscription relationship exists between the first device and the second device is determined based on identity information of a subscribing device registered at the first device.

65. The device according to claim 64, characterized in that If the identity information of the subscription device registered at the first device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or If the identity information of the subscription device registered at the first device does not include the identity information of the second device, then there is no subscription relationship between the first device and the second device.

66. The device according to any one of claims 62 to 65, characterized in that If the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or If the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

67. The device according to any one of claims 61 to 66, characterized in that The registration of the second device at the first device is triggered based on a registration request received by the first device, where the registration request is used to indicate one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; Verification code information, where the verification code information is used to verify the authority of the device sending the registration request; as well as First priority information, where the first priority information is used to indicate the priority of the second device requesting to send the first message.

68. The device according to claim 67, characterized in that The access control subject information is indicated by using a device identifier of the second device; and / or, the access control subject information is indicated by using a group identifier of the second device.

69. The device according to claim 67 or 68, characterized in that The registration request is sent by the second device; or, the registration request is sent by a third device other than the second device.

70. The device according to claim 69, characterized in that The third device has administrator authority of the first device.

71. The device according to any one of claims 61 to 70, characterized in that The registration information used to register the second device includes one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; as well as Second priority information, where the second priority information is used to indicate a priority for the first device to send the first message to the second device.

72. The device according to any one of claims 61 to 71, characterized in that Whether the second device is allowed to register at the first device is determined according to whether the first device has storage space to store registration information for registering the second device.

73. The device according to any one of claims 61 to 72, characterized in that The device also includes: a first sending module, configured to send a connection request to the first device, wherein the connection request is used to establish a connection with the first device, and the connection request is sent by the second device when it is determined according to the first message that a connection needs to be established with the first device; The second sending module is used to send a subscription request to the first device, where the subscription request is used to subscribe to resources of the first device.

74. The device according to any one of claims 61 to 73, characterized in that The first device is a resource-constrained device or an intermittently connected device ICD.

75. A device for connecting equipment, characterized in that: The device is applied to a third device, and the device includes: A sending module, configured to send a registration request to the first device, wherein the registration request is used to register the second device; The successful registration of the second device is used to instruct the first device to send a first message to the second device when the first device changes to a connectable state or enters a wake-up state, and the first message is used to instruct the second device to establish a connection with the first device.

76. The device according to claim 75, characterized in that The registration policy of the second device is determined according to a subscription relationship between the first device and the second device.

77. The device according to claim 76, characterized in that If a subscription relationship exists between the first device and the second device, registration of the second device at the first device is allowed; and / or If there is no subscription relationship between the first device and the second device, registration of the second device at the first device is not permitted.

78. The device according to claim 76 or 77, characterized in that Whether a subscription relationship exists between the first device and the second device is determined based on identity information of a subscribing device registered at the first device.

79. The device according to claim 78, characterized in that If the identity information of the subscription device registered at the first device includes the identity information of the second device, a subscription relationship exists between the first device and the second device; and / or If the identity information of the subscription device registered at the first device does not include the identity information of the second device, then there is no subscription relationship between the first device and the second device.

80. The device according to any one of claims 76 to 79, characterized in that If the first device allows registration of the second device, the sleep cycle corresponding to the first device is a long sleep cycle; and / or If the first device does not allow registration of the second device, the sleep cycle corresponding to the first device is a short sleep cycle.

81. The device according to any one of claims 75 to 80, characterized in that The registration request is used to indicate one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; Verification code information, where the verification code information is used to verify the authority of the device sending the registration request; as well as First priority information, where the first priority information is used to indicate the priority of the second device requesting to send the first message.

82. The device according to claim 81, characterized in that The access control subject information is indicated by using a device identifier of the second device; and / or, the access control subject information is indicated by using a group identifier of the second device.

83. The device according to any one of claims 75 to 82, characterized in that The registration information used to register the second device includes one or more of the following information: identity information of the second device; Access control subject information of the second device at the first device; encryption information associated with the first message; as well as Second priority information, where the second priority information is used to indicate a priority for the first device to send the first message to the second device.

84. The device according to any one of claims 75 to 83, characterized in that Whether the second device is allowed to register at the first device is determined according to whether the first device has storage space to store registration information for registering the second device.

85. The device according to any one of claims 75 to 84, characterized in that The third device has administrator authority of the first device.

86. The device according to any one of claims 75 to 85, characterized in that The first device is a resource-constrained device or an intermittently connected device ICD.

87. A device for connecting a device, characterized in that: The device comprises a transceiver, a memory and a processor, wherein the memory is used to store a program, and the processor is used to call the program in the memory so that the device executes the method as described in any one of claims 1-43.

88. A device, characterized in that It comprises a processor, which is used to call a program from a memory so that the device executes the method as described in any one of claims 1-43.

89. A chip, characterized in that: It comprises a processor, which is used to call a program from a memory so that a device equipped with the chip executes a method as claimed in any one of claims 1 to 43.

90. A computer-readable storage medium, characterized in that A program is stored thereon, the program causing a computer to execute the method according to any one of claims 1 to 43.

91. A computer program product, characterized in that A program is included, which causes a computer to execute the method as claimed in any one of claims 1 to 43.

92. A computer program, characterized in that The computer program causes a computer to execute the method according to any one of claims 1 to 43.

Citation Information

Patent Citations

  • Communicating with a constrained internet device

    CN104662867A

  • Method and system for approving or disapproving connection requests

    CN108307678A

  • Method for discontinuously connecting large number of terminals with router, and router

    CN111131054A

  • Network redistribution method and device and storage medium

    CN112543492A

  • Intermittently connectable electronic device with unique identifier

    EP0869640A1