ELECTRONIC DEVICE COMMUNICATING WITH EXTERNAL ELECTRONIC DEVICE AND METHOD FOR OPERATING THE SAME

According to an embodiment, an electronic device includes a communication module and at least one processor connected to the communication module. The at least one processor is configured to, upon executing an application stored in the electronic device, identify at least one external electronic device registered in the application, identify at least one communication protocol supported by the at least one external electronic device among a plurality of communication protocols, and adjust a scan time corresponding to a first communication protocol among the plurality of communication protocols based on the at least one communication protocol.

TECHNICAL FIELD

The disclosure relates to an electronic device communicating with an external electronic device and a method for operating the same.

BACKGROUND ART

The Internet of Things (IoT) refers to technology for accessing the Internet by equipping various things with sensors and communication functionality.

IoT is an artificial intelligence technology capable of exchanging data between things connected via the Internet, self-analyzing the data, providing learned information to the user or allowing the user to remotely control them. Here, the things may be various embedded systems, e.g., home appliances, mobile devices, or wearable devices. IoT-connected things may connect to the Internet using their own unique internet protocol (IP) addresses for distinguishing them from others and may have sensors for obtaining data from an external environment.

IoT is also highly useful for the purpose of controlling various electronic devices in the home. The user may control electronic devices, such as a TV, a washing machine, or an air conditioner, to perform their respective specialized services in the home IoT environment and may easily share information thereabout.

DISCLOSURE

Technical Problem

In a discovery procedure of an Internet of Things (IoT) system, the electronic device may have difficulty in scanning an external electronic device desired by the user due to duplication of scan resources or ambient environment.

Aspect of the disclosure, an electronic device may determine a scan target considering the influence by the ambient environment or duplication of scan resources and scan an external electronic device desired by the user.

Aspect of the disclosure, an electronic device may identify a communication protocol supported by an external electronic device registered in the user account and scan an external electronic device desired by the user.

Technical Solution

In accordance with an aspect of the disclosure, an electronic device is provided. The electronic device includes a communication module and at least one processor connected to the communication module. The at least one processor is configured to, upon executing an application stored in the electronic device, identify at least one external electronic device registered in the application, identify at least one communication protocol supported by the at least one external electronic device among a plurality of set communication protocols, and adjust a scan time corresponding to a first communication protocol among the plurality of set communication protocols based on the at least one identified communication protocol.

In accordance with another aspect of the disclosure, a method for operating an electronic device scanning an external electronic device is provided. The method includes upon executing an application stored in the electronic device, identifying at least one external electronic device registered in the application, identifying at least one communication protocol supported by the at least one external electronic device among a plurality of set communication protocols, and adjusting a scan time corresponding to a first communication protocol among the plurality of set communication protocols based on the at least one identified communication protocol.

Advantageous Effects

According to embodiment of the disclosure, in an Internet of things (IoT) system, an electronic device may prevent unnecessary waste of scan resources during a discovery operation and efficiently set a scan target, thereby enhancing the scan performance of the electronic device.

According to embodiments of the disclosure, in an IoT system, an electronic device may efficiently set a scan target considering the characteristics of an external electronic device and scan an external electronic device desired by the user.

MODE FOR INVENTION

FIG.2is a block diagram200illustrating a program according to an embodiment of the disclosure.

Referring toFIG.2, the program140may include an operating system (OS)142to control one or more resources of the electronic device101, middleware144, or an application146executable in the OS142. The OS142may include, for example, Android™, iOS™, Windows™, Symbian™, Tizen™, or Bada™. At least part of the program140, for example, may be pre-loaded on the electronic device101during manufacture, or may be downloaded from or updated by an external electronic device (e.g., the electronic device102or104, or the server108) during use by a user.

The OS142may control management (e.g., allocating or deallocation) of one or more system resources (e.g., process, memory, or power source) of the electronic device101. The OS142, additionally or alternatively, may include one or more driver programs to drive other hardware devices of the electronic device101, for example, the input module150, the sound output module155, the display module160, the audio module170, the sensor module176, the interface177, the haptic module179, the camera module180, the power management module188, the battery189, the communication module190, the subscriber identification module196, or the antenna module197.

The middleware144may provide various functions to the application146such that a function or information provided from one or more resources of the electronic device101may be used by the application146. The middleware144may include, for example, an application manager201, a window manager203, a multimedia manager205, a resource manager207, a power manager209, a database manager211, a package manager213, a connectivity manager215, a notification manager217, a location manager219, a graphic manager221, a security manager223, a telephony manager225, or a voice recognition manager227.

