Equipment registration method and device, electronic equipment and storage medium

By obtaining the device's context information through the gateway to calculate priority, and adopting a context-driven registration mechanism, the conflict problem when multiple gateways discover devices at the same time is resolved, improving device access efficiency and reducing the probability of mismatch.

CN121645408APending Publication Date: 2026-03-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, when multiple gateways discover the same device simultaneously, conflicts and incorrect bindings are likely to occur. The lack of contextual information as a decision factor results in low device access efficiency and a high probability of mismatch.

Method used

The gateway receives broadcast information from devices, obtains context information, including historical and current information, calculates the priority information of devices, and performs data interaction according to priority to complete registration, adopting a context-driven registration mechanism.

Benefits of technology

By comprehensively considering context information to calculate device priority, conflicts are avoided when multiple gateways discover the same device simultaneously, device initialization efficiency is improved, the probability of mismatch is significantly reduced, and registration is completed faster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121645408A_ABST
    Figure CN121645408A_ABST
Patent Text Reader

Abstract

The invention provides an equipment registration method and device, electronic equipment and a storage medium, and the method comprises the steps that a gateway receives broadcast information sent by equipment, and obtains context information related to equipment registration; the context information comprises historical context information stored in the gateway and current context information generated by the gateway in a scanning process; determining priority information of the gateway registration device according to the context information; and in response to the broadcast information, performing data interaction with the equipment according to the priority information so as to complete registration operation for the equipment. Different from an existing static mode of finding and binding first, the method is based on the context information and the priority, conflict resolution and accurate binding can be achieved, conflicts generated when multiple gateways find the same device at the same time are avoided, the device initialization efficiency is improved, faster registration completion is achieved in a large-scale scene, and the mismatching probability is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of device registration, and particularly relates to a device registration method and device, an electronic device and a storage medium. BACKGROUND

[0002] In related technologies, the discovery and access of devices usually depend on two types of methods: One type is that a device end periodically actively broadcasts basic information, and a gateway receives and analyzes the information to complete identification and binding; The other type is that a gateway end periodically polls and scans a local area network, and initiates a registration request through detected air conditioner device information.

[0003] These technical solutions improve the device access efficiency to a certain extent, but there may be a problem that multiple gateways simultaneously register a device. SUMMARY

[0004] In view of the above problems, a device registration method and device, an electronic device and a storage medium are provided to overcome the above problems or at least partially solve the above problems, comprising: A device registration method applied to a gateway, the method comprising: receiving broadcast information sent by the device, and obtaining context information related to device registration; determining priority information of the gateway registering the device according to the context information; in response to the broadcast information, performing data interaction with the device according to the priority information to complete a registration operation for the device.

[0005] In some embodiments, the determining of the priority information of the gateway registering the device according to the context information comprises: determining a registration time window of the device; calculating the priority information of the gateway registering the device according to the context information within the registration time window of the device.

[0006] In some embodiments, the data interaction with the device according to the priority information comprises: determining a registration time delay of the gateway for the device according to the priority information; performing data interaction with the device according to the registration time delay.

[0007] In some embodiments, the data interaction with the device according to the registration time delay comprises: calculating a duration; When the duration matches the registration delay, data interaction is performed with the device to complete a registration operation for the device.

[0008] In some embodiments, the priority information of the gateway registering the device is calculated according to the context information, including: According to the context information, the current signal strength information of the device, the timestamp of the gateway receiving the broadcast information, and the topology matching degree of the device and the gateway are determined. According to the current signal strength information, the timestamp, and the topology matching degree, a context factor is determined. According to the context factor, the priority information of the gateway registering the device is calculated.

[0009] In some embodiments, when data interaction is performed with the device according to the priority information in response to the broadcast information, the method further includes: If the registration confirmation information returned by the device is received, the information of the device is stored in the local device list of the gateway; the device is used to store the information received from the gateway when returning the registration confirmation information. If the registration confirmation information returned by the device is not received, the registration of the device is abandoned.

[0010] In some embodiments, after the gateway completes the registration of the device, the method further includes: The communication path of the device and the gateway is determined, and the path context information corresponding to the communication path and the service characteristics of the service data corresponding to the communication path are determined. According to the path context information and the service characteristics, the communication path is adjusted.

[0011] In some embodiments, the gateway is deployed with plug-ins for different protocols; after receiving the broadcast information sent by the device, the method further includes: According to the broadcast information, the target protocol of the device is determined. The target plug-in corresponding to the target protocol is called to process the broadcast information.

[0012] In some embodiments, the context information includes historical context information saved in the gateway and current context information generated by the gateway in the scanning process; the historical context information includes at least one of the following information: The historical state information of the device and the historical state information of the gateway. The current context information includes at least one of the following information: current state information of the device, current state information of the gateway.

[0013] The embodiment of the present application further provides a device registration apparatus, which comprises: a receiving and acquiring module, configured to receive broadcast information sent by the device and acquire context information related to the device registration; a priority determining module, configured to determine priority information of the gateway registering the device according to the context information; a registration module, configured to perform data interaction with the device according to the priority information to complete the registration operation for the device in response to the broadcast information.

