Electronic device for managing controlled device and operation method thereof
The electronic device automatically detects and reconnects offline IoT devices by establishing a device-to-device connection and following recovery policies, addressing the inconvenience of manual reconnection and enhancing IoT network reliability.
Patent Information
- Application Number
- PCT/KR2024/003866
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-23
- Filing Date
- 2024-03-27
- Publication Date
- 2024-11-21
AI Technical Summary
Users face inconvenience when home appliances connected to IoT networks become offline due to connection issues, as existing solutions lack automated detection and reconnection capabilities, requiring manual intervention like unplugging and replugging devices, especially for appliances like refrigerators where this is difficult.
An electronic device with a transceiver, processors, and memory that automatically detects offline appliances, establishes a device-to-device connection, receives error codes, determines recovery methods based on policy information, and sends commands to restore the connection, providing guided user responses for issues like network or device problems.
Automatically detects and reconnects offline IoT devices, reducing user effort and simplifying troubleshooting by providing guided recovery actions, enhancing the reliability and convenience of IoT network management.
Smart Images

Figure KR2024003866_21112024_PF_FP_ABST
Abstract
Description
Electronic device for managing a controlled device and its operating method The present disclosure relates to an electronic device for managing a controlled device and a method of operating the same. The variety of services and additional features offered through user terminals, such as smartphones, is steadily increasing. To enhance the utility of these electronic devices and satisfy the diverse needs of users, telecommunications service providers and electronic device manufacturers are competitively developing electronic devices offering a variety of functions. Consequently, the various functions offered through these devices are also becoming increasingly sophisticated. As wireless communication technology advances, devices utilizing artificial intelligence (AI) are becoming more widely adopted. For example, home appliances connected to the Internet of Things (IoT) can utilize AI. IoT technology can collect and analyze data generated by these devices to provide intelligent Internet technology services that create new value in human lives. Through the convergence and integration of existing Internet technologies with various industries, IoT technology can be applied to areas such as smart homes, smart buildings, smart cities, smart cars, and smart appliances. Meanwhile, homes are equipped with a variety of home appliances for the convenience of users. Various services are being proposed to utilize IoT technology to facilitate the operation and control of these appliances. Home network technology can provide various services to users within the home via the home network. For example, users can control various controlled devices (e.g., IoT-enabled home appliances) that make up the home network using personal electronic devices (e.g., smartphones). Users may desire a wider range of services to control these controlled devices. Accordingly, there is a growing demand for the development of various technologies that manage controlled devices in a way that reflects user intent. A user can use an electronic device (e.g., a smartphone or a wearable device) owned by the user to control a controlled device (e.g., a television, an air conditioner, a washing machine, a security camera, a lighting device, or a switch) by performing a procedure (e.g., onboarding) to register the controlled device with a network (e.g., a cloud server). The electronic device can associate the controlled device with a user account by controlling the controlled device to register with the server. The electronic device can then use the user account to access the server through a client application and control the controlled device. Electronic devices can check and control the status of controlled devices registered to a user account through a client application. If a controlled device cannot normally connect to the server, the controlled device may appear offline in the client application. A controlled device may become offline for various reasons, such as device problems, network failures, cloud failures, or application failures. If a controlled device appears offline, the electronic device can use a plug-in application to provide an offline guide pop-up. The offline guide pop-up can provide general help guides, such as checking the home network environment and checking the power plug. When a software failure causes a disconnection (e.g., going offline) in a controlled device (e.g., a refrigerator) that is always on, the connection cannot be restored by simply turning the power on / off, and the user must unplug and plug it back in. However, in the case of built-in appliances such as refrigerators, unplugging and replugging the power can be difficult for the user. In such cases, to resolve the offline status of the controlled device, it is necessary to delete the controlled device and then re-register it with the server, but it is difficult for the user to know the exact action guide. To re-register the controlled device, the existing registration information must be deleted and the registration process must be performed again, which causes inconvenience to the user. The above information is provided solely as background information to aid in understanding the present disclosure. No determination has been made, and no assertion is made, as to whether any of the above is applicable as prior art in connection with the present disclosure. Aspects of the present disclosure address at least the problems and / or disadvantages mentioned above, and provide at least the advantages described below. Accordingly, one aspect of the present disclosure provides an electronic device for managing a controlled device and a method for controlling the same. Another aspect of the present disclosure is to automatically detect a situation where a controlled device loses connection with a server. Another aspect of the present disclosure is to restore a connection to a controlled device that is offline. Another aspect of the present disclosure is to automatically reconnect an offline controlled device to a server. Another aspect of the present disclosure provides a guide to users responding to causes of a controlled device going offline. Additional aspects will be partly set forth in the following description, partly will be apparent from the description, or may be learned by practice of the embodiments presented. An electronic device according to one embodiment of the present disclosure is provided. The electronic device may include a transceiver for receiving and transmitting signals, one or more processors communicatively coupled to the transceiver, and a memory for storing instructions. The instructions, when executed by the one or more processors, may cause the electronic device to obtain first information indicating that a controlled device is in an offline state in which the connection to a server is lost. The instructions, when executed by the one or more processors, may cause the electronic device to establish a device-to-device (D2D) connection with the controlled device through the transceiver. The instructions, when executed by the one or more processors, may cause the electronic device to receive an error code related to the offline state of the controlled device from the controlled device through the D2D connection. The instructions, when executed by the one or more processors, may cause the electronic device to determine a recovery method corresponding to the error code based on specified recovery policy information. The above instructions, when executed by the one or more processors, may cause the electronic device to transmit a recovery command to the controlled device via the transceiver, the recovery command instructing the controlled device to recover a connection between the controlled device and the server based on the determined recovery method. A method performed by an electronic device according to another aspect of the present disclosure is disclosed. The method may include an operation of obtaining, by the electronic device, first information indicating that a controlled device is in an offline state in which the connection to a server is lost. The method may include an operation of establishing, by the electronic device, a device-to-device (D2D) connection with the controlled device. The method may include an operation of receiving, by the electronic device, an error code related to the offline state of the controlled device from the controlled device through the D2D connection. The method may include an operation of determining, by the electronic device, a recovery method corresponding to the error code based on designated recovery policy information. The method may include an operation of transmitting, by the electronic device, a recovery command to the controlled device, the recovery command instructing the controlled device to recover the connection between the controlled device and the server based on the determined recovery method. According to another aspect of the present disclosure, one or more non-transitory computer-readable storage media storing one or more computer programs including computer-executable instructions that, when executed by one or more processors, cause an electronic device to perform operations. The operations may include: obtaining, by the electronic device, first information indicating that a controlled device is in an offline state with a lost connection to a server; establishing, by the electronic device, a device-to-device (D2D) connection with the controlled device; receiving, by the electronic device, an error code related to the offline state of the controlled device from the controlled device; determining, by the electronic device, a recovery method corresponding to the error code based on designated recovery policy information; and transmitting, by the electronic device, a recovery command to the controlled device, the recovery command instructing the control device to recover the connection between the controlled device and the server based on the determined recovery method. Other aspects, advantages and salient features of the present disclosure will become apparent to those skilled in the art from the following detailed description of various embodiments of the present disclosure taken in conjunction with the accompanying drawings. The above and other aspects, features and advantages of specific embodiments of the present disclosure will become more apparent from the following description taken in conjunction with the accompanying drawings. FIG. 1 illustrates an IoT (internet of things) system according to one embodiment of the present disclosure. FIG. 2 is a block diagram of an electronic device within a network environment according to one embodiment of the present disclosure. FIG. 3 is a diagram illustrating a network including controlled devices according to one embodiment of the present disclosure. FIG. 4 is a block diagram illustrating the configuration of an electronic device providing an offline diagnostic function according to one embodiment of the present disclosure. FIG. 5A, FIG. 5B, and FIG. 5C are diagrams illustrating offline notifications of an IoT network according to various embodiments of the present disclosure. FIG. 6 is a diagram for explaining a device offline due to an AP (access point) problem according to one embodiment of the present disclosure. FIG. 7 is a diagram illustrating a device offline due to a device problem according to one embodiment of the present disclosure. FIG. 8 illustrates a system structure that supports offline diagnosis and connection recovery according to one embodiment of the present disclosure. FIG. 9 is a flowchart illustrating a procedure for offline diagnosis and connection recovery according to one embodiment of the present disclosure. FIG. 10 is a flowchart illustrating a procedure for updating a recovery policy according to one embodiment of the present disclosure. FIG. 11 is a sequence diagram illustrating automatic recovery of an offline device through a BLE (Bluetooth low energy) scan according to one embodiment of the present disclosure. FIG. 12 is a sequence diagram illustrating an automatic recovery procedure of an offline device through local network device search according to one embodiment of the present disclosure. FIG. 13 is a diagram illustrating offline detection and automatic recovery based on mDNS / DNS-SD (multicast domain name service / DNS-based service discovery) according to one embodiment of the present disclosure. FIG. 14 is a sequence diagram illustrating offline detection and automatic recovery based on mDNS / DNS-SD according to one embodiment of the present disclosure. FIG. 15 is a diagram illustrating offline detection and automatic recovery based on SSE according to one embodiment of the present disclosure. FIG. 16 is a sequence diagram illustrating offline detection and automatic recovery based on SSE according to one embodiment of the present disclosure. FIG. 17 is a sequence diagram illustrating offline detection and automatic recovery based on BLE scan according to one embodiment of the present disclosure. FIG. 18 is a diagram illustrating a user notification for an offline state according to one embodiment of the present disclosure. FIG. 19 is a sequence diagram illustrating user notification through local network search according to one embodiment of the present disclosure. FIG. 20 is a sequence diagram illustrating a user notification for a Wi-Fi update according to one embodiment of the present disclosure. FIG. 21 is a diagram for explaining an operation of diagnosing and recovering an offline cause by oneself according to one embodiment of the present disclosure. It should be noted that throughout the drawings, similar reference numbers are used to describe identical or similar elements, features and structures. The following description, with reference to the accompanying drawings, is provided to facilitate a comprehensive understanding of various embodiments of the present disclosure as defined by the claims and their equivalents. While it includes numerous specific details to aid understanding, these should be considered merely illustrative. Accordingly, those skilled in the art will recognize that various changes and modifications can be made to the various embodiments described herein without departing from the scope and spirit of the present disclosure. Furthermore, descriptions of known functions and configurations may be omitted for clarity and brevity. The terms and words used in the following description and claims are not intended to be limited in their bibliographic meanings, but rather have been used by the inventors solely to facilitate a clear and consistent understanding of the present disclosure. Therefore, it should be apparent to those skilled in the art that the following description of various embodiments of the present disclosure is provided for illustrative purposes only and is not intended to limit the present disclosure as defined by the appended claims and their equivalents. The singular forms "a," "an," and "the" should be understood to include plural referents unless the context clearly dictates otherwise. Thus, for example, a reference to "a surface of a part" includes a reference to one or more such surfaces. It should be recognized that each block of the flowchart and the combination of flowcharts can be performed by one or more computer programs containing instructions. The one or more computer programs may be stored entirely in a single memory, or the one or more computer programs may be divided into different parts stored in different memories. Any function or operation described herein may be processed by a single processor or a combination of processors. A single processor or a combination of processors is a circuit that performs processing, and includes circuits such as an application processor (AP) (e.g., a central processing unit (CPU)), a communication processor (CP) (e.g., a modem), a graphics processing unit (GPU), a neural processing unit (NPU) (e.g., an artificial intelligence (AI) chip), a Wi-Fi chip, a Bluetooth® chip, a Global Positioning System (GPS) chip, a Near Field Communication (NFC) chip, a connection chip, a sensor controller, a touch controller, a fingerprint sensor controller, a display drive integrated circuit (IC), an audio codec (CODEC) chip, a universal serial bus (USB) controller, a camera controller, an image processing IC, a microprocessor unit (MPU), a system on a chip (SoC), an integrated circuit (IC), and the like. FIG. 1 illustrates an Internet of Things (IoT) system (100) according to one embodiment of the present disclosure. Meanwhile, at least some of the components of FIG. 1 may be omitted, and the system may be implemented to include additional components not shown. Referring to FIG. 1, an IoT system (100) according to one embodiment includes a plurality of electronic devices connectable to a data network (116 or 146). For example, the IoT system (100) may include at least one of a first IoT server (110), a first node (120), a voice assistance server (130), a second IoT server (140), a second node (150), or devices (121, 122, 123, 124, 125, 136, 137, 151, 152, 153). According to one embodiment, the first IoT server (110) may include at least one of a communication interface (111), a processor (112), or a storage (113). The second IoT server (140) may include at least one of a communication interface (141), a processor (142), or a storage (143). The “IoT server” in this document may remotely control and / or monitor one or more devices (e.g., devices (121, 122, 123, 124, 125, 151, 152, 153)) via a relay device (e.g., the first node (120) or the second node (150)) or directly without a relay device, for example, based on a data network (e.g., the data network (116) or the data network (146)). Here, a "device" is not limited to a sensor, home appliance, office electronic device, or process-performing device that is deployed (or located) within a local environment, such as a home, office, factory, building, external branch, or other type of site. A device that receives a control command and performs an action corresponding to the control command may be referred to as a "target device." An IoT server may also be referred to as a central server, as it selects a target device from among multiple devices and provides control commands. According to one embodiment, the first IoT server (110) may communicate with devices (121, 122, 123) via a data network (116). The data network (116) may mean a network for long-distance communication, such as the Internet or a computer network (e.g., a LAN or WAN), or may include a cellular network. According to one embodiment, the first IoT server (110) may be connected to a data network (116) via a communication interface (111). The communication interface (111) may include a communication device (or communication module) for supporting communication of the data network (116), and may be integrated into a single component (e.g., a single chip) or implemented as a plurality of separate components (e.g., multiple chips). The first IoT server (110) may communicate with devices (121, 122, 123) via a first node (120). The first node (120) may receive data from the first IoT server (110) via the data network (116) and transmit the received data to at least some of the devices (121, 122, 123). Alternatively, the first node (120) may receive data from at least some of the devices (121, 122, 123) and transmit the received data to the first IoT server (110) via the data network (116). The first node (120) may function as a bridge between the data network (116) and the devices (121, 122, 123). Meanwhile, although FIG. 1 illustrates one first node (120), this is merely exemplary and there is no limitation on the number. A "node" in this document may be an edge computing system or a hub device. According to one embodiment, the first node (120) supports wired and / or wireless communication with the data network (116), and may also support wired and / or wireless communication with devices (121, 122, 123). For example, the first node (120) may be connected to the devices (121, 122, 123) via a short-range communication network such as at least one of Bluetooth, Wi-Fi, Wi-Fi direct, Z-wave, Zig-bee, INSETEON, X10, or IrDA (infrared data association), but there is no limitation on the type of communication. The first node (120) may be deployed (or located) within an environment such as, for example, a home, an office, a factory, a building, an external branch, or other types of sites. Accordingly, the devices (121, 122, 123) may be monitored and / or controlled by services provided by the first IoT server (110), and the devices (121, 122, 123) may not be required to have the capability of full network communication (e.g., Internet communication) for direct connection to the first IoT server (110). Devices (121, 122, 123) are illustrated as being implemented as electronic devices within a home environment, such as light switches, proximity sensors, temperature sensors, etc., but this is by way of example only and is not limiting. According to one embodiment, the first IoT server (110) may support direct communication with devices (124, 125). Here, "direct communication" may mean communication that does not pass through an intermediary device, such as the first node (120), for example, communication via a cellular communication network and / or a data network. According to one embodiment, the first IoT server (110) may transmit a control command to at least some of the devices (121, 122, 123, 124, 125). Here, the “control command” may mean data that causes a controllable device to perform a specific operation, and the specific operation is an operation performed by the device, and may include outputting information, sensing information, reporting information, and managing (e.g., deleting or creating) information, and there is no limitation on its type. For example, the processor (112) may obtain information (or a request) for generating a control command from an external source (e.g., a voice assistant server (130), the second IoT server (140), an external system (160), or at least some of the devices (121, 122, 123, 124, 125)), and generate the control command based on the obtained information. Alternatively, the processor (112) may generate a control command based on whether the monitoring results of at least some of the devices (121, 122, 123, 124, 125) satisfy a specified condition. The processor (112) may control the communication interface (111) to transmit the control command to the target device. According to one embodiment, the processor (112), or the processor (132), or the processor (142) may be implemented as a combination of one or more of a general-purpose processor such as a central processing unit (CPU), a digital signal processor (DSP), an application processor (AP), or a communication processor (CP), a graphics-only processor such as a graphical processing unit (GPU), a vision processing unit (VPU), or an artificial intelligence-only processor such as a neural processing unit (NPU). The above-described processing units are merely exemplary, and those skilled in the art will understand that the processor (112) is not limited to any computational means that can execute instructions stored in the storage unit (113), for example, and output the executed results. According to one embodiment, the processor (112) may configure a web-based interface based on the API (114) or expose resources managed by the first IoT server (110) to the outside. The web-based interface may, for example, support communication between the first IoT server (110) and an external web service. The processor (112) may also allow, for example, an external system (160) to control and / or access the devices (121, 122, 123). The external system (160) may be an independent system that is not associated with or is not a part of the system (100), for example. The external system (160) may be, for example, an external server or a website. However, security is required for access to the devices (121, 122, 123) or the resources of the first IoT server (110) from the external system (160). According to one embodiment, the processor (112) may externally expose an API endpoint (e.g., a URL (universal resource locator)) based on the API (114) of the automation application. As described above, the first IoT server (110) may transmit a control command to a target device among the devices (121, 122, 123). Meanwhile, the description of the communication interface (141), the processor (142), the API (144) of the storage (143), and the database (145) of the second IoT server (140) may be substantially the same as the description of the communication interface (111), the processor (112), the API (114) of the storage (113), and the database (115) of the first IoT server (110). In addition, the description of the second node (150) may be substantially the same as the description of the first node (120). The second IoT server (140) can transmit control commands to a target device among the devices (151, 152, 153).The first IoT server (110) and the second IoT server (140) may be operated by the same service provider in one embodiment, but may be operated by different service providers in another embodiment. According to one embodiment, the voice assistant server (130) can transmit and receive data with the first IoT server (110) via a data network (116). The voice assistant server (130) according to one embodiment can include at least one of a communication interface (131), a processor (132), or a storage (133). The communication interface (131) can communicate with a smart phone (136) or an AI speaker (137) via a data network (not shown) and / or a cellular network (not shown). The smart phone (136) or the AI speaker (137) can include a microphone, acquire a user voice, convert it into a voice signal, and transmit the voice signal to the voice assistant server (130). The processor (132) can receive a voice signal from the smart phone (136) or the AI speaker (137) via the communication interface (131). The processor (132) can process the received voice signal based on the stored model (134). The processor (132) can generate (or confirm) a control command using the processing result based on information stored in the database (135).According to one embodiment, the storage (113, 133, 143) may include at least one type of non-transitory storage medium among a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (e.g., SD or XD memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, or an optical disk, and the type thereof is not limited. In various embodiments, at least one device (e.g., device (124)) communicating with the first IoT server (110) may be a smartphone (e.g., electronic device (201) of FIG. 2) within a network environment. FIG. 2 is a block diagram of an electronic device (201) within a network environment (200) according to one embodiment of the present disclosure. Referring to FIG. 2, in a network environment (200), an electronic device (201) may communicate with an electronic device (202) via a first network (298) (e.g., a short-range wireless communication network), or may communicate with at least one of an electronic device (204) or a server (208) via a second network (299) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (201) may communicate with the electronic device (204) via the server (208). According to one embodiment, the electronic device (201) may include a processor (220), a memory (230), an input module (250), an audio output module (255), a display module (260), an audio module (270), a sensor module (276), an interface (277), a connection terminal (278), a haptic module (279), a camera module (280), a power management module (288), a battery (289), a communication module (290), a subscriber identification module (296), or an antenna module (297). In some embodiments, the electronic device (201) may omit at least one of these components (e.g., the connection terminal (278)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (276), the camera module (280), or the antenna module (297)) may be integrated into one component (e.g., the display module (260)). The processor (220) may, for example, execute software (e.g., a program (240)) to control at least one other component (e.g., a hardware or software component) of the electronic device (201) connected to the processor (220) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (220) may store commands or data received from other components (e.g., a sensor module (276) or a communication module (290)) in a volatile memory (232), process the commands or data stored in the volatile memory (232), and store result data in a non-volatile memory (234). According to one embodiment, the processor (220) may include a main processor (221) (e.g., a central processing unit or an application processor) or an auxiliary processor (223) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together with the main processor (221). For example, when the electronic device (201) includes the main processor (221) and the auxiliary processor (223), the auxiliary processor (223) may be configured to use less power than the main processor (221) or to be specialized for a given function. The auxiliary processor (223) may be implemented separately from the main processor (221) or as a part thereof. The auxiliary processor (223) may control at least a portion of functions or states associated with at least one component (e.g., a display module (260), a sensor module (276), or a communication module (290)) of the electronic device (201), for example, on behalf of the main processor (221) while the main processor (221) is in an inactive (e.g., sleep) state, or together with the main processor (221) while the main processor (221) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (223) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (280) or a communication module (290)). In one embodiment, the auxiliary processor (223) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (201) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (208)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure. The memory (230) can store various data used by at least one component (e.g., the processor (220) or the sensor module (276)) of the electronic device (201). The data can include, for example, software (e.g., the program (240)) and input data or output data for commands related thereto. The memory (230) can include a volatile memory (232) or a non-volatile memory (234). The program (240) may be stored as software in the memory (230) and may include, for example, an operating system (242), middleware (244), or an application (246). The input module (250) can receive commands or data to be used in a component of the electronic device (201) (e.g., a processor (220)) from an external source (e.g., a user) of the electronic device (201). The input module (250) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen). The audio output module (255) can output audio signals to the outside of the electronic device (201). The audio output module (255) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker. The display module (260) can visually provide information to an external party (e.g., a user) of the electronic device (201). The display module (260) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. In one embodiment, the display module (260) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch. The audio module (270) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (270) can acquire sound through the input module (250), output sound through the sound output module (255), or an external electronic device (e.g., electronic device (202)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (201). The sensor module (276) can detect the operating status (e.g., power or temperature) of the electronic device (201) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (276) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor. The interface (277) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (201) to an external electronic device (e.g., the electronic device (202)). In one embodiment, the interface (277) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface. The connection terminal (278) may include a connector through which the electronic device (201) may be physically connected to an external electronic device (e.g., the electronic device (202)). According to one embodiment, the connection terminal (278) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector). A haptic module (279) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (279) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device. The camera module (280) can capture still images and moving images. According to one embodiment, the camera module (280) may include one or more lenses, image sensors, image signal processors, or flashes. The power management module (288) can manage the power supplied to the electronic device (201). According to one embodiment, the power management module (288) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC). A battery (289) may power at least one component of the electronic device (201). In one embodiment, the battery (289) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell. The communication module (290) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (201) and an external electronic device (e.g., electronic device (202), electronic device (204), or server (208)), and the performance of communication through the established communication channel. The communication module (290) may operate independently from the processor (220) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (290) may include a wireless communication module (292) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (294) (e.g., a local area network (LAN) communication module, or a power line communication module). Any of these communication modules may communicate with an external electronic device (204) via a first network (298) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (299) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules may be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (292) may use subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (296) to verify or authenticate the electronic device (201) within a communication network such as the first network (298) or the second network (299). The wireless communication module (292) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (292) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (292) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (292) can support various requirements specified in the electronic device (201), an external electronic device (e.g., the electronic device (204)), or a network system (e.g., the second network (299)). According to one embodiment, the wireless communication module (292) can support a peak data rate (e.g., 20 Gbps or more) for realizing eMBB, a loss coverage (e.g., 164 dB or less) for realizing mMTC, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for realizing URLLC. The antenna module (297) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (297) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (297) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (298) or the second network (299), may be selected from the plurality of antennas, for example, by the communication module (290). A signal or power may be transmitted or received between the communication module (290) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (297). According to various embodiments, the antenna module (297) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band. At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)). According to one embodiment, commands or data may be transmitted or received between the electronic device (201) and an external electronic device (204) via a server (208) connected to a second network (299). Each of the external electronic devices (202, or 204) may be the same or a different type of device as the electronic device (201). According to one embodiment, all or part of the operations executed in the electronic device (201) may be executed in one or more of the external electronic devices (202, 204) or the server (208). For example, when the electronic device (201) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (201) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (201). The electronic device (201) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (201) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (204) may include an Internet of Things (IoT) device. The server (208) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (204) or the server (208) may be included in the second network (299).The electronic device (201) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology. FIG. 3 is a diagram illustrating a network including controlled devices according to one embodiment of the present disclosure. Referring to FIG. 3, a network (300) (e.g., an IoT network) may include a server (310) operating as an IoT cloud, an electronic device (201) capable of communicating with the server (310) via network communication (e.g., a wireless network), and one or more controlled devices (320a, 320b, 320c, 320d) within a local network (350) that support IoT technology and can communicate with the server (310) via network communication (e.g., an access point (AP) (340)). In one embodiment, a hub device (330) (e.g., a smartphone, a tablet, a home automation panel, a PC, or a TV) configured to manage connections and states of the controlled devices (320a, 320b, 320c, 320d) may be included in the local network (350). The electronic device (201) can communicate with the controlled devices (320a, 320b, 320c, 320d) and the hub device (330) via a server (310), via long-range wireless communication (e.g., a second network (299)), or via short-range wireless communication (e.g., a first network (298)). The hub device (330) can communicate with the controlled devices (320a, 320b, 320c, 320d) via an AP (340) or via a direct-to-direct (D2D) connection. The controlled devices (320a, 320b, 320c, 320d) can be controlled (e.g., to report status and / or execute specific functions) by remote commands (e.g., control commands of the electronic device (201)) and may include, for example, at least one of a television, an air conditioner, a refrigerator, a washing machine, a lighting device, a security camera, a sensor, or a window treatment. The controlled devices (320a, 320b, 320c, 320d) may communicate with the electronic device (201) via the hub device (330), communicate with the electronic device (201) via the server (310), and / or communicate directly with the electronic device (201) (e.g., without going through the server (310), the AP (340), or the hub device (330)). In one embodiment, the controlled devices (320a, 320b, 320c, 320d) may be configured to communicate with the electronic device (201) via long-range wireless communication (e.g., the second network (299)) or via short-range wireless communication (e.g., the first network (298)). In one embodiment, the controlled devices (320a, 320b, 320c, 320d) may be configured to communicate with the server (310) via long-range wireless communication (e.g., the second network (299)) or via short-range wireless communication (e.g., the first network (298)). In one embodiment, the electronic device (201) may be a personal electronic device, such as a smart phone, a tablet, or a wearable device, or an electronic device having a display and a user interface, such as a television or a control console. The electronic device (201) may discover at least one of the controlled devices (320a, 320b, 320c, 320d) (e.g., the controlled device (320a)) and may perform a registration procedure to register the discovered controlled device (320a) with the server (310). The controlled devices (320a, 320b, 320c, 320d) may be registered with the server (310) to be associated with a user account. The electronic device (201) may use the user account to monitor and control the controlled devices (320a, 320b, 320c, 320d) registered with the server (310). The electronic device (201) can check the status of the controlled devices (320a, 320b, 320c, 320d) that the user will use for the IoT control service, or control the controlled devices (320a, 320b, 320c, 320d) (for example, transmit a control command instructing to execute a specific function). The electronic device (201) can be an owner device of the local network (350). Although not shown, at least one member device including at least some functions and / or authority of the electronic device (201) can be included in the network (300). In one embodiment, the member device cannot perform a registration procedure for the controlled devices (320a, 320b, 320c, 320d), but can perform a function of checking or controlling the status of the controlled devices (320a, 320b, 320c, 320d) registered with the server (310). The hub device (330) is an electronic device that provides a hub function related to an IoT control service, and may be a server or gateway placed within a physical area (e.g., a building, a home, or a hotel) corresponding to a local network (350), or a remote server placed outside the local network (350). The hub device (330) may be a home appliance such as a smartphone, tablet, personal computer (PC), or TV having a hub function. The hub device (330) may be registered with the server (310) by the electronic device (201) through a procedure similar to that of the controlled devices (320a, 320b, 320c, 320d). FIG. 4 is a block diagram illustrating the configuration of an electronic device providing an offline diagnostic function according to one embodiment of the present disclosure. Referring to FIG. 4, an electronic device (e.g., a hub device (330)) may be a device that implements an IoT service (e.g., an event-based IoT service) in a network (300) (e.g., an IoT network). For example, the IoT network may be a smart home network, and the IoT service may be an automation service. The electronic device (e.g., a hub device (330)) may include a processor (410), a transceiver (420), a memory (430), and / or an interface (440). An electronic device (e.g., a hub device (330)) may include a transceiver (420) (e.g., a communication module (290) of FIG. 2) that transmits and receives signals using one or more antennas (not shown) with an external electronic device (e.g., at least one of the device (124) of FIG. 1, the electronic device (201) of FIG. 2, the server (310), the AP (340), or the controlled devices (320a, 320b, 320c, 320d) of FIG. 2). In one embodiment, one or more antennas may be implemented as part of an antenna module (297) of FIG. 2. An electronic device (e.g., hub device (330)) may support at least one of long term evolution (LTE), 5G / NR (new radio), Zigbee, Z-Wave, ultra wide-band (UWB), Wi-Fi, or Bluetooth (e.g., Bluetooth legacy (BT) and / or Bluetooth low energy (BLE)) via a transceiver (420). The transceiver (420) may include one or more communication circuits based on LTE, 5G / NR, Zigbee, Z-Wave, UWB, Wi-Fi, BT, and / or BLE. An electronic device (e.g., a hub device (330)) may include an interface (440) for communicating with components and / or users outside the network (e.g., an interface (277) of FIG. 2, an input module (250), a display module (260), and / or an audio module (270)). An electronic device (e.g., a hub device (330)) may include a processor (410) (e.g., a processor (220) of FIG. 2) that may be implemented as one or more single-core processors or one or more multi-core processors, and a memory (430) (e.g., a memory (230) of FIG. 2) that stores instructions and data for the operation of the electronic device (e.g., a hub device (330)). The memory (430) can store applications, user information, device information, connection information, or related data for executing IoT services. The processor (410) manages the status and operation of controlled devices (e.g., controlled devices (320a, 320b, 320c, 320d)) related to the IoT service, and can provide offline diagnostic services for the controlled devices while the controlled devices are in an offline state (e.g., server-offline state) where they are disconnected from a server (e.g., server (310)). In one embodiment, the processor (410) can include a diagnostic module (e.g., diagnostic module (832) or diagnostic module (2110)) that provides offline diagnostic services. Any one of the controlled devices (320a, 320b, 320c, 320d) registered in the server (310) and the hub device (330) (e.g., the controlled device (320b) or the hub device (330)) may be in an offline state (e.g., a server-offline state) in which the connection with the server (310) is disconnected. The electronic device (201) may display information indicating that the controlled device (320b) or the hub device (330) is in an offline state, for example, on the display module (260). A situation in which the controlled device (320b) or the hub device (330) is displayed as offline on the electronic device (201) may be caused by one or more causes, such as a device problem, an AP problem, a server failure, or an application problem. FIG. 5A, FIG. 5B, and FIG. 5C are diagrams for explaining offline notifications of an IoT network according to various embodiments of the present disclosure. Referring to FIG. 5A, an electronic device (201) may display a device list (510) listing one or more devices (e.g., device A, device B, device C, device D, and device E) registered to an IoT network. The device list (510) may include information (e.g., text and / or images) indicating the connection status (e.g., online or offline) of each device. A user may recognize that certain devices (e.g., device D and device E) are offline or online by viewing the device list (510). In one embodiment, the offline status may include at least one of an offline status in which the devices (e.g., device D and device E) are disconnected from a server (e.g., server 310) (e.g., server-offline status) or an offline status in which the devices (e.g., device D and device E) are disconnected from the electronic device (201) (e.g., hub-offline status). Referring to FIG. 5B, upon receiving an input (e.g., a touch) from a user to select one of the offline devices (e.g., device D), the electronic device (201) may display a guide (e.g., text) (520) indicating the connection status and recovery method of the device D. In one embodiment, the device D may be a hub device (e.g., hub device (330)), and the guide (520) may instruct, for example, "The hub connection has been lost. A device connected to the hub is not working. Check the hub connection." Referring to FIG. 5c, the electronic device (201) may display details (530) including the offline status and guide of the device D based on a user input selecting the offline device D (e.g., hub device (330)). The electronic device (201) may execute an offline diagnostics service to analyze the cause of the offline status and proceed with recovery by referring to the recovery guide. For an offline diagnostic service that analyzes the cause of an offline state and restores the connection (e.g., reconnection), the electronic device (201) can connect to an offline IoT device (e.g., controlled devices (320a, 320b, 320c, 320d) or a hub device (330)). In the offline diagnostic service, the electronic device (201) can provide a guide screen including a phrase guiding the user to change the offline IoT device to a soft-AP mode. After displaying the guide screen, the electronic device (201) can perform discovery to connect to the IoT device that has been switched to the soft-AP mode through the guide screen. However, for example, if the IoT device is installed in a location that is difficult for the user to reach or the operation method of the IoT device is complicated, the user may find it difficult or cumbersome to change the IoT device to the soft-AP mode. Even after the user manipulates the IoT device to change it to soft-AP mode, the D2D connection (e.g., soft-AP connection or BLE connection) between the electronic device (201) and the IoT device may fail. In addition, if the server (310) identifies the IoT device as being offline (e.g., server-offline state) due to a disconnection of the session with the server (310) while the IoT device is connected to a network (e.g., AP (340)), a problem may arise in which the network connection is unnecessarily disconnected for the D2D connection between the electronic device (201) and the IoT device. Moreover, if the electronic device (201) is not in the same network (e.g., local network (350)) or home environment as the offline IoT device, the electronic device (201) may not be able to perform detailed diagnosis of the offline IoT device, making it difficult to restore the connection of the IoT device. FIG. 6 is a diagram illustrating a device offline due to an AP problem according to one embodiment of the present disclosure. Referring to FIG. 6, all IoT devices (e.g., controlled devices (320a, 320b, 320c, 320d) and hub device (330)) connected to an AP (340) within a local network (350) may go offline. This type of offline operation may occur due to replacement of the AP due to moving or a change in telecommunications carrier, change of the AP password, AP failure, or server failure. The electronic device (201) can identify the connection status (e.g., online status or offline status) of IoT devices through, for example, the server (310), and display information indicating the connection status of the IoT devices (e.g., offline status (600a) of the controlled device (320a), offline status (600b) of the controlled device (320b), offline status (600c) of the controlled device (320c), offline status (600d) of the controlled device (320d), and offline status (600e) of the hub device (330)). FIG. 7 is a diagram illustrating a device offline due to a device problem according to one embodiment of the present disclosure. Referring to FIG. 7, among the IoT devices (e.g., controlled devices (320a, 320b, 320c, 320d) and hub device (330)) connected to the AP (340) within the local network (350), at least one IoT device (e.g., controlled device (320b)) may go offline. This offline type may be caused by a session connection failure due to a communication failure between an IoT device (e.g., controlled device (320b)) and a server (310), or a network connection failure between an IoT device (e.g., controlled device (320b)) and an AP (340). As another example, an IoT device (e.g., controlled device (320b)) may become offline because the server (310) intentionally releases a session (e.g., a session with controlled device (320b)) that has not been used for a long period of time. The electronic device (201) can identify the connection status (e.g., online status or offline status) of IoT devices through, for example, the server (310), and display information indicating the connection status of the IoT devices (e.g., online status (700a) of the controlled device (320a), offline status (700b) of the controlled device (320b), online status (700c) of the controlled device (320c), online status (700d) of the controlled device (320d), and online status (700e) of the hub device (330). By executing an offline diagnostic service through an electronic device (201), a user can identify the offline cause and offline type of an IoT device and restore the connection of the IoT device according to the identified offline type. According to embodiments of the present disclosure, instead of a user directly recognizing an offline state of an IoT device through an electronic device (201) and recovering it through an offline diagnostic service, an electronic device (e.g., a hub device (330)) located within a local network (e.g., a local network (350)) can automatically detect an IoT device that is offline and easily recover the connection of the IoT device without any additional action by the user. FIG. 8 illustrates a system architecture that supports offline diagnosis and connection recovery according to one embodiment of the present disclosure. Referring to FIG. 8, a user device (820) (e.g., electronic device (201)) may include a client application that registers at least one controlled device (840) (e.g., controlled devices (320a, 320b, 320c, 320d)) with a server (810) (e.g., server (310)) and remotely controls the registered controlled device (840). As an example, the user device (820) including the client application may be any one of a mobile device, a TV, a family hub, or a smart watch. Onboarding may include a procedure of registering the controlled device (840) with the server (810). The controlled device (840) may be registered (e.g., onboarded) with the server (810) using any one of a hub-connected, a cloud-connected, or a cloud-to-cloud connection. In the case of hub connection, the controlled device (840) may be connected to a hub device (e.g., hub device (330)) using a short-range communication function such as Zigbee, Z-Wave, or Wi-Fi, and may be registered with the server (310) via the hub device (330). In the case of cloud connection, the controlled device (840) may be connected to the server (810) via an AP (not shown) (e.g., AP (340)). In the case of cloud-to-cloud connection, the controlled device (840) may be first registered with a third-party cloud server (not shown), and the registration information of the controlled device (840) may be transmitted to the server (810) via an application programmable interface (API). In the case of cloud connection, the user device (820) can connect to the controlled device via a BLE connection, transmit network connection information (e.g., Wi-Fi information or AP information related to the AP (340)) for onboarding (e.g., server registration) to the controlled device (840) via the BLE connection, and collect device logs of the controlled device (840) via the BLE connection. The user device (820) can upload device logs and / or connection logs related to the controlled device (840) to the server (810). An electronic device (830) (e.g., hub device (330)) may include a diagnostic module (832) that executes an offline diagnostic service related to a controlled device (840). If the controlled device (840) is disconnected from the server (810) after onboarding, the electronic device (830) may execute an offline diagnostic service through the diagnostic module (832) to diagnose the cause of the offline connection and perform connection recovery. The electronic device (830) may upload diagnostic data generated as a result of the diagnostic data to the server (810) (e.g., database (812)). In one embodiment, the diagnostic data may include an error code and a recovery result (e.g., success or failure). The electronic device (830) can detect the offline status of the controlled device (840) and support the controlled device (840) to automatically reconnect to the server (810) according to recovery policy information. If the electronic device (830) is a hub device (330) equipped with a hub function, the electronic device (830) can perform registration and control for the hub-connected device. The server (810) can receive diagnostic data generated as a result of diagnosing the offline status of at least one controlled device (840) (e.g., controlled devices (320a, 320b, 320c, 320d)) from the electronic device (830) and store the diagnostic data in a database (DB) (812). below shows an example of diagnostic data uploaded to a server (810) after executing an offline diagnostic service on an electronic device (830). Key Subfield Description Sample sessionId ID of the diagnostic session currently in progress 54947df8-0e9e-4471-a2f9-9af509fb5889 errorCode Error code (analysis result)"[ / "NE11-1 / "]"failCode Analysis or recovery failed"AE01-1""deviceId"Unique ID of the device"11111111-2222-3333-4444-abcdefgh1234""accountId"Account ID"aaaaaaaaaa""country"Region"KR""apConnected"ssid SSID of the connected AP"{"ssid":"dcon5G", "mn":"11:22:33", "frequency":"5412", "rssi":"-20", "capability":"WPA2"}"mn SSID of the connected AP Model Name: freqeuncy Frequency: rssi Received Signal Strength: capability Capability "deviceState" Device State: "ONLINE" "OFFLINE" "UNKNOWN" "recoveryResult" Recovery Result: "SUCCESS" "FAIL" "TIMEOUT" "LOCAL_SYNC_TIMEOUT" "CANCEL" "NO_ACTION" "NONE" "reconnectingTime" Duration of reconnecting 3405 The server (810) can manage recovery policy information indicating a recovery method and a troubleshooting guide for each error code associated with one or more controlled devices (e.g., controlled devices (840)), and can download the recovery policy information indicating the recovery method for each error code to the electronic device (830). When the recovery method for each error code is changed, the server (810) can update the recovery policy information, and the electronic device (830) can download the updated recovery policy information from the server (810). The server (810) can collect the resulting diagnostic data of the offline diagnostic service and store it in the database (812), and can update the recovery policy information to include whether to execute automatic recovery or perform user notification depending on the recovery success rate for each error code. below shows an example of recovery policy information including recovery methods and troubleshooting guides for each error code. Error CodeCausesRecovery MethodsTroubleshooting GuideDS01-1Long-term inactivityNotification to userThe connection to the server has been lost due to long-term inactivity.CE20Sign-in failedRestartCE90Initialize deviceAdd againNE11-1Router connection failed (AP not found)Wi-Fi updateThe connection has been lost due to a change in router information. Please check the router status.NE11-4Router connection failed (password mismatch)Wi-Fi updateThe connection has been lost due to a change in router information. Please check the router status.NE11-2Router connection failed (Authentication)User notificationThe connection has been lost due to a router problem. Please check the router status. The electronic device (830) can download recovery policy information from the server (810). When the recovery policy changes, the server (810) can update the recovery policy information according to the changed recovery policy, and the electronic device (830) can download the updated recovery policy information. The recovery policy information can be manually changed by a system administrator or automatically updated according to the cumulative recovery success rate for each error code. For example, if the recovery success rate for a specific error code of the controlled device (840) is 70% or lower, the recovery method for the error code can be changed from automatic recovery to user notification. Embodiments of the present disclosure may be related to detecting an offline state of a controlled device (840), automatically recovering the controlled device (840) based on the offline cause, guiding the recovery situation to the user when automatic recovery is not possible, or an electronic device (840) equipped with a hub function diagnosing an offline state and recovering a connection on its own. FIG. 9 is a flowchart illustrating an offline diagnosis and connection recovery procedure according to one embodiment of the present disclosure. At least one of the illustrated operations may be executed by a processor (e.g., processor (410)) of an electronic device (830) (e.g., hub device (330)). According to embodiments, at least one of the operations described below may be omitted, modified, or reordered. Referring to FIG. 9, in operation 905, the electronic device (830) (e.g., the processor (410)) may determine whether a recovery policy for connection recovery of a controlled device (840) (e.g., controlled devices (320a, 320b, 320c, 320d)) has been updated. In one embodiment, the electronic device (830) (e.g., the processor (410)) may store recovery policy information in advance. In one embodiment, the electronic device (830) (e.g., the processor (410)) may determine that the recovery policy has been updated based on receiving an update notification of the recovery policy from a server (810) (e.g., the server (310) or a policy server (not shown)), and may proceed to operation 910 to receive updated recovery policy information. If the recovery policy has not been updated, the electronic device (830) (e.g., the processor (410)) may proceed to operation 915. In operation 910, the electronic device (830) (e.g., processor (410)) may transmit a recovery policy update request to a server (810) (e.g., server (310) or a policy server) and receive updated recovery policy information from the server (810). Operations 905 and 910 may be described in detail, for example, in FIG. 10. In one embodiment, operations 905 and 910 may be omitted. At step 915, the electronic device (830) (e.g., processor (410)) can detect that a controlled device (840) (e.g., at least one of controlled devices (320a, 320b, 320c, 320d)) is disconnected from the server (810) (i.e., server-offline state). In one embodiment, the electronic device (830) (e.g., processor (410)) can discover an offline controlled device (e.g., controlled device (840)) by at least one of the following methods: - Disconnection detection via mDNS (multicast domain name service), DNS-SD (DNS-based service discovery), SSDP (simple service discovery protocol), or UPNP (universal plug and play) (e.g., operations 1404, 1406, 1408, and 1410 of FIG. 14); - Disconnection detection via SSE (server-send events) (e.g., actions 1604 and 1608 of FIG. 16); and / or - Disconnection detection via BLE discovery (e.g., actions 1708, 1710, and 1712 in FIG. 17). Actions 920, 925, 930, and 935 may refer to procedures for determining an appropriate recovery method for an error code. In operation 920, the electronic device (830) (e.g., the processor (410)) can establish a D2D connection (e.g., at least one of a hypertext transfer protocol over secure (HTTPS) connection based on a DNS lookup, a BLE connection, or a Wi-Fi connection) with the controlled device (840) detected to be offline. In operation 925, the electronic device (830) (e.g., processor (410)) may obtain an error code of the controlled device (840). In one embodiment, the electronic device (830) (e.g., processor (410)) may receive the error code from the controlled device (840) via a DNS service discovery response, an HTTPS connection, or a BLE connection. At operation 930, the electronic device (830) (e.g., processor (410)) may determine a recovery method corresponding to the error code based on recovery policy information (e.g., ). In one embodiment, the recovery policy information may indicate the recovery policy updated at operation 910. In operation 935, the electronic device (830) (e.g., processor (410)) may determine whether automatic recovery is possible based on the determined recovery method. In one embodiment, the electronic device (830) (e.g., processor (410)) may determine whether the recovery method corresponding to the error code is a user notification. If the recovery method is a user notification, the electronic device (830) (e.g., processor (410)) may determine that automatic recovery is not possible and may proceed to operation 940. If the recovery method is not a user notification, the electronic device (830) (e.g., processor (410)) may determine that automatic recovery is possible and may proceed to operation 945. In operation 940, the electronic device (830) (e.g., the processor (410)) may directly display a user notification related to the diagnostic results of the offline diagnostic service, or may request the user device (820) to display the user notification through the server (810). In operation 945, the electronic device (830) (e.g., processor (410)) may perform a recovery method corresponding to the error code. In one embodiment, the recovery method may include one of updating with changed AP information, performing automatic onboarding, or performing automatic reconnection. Although not illustrated, the electronic device (830) (e.g., processor (410)) may determine whether the controlled device (840) is successfully connected to the server (810) as a result of performing the recovery method, and may report diagnostic data including the error code and the recovery result (e.g., success or failure) to the server (810). In one embodiment, when the electronic device (830) is a hub device (330), the electronic device (830) can perform connection recovery to maintain connectivity. FIG. 10 is a flowchart illustrating a procedure for updating a recovery policy according to one embodiment of the present disclosure. At least one of the illustrated operations may be executed by a processor (not illustrated) of a server (810) (e.g., server (310)). According to embodiments, at least one of the operations described below may be omitted, modified, or reordered. Referring to FIG. 10, in operation 1005, the server (810) may receive diagnostic data generated as a result of an offline diagnostic service (e.g., diagnostic data of Table 1) from an electronic device (830). In one embodiment, the diagnostic data may include an error code and a recovery result (e.g., success or failure) related to a controlled device (840) detected as offline. In operation 1010, the server (810) may accumulate a success rate for the above error code. In one embodiment, the success rate may represent the probability that the connection to the server (810) is successful as a result of executing automatic recovery of the controlled device (840). In operation 1015, the server (810) may determine whether recovery policy information needs to be updated in response to the error code. In one embodiment, the server (810) may determine to update the recovery policy information in response to the error code if the accumulated success rate exceeds a threshold and the recovery method corresponding to the error code is a user notification. If the recovery policy information needs to be updated, the server (810) may proceed to operation 1020. If the recovery policy information does not need to be updated, the server (810) may terminate the process. In operation 1020, the server (810) may update the recovery policy information (e.g., ) in response to the error code. In one embodiment, the server (810) may set the recovery method corresponding to the error code in the recovery policy information to automatic recovery. FIG. 11 is a sequence diagram illustrating automatic recovery of an offline device through BLE scan according to one embodiment of the present disclosure. Referring to FIG. 11, at operation 1102, the controlled device (830) may lose connection to an AP (e.g., AP (340)). At operation 1104, the controlled device (830) may initiate broadcast of an offline advertisement packet (ADV) based on detecting that the connection with the AP (340) has been lost and the device has entered an offline state (e.g., a server-offline state in which the connection between the controlled device (830) and the server (810) has been lost). In one embodiment, the offline ADV may include information indicating that the controlled device (830) is in an offline state (e.g., an online bit set to 0x00). In operation 1106, the electronic device (830) may identify the offline state of the controlled device (840) based on receiving the offline ADV through a BLE scan. In operation 1108, the electronic device (830) may establish a D2D connection (e.g., a BLE connection or a Bluetooth GATT (generic attribute profile) connection) with the controlled device (840). In operation 1110, the electronic device (830) may perform an offline diagnostic service for the controlled device (840) through the D2D connection. In one embodiment, the electronic device (830) may receive an error code indicating the cause of the offline state of the controlled device (840) through the D2D connection, and determine a recovery method (e.g., changing AP information, rebooting, or restarting) corresponding to the error code. In one embodiment, the recovery method may be determined based on pre-stored recovery policy information (e.g., ). In operation 1112, the electronic device (830) may transmit a recovery command instructing a recovery method according to the performance result of the offline diagnosis service to the controlled device (840). In operation 1114, the controlled device (840) may execute automatic recovery (e.g., change of AP information, reboot or restart of the controlled device (840)) based on the recovery command of the electronic device (830). In operation 1116, the controlled device (840) may be connected to an AP (e.g., AP (340) or a new AP (not shown)) by performing the automatic recovery. The controlled device (840) may be reconnected to the server (810) via the AP (340) or the new AP. FIG. 12 is a sequence diagram illustrating an automatic recovery procedure of an offline device through local network device search according to one embodiment of the present disclosure. Referring to FIG. 12, in operation 1202, the controlled device (830) can identify that the connection (e.g., session) with the server (810) has been lost. In operation 1204, the electronic device (830) can detect an offline state of the controlled device (830) (e.g., a server-offline state in which the connection between the controlled device (830) and the server (810) has been lost) through a local network search. In one embodiment, the local network search can include offline detection using at least one of mDNS, DNS-SD, SSDP, UPNP, or SSE. In operation 1206, the electronic device (830) may establish a D2D connection (e.g., an HTTPS connection) with the controlled device (840). In operation 1208, the electronic device (830) may perform an offline diagnostic service for the controlled device (840) through the D2D connection. In one embodiment, the electronic device (830) may receive an error code indicating the cause of the offline operation of the controlled device (840) through the D2D connection, and determine a recovery method (e.g., changing AP information, rebooting, or restarting) corresponding to the error code. In one embodiment, the recovery method may be determined based on pre-stored recovery policy information (e.g., ). In operation 1210, the electronic device (830) may transmit a recovery command instructing a recovery method according to the performance result of the offline diagnosis service to the controlled device (840). In operation 1212, the controlled device (840) may execute automatic recovery (e.g., change of AP information, reboot or restart of the controlled device (840)) based on the recovery command of the electronic device (830). In operation 1214, the controlled device (840) may connect to an AP (e.g., AP (340) or a new AP (not shown)) by performing the automatic recovery. The controlled device (840) may be reconnected to the server (810) via the AP (340) or the new AP. FIG. 13 is a diagram illustrating offline detection and automatic recovery based on mDNS / DNS-SD according to one embodiment of the present disclosure. Referring to FIG. 13, an electronic device (830) (e.g., a hub device (330)) and a controlled device (840) (e.g., controlled devices (320a, 320b, 320c, 320d)) within a local network (1300) (e.g., a local network (350)) may be connected to a server (810) via an AP (340). At operation 1312, the controlled device (840) may detect that the connection with the AP (340) has been lost. In one embodiment, the connection with the AP (340) may be lost due to a software problem in the controlled device (840). In operation 1314, the electronic device (830) may transmit a DNS service discovery periodically (e.g., every N minutes). The electronic device (830) may periodically transmit a DNS service discovery based on mDNS or DNS-SD to monitor the offline state of the controlled device (840). In operation 1316, the controlled device (840) may transmit a response (e.g., a DNS service discovery response corresponding to the DNS service discovery) including offline status information and an error code to the electronic device (830) based on detecting that the connection with the AP (340) is lost. In one embodiment, the DNS service discovery may be based on mDNS or DNS-SD. mDNS or DNS-SD may be used to find a host name without zero setting in a local area network. DNS-SD may be used to set a service type using a PTR (pointer record) of DNS. In operation 1318, the electronic device (830) may determine a recovery method corresponding to the error code by executing an offline diagnosis service based on the error code. In operation 1320, the electronic device (830) may transmit a recovery command indicating the recovery method to the controlled device (840). In one embodiment, the electronic device (830) may establish a D2D connection (e.g., an HTTPS connection) with the controlled device (840) to transmit the recovery command. In operation 1322, the controlled device (840) may perform automatic recovery (e.g., reboot or restart) according to the recovery method based on the recovery command. In operation 1324, the controlled device (840) may be connected to the AP (340) through the automatic recovery, and may report a recovery result (e.g., connection recovery completion or online status) to the server (810) through the AP (340). FIG. 14 is a sequence diagram illustrating offline detection and automatic recovery based on mDNS / DNS-SD according to one embodiment of the present disclosure. Referring to FIG. 14, in operation 1402, the controlled device (840) may be connected to the server (810) online via an AP (340) (not shown). In operation 1404, the electronic device (830) may transmit a DNS service discovery periodically (e.g., every N minutes). The service type of the DNS service discovery may be a value specified to detect whether the controlled device (840) is offline, for example, [_calmrecovery._tcp.local]. In operation 1406, the controlled device (840) may transmit a response (e.g., a DNS service discovery response) to the electronic device (830) including information indicating that the controlled device (840) is online after onboarding to the server (810) is completed. In one embodiment, the hostname in the response may be set to a value that ensures uniqueness, such as [the last 5 digits of the device ID + _calmrecovery.local], to avoid duplication within the local network (1300) (e.g., the local network (350)). In one embodiment, the response may be structured as shown in Table 3 below. host = [9f4d3-calmrecovery.local]address = [aaa.bbb.cc.d]port =
[1234] txt = [Online=true, LastErrorCode=UE01", identifier=54f8d62...] In operation 1408, the connection (e.g., session) between the controlled device (840) and the server (810) may be disconnected, and in operation 1410, the controlled device (840) may detect that it is in an offline state (e.g., a server-offline state in which the connection between the controlled device (840) and the server (810) is disconnected). In operation 1412, the electronic device (830) may transmit a DNS service discovery including a service type of [_calmrecovery._tcp.local] according to a specified period. In operation 1414, the controlled device (840) may transmit a response (e.g., a DNS service discovery response) including information notifying that it is in an offline state and an error code to the electronic device (830) based on detecting that it is in an offline state. In one embodiment, the response may be configured as shown in Table 4 below. hostname = [9f4d3-calmrecovery.local]address = [aaa.bbb.cc.d]port =
[1234] txt = ["Online=false, LastErrorCode=CE20", identifier=54f8d62...] Here, the txt field may contain information indicating that the controlled device (840) is offline (e.g., "Online=false") and an error code (e.g., "LastErrorCode=CE20"). The electronic device (830) can verify that the controlled device (840) is a user-owned device based on the response (e.g., information included in an identifier field of the response). In one embodiment, the controlled device (840) can include a serial number of the controlled device (840) in the identifier field, and the electronic device (830) can verify the serial number. The electronic device (830) can determine a recovery method for the controlled device (840) based on an error code in the response. In one embodiment, the recovery method can be determined based on pre-stored recovery policy information (e.g., ). In operation 1416, the electronic device (830) may establish a D2D connection (e.g., an HTTPS connection) with the controlled device (840). In one embodiment, the electronic device (830) may transmit an HTTPS connection request to the controlled device (840) based on the device IP address and port number included in the response. The electronic device (830) may create a TLS (transport layer security) session with the controlled device (840) based on the certificate. In operation 1418, the electronic device (830) may transmit a recovery command to the controlled device (840) via the HTTPS connection. The recovery command may include information (e.g., {"command":"restartThings"}) indicating a recovery method (e.g., restart) determined based on the error code. In operation 1420, the controlled device (840) may execute the recovery method (e.g., restart) based on the recovery command. After being restarted, the controlled device (840) may reconnect to the AP (340) based on previously stored AP information (e.g., service set ID (SSID), password, authentication type, and / or encryption type). In operation 1422, the controlled device (840) may transmit a sign-in request to the server (810) through the AP (340). In operation 1424, the server (810) may respond to the controlled device (840) that the sign-in is successful. Although not shown, in one embodiment, the electronic device (830) may receive information from the server (810) indicating that the controlled device (840) is online. Although not shown, in one embodiment, the electronic device (830) may transmit diagnostic data (e.g., diagnostic data of ) related to the diagnosis and recovery results of the controlled device (840) to the server (810). FIG. 15 is a diagram illustrating offline detection and automatic recovery based on SSE according to one embodiment of the present disclosure. Referring to FIG. 15, an electronic device (830) (e.g., a hub device (330)) and a controlled device (840) (e.g., controlled devices (320a, 320b, 320c, 320d)) within a local network (1500) (e.g., a local network (350)) may be connected to a server (810) via an AP (340). At operation 1512, the electronic device (830) may receive a device event (e.g., an SSE) from the server (810) notifying an offline state of the controlled device (840) (e.g., a server-offline state in which the connection between the controlled device (840) and the server (810) is lost). In one embodiment, the server (810) may transmit the device event to the electronic device (830) based on detecting that a session with the controlled device (840) has been lost. At operation 1514, the electronic device (830) may transmit an mDNS service discovery based on the device event. At operation 1516, the controlled device (840) may detect a loss of connection with the server (810) and, in response to the mDNS service discovery, transmit a response (e.g., an mDNS service discovery response) to the electronic device (830) that includes the host name of the controlled device (840). In operation 1518, the electronic device (830) may request an error code indicating the cause of the offline state from the controlled device (840). In operation 1520, the controlled device (840) may transmit the error code to the electronic device (830). In one embodiment, to request and transmit the error code, the electronic device (830) may establish a D2D connection (e.g., an HTTPS connection) with the controlled device (840). In operation 1522, the electronic device (830) can determine a recovery method corresponding to the error code by executing an offline diagnosis service based on the error code. In operation 1524, the electronic device (830) can transmit a recovery command indicating the recovery method to the controlled device (840). In operation 1526, the controlled device (840) can perform automatic recovery (e.g., reboot or restart) according to the recovery method based on the recovery command. In operation 1528, the controlled device (840) can be connected to the AP (340) through the automatic recovery, and can report the recovery result (e.g., connection recovery completion or online status) to the server (810) through the AP (340). FIG. 16 is a sequence diagram illustrating offline detection and automatic recovery based on SSE according to one embodiment of the present disclosure. Referring to FIG. 16, in operation 1602, the electronic device (830) may subscribe to the SSE service of the server (810). The SSE service may provide the electronic device (830) with a device event notifying the offline state of the controlled device (840) when the controlled device (e.g., the controlled device (840)) owned by the electronic device (830) becomes offline (e.g., a server-offline state in which the connection between the controlled device (840) and the server (810) is disconnected). In operation 1604, the server (810) and the controlled device (840) may detect that a session connected to each other is disconnected. In operation 1606, the controlled device (840) may initiate an HTTPS server operation based on the disconnection of the session. In one embodiment, the domain name for the HTTPS server operation may be a predetermined value, for example, [the last 5 digits of the device ID + calmrecovery.local]. At operation 1608, the server (810) may transmit a device event notifying the offline status of the controlled device (840) based on the disconnection of the session to the electronic device (830) according to the SSE service. In operation 1610, the electronic device (830) can obtain the host name (e.g., domain name) and device information (e.g., device IP address) of the controlled device (840) based on the device ID of the controlled device (840). In one embodiment, the electronic device (830) can obtain the host name through an mDNS search (e.g., mDNS service discovery and response), and can obtain the device IP address and port number of the controlled device (840) using the host name. The host name can be set to a value that can ensure uniqueness, such as [the last 5 digits of the device ID + _calmrecovery.local], to avoid duplication within the local network (1500) (e.g., the local network (350)). In operation 1612, the electronic device (830) may establish a D2D connection (e.g., an HTTPS connection) with the controlled device (840). In one embodiment, the electronic device (830) may transmit an HTTPS connection request to the controlled device (840) based on the device IP address and port number. The electronic device (830) may create a TLS session with the controlled device (840) based on the certificate. In operation 1614, the electronic device (830) may transmit an error code request to the controlled device (840) via the HTTPS connection. In operation 1616, the controlled device (840) may transmit an error code (e.g., {last_error_code: "CE20"}) indicating an offline cause to the electronic device (830) via the HTTPS connection. The electronic device (830) may determine a recovery method for the controlled device (840) based on the error code. In one embodiment, the recovery method may be determined based on pre-stored recovery policy information (e.g., ). In operation 1618, the electronic device (830) may transmit a recovery command to the controlled device (840) via the HTTPS connection. The recovery command may include information (e.g., {"command":"restartThings"}) indicating a recovery method (e.g., restart) determined based on the error code. In operation 1620, the controlled device (840) may stop the HTTPS server operation based on receiving the recovery command. In operation 1622, the controlled device (840) may execute the recovery method (e.g., restart) based on the recovery command. After being restarted, the controlled device (840) may reconnect to the AP (340) based on pre-stored AP information (e.g., SSID and / or password). In operation 1624, the controlled device (840) may transmit a sign-in request to the server (810) via the AP (340). In operation 1626, the server (810) may respond to the controlled device (840) that the sign-in is successful. In operation 1628, the server (810) may transmit a device event to the electronic device (830) notifying the online status of the controlled device (840) according to the SSE service. Although it will not be a city, if sign-in to the server (810) fails, the electronic device (830) can determine a recovery failure based on a timeout. Although not shown, in one embodiment, the electronic device (830) may transmit diagnostic data (e.g., diagnostic data of Table 1) related to the diagnosis and recovery results of the controlled device (840) to the server (810). Automatic recovery based on BLE scan can use BLE to search for, diagnose, and recover a controlled device (e.g., controlled device (840)) that has lost connection with an AP (340). The electronic device (830) can detect offline status of the controlled device (840) through BLE scan and perform offline diagnosis and recovery based on a device protocol (e.g., open connectivity foundation (OCF) or smartthings software development kit (STDK)). FIG. 17 is a sequence diagram illustrating offline detection and automatic recovery based on BLE scan according to one embodiment of the present disclosure. Referring to FIG. 17, in operation 1702, the controlled device (840) may be connected to the server (810) via an AP (340) (not shown) and may be in an online state. In operation 1704, the controlled device (840) may broadcast an advertising packet (e.g., an online ADV) that includes information indicating the online state (e.g., 'Online bit: 0x01'). In one embodiment, the controlled device (840) may broadcast the online ADV periodically or only when it is determined to be necessary. In operation 1706, the electronic device (830) may identify that the controlled device (840) is in an online state based on identifying that the received advertising packet includes information indicating the online state by periodically performing a BLE scan. At operation 1708, the connection between the controlled device (840) and the server (810) may be disconnected, and at operation 1710, the controlled device (840) may detect that it is in an offline state (e.g., a server-offline state in which the connection between the controlled device (840) and the server (810) is disconnected). At operation 1712, the controlled device (840) may broadcast an advertising packet (e.g., an offline ADV) that includes information indicating the offline state (e.g., 'Online bit: 0x00'). In one embodiment, the controlled device (840) may periodically broadcast the offline ADV while it is offline. The electronic device (830) may identify that the controlled device (840) is in an offline state based on identifying that an advertising packet received through a periodic BLE scan includes information indicating the offline state. In operation 1714, the electronic device (830) may request device information of the controlled device (840) from the server (810) using the BLE information of the controlled device (840) acquired through the offline ADV to confirm that the controlled device (840) is a user-owned device. The device information is information that the controlled device (840) stores in the server (810) during the onboarding process, and may include, for example, information that can identify the controlled device (840) (e.g., device ID, BLE MAC (media access control) address, and / or serial number) and / or information indicating a device protocol (e.g., OCF) of the controlled device (830). In operation 1716, the electronic device (830) may receive a response including the device information of the controlled device (840) from the server (810), and confirm that the controlled device (840) is owned by the user based on the device information (e.g., serial number). In operation 1718, the electronic device (830) can establish a D2D connection (e.g., an OCF connection) with the controlled device (840). In operation 1720, the electronic device (830) can verify ownership of the controlled device (840) using the serial number obtained from the controlled device (840) and create a secure session with the controlled device (840). In operation 1722, the electronic device (830) may transmit an error code request to the controlled device (840) via the D2D connection. In operation 1724, the controlled device (840) may transmit an error code (e.g., {last_error_code: "CE20"}) indicating an offline cause to the electronic device (830) via the D2D connection. The electronic device (830) may determine a recovery method for the controlled device (840) based on the error code. In one embodiment, the recovery method may be determined based on pre-stored recovery policy information (e.g., ). In operation 1726, the electronic device (830) may transmit a recovery command to the controlled device (840) via the D2D connection. The recovery command may include information (e.g., {"command":"restartThings"}) indicating a recovery method (e.g., restart) determined based on the error code. In operation 1728, the controlled device (840) may execute the recovery method (e.g., restart) based on the recovery command. After being restarted, the controlled device (840) may reconnect to the AP (340) based on previously stored AP information (e.g., SSID and / or password). In operation 1730, the controlled device (840) may transmit a sign-in request to the server (810) via the AP (340). In operation 1732, the server (810) may respond to the controlled device (840) that the sign-in is successful. Although not shown, in one embodiment, the electronic device (830) may receive information from the server (810) indicating that the controlled device (840) is online. Although not shown, in one embodiment, the electronic device (830) may transmit diagnostic data (e.g., diagnostic data of ) related to the diagnosis and recovery results of the controlled device (840) to the server (810). In one embodiment of the present disclosure, a recovery method for bringing an offline controlled device (840) online may include a method that induces user intervention in addition to methods that the controlled device (840) performs on its own, such as restarting or updating Wi-Fi, and a user notification may be used to execute a recovery method that induces user intervention. FIG. 18 is a diagram illustrating a user notification for an offline state according to one embodiment of the present disclosure. Referring to FIG. 18, an electronic device (830) (e.g., a hub device (330)) and a controlled device (840) (e.g., controlled devices (320a, 320b, 320c, 320d)) within a local network (1800) (e.g., a local network (350)) may be connected to a server (810) via an AP (340). Even if there is no problem with the controlled device (840) or the network connection (e.g., the AP (340)), the controlled device (840) may go offline due to policy reasons. For example, if the controlled device (840) is not used for a long period of time, the controlled device (840) may disconnect from the server (810) and go offline. In this case, the electronic device (830) may not perform automatic recovery but may instead transmit a user notification to the user device (820). At step 1812, the controlled device (840) may disconnect from the server (810) and go offline based on a specified criterion (e.g., long-term inactivity). At step 1814, the electronic device (830) may transmit a DNS service discovery periodically (e.g., every N minutes). At step 1316, the controlled device (840) may transmit a response (e.g., a DNS service discovery response) to the electronic device (830) that includes offline status information and an error code. Although not illustrated, the electronic device (830) may obtain the error code of the controlled device (840) via a BLE search instead of a DNS search (e.g., a DNS service discovery and response). In operation 1818, the electronic device (830) may transmit a user notification (e.g., an offline notification) based on the error code to the server (810). In operation 1820, the server (810) may forward the offline notification to the user device (820). In operation 1822, the user device (820) may display a guide phrase (e.g., "The living room TV has not been used for a long time and has been disconnected from the server") based on the offline notification. FIG. 19 is a sequence diagram illustrating user notification through local network search according to one embodiment of the present disclosure. Referring to FIG. 19, in operation 1902, a controlled device (840) (e.g., a TV) may be online and connected to a server (810) via an AP (340) (not shown). In operation 1904, an electronic device (830) may periodically (e.g., every N minutes) transmit a DNS service discovery. The service type of the DNS service discovery may be a value specified to detect whether the controlled device (840) is offline, for example, [_calmrecovery._tcp.local]. In operation 1906, the controlled device (840) may transmit a response (e.g., a DNS service discovery response) to the electronic device (830) that includes information indicating that the controlled device (840) is online after onboarding to the server (810) is complete. In one embodiment, the host name in the response may be set to a unique value such as [the last 5 digits of the device ID + _calmrecovery.local] to avoid duplication within the local network (1800) (e.g., the local network (350)). In one embodiment, the response may be configured as shown in . In operation 1908, the connection (e.g., session) between the controlled device (840) and the server (810) may be disconnected, and in operation 1910, the controlled device (840) may detect that it is in an offline state (e.g., a server-offline state in which the connection between the controlled device (840) and the server (810) is disconnected). In operation 1912, the electronic device (830) may transmit a DNS service discovery according to a specified period. In operation 1914, the controlled device (840) may transmit a response (e.g., a DNS service discovery response) to the electronic device (830) based on detecting that it is in an offline state, including information indicating the offline state (e.g., "Online=false"), an error code (e.g., "LastErrorCode=DS01-1"), and / or a device identifier. The electronic device (830) may determine that the recovery method for the controlled device (840) is a user notification based on the error code in the response. In one embodiment, the recovery method may be determined based on previously stored recovery policy information (e.g., ). Although not shown, in one embodiment of the present disclosure, the electronic device (830) may obtain the error code of the controlled device (840) through a BLE search (e.g., operations 1706, 1712, 1714, 1716, 1718, 1720, 1722, and 1724) instead of a local network search (e.g., operations 1904, 1906, 1912, and 1914), and then proceed to operation 1916. In operation 1916, the electronic device (830) may transmit a user notification (e.g., an offline notification) based on the error code to the server (810). In operation 1918, the server (810) may forward the offline notification to the user device (820). In operation 1920, the user device (820) may display a guide phrase explaining the offline status (e.g., "The living room TV has not been used for a long time and has been disconnected from the server") based on the offline notification. Although not shown, in one embodiment, the electronic device (830) may transmit diagnostic data (e.g., diagnostic data of Table 1) related to the diagnosis and recovery results of the controlled device (840) to the server (810). In one embodiment of the present disclosure, if the controlled device (840) goes offline due to a change in AP information (e.g., SSID and / or password), automatic recovery and user notification can be performed. FIG. 20 is a sequence diagram illustrating a user notification for a Wi-Fi update according to one embodiment of the present disclosure. Referring to FIG. 20, in operation 2002, the connection between the controlled device (840) (e.g., a washing machine) and the server (810) may be disconnected, and in operation 2004, the controlled device (840) may detect that it is in an offline state (e.g., a server-offline state in which the connection between the controlled device (840) and the server (810) is disconnected). In operation 2006, the controlled device (840) may broadcast an advertising packet (e.g., an offline ADV) that includes information indicating the offline state (e.g., 'Online bit: 0x00'). In one embodiment, the controlled device (840) may periodically broadcast the offline ADV while it is offline. In operation 2008, the electronic device (830) may perform a periodic BLE scan to detect that the controlled device (840) is offline. The electronic device (830) can receive the offline ADV through the periodic BLE scan and identify that the controlled device (840) is in an offline state. In operation 2010, the electronic device (830) may request device information of the controlled device (840) from the server (810) using the BLE information of the controlled device (840) acquired through the offline ADV to confirm that the controlled device (840) is a user-owned device. The device information is information that the controlled device (840) stores in the server (810) during the onboarding process, and may include, for example, information that can identify the controlled device (840) (e.g., device ID, BLE MAC address, and / or serial number) and / or information indicating a device protocol (e.g., OCF) of the controlled device (830). In operation 2012, the electronic device (830) may receive a response including the device information of the controlled device (840) from the server (810), and confirm that the controlled device (840) is owned by the user based on the device information (e.g., serial number). In operation 2014, the electronic device (830) may establish a D2D connection (e.g., an OCF connection) with the controlled device (840). In operation 2016, the electronic device (830) may verify ownership of the controlled device (840) using a serial number obtained from the controlled device (840) and create a secure session with the controlled device (840). In operation 2018, the electronic device (830) may transmit an error code request to the controlled device (840) via the D2D connection. In operation 2020, the controlled device (840) may transmit an error code (e.g., {last_error_code: "NE11-1"}) indicating an offline cause to the electronic device (830) via the D2D connection. Based on the error code, the electronic device (830) may determine that a recovery method for the controlled device (840) is a user notification. In one embodiment, the recovery method may be determined based on pre-stored recovery policy information (e.g., ). In operation 2022, the electronic device (830) may request a Wi-Fi scan list including scannable Wi-Fi devices (e.g., APs) from the controlled device (840) and obtain a Wi-Fi scan list including APs scanned by the controlled device (840). In one embodiment, the Wi-Fi scan list may include AP information (e.g., SSID, password, authentication type, and / or encryption type) of each AP scanned by the controlled device (840). If the AP to which the electronic device (830) is connected (e.g., AP (340)) is included in the Wi-Fi scan list received from the controlled device (840), operation 2024 may be performed. On the other hand, if the AP to which the electronic device (830) is connected (e.g., AP (340)) is not included in the Wi-Fi scan list received from the controlled device (840), operation 2032 may be performed. Action 2024 may include actions 2026, 2028, and 2030. In action 2026, the electronic device (830) may transmit AP information (e.g., SSID and / or password) for the AP (340) to the controlled device (840). In action 2028, the controlled device (840) may connect to the AP (340) using the AP information and transmit a sign-in request to the server (810) via the AP (340). In action 2030, the server (810) may respond to the controlled device (840) that the sign-in is successful. Action 2032 may include actions 2034, 2036, and 2038. In action 2034, the electronic device (830) may transmit a user notification (e.g., an offline notification) related to the controlled device (840) to the server (810). In action 2036, the server (810) may forward the offline notification to the user device (820) (e.g., the electronic device (201)). In action 2038, the user device (820) may display a guide phrase (e.g., "The washing machine is disconnected because no AP is found") describing the offline status based on the offline notification. Although not shown, in one embodiment, the electronic device (830) may transmit diagnostic data (e.g., diagnostic data of Table 1) related to the diagnosis and recovery results of the controlled device (840) to the server (810). In one embodiment of the present disclosure, when an electronic device (830) goes offline, the electronic device (830) cannot normally diagnose whether a controlled device (e.g., controlled devices (320a, 320b, 320c, 320d)) located nearby is offline. When the electronic device (830) goes offline, the electronic device (830) can diagnose the cause of the disconnection and recover on its own. FIG. 21 is a diagram for explaining an operation of diagnosing and recovering an offline cause by oneself according to one embodiment of the present disclosure. Referring to FIG. 21, the electronic device (830) may include a diagnostic module (2110) (e.g., diagnostic module (832)) that performs diagnosis and recovery according to an offline diagnostic service of controlled devices (e.g., controlled devices (320a, 320b, 320c, 320d)) and a management module (2120) that manages connection and operation of the controlled devices. The diagnostic module (2110) and the management module (2120) may be driven as separate processes to ensure independence of operation. When the management module (2120) goes offline, the management module (2120) can transmit a signal (2102) containing an offline status and an error code (e.g., 'DS01-1') to the diagnostic module (2110). Considering the case where the process of the management module (2120) is forcibly terminated, the diagnostic module (2110) can periodically transmit a polling signal to check whether the management module (2120) is offline. The diagnostic module (2110) can determine a recovery method based on recovery policy information indicating a recovery method for each error code, and transmit a recovery command (2104) indicating the recovery method (e.g., restart) to the management module (2120). The management module (2120) can restart based on the recovery command (2104), and after restarting, can be connected to the server (810) via the AP (340). An electronic device (830) according to one embodiment of the present disclosure may include a transceiver (420) for receiving and transmitting signals, one or more processors (410) communicatively coupled to the transceiver, and a memory (430) for storing instructions. The instructions, when executed by the one or more processors, may be configured to cause the electronic device to obtain first information indicating that a controlled device (840) is in an offline state in which the connection to a server (810) is lost. The instructions, when executed by the one or more processors, may be configured to cause the electronic device to establish a device-to-device (D2D) connection with the controlled device through the transceiver. The instructions, when executed by the one or more processors, may be configured to cause the electronic device to receive an error code related to the offline state of the controlled device from the controlled device through the D2D connection. The above instructions, when executed by the one or more processors, may be configured to cause the electronic device to determine a recovery method corresponding to the error code based on specified recovery policy information. The above instructions, when executed by the one or more processors, may be configured to transmit a recovery command to the controlled device via the transceiver, the recovery command instructing the electronic device to recover a connection between the controlled device and the server based on the determined recovery method. In one embodiment, the specified recovery policy information may include information on one or more recovery methods corresponding to a plurality of error codes associated with the controlled device. In one embodiment, the commands may cause the electronic device to receive from the server the first information including a device event notifying the offline status of the controlled device. In one embodiment, the commands may cause the electronic device to periodically transmit a domain name service (DNS) service discovery and, in response to the DNS service discovery, receive a service discovery response from the controlled device that includes the first information indicating the offline status. In one embodiment, the commands may cause the electronic device to receive an advertising packet broadcast from the controlled device via a low-power Bluetooth (BLE) scan and to identify that the advertising packet includes the first information indicating the offline status. In one embodiment, the commands may cause the electronic device to request device information related to the controlled device from the server based on identifying that the advertising packet includes the first information, receive the device information for use in the D2D connection from the server, and verify ownership of the controlled device based on a serial number included in the device information. In one embodiment, the instructions may cause the electronic device to periodically transmit a domain name service (DNS) service discovery and, in response to the DNS service discovery, receive a service discovery response from the controlled device that includes the first information indicating the offline status and the error code. In one embodiment, the D2D connection may include at least one of a hypertext transfer protocol over secure (HTTPS) connection based on a DNS lookup, a BLE connection, or a Wi-Fi connection. In one embodiment, the commands may cause the electronic device to determine whether the determined recovery method indicates that automatic recovery of the offline state is possible, and if automatic recovery is not possible, transmit a user notification to the user device (820) via the server requesting display of guidance text related to the offline state. In one embodiment, the commands may cause the electronic device to transmit diagnostic data indicating the cause of the offline state or the result of recovery to the server. A method performed by an electronic device (830) according to one embodiment of the present disclosure may include an operation (915) of obtaining, by the electronic device, first information indicating that a controlled device (840) is in an offline state in which the connection to a server (810) is lost. The method may include an operation (920) of establishing, by the electronic device, a device-to-device (D2D) connection with the controlled device. The method may include an operation (925) of receiving, by the electronic device, an error code related to the offline state of the controlled device from the controlled device through the D2D connection. The method may include an operation (930) of determining, by the electronic device, a recovery method corresponding to the error code based on designated recovery policy information. The method may include operations (935, 945) of transmitting, by the electronic device, a recovery command to the controlled device, the recovery command instructing the controlled device to recover the connection between the controlled device and the server based on the determined recovery method. In one embodiment, the specified recovery policy information may include information on one or more recovery methods corresponding to a plurality of error codes associated with the controlled device. In one embodiment, the operation of obtaining the first information may include an operation of receiving the first information including a device event notifying the offline status of the controlled device from the server. In one embodiment, the operation of obtaining the first information may include an operation of periodically transmitting a domain name service (DNS) service discovery, and an operation of receiving, from the controlled device, a service discovery response including the first information notifying the offline status in response to the DNS service discovery. In one embodiment, the operation of obtaining the first information may include an operation of receiving an advertising packet broadcast from the controlled device via a low-power Bluetooth (BLE) scan, and an operation of identifying that the advertising packet includes the first information notifying the offline status. In one embodiment, the method may include an operation of requesting device information related to the controlled device from the server based on identifying that the advertising packet includes the first information, an operation of receiving the device information to be used for the D2D connection from the server, and an operation of confirming ownership of the controlled device based on a serial number included in the device information. In one embodiment, the operation of obtaining the first information and the operation of receiving the error code may include an operation of periodically transmitting a domain name service (DNS) service discovery, and an operation of receiving, from the controlled device, a service discovery response including the first information and the error code, which notifies the offline status in response to the DNS service discovery. In one embodiment, the D2D connection may include at least one of an HTTPS connection based on a DNS lookup, a BLE connection, or a Wi-Fi connection. In one embodiment, the method may include an operation of determining whether the determined recovery method indicates that automatic recovery of the offline state is possible, and, if the automatic recovery is not possible, an operation of transmitting a user notification requesting display of a guide phrase related to the offline state to the user device (820) through the server. In one embodiment, the method may include transmitting diagnostic data indicating the cause of the offline state and / or the result of recovery to the server. One or more non-transitory computer-readable storage media according to one embodiment of the present disclosure store one or more computer programs including computer-executable instructions that, when executed by one or more processors (410) of an electronic device (830), cause the electronic device to perform the following operations. The operations include: obtaining, by the electronic device, first information indicating that a controlled device (840) is in an offline state where it is disconnected from a server (810); establishing, by the electronic device, a device-to-device (D2D) connection with the controlled device; receiving, by the electronic device, an error code related to the offline state of the controlled device from the controlled device through the D2D connection; determining, by the electronic device, a recovery method corresponding to the error code based on specified recovery policy information; and transmitting, by the electronic device, a recovery command to the controlled device, the recovery command instructing the control device to recover the connection between the controlled device and the server based on the determined recovery method. In one embodiment, the specified recovery policy information may include information about one or more recovery methods corresponding to a plurality of error codes associated with the controlled device. Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices. The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component. The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC). Various embodiments of the present document may be implemented as software (e.g., a program (240)) including one or more instructions stored in a storage medium (e.g., an internal memory (236) or an external memory (238)) readable by a machine (e.g., an electronic device (201)). For example, a processor (e.g., a processor (220)) of the machine (e.g., an electronic device (201)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium. According to one embodiment, the method according to various embodiments disclosed in this document may be provided as a computer program product. The computer program product may be traded between sellers and buyers as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)) or may be provided through an application store (e.g., Play Store). TM ) or directly between two user devices (e.g., smart phones), online distribution (e.g., downloading or uploading). In the case of online distribution, at least a portion of the computer program product may be at least temporarily stored or temporarily created in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server. According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and placed in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added. While the present disclosure has been illustrated and described with reference to various embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the scope of the present disclosure as defined by the appended claims and their equivalents.
Claims
1. In an electronic device (830), A transceiver (420) for receiving and transmitting signals; One or more processors (410) communicatively coupled to the transceiver; and A memory (430) for storing commands, wherein the commands, when executed by one or more processors, cause the electronic device to: Obtains first information indicating that the controlled device (840) is in an offline state with a disconnection to the server (810), Establishing a device-to-device (D2D) connection with the controlled device through the above transceiver, Receive an error code related to the offline state of the above controlled device from the above controlled device through the D2D connection, Determine the recovery method corresponding to the above error code based on the specified recovery policy information, An electronic device that transmits a recovery command to the controlled device through the transceiver, the recovery command instructing the controlled device to recover the connection between the controlled device and the server based on the recovery method determined above.
2. In paragraph 1, the specified recovery policy information is: An electronic device characterized by including information on one or more recovery methods corresponding to a plurality of error codes associated with the controlled device.
3. In the first or second paragraph, the commands cause the electronic device to: An electronic device characterized in that it receives the first information including a device event notifying the offline state of the controlled device from the server.
4. In the first or second paragraph, the commands cause the electronic device to: Periodically sends Domain Name Service (DNS) service discovery, An electronic device characterized in that it receives, from the controlled device, a service discovery response including the first information notifying the offline status in response to the DNS service discovery.
5. In the first or second paragraph, the commands cause the electronic device to: Receive advertising packets broadcast from the controlled device via a low-power Bluetooth (BLE) scan, An electronic device characterized in that it identifies that the advertising packet includes the first information notifying the offline status.
6. In paragraph 5, the commands cause the electronic device to: Requesting device information related to the controlled device to the server based on identifying that the first information is included in the advertising packet; Receive the device information to be used for the above D2D connection from the server, An electronic device characterized in that it verifies ownership of the controlled device based on a serial number included in the device information.
7. In the first or second paragraph, the commands cause the electronic device to: Periodically sends Domain Name Service (DNS) service discovery, An electronic device characterized in that it receives a service discovery response from the controlled device, the service discovery response including the first information notifying the offline status and the error code in response to the DNS service discovery.
8. In any one of paragraphs 1 to 7, the D2D connection is: An electronic device characterized by comprising at least one of a hypertext transfer protocol over secure (HTTPS) connection based on a domain name service (DNS) lookup, a Bluetooth low energy (BLE) connection, or a Wi-Fi connection.
9. In any of paragraphs 1 to 8, the commands cause the electronic device to: Determine whether the above-determined recovery method indicates that automatic recovery of the offline state is possible, An electronic device characterized in that, if the above automatic recovery is not possible, a user notification requesting display of a guide phrase related to the offline state is transmitted to the user device (820) through the server.
10. In any one of paragraphs 1 to 9, the commands cause the electronic device to: An electronic device characterized in that it transmits diagnostic data indicating the cause of the offline state or the result of recovery to the server.
11. In a method performed by an electronic device (830), An operation (915) of obtaining first information by the electronic device indicating that the controlled device (840) is in an offline state with a disconnection to the server (810), An operation (920) of establishing a device-to-device (D2D) connection between the controlled device and the device by the electronic device, An operation (925) of receiving an error code related to the offline state of the controlled device from the controlled device through the D2D connection by the electronic device; An operation (930) of determining a recovery method corresponding to the error code based on the specified recovery policy information by the electronic device; A method comprising the action (935,945) of transmitting, by the electronic device, a recovery command to the controlled device, the recovery command instructing the controlled device to recover the connection between the controlled device and the server based on the determined recovery method.
12. In paragraph 11, the specified recovery policy information is: A method characterized by including information of one or more recovery methods corresponding to a plurality of error codes associated with the controlled device.
13. In clause 11 or 12, the operation of obtaining the first information comprises: A method characterized by comprising an action of receiving from the server the first information including a device event notifying the offline state of the controlled device.
14. In clause 11 or 12, the operation of obtaining the first information comprises: The action of periodically sending Domain Name Service (DNS) service discovery, A method characterized by comprising the action of receiving, from the controlled device, a service discovery response including the first information notifying the offline status in response to the DNS service discovery.
15. In clause 11 or 12, the operation of obtaining the first information comprises: An operation of receiving an advertising packet broadcast from the controlled device through a Bluetooth low energy (BLE) scan, An action for identifying that the advertising packet includes the first information indicating the offline status; An operation of requesting device information related to the controlled device to the server based on identifying that the first information is included in the advertising packet; An operation of receiving the device information to be used for the above D2D connection from the server, A method characterized by including an action of verifying ownership of the controlled device based on a serial number included in the device information.
Citation Information
Patent Citations
Communication device, control method, and program
JP2022155052A
Resource selection apparatus and communication system
KR101881786B1
Vision inspection device and apparatus for manufacturing electrode plate of secondary battery having the same
KR1020240071033A
Sidewalk and road block with non-slip and antibacterial for pedestrian safty of peopoe who are weak in walking
KR102425765B1
KR20220097226A