The application manager201, for example, may manage the life cycle of the application146. The window manager203, for example, may manage one or more graphical user interface (GUI) resources that are used on a screen. The multimedia manager205, for example, may identify one or more formats to be used to play media files, and may encode or decode a corresponding one of the media files using a codec appropriate for a corresponding format selected from the one or more formats. The resource manager207, for example, may manage the source code of the application146or a memory space of the memory130. The power manager209, for example, may manage the capacity, temperature, or power of the battery189, and determine or provide related information to be used for the operation of the electronic device101based at least in part on corresponding information of the capacity, temperature, or power of the battery189. According to an embodiment, the power manager209may interwork with a basic input/output system (BIOS) (not shown) of the electronic device101.

The database manager211, for example, may generate, search, or change a database to be used by the application146. The package manager213, for example, may manage installation or update of an application that is distributed in the form of a package file. The connectivity manager215, for example, may manage a wireless connection or a direct connection between the electronic device101and the external electronic device. The notification manager217, for example, may provide a function to notify a user of an occurrence of a specified event (e.g., an incoming call, message, or alert). The location manager219, for example, may manage locational information on the electronic device101. The graphic manager221, for example, may manage one or more graphic effects to be offered to a user or a user interface related to the one or more graphic effects.

The security manager223, for example, may provide system security or user authentication. The telephony manager225, for example, may manage a voice call function or a video call function provided by the electronic device101. The voice recognition manager227, for example, may transmit a user's voice data to the server108, and receive, from the server108, a command corresponding to a function to be executed on the electronic device101based at least in part on the voice data, or text data converted based at least in part on the voice data. According to an embodiment, the middleware244may dynamically delete some existing components or add new components. According to an embodiment, at least part of the middleware144may be included as part of the OS142or may be implemented as another software separate from the OS142.

The application146may include, for example, a home251, a dialer253, a short message service (SMS)/multimedia messaging service (MMS)255, an instant message (IM)257, a browser259, a camera261, an alarm263, a contact265, a voice recognition267, an email269, a calendar271, a media player273, an album275, a watch277, health279(e.g., for measuring the degree of workout or biometric information, such as blood sugar), or environmental information281(e.g., for measuring air pressure, humidity, or temperature information) application. According to an embodiment, the application146may further include an information exchanging application (not shown) that is capable of supporting information exchange between the electronic device101and the external electronic device. The information exchange application, for example, may include a notification relay application adapted to transfer designated information (e.g., a call, message, or alert) to the external electronic device or a device management application adapted to manage the external electronic device. The notification relay application may transfer notification information corresponding to an occurrence of a specified event (e.g., receipt of an email) at another application (e.g., the email application269) of the electronic device101to the external electronic device. Additionally or alternatively, the notification relay application may receive notification information from the external electronic device and provide the notification information to a user of the electronic device101.

The device management application may control the power (e.g., turn-on or turn-off) or the function (e.g., brightness, resolution, or focus) of the external electronic device or some component thereof (e.g., a display module or a camera module of the external electronic device). The device management application, additionally or alternatively, may support installation, delete, or update of an application running on the external electronic device.

FIG.3is a view illustrating an IoT environment according to an embodiment of the disclosure.

Referring toFIG.3, an IoT environment300may include an electronic device310, a cloud320, and cloud-connected devices330. According to various embodiments, the IoT environment300may mean a type of platform that connects cloud-connected devices300, e.g., home appliances, via various types of communication networks and relays and controls them by a local server. According to various embodiments, the IoT environment300may provide device search and control while controlling various communication protocols, such as Bluetooth (BT), Bluetooth low energy (BLE), Wi-Fi, peer-to-peer (P2P) network, universal plug and play (UPnP), Cloud, or ultra-wideband (UWB). According to various embodiments, the IoT environment300may be implemented as an open platform to be able to connect not only a specific brand of sensor or product but also other brands of products. According to various embodiments, the IoT environment300may be implemented as a closed platform to be able to connect a specific brand of sensor and product.

According to various embodiments, an application315(e.g., the application146ofFIG.1) executable by an operating system (e.g., the operating system142ofFIG.1) may be installed on the electronic device310(e.g., the electronic device101ofFIG.1). According to various embodiments, the application315may be preloaded on the electronic device310when manufactured or be downloaded from an external electronic device (e.g., the electronic device102or104ofFIG.1or the server108ofFIG.1) or updated. According to various embodiments, the application315may identify the state of the cloud-connected devices330registered with the server in the cloud320and control the cloud-connected devices330. According to various embodiments, the application315may control the cloud-connected devices330registered with the server in the cloud320to be automatically operated at a predetermined time or receive notifications from the cloud-connected devices330. According to various embodiments, the application315may control and manage smart home appliances or Internet of Things (IoT) through the electronic device310and wiredly or wirelessly connect with nearby devices. For example, the cloud-connected devices330may include at least one of TVs, speakers, refrigerators, kimchi refrigerators, wine cellars, washers, driers, air dressers, ovens, dish washers, cooktops, robot vacuums, air conditioners, and air purifiers.