[0014] In some embodiments, the priority determining module is configured to determine a registration time window of the device; and the priority information of the gateway registering the device is calculated according to the context information within the registration time window of the device.

[0015] In some embodiments, the registration module is configured to determine a registration time delay of the gateway for the device according to the priority information; and the data interaction with the device is performed according to the registration time delay.

[0016] In some embodiments, the registration module is configured to calculate a duration; and the data interaction with the device is performed to complete the registration operation for the device when the duration matches the registration time delay.

[0017] In some embodiments, the priority determining module is configured to determine current signal strength information of the device, a time stamp of the gateway receiving the broadcast information and a topology matching degree of the device and the gateway according to the context information; to determine a context factor according to the current signal strength information, the time stamp and the topology matching degree; and to calculate the priority information of the gateway registering the device according to the context factor.

[0018] In some embodiments, the registration module is further configured to store information of the device to a local device list of the gateway if registration confirmation information returned by the device is received when the data interaction with the device is performed according to the priority information in response to the broadcast information; the device is configured to store information received from the gateway when the registration confirmation information is returned; and the registration of the device is abandoned if the registration confirmation information returned by the device is not received.

[0019] In some embodiments, the registration module is further configured to, after the gateway completes the registration of the device, determine a communication path of the device and the gateway, determine path context information corresponding to the communication path and service characteristics of service data corresponding to the communication path, and adjust the communication path according to the path context information and the service characteristics.

[0020] In some embodiments, the gateway is deployed with plug-ins for different protocols; and the registration module is further configured to, after receiving the broadcast information sent by the device, determine a target protocol of the device according to the broadcast information, and call a target plug-in corresponding to the target protocol to process the broadcast information.

[0021] In some embodiments, the context information includes historical context information saved in the gateway and current context information generated by the gateway in a scanning process; and the historical context information includes at least one of the following information: historical state information of the device and historical state information of the gateway; The current context information includes at least one of the following information: current state information of the device and current state information of the gateway.

[0022] Embodiments of the present application also provide an electronic device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and the computer program, when executed by the processor, implements the device registration method as above.

[0023] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the device registration method as above.

[0024] Embodiments of the present application have the following advantages: In the embodiments of the present application, the gateway receives the broadcast information sent by the device and acquires context information related to device registration; the context information includes historical context information saved in the gateway and current context information generated by the gateway in the scanning process; according to the context information, priority information of the gateway registering the device is determined; in response to the broadcast information, data interaction is performed with the device according to the priority information to complete the registration operation for the device. In the embodiments of the present application, the priority information of the gateway registering the device is calculated by comprehensively considering the context information; then the registration is performed based on the priority information, so as to realize the context-driven registration mechanism. Different from the existing static mode of "discovery first and binding first", the present application can conflict resolution and accurate binding based on the context information and the priority, avoid the conflict when multiple gateways discover the same device at the same time, improve the device initialization efficiency, realize faster registration completion in a large-scale scene, and significantly reduce the misconfiguration probability. BRIEF DESCRIPTION OF DRAWINGS

[0025] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which: Figure 1 is a step flow chart of a device registration method according to an embodiment of the present application; Figure 2 is a step flow chart of another device registration method according to an embodiment of the present application; Figure 3 is a step flow chart of another device registration method according to an embodiment of the present application; Figure 4 is a step flow chart of a bidirectional registration according to an embodiment of the present application; Figure 5 is a step flow chart of adjusting a communication path according to an embodiment of the present application; Figure 6 is a structural schematic diagram of a device registration apparatus according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the above objectives, characteristics and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0027] In the scenario of multiple gateways coexisting and complex wiring, multiple gateways can discover the same device at the same time to register, thereby causing the problem of conflict or error binding. The reason is that there is a lack of context information (such as signal strength, historical binding record, etc.) as a decision factor, causing the same device to be simultaneously competed for binding by multiple gateways. In view of this, the embodiment of the present application proposes a device registration method, which calculates the priority information of the gateway registering the device by comprehensively considering the context information; and then performs registration based on the priority information, thereby realizing a context-driven registration mechanism. Different from the existing static mode of "discovering first and binding first", the present application can conflict resolution and accurate binding based on context information and priority, avoid conflict when multiple gateways discover the same device at the same time, improve device initialization efficiency, realize faster registration completion in a large-scale scenario, and significantly reduce the misconfiguration probability.

[0028] Reference Figure 1 A step flowchart of a device registration method of an embodiment of the present application is shown, which can include the following steps: Step 101, receiving the broadcast information sent by the device and obtaining the context information related to device registration.

[0029] In some embodiments, the above-mentioned device registration method can be applied to a gateway, which can be a gateway for device registration, also known as a smart home gateway. The gateway is the core hub device connecting smart home devices and user control terminals (mobile phone App, smart speaker, etc.), and simultaneously undertakes functions such as device registration management, protocol conversion, data forwarding, security authentication, etc. The device can refer to a smart home device, such as a smart air conditioner, a smart refrigerator, etc.