FIG.4is a view illustrating an IoT environment according to an embodiment of the disclosure.

Referring toFIG.4, an IoT environment400may include an electronic device410, a first cloud420, cloud-connected devices430(e.g., the cloud-connected devices330ofFIG.3), a hub440, a second cloud460, and a third cloud470. According to various embodiments, the IoT environment400may provide substantially the same or similar environment to the IoT environment300described in connection withFIG.3. According to various embodiments, an application415(e.g., the application146ofFIG.1) executable by an operating system (e.g., the operating system142ofFIG.1) may be installed on the electronic device410(e.g., the electronic device101ofFIG.1). According to various embodiments, the application415may identify the state of the cloud-connected devices430registered with the server in the first cloud420and control the cloud-connected devices430. According to various embodiments, the application415may control the cloud-connected devices430registered with the server in the first cloud420to be automatically operated at a predetermined time or receive notifications from the cloud-connected devices430. According to various embodiments, the application415may control and manage smart home appliances or Internet of Things (IoT) through the electronic device310and wiredly or wirelessly connect with nearby devices.

According to various embodiments, the first cloud420may include a server that manages or controls the electronic device410and the cloud-connected devices430. According to various embodiments, the server in the first cloud420may store information transmitted/received between the electronic device410and the cloud-connected devices430, relay communication between the electronic device410and the cloud-connected devices430, and support communication of the electronic device410and the cloud-connected devices430. According to various embodiments, the first cloud420may implement an application programming interface (API) which is a language or message format used for communication between operating system and application program. According to various embodiments, the first cloud420may be connected with the cloud-connected devices430via the hub440. According to various embodiments, the hub440may mean a device (e.g., gateway) that relays communication between the first cloud420and the cloud-connected devices430. According to various embodiments, the hub440may be a device implemented in the first cloud420or implemented as a separate device (e.g., external server). According to various embodiments, the first cloud420may be connected with the cloud-connected devices430via a direct connection450without using the hub440.

According to various embodiments, the first cloud420may be connected with a cloud connector424using an API422and communicate with the second cloud460. According to various embodiments, the operator who provides service on the first cloud420may differ from the operator who provides service on the second cloud460. According to various embodiments, the cloud connector424may relay communication between different clouds (e.g., the first cloud420and the second cloud460). According to various embodiments, the cloud connector424may be a hardware device or software module implemented in the first cloud420. According to various embodiments, the cloud connector424may be a hardware device or software module implemented outside the first cloud420. According to various embodiments, the cloud connector424may be a separate server implemented outside the first cloud420.

According to various embodiments, the first cloud420may be connected with an automation function426using the API422. The automation function426may control each of the cloud-connected devices430connected to the first cloud420to perform its pre-defined operation without a user command (or input) if a condition set in the application415by the user is met. According to various embodiments, the automation function426may be a hardware device or software module implemented in the first cloud420. According to various embodiments, the automation function426may be a hardware device or software module implemented outside the first cloud420. According to various embodiments, the automation function426may be a separate server implemented outside the first cloud420. According to various embodiments, in response to a user input, the application415may set various conditions, e.g., time (e.g., specific time, specific time period, always, or day), device state, member location (e.g., check on whether it is in the initially set place), place state, or weather. According to various embodiments, if the condition set by the application415is met, the automation function426may control each of the cloud-connected devices430connected to the first cloud420to perform functions, e.g., device control, smartphone notification, play voice messages through speaker, place state change, or mode execution.

According to various embodiments, the first cloud420may be connected with a cloud connector428using the API422and communicate with the third cloud470. According to various embodiments, the operator who provides service on the first cloud420may differ from the operator who provides service on the third cloud470. According to various embodiments, the cloud connector428may relay communication between different clouds (e.g., the first cloud420and the third cloud470). According to various embodiments, the cloud connector428may be a hardware device or software module implemented in the first cloud420. According to various embodiments, the cloud connector428may be a hardware device or software module implemented outside the first cloud420. According to various embodiments, the cloud connector428may be a separate server implemented outside the first cloud420.

FIG.5is a view illustrating of a system architecture according to an embodiment of the disclosure.