[0030] In the embodiment of the present application, the device enters the initialization stage when starting; at this time, the device can periodically send a broadcast signal to the local area network; the broadcast signal can include the basic information of the device, including but not limited to the device unique identifier (Device ID), the device model, the supported communication protocol version, the manufacturer information, etc. Through this step, the gateway can quickly capture the existence of the device in the network, laying the foundation for subsequent registration.

[0031] The gateway can perform network scanning within a set period, which can not only receive the broadcast information sent by the device actively, but also synchronously collect the context information related to device registration.

[0032] The context information can include historical context information saved in a local database of the gateway, such as historical binding records of the gateway and the device, last registration time of the device, communication success rate of the device and the gateway, and historical average RSSI (Received Signal Strength Indication) of the device.

[0033] The context information can also include current context information dynamically generated by the gateway in a scanning process, such as the number of occurrences of the device in the current scanning period, time difference of receiving the same broadcast information by multiple gateways, and current link load of the gateway.

[0034] In some embodiments of the present application, the historical context information includes at least one of the following information: historical state information of the device and historical state information of the gateway; The current context information includes at least one of the following information: current state information of the device and current state information of the gateway.

[0035] The historical state information of the device can refer to state information in a historical running process of the device, such as historical average RSSI and last registration time of the device; the historical state information of the gateway can refer to state information in a historical running process of the gateway, such as historical binding records of the gateway and the device.

[0036] The current state information of the device can refer to state information in a current running process of the device, such as current topological position of the device; the current state information of the gateway can refer to state information in a current running process of the gateway, such as current link load of the gateway, which is not limited in the embodiments of the present application.

[0037] In step 102, priority information of the gateway registering the device is determined according to the context information.

[0038] After obtaining the context information, the priority information of the gateway registering the device can be determined according to the historical context information and the current context information; the priority information can be used to measure the priority of the gateway registering the device, and the priority information can be represented by a value, and the larger the value is, the more likely the device is registered by the gateway.

[0039] For example, the priority information of the gateway registering the device can be determined by comprehensively considering the historical context information and the current context information.

[0040] For example, if the gateway is close to the device, a larger priority information can be determined; if the gateway is far away from the device, a smaller priority information can be determined.

[0041] For example, if the device has connected to gateway M m times and gateway N n times, and m is greater than n, the priority information of gateway M is greater than that of gateway N.

[0042] In step 103, in response to the broadcast information, data interaction is performed with the device according to the priority information, so as to complete the registration operation of the device.

[0043] After determining the priority information of the gateway for the registration device, the gateway can respond to the broadcast information received in advance, and perform data interaction with the device according to the priority information, so as to complete the registration operation of the device.

[0044] In some embodiments, the gateway with the highest priority information can complete the data interaction with the device, so as to complete the registration operation of the device; and the gateway with lower priority information cannot complete the data interaction with the device, so as to complete the registration operation of the device. In the embodiments of the present application, the priority information of the gateway for the registration device is calculated by comprehensively considering the context information; and then the registration is performed based on the priority information, so as to realize the registration mechanism driven by the context. Different from the static mode of "discovery first and binding first", the present application can resolve conflicts and accurately bind based on the context information and the priority, avoid conflicts when multiple gateways discover the same device at the same time, improve the initialization efficiency of the device, realize faster registration completion in a large-scale scenario, and significantly reduce the misconfiguration probability.

[0045] In the embodiments of the present application, the gateway receives the broadcast information sent by the device, and obtains the context information related to the registration of the device; the context information includes the historical context information saved in the gateway and the current context information generated in the scanning process of the gateway; the priority information of the gateway for the registration device is determined according to the context information; in response to the broadcast information, data interaction is performed with the device according to the priority information, so as to complete the registration operation of the device. In the embodiments of the present application, the priority information of the gateway for the registration device is calculated by comprehensively considering the context information; and then the registration is performed based on the priority information, so as to realize the registration mechanism driven by the context. Different from the static mode of "discovery first and binding first", the present application can resolve conflicts and accurately bind based on the context information and the priority, avoid conflicts when multiple gateways discover the same device at the same time, improve the initialization efficiency of the device, realize faster registration completion in a large-scale scenario, and significantly reduce the misconfiguration probability.

[0046] Referring to Figure 2 , another step flowchart of a registration method of a device is shown, which can include the following steps: In step 201, broadcast information sent by a device is received, and context information related to the registration of the device is obtained.

[0047] In the embodiments of the present application, the device enters an initialization stage when starting; at this time, the device can periodically send a broadcast signal to the local area network; for example: device unique identifier, device model, supported communication protocol version, manufacturer information, etc.

[0048] The gateway can perform network scanning within a set period, which can not only receive broadcast information actively sent by the device, but also synchronously collect context information related to device registration, for example: including historical binding records of the gateway and the device, the last registration time of the device, the communication success rate of the device and the gateway, and the historical average RSSI of the device, etc.

[0049] Step 202, determine the registration time window of the device.

[0050] In some embodiments, in a high concurrency scenario, the registration request can be allocated based on the registration time window to avoid repeated binding; specifically, each device corresponds to a registration time window; the registration operation for the device can only be performed within the registration time window.

[0051] When the gateway receives the broadcast information, it can also collect and determine the registration time window of the device.

[0052] Step 203, within the registration time window of the device, calculate the priority information of the gateway registering the device according to the context information.

[0053] After determining the registration time window, the gateway can add the device to the "registration pool" within the registration time window (for example: 50-200ms); for the devices in the pool, the gateway will calculate the priority information of the gateway registering the device according to the context information within the registration time window.

[0054] Step 204, determine the registration delay of the gateway for the device according to the priority information.

[0055] In some embodiments, after determining the priority information, the registration delay of the gateway for the device can be determined based on the priority information; in the embodiments of the present application, different priority information corresponds to different registration delay; by involving different registration delay, the registration operation of the gateway can be divided by time, so as to realize conflict resolution and accurate binding: That is, the shorter the registration delay, the earlier the gateway performs data interaction with the device to complete the registration operation, and the longer the registration delay, the later the gateway performs data interaction with the device to complete the registration operation; for the device, the first gateway that performs data interaction will complete the registration operation.

[0056] Step 205, in response to the broadcast information, perform data interaction with the device according to the registration delay to complete the registration operation for the device.

[0057] After determining the registration delay, the gateway can interact with the device in data according to the registration delay in response to the broadcast information; since the registration delays corresponding to different gateways are different, different gateways send registration requests to the device at different times. The first gateway that sends a registration request to the device will complete data interaction with the device and complete the registration operation for the device.

[0058] In the embodiment of the application, the broadcast information sent by the device is received, and context information related to device registration is obtained; a registration time window of the device is determined; priority information of the gateway registering the device is calculated according to the context information within the registration time window of the device; the registration delay of the gateway for the device is determined according to the priority information; and data interaction with the device is performed according to the registration delay in response to the broadcast information to complete the registration operation for the device. The priority information of the gateway registering the device is calculated by comprehensively considering the context information in the embodiment of the application; and then the registration is performed based on the priority information, so as to realize the context-driven registration mechanism. Different from the existing static method of "discovery first and binding first", the application can conflict resolution and accurate binding based on context information and priority, avoid conflicts when multiple gateways discover the same device at the same time, improve device initialization efficiency, realize faster registration completion in a large-scale scenario, and significantly reduce the misconfiguration probability.

[0059] Reference Figure 3 The step flowchart of another device registration method of the embodiment of the application is shown, which can include the following steps: Step 301, receiving broadcast information sent by a device and obtaining context information related to device registration.

[0060] In the embodiment of the application, the device enters an initialization stage when starting; at this time, the device can periodically send a broadcast signal to a local area network; for example: device unique identifier, device model, supported communication protocol version, manufacturer information, etc.

[0061] The gateway can perform network scanning within a set period, and the network scanning can not only receive broadcast information actively sent by the device, but also synchronously collect context information related to device registration, for example: including historical binding records of the gateway and the device, last registration time of the device, communication success rate of the device and the gateway, and historical average RSSI of the device.

[0062] Step 302, determining a registration time window of the device.

[0063] In some embodiments, in a high concurrency scenario, the registration request can be allocated based on a registration time window to avoid repeated binding; specifically, each device corresponds to a registration time window; the registration operation for the device can only be performed within the registration time window; when receiving the broadcast information, the gateway can also collect the registration time window of the device.

[0064] Step 303, according to the context information, determine the current signal strength information of the device, the timestamp of the gateway receiving the broadcast information, and the topology matching degree of the device and the gateway.

[0065] In some embodiments, the gateway can first determine the current signal strength information of the device, the timestamp of the gateway receiving the broadcast information, and the topology matching degree of the device and the gateway according to the context information; wherein the topology matching degree of the device and the gateway can be determined based on the location of the device and the gateway, and the greater the distance between the gateway and the device, the smaller the topology matching degree.

[0066] Step 304, according to the current signal strength information, the timestamp, and the topology matching degree, determine the context factor.

[0067] After determining the current signal strength information, the timestamp of the gateway receiving the broadcast information, and the topology matching degree of the device and the gateway, the gateway can respectively convert the current signal strength information, the timestamp of the gateway receiving the broadcast information, and the topology matching degree of the device and the gateway into numerical values, thereby obtaining a plurality of context factors.

[0068] Exemplarily, the context factor can include: RSSI, historical binding weight, current load, physical topology matching degree, reception times and received timestamp, etc.

[0069] Step 305, within the registration time window of the device, calculate the priority information of the gateway registering the device according to the context factor.

[0070] In some embodiments, the gateway can calculate a registration priority score within the registration time window according to the context factor and a preset weight; the registration priority score is a numerical representation of the priority information.