Referring toFIG.5, a system architecture500may include a discovery module (discovery)510, a data processing module (data processing)520, a repository module (repository)530, a publisher module (publisher)540, and a trigger module (trigger)550. According to various embodiments, an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, and the electronic device410ofFIG.4) may execute, in a set order, at least one of the functions of the discovery module510, the data processing module520, the repository module530, the publisher module540, and the trigger module550, to connect IoT devices in an IoT environment.

According to various embodiments, the electronic device may scan (or discover) an external electronic device supporting various communication protocols (e.g., BL511, BLE512, Wi-Fi513, P2P514, UPnP515, CLOUD516, and UWB517) through the discovery module510. According to various embodiments, the electronic device may transfer the scanning result of the discovery module510to the data processing module520and may store data about the scanning result in a repository module812. According to various embodiments, the electronic device may transfer data about the scanning result to the publisher module540and the trigger module550.

According to various embodiments, since the operation of the electronic device to scan the external electronic device consumes a large amount of battery power, the electronic device may stop scanning if a desired device is discovered. According to various embodiments, the electronic device may set a time limit for the operation of scanning the external electronic device. According to various embodiments, when an external electronic device that was connectable to the electronic device moves out of connection coverage, if the electronic device continues to scan the external electronic device, battery consumption and resource waste may occur. According to various embodiments, the electronic device may perform a scan on another external electronic device considering a scan constraint situation of Wi-Fi. For example, in the case of Wi-Fi, the foreground app may scan 4 times at 2-minute intervals and may perform multiple scans in a short time. The background app may perform one scan at a 30-minute interval in total. According to various embodiments, the electronic device may scan another external electronic device considering the scan constraint situation of the communication protocol.

According to various embodiments, since Bluetooth and Wi-Fi use the same frequency band, a collision between Bluetooth and Wi-Fi protocols, or an error or delay may occur when the electronic device scans. According to various embodiments, when the electronic devices simultaneously use the scan resource (or resource) at a specific point in time, some of the electronic devices may not be able to scan a nearby device. According to various embodiments, the electronic device may not be able to scan a device corresponding to a scan type having a short period due to surrounding interference and environment. According to various embodiments, if only BLE-supporting devices are registered in the application (e.g., the application146ofFIG.1, the application315ofFIG.3, or the application415ofFIG.4), the electronic device may consume most of the scan resources in scanning other communication protocols (e.g., Wi-Fi, UPnP, P2P, or BT), thus failing to scan a BLE-supporting device. According to various embodiments, the electronic device may provide efficient discovery scheduling by adjusting the scan time and the order of scan priority in a discovery procedure according to the type of a registered device.

According to various embodiments, the electronic device may identify one or more communication protocols supported per device type registered in the application (or user account) and determine at least one protocol requiring a scan among the plurality of communication protocols based on the device information and current location at the time of starting application driving and scanning According to various embodiments, the electronic device may adjust (or determine) the scan time or the order of scan priority based on at least one of the device type of the external electronic device, location information about the external electronic device, and the plurality of communication protocols. According to various embodiments, the device type registered in the application (or user account) may be set based on at least one of the product type and product model of the electronic device. For example, the device types registered in the application (or user account) may be at least one of a mobile phone, a tablet, a wearable device, a PC, an accessory device, a TV, audio visual (AV), signage, a refrigerator, a washer, a dryer, an air conditioner, an air purifier, an oven, a range, a microwave, a hood, a robot vacuum, a smart home device, a printer, a headphone, a speaker, a monitor, an E-board, an IoT device, a camera, a camcorder, a cooktop, a dishwasher, a smart watch, a band, a router, a tracker, a car, an air dresser, a speaker, a display, or ear-buds.

According to various embodiments, the electronic device may identify at least one communication protocol supported by at least one external electronic device among the plurality of communication protocols and may adjust a scan time corresponding to a specific communication protocol among the set plurality of communication protocols based on the identified at least one communication protocol. According to various embodiments, a scanning order for the plurality of communication protocols may be predetermined when the application is driven. For example, when the application is driven, the electronic device may scan external electronic devices in the order of BLE, Wi-Fi, P2P, UPnP, CLOUD, UWB, and BT. According to various embodiments, the electronic device may scan the external electronic device based on whether real-time data collection is supported and the number of external electronic devices supporting a specific communication protocol. According to various embodiments, the electronic device may collect data in real-time in the case of Wi-Fi and, when the number of external electronic devices supporting Wi-Fi is smaller than the number of external electronic devices supporting BLE, first scan the external electronic devices supporting BLE. According to various embodiments, the electronic device may collect data in real-time in the case of Wi-Fi and may scan the external electronic device supporting BT first if data cannot be collected in real time in the case of BT.