[0071] Exemplarily, the registration priority score can be calculated by the following formula: Score=α*RSSI+γ*(time stamp inverse weight)+δ*topology matching degree; Wherein, α, γ, δ are preset weights, which can be set according to actual conditions; the time stamp inverse weight can be determined according to the timestamp of the gateway receiving the broadcast information, and the earlier the timestamp, the greater the time stamp inverse weight.

[0072] Step 306, determine the registration delay of the gateway for the device according to the priority information.

[0073] In some embodiments, after determining the priority information, a registration delay of the gateway for the device can be determined based on the priority information; in embodiments of the present application, different priority information corresponds to different registration delays; by involving different registration delays, the registration operation of the gateway can be divided in time, so as to realize conflict resolution and accurate binding: That is, the shorter the registration delay of the gateway, the earlier the gateway performs data interaction with the device to complete the registration operation, and the longer the registration delay of the gateway, the later the gateway performs data interaction with the device to complete the registration operation; for the device, the first gateway that performs data interaction will complete the registration operation.

[0074] Step 307, calculating the duration.

[0075] After determining the registration delay, the gateway performs data interaction with the device according to the registration delay; specifically, the gateway can first calculate the duration from receiving the broadcast information, or can calculate the duration from the start time of the registration time window.

[0076] Step 308, when the duration matches the registration delay, responding to the broadcast information, performing data interaction with the device to complete the registration operation for the device.

[0077] In some embodiments, after determining the duration, it can be compared whether the duration matches the registration delay, that is, whether the duration is equal to the registration delay.

[0078] When the duration is less than the registration delay, the duration can be continuously calculated; otherwise, if the duration is equal to the registration delay, that is, the duration matches the registration delay, the gateway can respond to the broadcast information, send a registration request to the device, and complete subsequent data interaction with the device to complete the registration operation for the device.

[0079] For the device, it will respond to the first received registration request for confirmation, and write the unique identifier and configuration information of the gateway sending the registration request into its own storage.

[0080] Synchronously, after receiving the confirmation operation, the gateway can record the device information to the local device list.

[0081] In some embodiments of the present application, when responding to the broadcast information, performing data interaction with the device according to the priority information, any one of the above embodiments can further include the following steps: If the registration confirmation information returned by the device is received, the information of the device is stored to the local device list of the gateway; the device is used to store the information received from the gateway when returning the registration confirmation information; if the registration confirmation information returned by the device is not received, the registration for the device is abandoned.

[0082] In some embodiments, the gateway can store the information of the device to the local device list of the gateway if the registration confirmation information returned by the device is received after sending the registration request to the device.

[0083] For the device, when determining to be registered by the gateway and returning the registration confirmation information to the gateway, the information received from the gateway (e.g., the unique identifier of the gateway, the configuration information sent by the gateway for the device, etc.) can be stored. Through this step, the bidirectional binding between the air conditioning device and the gateway is realized, and the identity confirmation of both parties is ensured, avoiding the misconfiguration problem caused by one-way communication.

[0084] On the contrary, if the gateway does not receive the registration confirmation information returned by the device, the registration of the device can be abandoned to avoid repeated registration.

[0085] In some embodiments of the present application, after the gateway completes the registration of the device, any one of the above embodiments can further include the following steps: determining the communication path of the device and the gateway, determining the path context information corresponding to the communication path, and determining the service characteristics of the service data corresponding to the communication path; and adjusting the communication path according to the path context information and the service characteristics.

[0086] In some embodiments, after the gateway completes the bidirectional registration of the device, the gateway not only statically saves the configuration information, but also dynamically configures the communication path of different devices based on real-time service load, link state and application priority, so as to realize flexible and efficient communication resource allocation.

[0087] Specifically, the gateway can first determine the communication path of the device and determine the path context information for representing the situation of the communication path, such as the state of the communication path.

[0088] In addition, the service data corresponding to the communication path can be identified, and the service characteristics of the service data can be extracted.

[0089] After determining the path context information and the service characteristics, the communication path can be adjusted from two aspects of the real-time state of the communication path and the basic transmission data of the communication path according to the path context information and the service characteristics. Thus, both the needs of the service data and the current situation of the communication path are considered, and the communication path is properly adjusted.

[0090] In some embodiments of the present application, the gateway is deployed with plug-ins for different protocols; after receiving the broadcast information sent by the device, any one of the above embodiments can further include the following steps: Based on the broadcast information, determine the target protocol of the device; then call the target plugin corresponding to the target protocol to process the broadcast information.

[0091] In some embodiments, plugins for identifying and processing different protocols can be pre-deployed in the gateway.

[0092] During the registration process, the gateway automatically loads the corresponding protocol-compatible plugins by analyzing the device's message characteristics or protocol identifiers. This plug-in mechanism supports unified processing of air conditioning devices from different brands and with different communication protocols, ensuring consistency in the registration process even in multi-brand scenarios.

[0093] Specifically, after receiving a broadcast message, the gateway can first identify and analyze the broadcast message to determine the target protocol corresponding to the device.