According to various embodiments, the electronic device may determine a communication protocol to scan based on its own location information and location information about the external electronic device. According to various embodiments, the electronic device may identify (or determine) its location information based on the information collected through Wi-Fi and base station location information, compare current location information about the electronic device with location information about the external electronic device registered in the application, and if the location of the external electronic device and the current location of the electronic device meet a preset condition (e.g., within a radius of 100 meters), scan the external electronic device. According to various embodiments, if the location of the external electronic device and the current location of the electronic device do not meet the preset condition (e.g., within a radius of 100 meters), the electronic device may receive only cloud events. According to various embodiments, when the external electronic device is connected to the same wireless network, the electronic device may determine that the preset condition (e.g., within a radius of 100 meters) is met and scan the external electronic device.

According to various embodiments, the electronic device may identify communication protocols supported per device type registered in the application (or account) and may scan the communication protocols supported by the external electronic device based on the communication protocols supported per device type. According to various embodiments, in the case of an external electronic device having a Nearby attribute, such as a SmartTag, initial scanning is important. Thus, the electronic device may add three more seconds to the BLE scanning time.

FIG.6is a view illustrating a system architecture according to an embodiment of the disclosure.

Referring toFIG.6, a system architecture600may include a framework610, a base component620, a service module (service)630, a discovery protocol module (discovery protocols)640, a discovery scheduler650, a repository module (repository)660, an action module (action)670, a trigger module (trigger)672, a publisher module (publisher)674, and a feature component680. According to various embodiments, the framework610may refer to a Linux-based open source software stack created to be used in various electronic devices. According to various embodiments, the base component620may refer to an element necessary for creating IoT-related basic services by simplifying IoT core modular system components and service recycling. According to various embodiments, the service module630may refer to a background process for periodically processing scanning and cloud events regardless of the UI. According to various embodiments, the discovery protocol module640may provide a discovery (scanning) API, such as BT, BLE, UPnP, Wi-Fi, P2P, UWB, wearable, accessory, and cloud. According to various embodiments, the discovery scheduler650may set at least one of an execution period of an application, a scanning time according to a position, and priority. According to various embodiments, the repository module660may store the scanning result, and the action module670may perform device connection and control. According to various embodiments, when a tag is found nearby or the connection is terminated, the trigger module672may automatically upload the location to the server according to the scanning result.

According to various embodiments, the discovery scheduler650included in an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, and the electronic device410ofFIG.4) for connection between IoT devices in an IoT environment may determine a scanning schedule if the user requests cloud device information when an application starts. According to various embodiments, the discovery scheduler650may determine a scanning schedule when the electronic device requests cloud device information upon booting. According to various embodiments, the discovery scheduler650may determine a scanning schedule when the external server updates the cloud device information state or receives cloud device information from the external server.

According to various embodiments, the discovery scheduler650may scan at least one of the communication protocols (e.g., BT, Wi-Fi, BLE, P2P, UPnP, UWB, wearable & accessory, cloud device) supported by the discovery protocol module640. According to various embodiments, the repository module660may store the scanning (or discovery) result. The scanning (or discovery) result may be transferred to the trigger module672and the publisher module674.

According to various embodiments, the discovery scheduler650may perform a scan on the BLE, Wi-Fi, UPnP, P2P, BT, and BLE communication protocols to scan (or search for) external electronic devices located nearby when an application is driven. According to various embodiments, the discovery scheduler650may set a scan time limit for the BLE, Wi-Fi, UPnP, P2P, and BT communication protocols. According to various embodiments, the discovery scheduler650may set a scan time according to a time period in which an external electronic device may be found based on an advertising speed of the communication protocol. According to various embodiments, the discovery scheduler650may terminate the scan (or search) of the communication protocol when the application ends or switches to the background state. According to various embodiments, the discovery scheduler650may not terminate the BLE protocol to support a service through a Nearby device.

Referring to Table 1, the discovery scheduler650may set the scan time for the BLE protocol to is (second), set the scan time for Wi-Fi protocol to 500 ms, set the scan time for the UPnP protocol to 500 ms, set the scan time for the P2P protocol to 15 s, and may again set the scan time for the Wi-Fi protocol to 5 s, set the scan time for the BT protocol to 2 s, and may then maintain the scan on the BLE protocol.

According to various embodiments, when only external electronic devices (e.g., tags) supporting the BLE protocol are registered in the application, the discovery scheduler650may perform a scan on the BLE protocol without scanning other communication protocols as shown in Table 2.

TABLE 2Discovery SchedulerBLE (Maintain BLE scan according to filter and scan option)

According to various embodiments, since the type of the external electronic device is Nearby, the discovery scheduler650may start a scan regardless of the location. According to various embodiments, since the Nearby device has an attribute, such as not near you, nearby, and connected state, it is necessary to determine the state of the device in real-time. According to various embodiments, the discovery scheduler650may adjust at least one of a scan filter and a scan period (scan duty) according to an application state, such as background, foreground, and screen on/off.

Table 3 shows an example in which the discovery scheduler650adjusts at least one of the scan filter and the scan duty according to the application state, such as background, foreground, or screen on/off.

According to various embodiments, the discovery scheduler650may schedule discovery as shown in Table 4 when an external electronic device supporting BT and BLE protocols is registered in the application. Referring to Table 4, the discovery scheduler650may set the scan time for the BLE protocol to is, set the scan time for the BT protocol to 2 s, and then keep scanning the BLE protocol. According to various embodiments, since an external electronic device, such as an accessory, is a device that may be used anywhere, the discovery scheduler650may control to start a BT or BLE protocol scan operation to update the device state and search for the device when the application is driven, regardless of the location.

According to various embodiments, the discovery scheduler650may schedule discovery as shown in Table 5 when external electronic devices supporting BLE, Wi-Fi, UPnP, P2P, and BT protocols are registered in the application. Referring to Table 5, the discovery scheduler650may set the scan time for the BLE protocol to 4 s, set the scan time for Wi-Fi protocol to 500 ms, set the scan time for the UPnP protocol to 500 ms, set the scan time for the P2P protocol to 15 s, and may again set the scan time for the Wi-Fi protocol to 5 s, set the scan time for the BT protocol to 2 s, and may then maintain the scan on the BLE protocol. Referring to Table 5, the discovery scheduler650may allocate three seconds more as the scan time for the BLE protocol when a tag that needs to quickly support the Nearby device is registered.

FIG.7is a view illustrating an electronic device scanning an external electronic device according to an embodiment of the disclosure.

Referring toFIG.7, an IoT system700includes an electronic device710(e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, or the electronic device410ofFIG.4), a server720, and an external electronic device730(e.g., the cloud-connected devices330ofFIG.3, and the cloud-connected devices430ofFIG.4). According to various embodiments, the server720may be implemented in the cloud320ofFIG.3or the first cloud420ofFIG.4. According to various embodiments, the electronic device710may include a communication module712that communicates with the server720or the external electronic device730and a processor714that controls the overall operation of the electronic device710. According to various embodiments, the server720may include a communication module722that communicates with the electronic device710or the external electronic device730and a processor724that controls the overall operation of the server720. According to various embodiments, the external electronic device730may include one or more external electronic devices.

According to various embodiments, when an application stored in the electronic device710is executed, the processor714included in the electronic device710may identify at least one external electronic device730registered in the application. According to various embodiments, the processor714may identify at least one communication protocol supported by at least one external electronic device730among the set plurality of communication protocols and may adjust a scan time corresponding to a first communication protocol among the set plurality of communication protocols based on the identified at least one communication protocol. According to various embodiments, the processor714may set an order of scan priority for the plurality of communication protocols based on the at least one communication protocol and location information about the electronic device710. According to various embodiments, the processor714may adjust the scan time corresponding to the first communication protocol based on the order of scan priority and may adjust the scan time corresponding to the second communication protocol among the plurality of communication protocols based on the order of scan priority. According to various embodiments, the processor714may exclude a third communication protocol among the plurality of communication protocols from the scan targets based on the order of scan priority. According to various embodiments, the processor714may start or end a scan on a communication protocol based on a life cycle (e.g., background, foreground) of the application. According to various embodiments, the application may be an Internet of Things (IoT) application that identifies the state of the at least one external electronic device and controls the operation of the at least one external electronic device. According to various embodiments, the scanning order of the plurality of set communication protocols may be predetermined. According to various embodiments, each of the plurality of communication protocols may be Bluetooth (BT), Bluetooth low energy (BLE), Wi-Fi, peer-to-peer (P2P) network, universal plug and play (UPnP), Cloud, or ultra-wideband (UWB).

According to various embodiments, the processor714may exclude, from the scan targets, external electronic devices, which are away from the electronic device710by a preset threshold distance or more, among the at least one external electronic device730based on the location information about the at least one external electronic device730and the location information about the electronic device710. According to various embodiments, the processor714may set an order of scan priority for the plurality of communication protocols based on the at least one communication protocol and change the scanning order of the first communication protocol and the second communication protocol among the plurality of communication protocols based on the order of scan priority. According to various embodiments, the processor714may exclude a third communication protocol among the plurality of communication protocols from the scan targets based on the order of scan priority. According to various embodiments, the processor714may control to receive, from the server720, type information and location information about the at least one external electronic device730registered in the application. According to various embodiments, the processor714may control to transmit information regarding the determined order of scan priority to the server720.