[0094] Then, the gateway can call the target plugin corresponding to the target protocol to parse the broadcast information and perform operations such as selecting, judging, and registering devices. The plugin is not only responsible for communication adaptation, but also directly participates in the identification and judgment process of device registration. In this way, devices of different brands can be accurately identified at the beginning of registration, and will not fail to connect due to different protocols, nor will the user need to select them manually.

[0095] Taking air conditioning equipment as an example: (Refer to...) Figure 4 The following is a flowchart illustrating the steps of a two-way registration according to an embodiment of this application: Device initialization and active broadcasting: Air conditioning equipment ( Figure 4 The gateway (AC) enters the initialization phase during startup, periodically sending broadcast signals to the local area network. These broadcast signals contain basic device information, including but not limited to the device's unique identifier (DeviceID), device model, supported communication protocol versions, and manufacturer information. Through this step, the gateway (... Figure 4 The GW (Government Grid Connector) can quickly detect the presence of air conditioning devices in the network, laying the foundation for subsequent two-way registration.

[0096] Gateway polling scan and context-aware registration priority adjustment: The gateway performs network scans within a set period, receiving not only active broadcast information from air conditioning devices but also simultaneously collecting contextual information. Contextual information includes, but is not limited to, signal strength index (RSSI), physical topology location, historical binding records, and registration time windows. Through this process, the gateway gains contextual awareness of the device status in the current environment, providing data support for subsequent dynamic registration priority adjustments.

[0097] When multiple gateways detect the same air conditioning device at the same time, the system makes priority determination based on context information and determines the registration order. For example, the gateway with the best signal strength is preferentially selected; if there is a historical binding record, the original binding gateway is preferentially reconnected. In a high concurrency scenario, the registration request is allocated based on a time window mechanism to avoid repeated binding.

[0098] Through this step, conflicts caused by multiple gateways simultaneously registering the same air conditioning device are effectively avoided, and the accuracy and efficiency of registration are improved.

[0099] In the embodiments of the present application, the gateway can mainly complete the registration of the device based on three types of data: first, real-time information extracted from the broadcast information of the air conditioning device, such as device ID, protocol type, and RSSI returned by the network card driver layer; second, historical context information saved in the local database of the gateway, including historical binding records, last registration time, communication success rate, and historical average RSSI; third, current context information dynamically generated by the gateway in the scanning process, such as the number of appearances of the device in the current scanning period, the time difference of receiving the same broadcast by multiple gateways, and the link load of the current gateway.

[0100] Two-way registration confirmation and differential dynamic configuration mechanism: After the gateway analyzes the broadcast information of the air conditioning device and completes the priority information determination, it sends a registration request to the target air conditioning device. After receiving the request, the air conditioning device confirms and writes the unique identifier and configuration information of the gateway into its own storage; at the same time, the gateway synchronously records the air conditioning device information to the local device list, and thus the two-way binding is completed. Through this step, two-way binding between the air conditioning device and the gateway is realized, ensuring that both parties complete identity confirmation and avoiding the misconfiguration problem caused by one-way communication.

[0101] Referring to Figure 5 , a step flowchart of adjusting the communication path is shown: After the device (AC) completes two-way registration, the gateway (GW) not only statically saves the configuration information, but also differentially and dynamically configures the communication path of different devices based on real-time business load, link state, and application priority. For example, when the Wi-Fi link of a certain air conditioning device is in a high load state, the system can temporarily switch its low-priority energy consumption reporting service to the ZigBee channel for transmission, thereby ensuring that the Wi-Fi link reserves bandwidth for time-sensitive data flow. This mechanism is different from the one-way polling or fixed priority scheduling in the prior art, but is a combination of context awareness and business characteristics.

[0102] In the embodiments of the present application, the gateway can first send a protocol adaptation instruction to the device to instruct the device to switch the transmission channel. After receiving the protocol adaptation instruction, the device can perform an operation of confirmation.

[0103] Multi-brand compatible protocol adaptation: In the registration process, the gateway automatically loads the corresponding protocol adaptation plug-in by analyzing the message characteristics or protocol identification of the air conditioning equipment. This plug-in mechanism supports the unified processing of air conditioning equipment of different brands and different communication protocols, so that the registration process remains consistent in a multi-brand coexistence scenario. For example, when a user replaces a Wi-Fi air conditioner of original brand A with a ZigBee air conditioner of brand B, the gateway only needs to call the corresponding plug-in to complete the compatibility without modifying the upper-layer business logic. Through this step, the compatibility and expandability of cross-brand devices are realized, and the maintenance and upgrade costs of the system are reduced.

[0104] Registration result storage and security processing: After completing the bidirectional registration and dynamic configuration, the gateway stores the registration results in the local database or distributed storage module, and can optionally report key information to the cloud management platform. In terms of security, the registration process can add encryption authentication or multi-factor verification mechanisms, such as joint verification using device ID, MAC address, and pre-shared key, to ensure that only legitimate devices can complete registration. Thus, the registration process ends.

[0105] The present application proposes a context-aware bidirectional registration strategy, which introduces signal strength, physical topology, historical network configuration records, and time window as context information in the device registration process, dynamically adjusts the registration priority of the device, and realizes a context-driven bidirectional confirmation mechanism. Unlike the existing static method of "discovery first, binding first", the present application realizes conflict resolution and accurate binding through context awareness factors and a bidirectional confirmation closed loop. It avoids conflicts when multiple gateways discover the same air conditioner at the same time, improves device initialization efficiency, realizes faster registration completion in large-scale scenarios, and significantly reduces the probability of misconfiguration.

[0106] In addition, the present application also proposes a multi-brand compatible registration adaptation framework, which dynamically loads the corresponding plug-in according to the message characteristics or protocol identification of the device through the protocol plug-in mechanism of the gateway, and realizes the unification of the registration process of different brand air conditioning equipment. Unlike the existing method of relying on a unified thing model, the present application supports the coexistence of multi-brand devices through a plug-in protocol adaptation layer, significantly improving the expandability of the system. The present application can realize cross-brand compatibility and unified management, reduce the cost of manual adaptation and development, and improve the universality and adaptability of the gateway as a smart home center.

[0107] It should be noted that, for the method embodiments, the series of acts complement each other to achieve the purpose of this application, therefore, the sequence of the acts should not be construed as a limitation on the implementation of the application. In addition, those skilled in the art should understand that the acts described can be performed by multiple entities or combinations thereof in sequence or concurrently, thus, the sequence of the acts should not be construed as a limitation on the implementation of the application.

[0108] Referring to Figure 6 , a structural schematic diagram of a registration device of an apparatus is shown, which can include the following modules: The receiving and obtaining module 601 is configured to receive broadcast information sent by the apparatus and obtain context information related to device registration. The priority determining module 602 is configured to determine priority information of the gateway registering the apparatus according to the context information. The registration module 603 is configured to respond to the broadcast information, interact with the apparatus according to the priority information, and complete the registration operation for the apparatus.

[0109] In an optional embodiment of the application, the priority determining module 602 is configured to determine a registration time window of the apparatus, and calculate the priority information of the gateway registering the apparatus according to the context information within the registration time window of the apparatus.

[0110] In an optional embodiment of the application, the registration module 603 is configured to determine a registration delay of the gateway for the apparatus according to the priority information, and interact with the apparatus according to the registration delay.

[0111] In an optional embodiment of the application, the registration module 603 is configured to calculate a duration, and interact with the apparatus to complete the registration operation for the apparatus when the duration matches the registration delay.

[0112] In an optional embodiment of the application, the priority determining module 602 is configured to determine current signal strength information of the apparatus, a time stamp of the gateway receiving the broadcast information, and a topology matching degree of the apparatus and the gateway according to the context information, determine a context factor according to the current signal strength information, the time stamp, and the topology matching degree, and calculate the priority information of the gateway registering the apparatus according to the context factor.

[0113] In an optional embodiment of the present application, the registration module 603 is further configured to, in response to the broadcast information, perform data interaction with the device according to the priority information, and store information of the device to a local device list of the gateway if registration confirmation information returned by the device is received; the device is configured to store information received from the gateway when returning the registration confirmation information; and if the registration confirmation information returned by the device is not received, the registration of the device is abandoned.

[0114] In an optional embodiment of the present application, the registration module 603 is further configured to, after the gateway completes the registration of the device, determine a communication path of the device and the gateway, determine path context information corresponding to the communication path and service characteristics of service data corresponding to the communication path, and adjust the communication path according to the path context information and the service characteristics.

[0115] In an optional embodiment of the present application, the gateway is deployed with plug-ins for different protocols; and the registration module 603 is further configured to, after receiving the broadcast information sent by the device, determine a target protocol of the device according to the broadcast information, and call a target plug-in corresponding to the target protocol to process the broadcast information.

[0116] In an optional embodiment of the present application, the context information includes historical context information stored in the gateway and current context information generated by the gateway in a scanning process; and the historical context information includes at least one of the following information: historical state information of the device and historical state information of the gateway; The current context information includes at least one of the following information: current state information of the device and current state information of the gateway.

[0117] In an embodiment of the present application, the gateway receives broadcast information sent by a device and acquires context information related to registration of the device; the context information includes historical context information stored in the gateway and current context information generated by the gateway in a scanning process; priority information of the gateway for registering the device is determined according to the context information; and data interaction with the device is performed according to the priority information in response to the broadcast information to complete a registration operation for the device. In the embodiment of the present application, the priority information of the gateway for registering the device is calculated by comprehensively considering the context information; and then the registration is performed based on the priority information, so as to realize a context-driven registration mechanism. Different from a static mode of "discovery first and binding first" in the prior art, the present application can resolve conflicts and accurately bind based on the context information and the priority, avoid conflicts when multiple gateways discover the same device at the same time, improve device initialization efficiency, realize faster registration completion in a large-scale scenario, and significantly reduce the probability of misconfiguration.

[0118] The embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and the computer program is executed by the processor to implement the registration method of the device.

[0119] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the registration method of the device.

[0120] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts are described in the part of the method embodiment.

[0121] Each embodiment in the specification is described in a progressive manner, and each embodiment mainly describes the difference from other embodiments, and the same and similar parts between the embodiments can be referred to each other.

[0122] Those skilled in the art shall understand that the embodiments of the present application can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can adopt a computer program product in the form of being implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.

[0123] The embodiments of the present application are described with reference to flowcharts and / or block diagrams according to the method, terminal device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the computer or other programmable data processing terminal device produce a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks.

[0124] These computer program instructions can also be stored in a computer readable storage medium to guide the computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer readable storage medium produce a product including instruction devices, which implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks.

[0125] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operational steps are performed on the computer or other programmable terminal device to generate a computer-implemented process, thus the instructions executed on the computer or other programmable terminal device provide a process for implementing the functions specified in the flowchart Figure 1 one flowchart or multiple flowcharts and / or blocks Figure 1 one block or multiple blocks.

[0126] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they have the basic inventive concept. Therefore, the appended claims are intended to cover all changes and modifications falling within the scope of the embodiments of the present application.

[0127] Finally, it should be noted that, in the present text, the relational terms such as first and second and the like are used merely to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof are intended to cover non-exclusive inclusions, so that a process, method, article, or terminal device including a list of elements does not only include those elements, but also includes other elements not explicitly listed or other elements inherent to such process, method, article, or terminal device. Without more limitations, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or terminal device including the element.

[0128] The above provides a detailed description of the registration method of a device, the device, the electronic device and the storage medium. The specific examples are applied to the principles and implementation manners of the present application. The above description of the embodiments is only used to help understand the method and its core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed. In conclusion, the content of the present description should not be understood as a limitation of the present application.

Claims

1. A method of registering a device, characterized by, The method applied to a gateway comprises: receiving broadcast information sent by the device and obtaining context information related to registration of the device; determining priority information of the gateway registering the device according to the context information; in response to the broadcast information, performing data interaction with the device according to the priority information to complete registration operation for the device.

2. The method of claim 1, wherein, The method of determining the priority information of the gateway registering the device according to the context information comprises: determining a registration time window of the device; in the registration time window of the device, calculating the priority information of the gateway registering the device according to the context information.

3. The method of claim 2, wherein, The method of performing data interaction with the device according to the priority information comprises: determining a registration delay of the gateway for the device according to the priority information; performing data interaction with the device according to the registration delay.

4. The method of claim 3, wherein, The method of performing data interaction with the device according to the registration delay comprises: calculating a duration; when the duration matches the registration delay, performing data interaction with the device to complete registration operation for the device.

5. The method of claim 2, wherein, The method of calculating the priority information of the gateway registering the device according to the context information comprises: determining current signal strength information of the device, a timestamp of the gateway receiving the broadcast information, and a topology matching degree of the device and the gateway according to the context information; determining a context factor according to the current signal strength information, the timestamp, and the topology matching degree; calculating the priority information of the gateway registering the device according to the context factor.

6. The method of claim 1, wherein, In response to the broadcast information, the method further comprises: if registration confirmation information returned by the device is received, storing information of the device to a local device list of the gateway; the device is used to store information received from the gateway when returning the registration confirmation information; if the registration confirmation information returned by the device is not received, giving up registration of the device.

7. The method according to any one of claims 1 to 6, characterized in that, After the gateway completes registration of the device, the method further comprises: determining a communication path of the device and the gateway, determining path context information corresponding to the communication path, and service characteristics of service data corresponding to the communication path; adjusting the communication path according to the path context information and the service characteristics.

8. The method according to any one of claims 1 to 6, characterized in that, The gateway is deployed with plug-ins for different protocols; After receiving the broadcast information sent by the device, the method further comprises: determining a target protocol of the device according to the broadcast information; calling a target plug-in corresponding to the target protocol to process the broadcast information.

9. The method of claim 1, wherein, The context information comprises historical context information saved in the gateway and current context information generated in a scanning process of the gateway; the historical context information comprises at least one of the following information: historical state information of the device and historical state information of the gateway; the current context information comprises at least one of the following information: Current state information of the device, current state information of the gateway.

10. An apparatus for registering a device, the apparatus comprising: The apparatus comprises: A receiving acquisition module, configured to receive broadcast information sent by the device and acquire context information related to registration of the device; A priority determination module, configured to determine priority information of the gateway registering the device according to the context information; A registration module, configured to respond to the broadcast information, perform data interaction with the device according to the priority information, and complete a registration operation for the device.

11. An electronic device, comprising: A computer program stored on the memory and capable of running on the processor, the computer program being executed by the processor to implement the device registration method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, A computer program stored on the computer readable storage medium, the computer program being executed by the processor to implement the device registration method according to any one of claims 1 to 9.