FIG.8is a view illustrating a discovery flow of an electronic device according to an embodiment of the disclosure.

Referring toFIG.8, an electronic device810may include a scanning module (scanning)811, a repository module (repository)812, a control module (control)813, a publisher module (publisher)814, and a trigger module (trigger)815, for a discovery flow. According to various embodiments, the electronic device810may scan an external electronic device820through the scanning module811based on at least one of the device type of the external electronic device820registered in the application (or user account), the communication protocol supported by the external electronic device820, the location information about the electronic device810, and the location information about the external electronic device820. According to various embodiments, the electronic device810may store the scanning result of the scanning module811in the repository module812and transfer the scanning result to the control module813and the publisher module814. According to various embodiments, the scanning result may be transferred to the trigger module815through the publisher module814. According to various embodiments, the scanning result may be transferred to the user interface (UI), a device panel, or the device plugin through the publisher module814.

FIG.9is a view illustrating a user interface of an electronic device according to an embodiment of the disclosure.

Referring toFIG.9, an application stored (or installed) in an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, the electronic device410ofFIG.4, or the electronic device710ofFIG.7) may differently display the external electronic device that may be controlled based on the location of the electronic device. According to various embodiments, in a screen910for the case where the electronic device is in the bed room, the electronic device may scan an external electronic device912(e.g., a light) located in the bed room and may be connected to the external electronic device to control the operation of the external electronic device according to the scanning result. According to various embodiments, in a screen920for the case where the electronic device is in the living room, the electronic device may scan a plurality of external electronic devices (e.g., an induction922, a smartwatch924, an air conditioner926, a TV928, and an air purifier930) located in the living room and be connected to at least one external electronic device among the plurality of external electronic devices to control the operation of the at least one external electronic device according to the scanning result.

According to various embodiments, the electronic device may determine its location and the location of the external electronic device based on the information provided from Wi-Fi and the base station (e.g., accuracy of location through Wi-Fi and the base station is about 100 meters). According to various embodiments, if the external electronic device is located within a radius of 100 m, or the external electronic device is connected over the same wireless network as that of the electronic device, the electronic device may determine that the external electronic device is a scan target. For example, the electronic device may identify that the light (e.g., ABL light) which is a scan target registered with the bed room is a device supporting only BLE short-range communication and may perform only a BLE scan in the bed room. For example, the electronic device may identify that external electronic devices which are scan targets registered with the living room are devices supporting four types of short-range communication, such as Wi-Fi, P2P, BLE, and BT, and perform a scan in the order of BLE, Wi-Fi, P2P, and BT according to the order of scan priority.

FIG.10is a view illustrating a user interface of an electronic device according to an embodiment of the disclosure.

Referring toFIG.10, an application stored (or installed) in an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, the electronic device410ofFIG.4, or the electronic device710ofFIG.7) may display, through a user interface1010, weather information1020, location information1030, information1040regarding registered external electronic devices, and information1050regarding a connected external electronic device. According to various embodiments, if the electronic device need not perform short-range communication, the electronic device may process a CLOUD-related event. According to various embodiments, the electronic device may identify the external electronic device registered in the application and change the scanning duty according to the state of the electronic device.

FIGS.11to14are views illustrating an operation method of an electronic device according to various embodiments.FIG.11relates to an embodiment in which the electronic device directly identifies at least one external electronic device when an application is executed.FIGS.12to14relate to embodiments in which the electronic device receives information about at least one external electronic device from a server. InFIGS.12and13, the electronic device may directly request information about at least one registered external electronic device from the server. InFIG.14, the electronic device may receive, from the server, a push message including information about at least one registered external electronic device without requesting information from the server.

FIG.11is a view illustrating an operation method of an electronic device according to an embodiment of the disclosure.

Referring toFIG.11, an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, the electronic device410ofFIG.4, or the electronic device710ofFIG.7) may scan external electronic devices (e.g., the cloud-connected devices330ofFIG.3, the cloud-connected devices430ofFIG.4, and the external electronic device730ofFIG.7). In operation1110, the electronic device may identify at least one external electronic device registered in the application upon executing an application stored in the electronic device. In operation1120, the electronic device may identify at least one communication protocol supported by the at least one external electronic device among a plurality of set communication protocols. In operation1130, the electronic device may adjust the scan time corresponding to the first communication protocol among the plurality of set communication protocols based on the at least one identified communication protocol.

FIG.12is a view illustrating an operation method of an electronic device according to an embodiment of the disclosure.

Referring toFIG.12, an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, the electronic device410ofFIG.4, or the electronic device710ofFIG.7) may scan external electronic devices (e.g., the cloud-connected devices330ofFIG.3, the cloud-connected devices430ofFIG.4, and the external electronic device730ofFIG.7). In operation1210, the electronic device may request information about at least one external electronic device registered in the application or server, from the server. In operation1220, the electronic device may identify the type of the at least one external electronic device based on the information about the at least one registered external electronic device received from the server. According to various embodiments, the type of the external electronic device may be set based on at least one of the product model (e.g., TV model name or mobile phone model name) and product classification of the external electronic device. According to various embodiments, the communication protocol supported by the at least one external electronic device may be differently set depending on at least one of the product model and product classification of the external electronic device. According to various embodiments, a device type index may be pre-defined according to at least one of the product model and product classification of the external electronic device. According to various embodiments, the electronic device may previously store or receive, from the server, information regarding the device type index defined according to at least one of the product model and product classification of the external electronic device. According to various embodiments, the information regarding the device type index may be included in the at least one registered external electronic device received from the server by the electronic device.

For example, the types of external electronic devices may be at least one of a mobile phone, a tablet, a wearable device, a PC, an accessory device, a TV, an audio visual (AV), a signage, a refrigerator, a washer, a dryer, an air conditioner, an air purifier, an oven, a range, a microwave, a hood, a robot vacuum, a smart home device, a printer, a headphone, a speaker, a monitor, an E-board, an IoT device, a camera, a camcorder, a cooktop, a dishwasher, a smart watch, a band, a router, a tracker, a car, an air dresser, a speaker, a display, or ear-buds. For example, the type of the external electronic device may be one of a first version of a mobile phone, a second version of a mobile phone, and a third version of a mobile phone. For example, if the type of the external electronic device is a mobile phone, the device type index may be defined as “1”, if the type of the external electronic device is a tablet, the device type index may be defined as “2”, and if the type of the external electronic device is a wearable device, the device type index may be defined as “3”. For example, if the type of the external electronic device is a mobile phone and the mobile phone model is the first version, the device type index may be defined as “1”, if the type of the external electronic device is a mobile phone and the mobile phone model is the second version, the device type index may be defined as “2”, and if the type of the external electronic device is a tablet, the device type index may be defined as “3”.

In operation1230, the electronic device may identify at least one communication protocol supported by the at least one external electronic device based on the type of the at least one external electronic device. In operation1240, the electronic device may set the scanning order and scan time for the plurality of communication protocols based on at least one of the type of the at least one external electronic device, the at least one communication protocol, the life cycle of the application, and location information about the electronic device.

FIG.13is a view illustrating an operation method of an electronic device according to an embodiment of the disclosure.

Referring toFIG.13, an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, the electronic device410ofFIG.4, or the electronic device710ofFIG.7) may scan external electronic devices (e.g., the cloud-connected devices330ofFIG.3, the cloud-connected devices430ofFIG.4, and the external electronic device730ofFIG.7). In operation1310, the electronic device may request information about at least one external electronic device registered in the application or server, from the server. In operation1320, the electronic device may identify the type of the at least one external electronic device based on the information about the at least one registered external electronic device received from the server. In operation1330, the electronic device may identify at least one communication protocol supported by the at least one external electronic device based on the type of the at least one external electronic device. In operation1340, the electronic device may set the scanning order and scan time for the plurality of communication protocols based on the type of the at least one external electronic device and the at least one communication protocol. In operation1350, the electronic device may reset the scanning order and scan time for the plurality of communication protocols based on the location information about the electronic device.

FIG.14is a view illustrating an operation method of an electronic device according to an embodiment of the disclosure.

Referring toFIG.14, an electronic device (e.g., the electronic device101ofFIG.1, the electronic device310ofFIG.3, the electronic device410ofFIG.4, or the electronic device710ofFIG.7) may scan external electronic devices (e.g., the cloud-connected devices330ofFIG.3, the cloud-connected devices430ofFIG.4, and the external electronic device730ofFIG.7). In operation1410, the electronic device may receive, from the server, a push message including information about at least one registered external electronic device. In operation1420, the electronic device may identify the type of the at least one external electronic device based on the information about the at least one registered external electronic device. In operation1430, the electronic device may identify at least one communication protocol supported by the at least one external electronic device based on the type of the at least one external electronic device. In operation1440, the electronic device may set the scanning order and scan time for the plurality of communication protocols based on at least one of the type of the at least one external electronic device, the at least one communication protocol, the life cycle of the application, and location information about the electronic device.