WO2024253401A1 - 전자 장치 및 전자 장치의 리소스를 과다 사용하는 어플리케이션을 감지하는 방법 - Google Patents
전자 장치 및 전자 장치의 리소스를 과다 사용하는 어플리케이션을 감지하는 방법 Download PDFInfo
- Publication number
- WO2024253401A1 WO2024253401A1 PCT/KR2024/007587 KR2024007587W WO2024253401A1 WO 2024253401 A1 WO2024253401 A1 WO 2024253401A1 KR 2024007587 W KR2024007587 W KR 2024007587W WO 2024253401 A1 WO2024253401 A1 WO 2024253401A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- resource
- application
- electronic device
- threshold value
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
Definitions
- This article is about electronic devices, and for example, electronic devices that can install and run various applications that utilize the resources of the electronic device.
- Electronic devices such as smart phones, tablet PCs, laptop PCs, and smart watches include various types of operating systems (or platforms) and can install and execute various applications that can be executed on each operating system. Users of electronic devices can download applications through online markets and install them on their electronic devices. Such markets have an open structure where developers can freely register applications in the market without any special verification procedures. Since various APIs (application program interfaces) or SDKs (software development kits) are provided to support easy application development, users can also develop necessary applications themselves and release them through the market.
- APIs application program interfaces
- SDKs software development kits
- an application When an application is executed on an electronic device, it may use system resources. Since various applications may be executed simultaneously in the foreground and background on an electronic device, the amount of system resources that a specific application may occupy may be limited. As the types of applications released through the market become more diverse, the number of applications that behave abnormally may also increase. For example, due to a lack of expertise on the part of developers, a specific application may use excessive system resources, affecting the overall performance of the electronic device. Therefore, a technology for detecting such abnormally behaving applications on an electronic device in real time is required.
- Electronic devices can monitor whether resources are running low below a threshold value to detect applications that are behaving abnormally.
- conventional technologies have used fixed threshold values to determine whether there is abnormal operation, and therefore, cases may occur where actual abnormal operation is not detected depending on the application.
- An electronic device may include a memory and a processor operatively connected to the memory.
- the memory can store a resource usage data set that maps and records a plurality of applications and a plurality of resource usages corresponding to each of the plurality of applications.
- the memory may store instructions that, when executed by the processor, cause the electronic device to, when the first application is executed, check the usage of at least one resource used by the executed first application, and record the checked usage information of the at least one resource in a resource usage data set stored in the memory.
- the instructions may further include instructions causing the electronic device to determine at least one first outlier threshold value corresponding to each of the first application and at least one resource used when executing the first application through a predetermined statistical analysis based on a resource usage data set stored in the memory, and to update at least one second outlier threshold value set for each of the first application and the at least one resource, which is previously stored in the memory, based on the determined at least one first outlier threshold value.
- an electronic device capable of accurately detecting an abnormally behaving application and a method for detecting an application that excessively uses resources of the electronic device can be provided by determining a threshold value that serves as a criterion for excessive resource usage in an electronic device capable of installing and executing various applications through statistical analysis.
- FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments.
- Figure 2 is a block diagram of a program according to one embodiment.
- FIG. 3 is a schematic diagram illustrating a server device and a plurality of electronic devices according to one embodiment.
- FIG. 4 is a block diagram of a server device according to one embodiment.
- FIG. 5 is a block diagram of a process running on a server device and an electronic device according to one embodiment.
- FIG. 6 illustrates a resource usage data set according to one embodiment.
- FIG. 7 is a block diagram of a process running on a server device and an electronic device according to one embodiment.
- FIGS. 8A to 8D illustrate a UI provided when an abnormal operation is detected in an electronic device according to one embodiment.
- FIGS. 9A to 9D are flowcharts of a method for an electronic device to detect abnormal operation of an application according to one embodiment of the present invention.
- FIG. 10 is a flowchart of a method for determining an abnormality threshold value of a server device according to one embodiment.
- FIG. 11 is a block diagram of an electronic device according to one embodiment.
- FIG. 12 is a block diagram of a process executed in an electronic device according to one embodiment.
- FIG. 13 is a flowchart of a method for determining an outlier threshold value of an electronic device according to one embodiment.
- FIG. 1 is a block diagram of an electronic device (101) in a network environment (100) according to various embodiments.
- the electronic device (101) may communicate with the electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (104) or the server (108) via a second network (199) (e.g., a long-range wireless communication network).
- the electronic device (101) may communicate with the electronic device (104) via the server (108).
- the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197).
- the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added.
- some of these components e.g., the sensor module (176), the camera module (180), or the antenna module (197) may be integrated into one component (e.g., the display module (160)).
- the processor (120) may control at least one other component (e.g., a hardware or software component) of an electronic device (101) connected to the processor (120) by executing, for example, software (e.g., a program (140)), and may perform various data processing or calculations.
- the processor (120) may store a command or data received from another component (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the command or data stored in the volatile memory (132), and store result data in a nonvolatile memory (134).
- the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) (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 (121).
- a main processor (121) e.g., a central processing unit or an application processor
- an auxiliary processor (123) e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor
- the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a given function.
- the auxiliary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
- the auxiliary processor (123) may control at least a portion of functions or states associated with at least one of the components of the electronic device (101) (e.g., the display module (160), the sensor module (176), or the communication module (190)), for example, while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state.
- the auxiliary processor (123) e.g., an image signal processor or a communication processor
- the auxiliary processor (123) may include a hardware structure specialized for processing artificial intelligence models.
- the artificial intelligence models may be generated through machine learning. Such learning may be performed, for example, in the electronic device (101) itself on which the artificial intelligence model is executed, or may be performed through a separate server (e.g., server (108)).
- the learning algorithm may 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 may include a plurality of 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), deep Q-networks, or a combination of two or more of the above, but is not limited to the examples described above.
- the artificial intelligence model may additionally or alternatively include a software structure.
- the memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101).
- the data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto.
- the memory (130) can include volatile memory (132) or nonvolatile memory (134).
- the program (140) may be stored as software in memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
- the input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101).
- the input module (150) 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 (155) can output an audio signal to the outside of the electronic device (101).
- the audio output module (155) 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 an incoming call. According to one embodiment, the receiver can be implemented separately from the speaker or as a part thereof.
- the display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101).
- the display module (160) can include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device.
- the display module (160) can 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 (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can obtain sound through an input module (150), or output sound through an audio output module (155), or an external electronic device (e.g., an electronic device (102)) (e.g., a speaker or a headphone) directly or wirelessly connected to the electronic device (101).
- an electronic device e.g., an electronic device (102)
- a speaker or a headphone directly or wirelessly connected to the electronic device (101).
- the sensor module (176) can detect an operating state (e.g., power or temperature) of the electronic device (101) or an external environmental state (e.g., user state) and generate an electric signal or data value corresponding to the detected state.
- the sensor module (176) 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 (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)).
- the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
- HDMI high definition multimedia interface
- USB universal serial bus
- SD card interface Secure Digital Card
- connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., the electronic device (102)).
- the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
- the haptic module (179) can convert an electrical signal into a mechanical stimulus (e.g., vibration or movement) or an electrical stimulus that a user can perceive through a tactile or kinesthetic sense.
- the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
- the camera module (180) can capture still images and moving images.
- the camera module (180) can include one or more lenses, image sensors, image signal processors, or flashes.
- the power management module (188) can manage power supplied to the electronic device (101).
- the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
- PMIC power management integrated circuit
- the battery (189) can power at least one component of the electronic device (101).
- the battery (189) can include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
- the communication module (190) may support establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., the electronic device (102), the electronic device (104), or the server (108)), and performance of communication through the established communication channel.
- the communication module (190) may operate independently from the processor (120) (e.g., the application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication.
- the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a GNSS (global navigation satellite system) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module or a power line communication module).
- a wireless communication module (192) e.g., a cellular communication module, a short-range wireless communication module, or a GNSS (global navigation satellite system) communication module
- a wired communication module (194) e.g., a local area network (LAN) communication module or a power line communication module.
- a corresponding communication module may communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (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)).
- a first network (198) e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)
- a second network (199) 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)
- a computer network e.g.,
- the wireless communication module (192) may use subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196) to identify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199).
- subscriber information e.g., an international mobile subscriber identity (IMSI)
- IMSI international mobile subscriber identity
- the wireless communication module (192) can support a 5G network and next-generation communication technology after a 4G network, for example, NR access technology (new radio access technology).
- the NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), terminal power minimization and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)).
- eMBB enhanced mobile broadband
- mMTC massive machine type communications
- URLLC ultra-reliable and low-latency communications
- the wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate.
- a high-frequency band e.g., mmWave band
- the wireless communication module (192) may 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 (192) may support various requirements specified in an electronic device (101), an external electronic device (e.g., an electronic device (104)), or a network system (e.g., a second network (199)).
- the wireless communication module (192) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL) each, or 1 ms or less for round trip) for URLLC realization.
- a peak data rate e.g., 20 Gbps or more
- a loss coverage e.g., 164 dB or less
- U-plane latency e.g., 0.5 ms or less for downlink (DL) and uplink (UL) each, or 1 ms or less for round trip
- the antenna module (197) can transmit or receive signals or power to or from the outside (e.g., an external electronic device).
- the antenna module (197) can include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB).
- the antenna module (197) can include a plurality of antennas (e.g., an array antenna).
- at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199) can be selected from the plurality of antennas by, for example, the communication module (190).
- a signal or power can be transmitted or received between the communication module (190) and the external electronic device through the selected at least one antenna.
- another component e.g., a radio frequency integrated circuit (RFIC)
- RFIC radio frequency integrated circuit
- the antenna module (197) may form a mmWave antenna module.
- the mmWave antenna module may include a printed circuit board, an RFIC positioned 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) positioned on or adjacent a second side (e.g., a top side or a side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.
- a first side e.g., a bottom side
- a plurality of antennas e.g., an array antenna
- peripheral devices e.g., a bus, a general purpose input and output (GPIO), a serial peripheral interface (SPI), or a mobile industry processor interface (MIPI)
- GPIO general purpose input and output
- SPI serial peripheral interface
- MIPI mobile industry processor interface
- commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199).
- Each of the external electronic devices (102, or 104) may be the same or a different type of device as the electronic device (101).
- all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of executing the function or service itself or in addition, request one or more external electronic devices to perform at least a part of the function or service.
- One or more external electronic devices that have received the request may execute at least a part 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 (101).
- the electronic device (101) may process the result as it is or additionally and provide it as at least a part of a response to the request.
- cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used.
- the electronic device (101) may provide an ultra-low latency service by using, for example, distributed computing or mobile edge computing.
- the external electronic device (104) may include an IoT (Internet of Things) device.
- the server (108) may be an intelligent server using machine learning and/or a neural network.
- the external electronic device (104) or the server (108) may be included in the second network (199).
- the electronic device (101) 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. 2 is a block diagram of a program module according to various embodiments.
- the program (140) may include an operating system (142), middleware (144), or an application (146) executable on the operating system (142) for controlling one or more resources of the electronic device (101).
- the operating system (142) may include, for example, Android TM , iOS TM , Windows TM , Symbian TM , Tizen TM , or Bada TM .
- At least some of the programs (140) may be preloaded onto the electronic device (101), for example, at the time of manufacturing, or may be downloaded or updated from an external electronic device (e.g., the electronic device (102 or 104), or a server (108)) in the user's usage environment.
- the operating system (142) may control (e.g., allocate or reclaim) system resources (e.g., processes, memory, or power) of the electronic device (101).
- the operating system (142) may additionally or alternatively include one or more driver programs for driving other hardware devices of the electronic device (101), such as an input device (150), an audio output device (155), a display device (160), an audio module (170), a sensor module (176), an interface (177), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197).
- driver programs for driving other hardware devices of the electronic device (101), such as an input device (150), an audio output device (155), a display device (160), an audio module (170), a sensor module (176), an interface (177), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication
- the middleware (144) can provide various functions to the application (146) so that the application (146) can use functions or information provided by one or more resources of the electronic device (101).
- the middleware (144) can include, for example, an application manager (201), a window manager (203), a multimedia manager (205), a resource manager (207), a power manager (209), a database manager (211), a package manager (213), a connectivity manager (215), a notification manager (217), a location manager (219), a graphics manager (221), a security manager (223), a call manager (225), or a voice recognition manager (227).
- the application manager (201) can manage, for example, the life cycle of the application (146).
- the window manager (203) can manage, for example, GUI resources used on a screen.
- the multimedia manager (205) can, for example, identify a format required for playing media files and perform encoding or decoding of the media files using a codec suitable for the format.
- the resource manager (207) can, for example, manage the source code of the application (146) or the space of the memory.
- the power manager (209) can, for example, manage the capacity, temperature, or power of the battery and determine or provide power information required for the operation of the electronic device (101) using the corresponding information.
- the power manager (209) can be linked with a basic input/output system (BIOS).
- BIOS basic input/output system
- the database manager (211) can, for example, create, search, or modify a database to be used in the application (146).
- the package manager (213) can, for example, manage the installation or update of an application distributed in the form of a package file.
- the connectivity manager (215) can, for example, manage a wireless or wired connection between the electronic device (101) and an external electronic device.
- the notification manager (217) can, for example, provide a function for notifying a user of an event that has occurred (e.g., a call, a message, or an alarm).
- the location manager (219) can, for example, manage location information of the electronic device (101).
- the graphics manager (221) can, for example, manage graphic effects to be provided to the user or a user interface related thereto.
- the security manager (223) can, for example, provide system security or user authentication.
- the telephony manager (225) may, for example, manage a voice call or video call function of the electronic device (101).
- the voice recognition manager (227) may, for example, transmit a user's voice data to the server (108) and receive a command corresponding to a function to be performed in the electronic device (101) based on the voice data or text data converted based on the voice data.
- the middleware (244) may dynamically delete some of the existing components or add new components.
- at least a part of the middleware (144) may be included as a part of the operating system (142) or may be implemented as software separate from the operating system (142).
- the application (146) may include, for example, a home (251), a dialer (253), an SMS/MMS (255), an IM (instant message) (257), a browser (259), a camera (261), an alarm (263), a contact (265), voice recognition (267), an email (269), a calendar (271), a media player (273), an album (275), a watch (277), a health (279) (e.g., measuring the amount of exercise or blood sugar, etc.), or an environmental information (281) (e.g., information on barometric pressure, humidity, or temperature) application.
- the application (146) may further include an information exchange application (not shown) that can support information exchange between the electronic device (101) and an external electronic device.
- the information exchange application may include, for example, a notification relay application for transmitting designated information (e.g., a call, a message, or an alarm) to an external electronic device, or a device management application for managing the external electronic device.
- the notification relay application may, for example, transmit notification information corresponding to an event (e.g., reception of a mail) generated in another application (e.g., an email application (269)) of the electronic device (101) to the external electronic device, or receive notification information from the external electronic device and provide it to a user of the electronic device (101).
- the device management application may, for example, control power (e.g., turn-on or turn-off) or a function (e.g., brightness, resolution, or focus of the display device (160) or the camera module (180)) of the external electronic device or a component thereof (e.g., the display device (160) or the camera module (180)) that communicates with the electronic device (101).
- control power e.g., turn-on or turn-off
- a function e.g., brightness, resolution, or focus of the display device (160) or the camera module (180) of the external electronic device or a component thereof (e.g., the display device (160) or the camera module (180)) that communicates with the electronic device (101).
- the device management application may additionally or alternatively support installation, deletion, or updating of applications running on external electronic devices.
- FIG. 3 is a schematic diagram illustrating a server device and a plurality of electronic devices according to one embodiment.
- a server device (400) can be connected to a plurality of electronic devices (300) via a network.
- the electronic device (300) can be a device such as a smart phone, a tablet PC, or a laptop PC, and there is no limitation on the type thereof.
- the electronic device (300) can include at least some of the configurations and/or functions of the electronic device (101) of FIG. 1.
- the electronic device (300) can install and execute various applications.
- the electronic device (300) can execute at least some of the applications (146) of FIG. 2, and can also execute at least one application downloaded and installed through an application store (e.g., Play Store TM ).
- the electronic device (300) can execute multiple applications simultaneously in the foreground and background.
- the executed application may use resources (or system resources) of the electronic device (300).
- the resources of the electronic device (300) used by the application may include, but are not limited to, a central processing unit (CPU), memory, input/output (I/O), threads, popup windows, virtual displays, notifications, and pending intents.
- the types of resources used may vary depending on the executed application, and even for the same application, the types of resources used may vary depending on the operating status and/or environmental settings.
- an application running on an electronic device (300) excessively uses a specific resource, abnormal operation may occur.
- Applications uploaded to an application store do not guarantee performance and stability, and some applications may cause abnormal operation by excessively using some resources.
- an application that operates well on most electronic devices (300) may cause abnormal operation on some electronic devices (300).
- the server device (400) may receive resource usage information from a plurality of electronic devices (300), accumulate and store the received resource usage information in a resource usage data set, and calculate an outlier threshold value based on the accumulated and stored resource usage data set. For example, when the electronic device (300) executes a specific application, it may use at least one resource, and may map and store the usage of the executed application and the at least one resource used. The electronic device (300) may transmit the resource usage information to the server device (400) whenever the application uses a resource and/or when receiving a request from the server device (400).
- the server device (400) may calculate an outlier threshold value by using statistical analysis on a resource usage data set including resource usage information of multiple electronic devices (300).
- the server device (400) may determine an outlier threshold value for each application and each resource.
- the outlier threshold value may be determined for each of CPU usage, memory usage, and number of pending intents generated of an SNS application by using statistical analysis.
- the server device (400) may use IQR (inter quartile range) and/or standard deviation to set a value having a large error compared to general usage as an outlier threshold value.
- the server device (400) can provide the calculated outlier threshold value to each electronic device (300).
- the electronic device (300) can update the pre-stored outlier threshold value with the outlier threshold value received from the server device (400).
- the electronic device (300) can check the usage of at least one resource and check whether the usage of each resource is equal to or greater than the outlier threshold value of each resource. For example, when an SNS application is executed, the CPU usage can be compared with the outlier threshold value of the CPU usage, the memory usage can be compared with the outlier threshold value of the memory usage, and the number of pending intents created can be compared with the outlier threshold value of the number of pending intents created.
- the electronic device (300) may determine that an abnormal operation has occurred due to the execution of the application if the usage of a specific resource used when executing the application is greater than an abnormal threshold value. If the electronic device (300) determines that an abnormal operation has occurred, the electronic device (300) may provide feedback to the user, forcefully terminate the application, and/or delete the application.
- the operation of determining an outlier threshold value may be performed by each electronic device (300) rather than the server device (400).
- the electronic device (300) may store a resource usage data set in memory, and when each application is executed, record resource usage information in the resource usage data set. When sufficient data is collected in the resource usage data set, and/or at set intervals, the electronic device (300) may determine an outlier threshold value for each resource of each application through statistical analysis.
- a server device (400) determines an outlier threshold value may be referred to as a first embodiment
- an embodiment in which each electronic device (300) determines an outlier threshold value may be referred to as a second embodiment.
- the first embodiment will be described with reference to FIGS. 4 to 10
- the second embodiment will be described with reference to FIGS. 11 to 13.
- any content that is redundant or can be inferred from the content of other embodiments may be omitted from the description.
- FIG. 4 is a block diagram of a server device according to one embodiment.
- the server device (400) may include a communication interface (430), a processor (410), and a memory (420). Even if some of the illustrated configurations are omitted or replaced, various embodiments of the present document may be implemented.
- the communication interface (430) can support communication with various electronic devices (e.g., the electronic device (300) of FIG. 3) through a network.
- the communication interface (430) can provide various interfaces such as HTTP (hypertext transfer protocol), REST (representational state transfer), MQTT (message queuing telemetry transport), and socket.
- the server device (400) can request transmission of resource usage information to the electronic device through the communication interface (430) and receive resource usage information from the electronic device.
- the memory (420) can temporarily or non-temporarily store various data.
- the memory (420) can include various types of memories, such as random access memory (RAM), virtual memory, cache memory, and/or flash memory.
- RAM random access memory
- the memory (420) can store various instructions that can be executed by the server device (400) (or processor (410)).
- the memory (420) can store a resource usage data set that accumulates and stores resource usage information received from a plurality of electronic devices.
- the resource usage data set can store usage information of each application and each resource by mapping them.
- the resource usage data set includes a RAW_DATA set that accumulates and stores RAW_DATA of resource usage received from the electronic devices, and additionally, can further include a COUNT set, a SUM set, a SQUARE_SUM set, and a FREQUENCY_TABLE set that accumulates and stores data such as COUNT, SUM, SQUARE_SUM, and FREQUENCY_TABLE related to resource usage.
- the processor (410) is a configuration capable of performing operations or data processing related to control and/or communication of each component of the server device (400), and may be configured with one or more processors.
- the operations of the processor (410) (or the server device (400)) described below may be performed by executing instructions stored in the memory (420).
- the processor (410) may execute various server processes or threads to perform operations of storing resource usage information received from an electronic device in a resource usage data set and generating an outlier threshold value from data stored in the resource usage data set.
- the processor (410) may request transmission of resource usage information to an electronic device via the communication interface (430). For example, the processor (410) may request transmission of resource usage information to each electronic device at set intervals or based on the amount of data accumulated in the resource usage data set.
- the processor (410) when it receives resource usage information from an electronic device through a communication interface (430), it may store the same in a resource usage data set of the memory (420).
- the structure of data accumulated and stored in the resource usage data set will be described in more detail with reference to FIG. 6.
- the processor (410) may determine at least one outlier threshold corresponding to each of a specific application and at least one resource used when executing the specific application based on a resource usage data set through a predetermined statistical analysis.
- the processor (410) may perform an operation of determining an outlier threshold corresponding to each of the resources for each of a plurality of applications.
- an outlier threshold for resource 0 of App 0 an outlier threshold for resource 1 , ..., an outlier threshold for resource j
- an outlier threshold for resource 0 of App 1 , an outlier threshold for resource 1 , ..., an outlier threshold for resource j may be calculated, and an outlier threshold for resource 0 of App 1 , an outlier threshold for resource 1 , ..., an outlier threshold for resource j may be calculated.
- the processor (410) can verify normality for data of a specific application and a specific resource of the resource usage data set.
- the normality verification can be based on, but is not limited to, the Kolmogorov-Smirnov test, the Shapiro-Wilk test, and/or the skewness, kurtosis, and standard error tests.
- the processor (410) may calculate the average and standard deviation of the data of the resource usage data set of a specific resource if the data follows a normal distribution.
- the processor (410) may determine an outlier threshold based on the standard deviation and a predetermined weight (e.g., w 1 ) for the corresponding resource.
- a predetermined weight e.g., w 1
- the processor (410) may determine the outlier threshold as a product of the standard deviation and the weight.
- the weight w 1 may be determined as a different value for each resource.
- the processor (410) may calculate an inter quartile range (IQR) when data of a resource usage data set of a specific resource does not follow a normal distribution, and determine an outlier threshold based on the IQR and a predetermined weight for the resource.
- the IQR may be determined as the difference between data corresponding to the lower 25% and data corresponding to the upper 25% after sequentially (e.g., in ascending order) sorting each data according to its value.
- the processor (410) may obtain the Q3 value and the Q1 value, and then obtain the IQR as the difference therebetween.
- the processor (410) may determine a value obtained by multiplying the IQR by a weight (e.g., w 2 ) and adding the value obtained by the Q3 value as the outlier threshold.
- a weight e.g., w 2
- the weight w 2 may be determined as a different value for each resource.
- the processor (410) may also calculate an outlier threshold based on the IQR and the weight w 2 for all data, without verifying normality of the data.
- the processor (410) can transmit the calculated abnormality threshold value to each electronic device through the communication interface (430).
- the electronic device can store the received abnormality threshold value and compare the usage of each resource used when executing the application with each abnormality threshold value to determine whether an abnormal operation has occurred.
- FIG. 5 is a block diagram of a process running on a server device and an electronic device according to one embodiment.
- a server process (450) running on a server device includes an outlier threshold calculator (470), and the outlier threshold calculator (470) can access a resource usage data set (460) stored in a memory of the server device (e.g., memory (420) of FIG. 4).
- an electronic device process (350) running on an electronic device may include a resource generator (360) and a resource manager daemon (370).
- the resource generator (360) may generate an event corresponding to the resource usage of the application when the application is executed and uses at least one resource, and transmit the event to the resource manager daemon (370).
- the resource generator (360) may be provided in the form of a class (e.g., ResEvt.class(.java))(361), a JNI (java native interface) library (e.g., ResEvt JNI library(.cpp))(362), and/or a SO (shared object) (e.g., LibresEvt.so)(363).
- the resource generator (360) may be executed as a part of a system process, and may generate an event indicating that a resource is being used by the system process through a plug-in, and transmit the event to the resource manager daemon (370).
- the resource manager daemon (370) can record resource usage statistics (371) and manage an outlier threshold value (372).
- the resource manager daemon (370) can receive application and resource usage information from the resource generator (360) and record the same in the resource usage statistics (371).
- the resource usage statistics (371) can store usage information of multiple applications and each resource used by each application in the form of a table.
- the resource manager daemon (370) when the resource manager daemon (370) receives an event from the resource generator (360), it may compare the usage of each resource with an outlier threshold value corresponding to each resource. If, as a result of the comparison, it is confirmed that the application of the corresponding event has used a specific resource more than the outlier threshold value, the resource manager daemon (370) may determine that the corresponding application is operating abnormally due to excessive use of resources. In this case, the resource manager daemon (370) may not record the usage information of each resource included in the corresponding event in the resource usage statistics (371).
- the resource manager daemon (370) may transmit resource usage statistics (371) accumulated in resource usage statistics to the server device whenever there is a data transmission request from the server device and/or whenever a resource usage event of an application is transmitted.
- the resource manager daemon (370) can stop the operation of the application (or terminate the execution) and reclaim the resources. After stopping the operation of the application, the resource manager daemon (370) can provide a notification to the user through an output device (e.g., a display, a speaker, a haptic) indicating the abnormal operation and induce the user to restart the application. If the problem of excessive resource usage occurs repeatedly more than a certain number of times even after the application is restarted, the resource manager daemon (370) can provide a user interface through the output device to induce the user to delete the application.
- an output device e.g., a display, a speaker, a haptic
- the resource manager daemon (370) may store an outlier threshold value received from a server device and update a pre-stored outlier threshold value (372) when a new outlier threshold value is received from the server device.
- the server device may store the resource usage data set (460).
- the resource usage data set (460) may accumulate and store resource usage information obtained from multiple electronic devices, and may map and store usage information of each application and each resource.
- the outlier threshold calculator (470) may determine at least one outlier threshold corresponding to each of a specific application and at least one resource used when executing the specific application based on the resource usage data set (460) through a predetermined statistical analysis.
- the outlier threshold calculator (470) may perform an operation of determining an outlier threshold corresponding to each of the resources for each of a plurality of applications.
- an outlier threshold for resource 0 of App 0 , an outlier threshold for resource 1 , ..., an outlier threshold for resource j may be calculated, and an outlier threshold for resource 0 of App 1 , an outlier threshold for resource 1 , ..., an outlier threshold for resource j may be calculated.
- the outlier threshold calculator (470) can test the normality of the usage data of a specific resource of a specific application to determine whether it follows a normal distribution. If the data follows a normal distribution, the outlier threshold calculator (470) can calculate a standard deviation and calculate an outlier threshold based on the standard deviation and a predetermined weight. If the data does not follow a normal distribution, the outlier threshold calculator (470) can calculate an inter quartile range (IQR) and calculate an outlier threshold based on the IQR and a predetermined weight.
- IQR inter quartile range
- FIG. 6 illustrates a resource usage data set according to one embodiment.
- the server device can accumulate and store resource usage information received from multiple electronic devices in a resource usage data set (460).
- FIG. 6 illustrates a data structure of a resource usage data set (460) for collecting usage statistics of resources used by applications running on each electronic device.
- each row of the resource usage data set (460) represents a plurality of applications that can be executed on the electronic device, and each column can represent a resource that can be used by each application.
- the applications can include applications provided in an application store, such as SNS applications, multimedia applications, or game applications, and the resources can be system resources that can be used when the applications are executed, such as CPU (central processing unit) usage, memory usage, I/O usage, number of threads created, number of pop-up windows created, number of virtual displays created, number of notification occurrences, and number of pending intents created. Examples of the applications and resources are not limited to the above examples.
- resource usage data (465) mapped and stored for a specific resource (e.g., resource 1) of a specific application (e.g., App5) is illustrated in more detail.
- the resource usage data of App5 and resource 1 may be accumulated and recorded by obtaining the usage of resource 1 when App5 is executed on a specific electronic device.
- Resource usage data (465) recorded for a specific application and a specific resource may include SUM, COUNT, SQUARE_SUM, FREQUENCY_TABLE, RAW_DATA.
- x k is the size of the resource used by the application, and N can be the number of times the application requested the resource or the number of samples.
- RAW_DATA can be a set of x k
- FREQUENCY_TABLE can be a data structure that stores the class (or interval) of x k and the frequency by class.
- COUNT, SUM, and SQUARE_SUM can be calculated as shown in Equations 1, 2, and 3 below.
- COUNT is equal to N
- SUM can be calculated as the sum of the sizes of the resources used by the application.
- SQUARE_SUM can be calculated as the sum of the squares of the sizes of the resources used by the application.
- the server device may accumulate data received from multiple electronic devices for a specific application and a specific resource and store the data in a resource usage data set (460). For example, the server device may calculate COUNT set, SUM set, SQUARE_SUM set, and FREQUENCY_TABLE set, respectively, by adding up the COUNT, SUM, SQUARE_SUM, and FREQUENCY_TABLE values related to resource usage of k electronic devices, as shown in Equations 4 to 7 below.
- the SUM set can be calculated as the sum of the sizes of the resources used by the applications running on the k electronic devices.
- the SQUARE_SUM set can be calculated as the sum of the squares of the sizes of the resources used by the corresponding applications on each of the k electronic devices.
- the frequency of the ith class (or interval) of the FREQUENCY_TABLE set can be calculated as the sum of the frequencies of the resource usage belonging to the corresponding class on each of the k electronic devices.
- the RAW_DATA set is for a normality test in the server process, and can be the sum of RAW_DATA, which is data that samples all or part of the resource usage information used by the applications installed on each electronic device.
- Table 1 shows a set of resource usage information collected from multiple electronic devices for App5 (e.g., SNS application) and Resource1 (e.g., pending intent).
- App5 e.g., SNS application
- Resource1 e.g., pending intent
- the server device When the server device receives resource usage information as in Table 1, it can add up the resource usage information of each electronic device as in Table 2 below.
- the server device can store the summed COUNT set, SUM set, SQUARE_SUM set, RAW_DATA set, and FREQUENCY_TABLE set in the resource usage data set (460) as shown in Table 2.
- each electronic device can transmit only resource usage information (e.g., RAW_DATA) for specific resources used by specific applications to the server device, in which case the server device can calculate data such as COUNT, SUM, SQUARE_SUM, and FREQUENCY TABLE of the electronic device based on the received RAW_DATA.
- each electronic device can obtain resource usage information for specific resources used by specific applications, and then calculate data such as COUNT, SUM, SQUARE_SUM, and FREQUENCY TABLE and transmit the calculated data to the server device.
- FIG. 7 is a block diagram of a process running on a server device and an electronic device according to one embodiment.
- the resource usage data set (460) in the server process (450) can accumulate and store resource usage information received from various electronic devices.
- the resource usage data set (460) stored in the server device has been described in detail with reference to FIG. 6.
- the server process (450) may determine at least one outlier threshold value corresponding to each of a specific application and at least one resource used by the specific application when executing, based on a resource usage data set (460) stored in a memory (e.g., memory (420) of FIG. 4) through a predetermined statistical analysis.
- the outlier threshold calculator (460) can perform a normality test (472) on at least some of the resource usage information stored in the resource usage data set (460) to determine whether the corresponding resource usage information is normal. If the resource usage information is normal, the outlier threshold calculator (460) can calculate a standard deviation and determine an outlier threshold based on the mean, the standard deviation, and a predetermined weight for the corresponding resource for each resource usage information (473). In addition, if the resource usage information is not normal, the outlier threshold calculator (460) can calculate an inter quartile range (IQR) and determine an outlier threshold based on the IQR and a predetermined weight for the corresponding resource for each resource (474).
- IQR inter quartile range
- the outlier threshold calculator (460) may collect resource usage statistics (371) of each application transmitted from the resource manager daemon (370) of the electronic device, and accumulate and store them in a resource usage data set (460).
- the server device may request the electronic device to transmit resource usage information according to a set cycle, or the electronic device may transmit resource usage information to the server device whenever a resource usage event occurs due to execution of the application.
- the outlier threshold calculator (460) may obtain statistical values by using statistical information (e.g., SUM set, COUNT set, SQUARE_SUM set, FREQUNCY_TABLE set) of specific resources used by specific applications collected from multiple electronic devices, and may test normality (472).
- the normality test may be based on, but is not limited to, the Kolmogorov-Smirnov test, the Shapiro-Wilk test, and/or the skewness, kurtosis, and standard error tests.
- the outlier threshold calculator (460) can calculate the standard deviation if the data has normality. For example, if the 29 numbers included in RAW_DATA of Table 2 have normality, the average and standard deviation of the 29 numbers can be calculated.
- the outlier threshold calculator (460) can determine an outlier threshold based on the calculated standard deviation (SD) and a predetermined weight (w 1 ) for the corresponding resource. For example, if the resource usage information has normality, the outlier threshold can be calculated as in Equation 8 below.
- AVG SUM set / COUNT set
- Outlier threshold AVG + SD * w 1
- AVG is the average of each resource usage recorded in the resource usage data set, which can be calculated by dividing the COUNT set by the recorded SUM set.
- the weight w 1 can be determined as a different value for each resource.
- the weight threshold calculator (460) may calculate an inter quartile range (IQR) if the data has normality.
- IQR inter quartile range
- the IQR may be determined as the difference between the data corresponding to the lower 25% and the data corresponding to the upper 25% after sorting each data sequentially (e.g., in ascending order) according to its value.
- Table 3 shows the frequency distribution of the FREQUENCY_TABLE set for a specific resource usage of a specific application.
- the Q1 index corresponding to the order of the lower 25% of data and the Q3 index corresponding to the order of the upper 25% of data can be calculated as in Equations 9 and 10 below.
- the Q1 value corresponding to the values of the lower 25% of data and the Q3 value corresponding to the values of the upper 25% of data can be calculated as in the following equation 11.
- the Q1 value and the Q3 value can be obtained by listing 29 data in ascending order and then finding the 7th and 22nd data.
- the resource usage data set (460) obtained from an actual server device includes a large amount of data, listing all data in ascending order and finding data corresponding to each order may be inefficient in terms of computation time.
- the server device can find a class (or section) to which the Q1 index and the Q3 index belong by a method such as Equation 11, and infer the order of the Q1 index and the Q3 index in the corresponding class by interpolation, thereby calculating the Q1 value and the Q3 value.
- the outlier threshold calculator (460) can calculate the outlier threshold based on the IQR and a predetermined weight (w 2 ) for the corresponding resource.
- Equation 12 is a formula for calculating the outlier threshold based on the IQR.
- Outlier threshold Q3 + (Q3-Q1) * w 2
- the outlier threshold can be calculated as in Equation 13 below.
- the weight w 2 is substituted as 1.5, but is not limited thereto.
- the outlier threshold calculator (460) determines the method for calculating the outlier threshold differently depending on whether the data of the resource usage data set (460) has normality. According to another embodiment, the outlier threshold calculator (460) may calculate the outlier threshold based on the IQR for all data without performing a normality test.
- the outlier threshold calculator (460) can calculate an outlier threshold for each application and each corresponding resource in the resource usage data set (460). For example, as illustrated in FIG. 7, if the usage of applications A 0 to A i and the resource usage of resources R 0 to R j are recorded in the resource usage data set (460), the outlier threshold calculator (460) can calculate an outlier threshold TH ij corresponding to the application A i and the resource R j for each application and resource. In this case, some applications may not use some of the resources, in which case the outlier threshold calculator (460) can exclude the outlier threshold corresponding to the corresponding application and resource, or record it as a value less than or equal to 0 (e.g., -1).
- FIGS. 8A to 8D illustrate UIs provided when abnormal operation due to excessive use of resources is detected in an electronic device according to one embodiment.
- the electronic device (300) may check the usage of at least one resource used by the executed application, and if the usage of a specific resource is greater than an outlier threshold set for the application and resource, the electronic device may determine that an abnormal operation has occurred due to the executed application.
- the electronic device (300) when an abnormal operation occurs, can terminate the execution of an application that has excessively used resources.
- the electronic device (300) can provide a notification including information indicating an application in which an abnormal operation has occurred and information indicating at least one resource that has been used exceeding a threshold value through an output device.
- the notification can include at least one of a user interface visually provided on a display, vibration using haptics, and audio information using a speaker.
- Figures 8a to 8d illustrate a UI provided through a display when abnormal motion is detected.
- the electronic device (300) may display a UI indicating the abnormal operation on the display.
- the electronic device (300) may display the UI indicating the abnormal operation as a UI (810) in the form of a pop-up in the central area of the screen as illustrated in FIG. 8A, and/or may provide it through a UI (820) on a status bar provided at the top of the screen as illustrated in FIG. 8B.
- the electronic device (300) may forcibly terminate the application that has caused the abnormal operation and provide a UI (810, 820) such as FIG. 8A or FIG. 8B through the display at least partially at the same time.
- the electronic device (300) can provide information indicating overused resources such as that shown in FIG. 8c through the UI (830).
- the electronic device (300) may provide information on resources (e.g., pending intent, popup window, virtual display) used by an executed application, and may provide a resource (e.g., pending intent) used above an abnormal threshold value so that the user can recognize it.
- resources e.g., pending intent, popup window, virtual display
- a resource e.g., pending intent
- the electronic device (300) may provide feedback to the user when the number of times a specific application is terminated due to an abnormal operation occurring during execution of the application is greater than or equal to a reference number (e.g., 3 times).
- the feedback may include information that induces deletion of the application.
- the electronic device (300) may provide a UI (840) through which the user can select whether to delete the application, as shown in FIG. 8d, via the display.
- the electronic device (300) may delete the corresponding application.
- FIGS. 9A to 9D are flowcharts of a method for an electronic device to detect abnormal operation of an application according to one embodiment of the present invention.
- FIGS. 9A to 9D may be performed by a processor of an electronic device (e.g., processor (120) of FIG. 1), and for example, at least some of the operations illustrated may be performed by a resource generator (360) and/or a resource manager daemon (370) of FIG. 5.
- the methods illustrated may be implemented as instructions executable by the electronic device (or the processor of the electronic device). These instructions may be stored on a computer readable recording medium.
- Figure 9a illustrates how an electronic device obtains and updates an outlier threshold value after initializing a resource manager daemon.
- the electronic device may initialize a resource manager daemon.
- the resource manager daemon may record usage information of at least one resource used when executing an application, and manage an outlier threshold corresponding to each application and each resource.
- the electronic device may set the outlier threshold to a value less than 0 (e.g., -1).
- the reason for initializing the outlier threshold to a value less than 0 is that this is a situation before statistical outliers are obtained for information on a specific application's use of a specific resource, so that the outlier threshold may be set to a negative number so as not to determine an abnormal operation when the application is executed.
- the electronic device may determine that it is not an abnormal operation regardless of the usage amount of the corresponding resource.
- the electronic device may set the outlier threshold to a statistically insignificantly large value rather than a value less than 0 during the initialization process of the resource manager daemon.
- the electronic device can determine whether an outlier threshold value is received from the server device.
- the server device can calculate an outlier threshold value corresponding to each application and each resource through statistical analysis based on resource usage information acquired from various electronic devices.
- the server device can calculate an outlier threshold value when sufficient data is accumulated in the resource usage data set, and can provide the calculated outlier threshold value to each electronic device.
- the electronic device may update a pre-stored outlier threshold value with the outlier threshold value transmitted from the server device. For example, during the initialization process of the resource manager daemon, the outlier threshold value set to a value less than 0 (e.g., -1) may be updated with the outlier threshold value acquired from the server device. Thereafter, when an application is executed and uses at least one resource, the electronic device may check whether the usage of each resource is greater than or equal to the updated outlier threshold value.
- FIG. 9b illustrates a method for an electronic device to transmit resource usage information to a server device and initialize previously stored data.
- the electronic device may receive a data transmission request from a server device.
- the electronic device may transmit resource usage information recorded in the memory to the server device. For example, in response to a data transmission request from the server device, the electronic device may transmit COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE, and RAW_DATA related to each resource usage of each application recorded in the memory to the server device. COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE, and RAW_DATA included in the resource usage information have been described above with reference to FIG. 6.
- the electronic device may record only RAW_DATA in the memory and then transmit it to the server device, in which case the server device may calculate data such as COUNT, SUM, SQUARE_SUM, and FREQUENCY TABLE of the corresponding electronic device based on the received RAW_DATA.
- the electronic device may initialize the values of COUNT, SUM, and SQUARE_SUM recorded in the memory to 0. Additionally, in operation 928, the electronic device may initialize FREQUENCY_TABLE and RAW_DATA. After transmitting the resource usage information to the server device, the electronic device may initialize the recorded data.
- the electronic device After the electronic device initializes the resource usage information, when a resource usage event occurs due to the execution of the application, the usage information of the used resources can be recorded in the memory.
- Figure 9c illustrates how an electronic device records resource usage information into memory.
- the electronic device may receive an event for specific resource usage of a specific application. For example, when the application is executed, it may use at least one resource (e.g., CPU usage, memory usage, pending intent generation), and a resource generator (e.g., resource generator (360) of FIG. 5) may forward an event for each resource usage of the application to a resource manager daemon (e.g., resource manager daemon (370) of FIG. 5).
- the electronic device may store the specific resource usage of the specific application in a variable R.
- the electronic device may determine whether the resource usage is less than the current outlier threshold, or whether the outlier threshold is a value less than 0.
- the electronic device may set the outlier threshold to a value less than 0 (e.g., -1) during the initialization process of the resource manager daemon, and if the outlier threshold is a value less than 0, it may be the case that there is no outlier threshold value acquired from the server device.
- the electronic device may determine that an abnormal operation has occurred due to excessive resource usage according to the execution of the application. In this case, in response to the occurrence of the abnormal operation, the electronic device may terminate the application and/or output a notification for notifying the abnormal operation through an output device (e.g., a display, a haptic, a speaker). In addition, if the amount of resource usage according to the currently set abnormality threshold is greater than or equal to the currently set abnormality threshold, the electronic device may not perform an operation of recording resource usage information of operation 948 or less.
- an output device e.g., a display, a haptic, a speaker
- an operation of recording resource usage information of operation 948 or lower may be performed.
- the electronic device may add 1 to COUNT, which is a value currently stored in memory for a specific application and a specific resource, add R to SUM, and add R*R to SQUARE_SUN.
- R is the usage amount of the application executed in operation 942, and therefore, resource usage information of the corresponding application may be recorded in the memory according to operation 948.
- the electronic device may determine whether storage of the current data is required. For example, if a sufficient number of pieces of information related to the specific resource usage of the application executed at operation 942 are already stored in the memory, the electronic device may determine that storage of additional data is unnecessary. Alternatively, the electronic device may determine whether storage of the current data is required based on whether an outlier threshold value corresponding to the corresponding application and/or the corresponding resource is provided from a server device.
- the electronic device may store the current data in RAW_DATA.
- the electronic device may increase the number of a class including the current resource usage (or R value) in the FREQEUNCY_TABLE by 1.
- the numerical range of the resource usage may be divided into a plurality of classes, and the electronic device may increase the number of a class to which the resource usage acquired in operation 942 belongs among the plurality of classes by 1.
- the size of the plurality of classes related to the usage of each resource may be arbitrarily determined for each type of resource, or may be specified by the server device.
- the electronic device may define a class as a string value of a class including an R value. If there is no value for the corresponding class in FREQUENCY_TABLE, the electronic device may set the frequency of the corresponding class to 0. If there is a value for the corresponding class in FREQUENCY_TABLE, the electronic device may increase the frequency of the corresponding class by 1.
- Figure 9d illustrates the operation of an electronic device when an abnormal operation occurs depending on the execution of a specific application.
- the electronic device may receive an event regarding usage of a particular resource by a particular application.
- the electronic device may determine whether the resource usage is greater than or equal to a current outlier threshold value, and whether the outlier threshold value is greater than or equal to 0. If the outlier threshold value is greater than or equal to 0, it may mean that the outlier threshold value is set to an outlier threshold value obtained from a server device.
- the electronic device may determine that the operation is not abnormal and record the resource usage in memory. For example, the electronic device may perform an operation of recording resource usage information of operation 948 or lower of FIG. 9c.
- the electronic device may determine that the abnormal operation is due to excessive resource usage.
- the electronic device may, in operation 968, forcefully terminate the application that caused the abnormal operation.
- the electronic device can determine whether the number of times the application has been force-terminated is greater than or equal to a reference number.
- the reference number may be three, but is not limited thereto.
- the electronic device may provide a UI indicating an abnormal operation of the application through the display.
- the electronic device may provide the UI indicating the abnormal operation in the form of a pop-up as in FIG. 8A, and/or on a status bar as in FIG. 8B.
- the electronic device may provide a notification indicating the abnormal operation of the application through another type of output device (e.g., haptic, speaker) other than the display.
- the electronic device may provide a UI that induces the user to delete the application. For example, the electronic device may provide the UI of FIG. 9d through the display. According to one embodiment, if the user selects a predetermined button on the UI provided in operation 974, the electronic device may provide a UI that induces the deletion of the application in operation 972.
- FIG. 10 is a flowchart of a method for determining an abnormality threshold value of a server device according to one embodiment.
- the method illustrated in FIG. 10 can be performed by a processor of a server device (e.g., processor (410) of FIG. 4), and the technical features described above may be omitted from the description below.
- the method illustrated can be implemented by instructions that can be executed by a server device (e.g., processor (410) of server device (400)). These instructions can be stored on a computer readable recording medium.
- the server device may receive resource usage information including the usage of at least one resource used when executing a specific application from the electronic device.
- the server device may receive COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE, and RAW_DATA corresponding to the specific application and the specific resource.
- COUNT is the number of times the application requested the resource or the number of samples
- RAW_DATA is a set of acquired resource usages
- SUM is the sum of the sizes of the resources used by the corresponding application
- SQUARE_SUM is the sum of the squares of the sizes of the resources used by the corresponding application.
- the server device may receive only RAW_DATA from the electronic device, and in this case, the server device may calculate other data such as COUNT, SUM, SQUARE_SUM, and FREQUENCY_TABLE based on the RAW_DATA received.
- the server device may add resource usage information received from the electronic device to a resource usage data set stored in a memory.
- the server device may add COUNT, SUM, and SQUARE_SUM received from the electronic device to the COUNT set, SUM set, and SQUARE_SUM set of the resource usage data set, respectively.
- the server device may add RAW_DATA received from the electronic device to the RAW_DATA set.
- the resource usage data set accumulated and stored by the server device has been described in detail with reference to FIG. 6.
- the server device can update the FREQUENCY_TABLE set based on the FREQUENCY_TABLE received from the electronic device. For example, the server device can determine the class as a string value of a first rank of the FREQUENCY_TABLE, and if the corresponding class exists in the received FREQUENCY_TABLE, the server device can add the frequency value of the corresponding class in the received FREQUENCY_TABLE to the frequency value of the corresponding class in the FREQUENCY_TABLE set.
- the server device can determine the class as a string value of a next rank, and repeat the operation of adding the frequency value of the corresponding class in the received FREQUENCY_TABLE to the frequency value of the corresponding class in the FREQUENCY_TABLE set as described above until there are no more classes to be added.
- the server device can perform a normality test on the feature applications and resource usage of the resource usage data set.
- the normality test can be based on, but is not limited to, a Kolmogorov-Smirnov test, a Shapiro-Wilk test, and/or a skewness, kurtosis, and standard error test.
- the server device can verify whether the normality test result data follows a normal distribution. If the data follows a normal distribution, operations 1052 and 1054 can be performed, and if the data does not follow a normal distribution, operations 1042, 1044, and 1046 can be performed.
- the server device may calculate a standard deviation of each data included in the resource usage data set of the corresponding application and resource.
- the standard deviation may be calculated as in Equation 14.
- the server device may calculate an outlier threshold based on the calculated standard deviation and a predetermined weight (w 1 ) for the corresponding resource.
- the outlier threshold may be calculated as in Equation 15.
- AVG SUM set / COUNT set
- Outlier threshold AVG + SD * w 1
- AVG is the average of each resource usage recorded in the resource usage data set, which can be calculated by dividing the COUNT set by the recorded SUM set.
- the weight w 1 can be determined as a different value for each resource.
- the server device may calculate a Q1 index and a Q3 index.
- the Q1 index may correspond to a sequence of the lower 25% of data after sorting the data in ascending order
- the Q3 index may correspond to a sequence of the upper 25% of data.
- the Q1 index and the Q3 index may be calculated according to Equations 16 and 17, respectively.
- the server device can calculate an inter quartile range (IQR).
- the IQR can be determined as a difference between the Q3 value and the Q1 value.
- the server device can check the Q3 value of the Q3 index and the Q1 value of the Q1 index, and calculate the IQR through the difference.
- the server device can find a class (or section) to which the Q1 index and the Q3 index belong, and infer an order of the Q1 index and the Q3 index in the corresponding class by interpolation, and calculate the Q1 value and the Q3 value.
- the server device may calculate an outlier threshold based on the calculated IQR and a predetermined weight (e.g., w 2 ).
- the outlier threshold may be calculated as in Equation 18.
- Outlier threshold Q3 + (Q3-Q1) * w 2
- the weight w2 can vary for each resource.
- the server device can transmit the determined abnormality threshold value to each electronic device.
- the electronic device can store the received abnormality threshold value and compare the usage of each resource used when executing the application with each abnormality threshold value to determine whether an abnormal operation has occurred.
- FIG. 11 is a block diagram of an electronic device according to one embodiment.
- an electronic device (1100) may include a processor (1110), a memory (1120), a communication module (1130), and at least one output device (1140). Even if some of the illustrated configurations are omitted or replaced with other configurations, various embodiments of the present document may be implemented.
- the electronic device (1100) may further include at least some of the configurations and/or functions of the electronic device (101) of FIG. 1. At least some of the respective configurations of the illustrated (or not illustrated) electronic device (1100) may be operatively, functionally, and/or electrically connected to each other.
- the electronic device (1100) may include at least one output device (1140) for providing a visual, auditory, or tactile notification (or feedback) to a user.
- the at least one output device (1140) may include a display (1150), a speaker (1160), and a haptic module (1170).
- the display (1150) may be implemented as any one of a liquid crystal display (LCD), a light-emitting diode (LED) display, and an organic light-emitting diode (OLED) display, but is not limited thereto.
- the display (1150) may be configured as a touch screen that detects a touch and/or proximity touch (or hovering) input using a part of a user's body (e.g., a finger) or an input device (e.g., a stylus pen).
- the display (1150) may include at least some of the configurations and/or functions of the display module (160) of FIG. 1. At least a part of the display (1150) may be flexible, and may be implemented as a foldable display or a rollable display.
- the haptic module (1170) may generate a vibration that can be perceived by a user through a mechanical structure such as a motor.
- the haptic module (1170) may include at least some of the configuration and/or functions of the haptic module (179) of FIG. 1.
- the speaker (1160) can output audio signals externally.
- the speaker (1160) can include at least some of the configurations and/or functions of the audio output module (155) of FIG. 1.
- the electronic device (1100) may further include, in addition to the display (1150), the haptic module (1170), and the speaker (1160), other types of output devices (1140) that can provide a user with a perceptible notification through various senses.
- the communication module (1130) may include various hardware and/or software configurations to support wireless communication with an external device (e.g., server device (400) of FIG. 3).
- the communication module (1130) may support short-range wireless communication (e.g., Wi-Fi, Bluetooth) and cellular wireless communication (e.g., 4G LTE, 5G NR).
- the communication module (1130) may include at least some of the configurations and/or functions of the communication module (190) of FIG. 1.
- the memory (1120) may temporarily or permanently store various data, including volatile memory and non-volatile memory.
- the memory (1120) may include at least some of the configuration and/or functions of the memory (130) of FIG. 1, and may store at least some of the program (140) of FIG. 1 and/or the program (140) of FIG. 2.
- the memory (1120) may store various instructions that may be performed by the processor (1110). Such instructions may include control commands such as arithmetic and logical operations, data movement, and input/output that may be recognized by the processor (1110).
- the processor (1110) may be configured as one or more processors (1110) capable of performing calculations or data processing related to control and/or communication of each component of the electronic device (1100).
- the processor (1110) may be electrically, functionally, and/or operatively connected to each component of the electronic device (1100) including a memory (1120), an output device (1140), and a communication module (1130).
- the processor (1110) may include at least some of the configurations and/or functions of the processor (120) of FIG. 1.
- the electronic device (1100) may include a multi-processor computer architecture, such as dual, quad, or octa core.
- the electronic device (1100) may configure a processor (1110) by integrating multiple cores that perform core operations, such as computational tasks, on a single integrated circuit.
- the processor (1110) may be implemented as a single core processor.
- the processor (1110) can implement on the electronic device (1100), but the following describes various embodiments of checking a resource usage event when an application is executed, recording resource usage information in the memory (1120), calculating an abnormality threshold corresponding to each resource based on a resource usage data set stored in the memory (1120), and determining an abnormal operation when a specific resource usage is higher than the abnormality threshold and providing feedback corresponding to the occurrence of the abnormal operation.
- the operations of the electronic device (1100) or the processor (1110) described below can be performed by loading instructions stored in the memory (1120).
- the electronic device (1100) can install and execute various applications.
- the electronic device (1100) can execute at least some of the applications (146) of FIG. 2, and can also execute at least one application downloaded and installed through an application store (e.g., Play Store TM ).
- the electronic device (1100) can execute multiple applications simultaneously in the foreground and background.
- the executed application may use the resources of the electronic device (1100).
- the resources of the electronic device (1100) used by the application may include, but are not limited to, a central processing unit (CPU), memory, I/O, threads, pop-up windows, virtual displays, notifications, and pending intents.
- the types of resources used may vary depending on the executed application, and even for the same application, the types of resources used may vary depending on the operating state and/or environment settings.
- the memory (1120) can store a resource usage data set that maps and records a plurality of applications and a plurality of resource usages corresponding to each of the plurality of applications.
- the resource usage data set can map and store usage information of each application and each resource.
- the resource usage data set can store data related to resource usage, such as COUNT, SUM, SQUARE_SUM, and FREQUENCY_TABLE.
- the resource usage data set can have the same data structure as the resource usage data set stored on the server device described in FIG. 6.
- the processor (1110) can check the usage of at least one resource used by a specific application when the specific application is executed. For example, when a specific application is executed according to a user's input, the executed application can use at least one resource (e.g., CPU usage, memory usage, pending intent creation), and the processor (1110) can check an event related to resource usage.
- the executed application can use at least one resource (e.g., CPU usage, memory usage, pending intent creation), and the processor (1110) can check an event related to resource usage.
- the processor (1110) may record usage information of at least one resource used according to the execution of an application in a resource usage data set stored in the memory (1120).
- the resource usage data set may accumulate and record usage information of each resource used when each application is executed, and the processor (1110) may add usage information of at least one resource used according to the execution of the application to data of the corresponding application and resource in the resource usage data set.
- the processor (1110) may determine that it is an abnormal operation, and in this case, the operation of recording in the resource usage data set may not be performed.
- the processor (1110) may determine at least one outlier threshold value (e.g., a first outlier threshold value) corresponding to each of a specific application and at least one resource used when executing the specific application, based on a resource usage data set stored in the memory (1120), through a predetermined statistical analysis.
- the method by which the processor (1110) determines the outlier threshold value may correspond to the method of the operation of the server device determining the outlier threshold value described above through FIGS. 4 to 10.
- the processor (1110) can perform a normality test on the feature applications and resource usage of the resource usage data set.
- the normality test can be based on, but is not limited to, the Kolmogorov-Smirnov test, the Shapiro-Wilk test, and/or the skewness, kurtosis, and standard error tests.
- the processor (1110) may determine an outlier threshold based on a standard deviation and a predetermined weight (w 1 ) when the data follows a normal distribution. For example, the processor (1110) may calculate an average and a standard deviation of data following a normal distribution. The processor (1110) may determine an outlier threshold as a product of the standard deviation and the weight.
- the weight w 1 may be determined as a different value for each resource.
- the processor (1110) may determine an outlier threshold based on the IQR and a predetermined weight (w 2 ) for the corresponding resource when the data does not follow a normal distribution.
- the IQR may be determined as the difference between the data corresponding to the lower 25% and the data corresponding to the upper 25% after sequentially (e.g., in ascending order) sorting each data according to its value.
- the processor (1110) may obtain the Q3 value and the Q1 value and then obtain the IQR as the difference therebetween.
- the processor (1110) may determine a value obtained by multiplying the IQR by the weight (e.g., w 2 ) and adding the value obtained by the Q3 value as the outlier threshold.
- the weight w 2 may be determined as a different value for each resource.
- the processor (1110) may also calculate an outlier threshold based on the IQR and the weight w 2 for all data, without verifying normality of the data.
- the processor (1110) can update an outlier threshold value (e.g., a second outlier threshold value) currently stored in the memory (1120) for the corresponding application and resource with the calculated outlier threshold value.
- the outlier threshold value can be set to a value less than 0 in an initial state, and can be updated to that value when the outlier threshold value is calculated.
- the processor (1110) can perform an operation of calculating the outlier threshold value when a sufficient amount of data is collected in the resource usage data set.
- the processor (1110) may determine whether, when a specific application is executed and uses at least one resource, the usage of the resource exceeds an abnormality threshold value set corresponding to the resource. According to one embodiment, when the usage of the resource exceeds the abnormality threshold value, the processor (1110) may determine that an abnormal operation has occurred due to the execution of the application.
- the processor (1110) may forcibly terminate an application that has caused an abnormal operation.
- the processor (1110) may provide a user interface indicating an abnormal operation of the application through the display (1150), as illustrated in FIGS. 8A to 8D.
- the processor (1110) may provide a notification indicating an abnormal operation of the application through another output device (1140), such as a haptic module (1170) or a speaker (1160).
- the processor (1110) can check whether the number of times the application causing the abnormal behavior is forced to terminate is greater than or equal to a reference number.
- the reference number may be 3 times, but is not limited thereto. If the number of times the application is forced to terminate is greater than or equal to the reference number, the processor (1110) can provide a user interface (e.g., the user interface of FIG. 9d) for inducing deletion of the application.
- FIG. 12 is a block diagram of a process executed in an electronic device according to one embodiment.
- processes (1200) running on a processor of an electronic device may include a resource manager daemon (1210) and an outlier threshold calculator (1250).
- the resource manager daemon (1210) may check for an event corresponding to the resource usage of an application when the application is running and uses at least one resource.
- a resource creation event may be provided in the form of a class (e.g., ResEvt.class(.java)), a Java native interface (JNI) library (e.g., ResEvt JNI library(.cpp)), and/or a shared object (SO) (e.g., LibresEvt.so).
- a resource creation event may be provided in the form of a class (e.g., ResEvt.class(.java)), a Java native interface (JNI) library (e.g., ResEvt JNI library(.cpp)), and/or a shared object (SO) (e.g., LibresEvt.so).
- JNI Java native interface
- SO shared object
- the resource manager daemon (1210) can record resource usage statistics (1220) and manage anomaly threshold values (1230).
- the resource manager daemon (1210) can receive application and resource usage information when an application is executed, and record the same in resource usage statistics (1220).
- the resource usage statistics (1220) can store usage information of multiple applications and each resource used by each application in a table format.
- the outlier threshold calculator (1250) may perform an operation of calculating an outlier threshold when a predetermined amount of data is accumulated and stored in a resource usage data set (1260) accumulated in a memory.
- the outlier threshold calculator (1250) may determine at least one outlier threshold corresponding to each of a specific application and at least one resource used when executing the specific application through a predetermined statistical analysis based on the resource usage data set (1260).
- the outlier threshold calculator (1250) may perform an operation of determining an outlier threshold corresponding to each of the resources for each of a plurality of applications.
- the anomaly threshold for resource 0 of App 0 , the anomaly threshold for resource 1 , ..., the anomaly threshold for resource j can be calculated, the anomaly threshold for resource 0 of App 1 , the anomaly threshold for resource 1 , ..., the anomaly threshold for resource j of App i , ..., the anomaly threshold for resource 0 , the anomaly threshold for resource 1 , ..., the anomaly threshold for resource j of App i can be calculated.
- the outlier threshold calculator (1250) can test the normality of usage data of a specific resource of a specific application (1270) to determine whether it follows a normal distribution. If the data follows a normal distribution, the outlier threshold calculator (1250) can calculate a standard deviation and calculate an outlier threshold based on the standard deviation and a predetermined weight (1271). If the data does not follow a normal distribution, the outlier threshold calculator (1250) can calculate an inter quartile range (IQR) and calculate an outlier threshold based on the IQR and a predetermined weight (1272).
- IQR inter quartile range
- the method by which the outlier threshold calculator (1250) calculates the outlier threshold value may correspond to the method by which the outlier threshold calculator (1250) of the server device described through FIGS. 4 to 10 calculates the outlier threshold value.
- the resource manager daemon (1210) when the resource manager daemon (1210) checks a resource usage event, it may compare the usage of each resource with an outlier threshold value corresponding to each resource. If the comparison result confirms that the application of the corresponding event has used a specific resource more than the outlier threshold value, the resource manager daemon (1210) may determine that the corresponding application is operating abnormally due to excessive use of resources. In this case, the resource manager daemon (1210) may not record the usage information of each resource included in the corresponding event in the resource usage statistics.
- the resource manager daemon (1210) determines that a specific application is behaving abnormally, it can stop the operation of the application (or terminate the execution) and reclaim the resources. After stopping the operation of the application, the resource manager daemon (1210) can provide a notification to the user through an output device (e.g., a display, a speaker, a haptic) indicating the abnormal operation and induce the user to restart the application. If the problem of excessive resource usage occurs repeatedly more than a certain number of times even after the application is restarted, the resource manager daemon (1210) can provide a UI to the user through an output device to induce the user to delete the application.
- an output device e.g., a display, a speaker, a haptic
- FIG. 13 is a flowchart of a method for determining an outlier threshold value of an electronic device according to one embodiment.
- the illustrated method can be performed by an electronic device (e.g., an electronic device (1100) of FIG. 11), and a description of the technical features described above may be omitted below.
- an electronic device e.g., an electronic device (1100) of FIG. 11
- the electronic device may check the usage of at least one resource used by the executed application when the application is executed. For example, when a specific application is executed according to a user's input, the executed application may use at least one resource (e.g., CPU usage, memory usage, pending intent creation), and the electronic device may check an event related to the resource usage.
- the executed application may use at least one resource (e.g., CPU usage, memory usage, pending intent creation), and the electronic device may check an event related to the resource usage.
- the electronic device may record usage information of a resource in a resource usage data set.
- the resource usage data set may accumulate and record usage information of each resource used when each application is executed, and the electronic device may add usage information of at least one resource used according to execution of the application to data of the corresponding application and resource in the resource usage data set.
- the electronic device may determine an outlier threshold corresponding to each application and resource through statistical analysis.
- the electronic device can perform a normality test on a feature application and resource usage of a resource usage data set. If it is confirmed that specific resource usage information has normality, the electronic device can calculate a standard deviation of the resource usage and determine an outlier threshold based on the calculated standard deviation and a predetermined weight (w 1 ). If the specific resource usage information does not have normality, the electronic device can calculate an inter quartile range (IQR) of the resource usage information and determine an outlier threshold based on the IQR and the predetermined weight (w 2 ).
- IQR inter quartile range
- the weight (w 1 ) and the weight (w 2 ) can be determined for each resource.
- the electronic device can determine respective outlier threshold values corresponding to each application and resource.
- the electronic device can update the pre-stored outlier threshold value with the calculated outlier threshold value.
- the electronic device can set the outlier threshold value to a value less than 0 in the initialization step, and then update the outlier threshold value with the calculated value when the outlier threshold value is calculated.
- the electronic device can perform the operation of calculating the outlier threshold value and update the calculated outlier threshold value again.
- the electronic device may check the usage of at least one resource used by the executed application, and if the usage of the specific resource is greater than or equal to an abnormal threshold value set for the application and resource, the electronic device may determine that an abnormal operation has occurred due to the executed application. When the abnormal operation has occurred, the electronic device may terminate the execution of the application that has excessively used resources. In addition, the electronic device may provide a notification including information indicating the application in which the abnormal operation has occurred and information indicating at least one resource that has been used in excess of the threshold value, through an output device.
- An electronic device may include a memory and a processor operatively connected to the memory.
- the memory can store a resource usage data set that maps and records a plurality of applications and a plurality of resource usages corresponding to each of the plurality of applications.
- the processor when the first application is executed, can check the usage of at least one resource used by the executed first application, and record the checked usage information of the at least one resource in a resource usage data set stored in the memory.
- the processor may be configured to determine at least one first outlier threshold value corresponding to each of the first application and at least one resource used when executing the first application through a predetermined statistical analysis based on a resource usage data set stored in the memory, and to update at least one second outlier threshold value set for each of the first application and the at least one resource, which is previously stored in the memory, based on the determined at least one outlier threshold value.
- the memory may store instructions that, when executed by the processor, cause the electronic device to, when a first application is executed, check the usage of at least one resource used by the executed first application, record the checked usage information of the at least one resource in a resource usage data set stored in the memory, determine at least one first outlier threshold value corresponding to each of the first application and the at least one resource used when executing the first application through a predetermined statistical analysis based on the resource usage data set stored in the memory, and update at least one second outlier threshold value set for each of the first application and the at least one resource, which is previously stored in the memory, based on the determined at least one first outlier threshold value.
- the processor may be configured not to record usage information of the first resource in a resource usage data set stored in the memory when the usage of the first resource used by the executed first application exceeds an abnormality threshold value set corresponding to the first application and the first resource.
- the processor may be configured to determine an outlier threshold value corresponding to the second application and the second resource when the amount of usage information of the second resource corresponding to the second application in the resource usage data set stored in the memory exceeds a reference number.
- the processor may be configured to calculate an inter quartile range (IQR) of usage information of a plurality of second resources recorded corresponding to the second application, and determine an outlier threshold value corresponding to the second application and the second resource based on the calculated IQR and a weight corresponding to the second resource.
- IQR inter quartile range
- the weights may be determined for each resource.
- the processor may be configured to verify whether usage information of a plurality of second resources recorded corresponding to the second application has normality, and if it is verified to have normality, calculate a standard deviation of the usage information of the plurality of second resources, and determine an outlier threshold value corresponding to the second application and the second resource based on the calculated standard deviation.
- the processor may be configured to, when a third application is executed, check the usage of at least one resource used by the executed third application, and, when the usage of the third resource among the checked usages of at least one resource is equal to or greater than an abnormality threshold value currently set corresponding to the third application and the third resource, determine that an abnormal operation has occurred due to the execution of the third application.
- the processor may be configured to terminate execution of the third application if it is determined that the abnormal operation has occurred.
- the processor may be configured to provide feedback to the user when the number of times the third application is terminated due to an abnormal operation occurring during execution of the third application is greater than or equal to a reference number.
- the electronic device further includes a display
- the processor may be configured to provide a user interface through the display, the user interface including information indicating a third application in which the abnormal operation occurred and information indicating at least one resource used in excess of the abnormal threshold value.
- a server device may include a communication interface, a memory, and a processor operatively connected to the communication interface and the memory.
- the processor may be configured to receive, through the communication interface, usage information of at least one resource used when executing a first application from a plurality of electronic devices, record the received usage information of the resource in a resource usage data set stored in the memory, determine, based on the resource usage data set, at least one outlier threshold value corresponding to each of the first application and the at least one resource used when executing the first application through a predetermined statistical analysis, and transmit the determined outlier threshold value to the plurality of electronic devices through the communication interface.
- the memory may store instructions that, when executed by the processor, cause the processor to receive, from a plurality of electronic devices via the communication interface, usage information of at least one resource used when executing a first application, record the received usage information of the resource in a resource usage data set stored in the memory, determine at least one outlier threshold value corresponding to each of the first application and the at least one resource used when executing the first application through a predetermined statistical analysis based on the resource usage data set, and transmit the determined outlier threshold value to the plurality of electronic devices via the communication interface.
- the processor may be configured to determine an outlier threshold value corresponding to the first application and the first resource when the amount of usage information of the first resource corresponding to the first application is stored in the resource usage data set stored in the memory in a number greater than or equal to a reference number.
- the processor may be configured to calculate an inter quartile range (IQR) of usage information of a plurality of first resources recorded corresponding to the first application, and determine an outlier threshold value corresponding to the first application and the first resource based on the calculated IQR and a weight corresponding to the first resource.
- IQR inter quartile range
- the weights may be determined for each resource.
- the processor may be configured to verify whether usage information of a plurality of first resources recorded corresponding to the first application has normality, and if it is verified to have normality, calculate a standard deviation of the usage information of the plurality of first resources, and determine an outlier threshold value corresponding to the first application and the first resource based on the calculated standard deviation.
- a method performed by a server device may include an operation of receiving usage information of at least one resource used when executing a first application from a plurality of electronic devices, an operation of recording the received usage information of the resource in a resource usage data set stored in a memory, an operation of determining at least one outlier threshold value corresponding to each of the first application and the at least one resource used when executing the first application through a predetermined statistical analysis based on the resource usage data set, and an operation of transmitting the determined outlier threshold value to the plurality of electronic devices.
- the operation of determining at least one outlier threshold value may include an operation of determining an outlier threshold value corresponding to the first application and the first resource when the amount of usage information of the first resource corresponding to the first application is stored in the stored resource usage data set in a number greater than or equal to a reference number.
- the operation of determining at least one outlier threshold value may include the operation of calculating an inter quartile range (IQR) of usage information of a plurality of first resources recorded corresponding to the first application, and the operation of determining an outlier threshold value corresponding to the first application and the first resource based on the calculated IQR and a weight corresponding to the first resource.
- IQR inter quartile range
- the weights may be determined for each resource.
- the operation of determining the at least one outlier threshold value may include the operation of checking whether usage information of a plurality of first resources recorded corresponding to the first application has normality, and if it is checked that the usage information has normality, calculating a standard deviation of the usage information of the plurality of first resources, and determining an outlier threshold value corresponding to the first application and the first resource based on the calculated standard deviation.
- An electronic device may include a display, a memory, and a processor operatively connected to the display and the memory.
- the memory can store a plurality of outlier threshold values, each corresponding to a plurality of applications and a plurality of resources.
- the processor may be configured to, when a first application is executed, check the usage of at least one resource used by the executed first application, check at least one abnormality threshold value corresponding to each of the first application and the at least one resource used in the memory, compare the usage of the first resource among the at least one identified resource with the first abnormality threshold value corresponding to the first application and the first resource, and determine that an abnormal operation has occurred due to the execution of the first application when the usage of the first resource is equal to or greater than the first abnormality threshold value.
- the processor may be configured to terminate execution of the first application if it is determined that the abnormal operation has occurred.
- the processor may be configured to provide feedback to the user when the number of times the first application is terminated due to an abnormal operation occurring during execution of the first application is greater than or equal to a reference number.
- the electronic devices according to various embodiments disclosed in this document may be devices of various forms.
- the 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 appliance devices.
- portable communication devices e.g., smartphones
- computer devices portable multimedia devices
- portable medical devices e.g., cameras
- wearable devices e.g., smart watch devices
- home appliance devices e.g., smartphones
- the electronic devices according to embodiments of this document are not limited to the above-described devices.
- 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).
- a component e.g., a first
- another component e.g., a second
- functionally e.g., a third component
- 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, for example.
- a module may be an integrally configured component or a minimum unit of the component or a portion thereof that performs one or more functions.
- a module may be implemented in the form of an application-specific integrated circuit (ASIC).
- ASIC application-specific integrated circuit
- Various embodiments of the present document may be implemented as software (e.g., a program (140)) including one or more instructions stored in a storage medium (e.g., an internal memory (136) or an external memory (138)) readable by a machine (e.g., an electronic device (101)).
- a processor e.g., a processor (120)
- the machine e.g., an electronic device (101)
- 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.
- ‘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.
- the method according to various embodiments disclosed in the present document may be provided as included in a computer program product.
- the computer program product may be traded between a seller and a buyer as a commodity.
- the computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store TM ) or directly between two user devices (e.g., smart phones).
- an application store e.g., Play Store TM
- at least a part of the computer program product may be at least temporarily stored or temporarily generated in a machine-readable storage medium, such as a memory of a manufacturer's server, a server of an application store, or an intermediary server.
- each component e.g., a module or a program of the above-described components may include a single or multiple entities, and some of the multiple entities may be separately arranged in other components.
- one or more components or operations of the above-described corresponding components may be omitted, or one or more other components or operations may be added.
- the multiple components e.g., a module or a program
- the integrated component may perform one or more functions of each of the multiple components identically or similarly to those performed by the corresponding component of the multiple components before the integration.
- the operations performed by the module, program, or other component may be executed sequentially, in parallel, repeatedly, 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.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
Abstract
본 문서의 다양한 실시예에 따른 전자 장치는, 메모리, 및 상기 메모리와 작동적으로 연결되는 프로세서를 포함할 수 있다. 상기 메모리는, 복수의 어플리케이션 및 상기 복수의 어플리케이션 각각에 대응하는 복수의 리소스 사용량을 맵핑하여 기록하는 리소스 사용 데이터 세트를 저장할 수 있다. 상기 메모리는, 상기 프로세서에 의해 실행 시에, 상기 전자 장치가, 제1어플리케이션이 실행되는 경우, 상기 실행된 제1어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 상기 확인된 적어도 하나의 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하고, 상기 메모리에 저장된 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정하고, 및 상기 결정된 적어도 하나의 이상치 임계 값에 기초하여, 기 저장된 상기 제1어플리케이션 및 상기 적어도 하나의 리소스 각각에 대해 설정된 적어도 하나의 이상치 임계 값을 업데이트 하도록 하는 인스트럭션들을 저장할 수 있다. 그 외에 다양한 실시예가 가능하다.
Description
본 문서는 전자 장치에 관한 것이며, 예를 들어, 전자 장치의 리소스를 이용하는 다양한 어플리케이션을 설치 및 실행할 수 있는 전자 장치에 대한 것이다.
스마트 폰, 태블릿 PC, 랩탑 PC, 스마트 와치와 같은 전자 장치는 다양한 종류의 운영 체제(또는 플랫폼)를 포함하며, 각 운영 체제 상에서 실행할 수 있는 다양한 어플리케이션을 설치 및 실행할 수 있다. 전자 장치의 사용자는 온라인 마켓을 통해 어플리케이션을 다운로드 받아 전자 장치 상에 설치할 수 있다. 이와 같은 마켓은 특별한 검증 절차 없이 개발자가 자유롭게 어플리케이션을 마켓에 등록할 수 있는 개방형 구조이다. 어플리케이션을 쉽게 개발할 수 있도록 지원하는 다양한 API(application program interface) 또는 SDK(software development kit)가 제공됨에 따라, 사용자는 직접 필요한 어플리케이션을 개발하여 마켓을 통해 공개할 수도 있다.
전자 장치 상에서 어플리케이션을 실행하면 시스템 리소스를 사용할 수 있다. 전자 장치 상에서 다양한 어플리케이션이 동시에 포 그라운드 및 백 그라운드에서 실행될 수 있기 때문에, 특정 어플리케이션이 점유할 수 있는 시스템 리소스의 양은 제한될 수 있다. 마켓을 통해 공개되는 어플리케이션의 종류가 다양해 짐에 따라, 이상 동작하는 어플리케이션도 늘어날 수 있다. 예를 들어, 개발자의 전문성 부족으로 인해, 특정 어플리케이션의 경우 시스템 리소스를 과다 사용하여 전자 장치의 전체적인 성능에 영향을 줄 수 있다. 따라서, 전자 장치 상에서 이와 같이 이상 동작하는 어플리케이션을 실시간으로 감지하는 기술이 요구된다.
전자 장치는 이상 동작 하는 어플리케이션을 감지하기 위해, 리소스가 임계 값 이하로 부족해지는 지 여부를 모니터링 할 수 있다. 하지만, 종래의 기술은 이상 동작 여부를 결정하기 위한 임계 값을 고정된 값으로 사용 하였으며, 이에 다라 어플리케이션에 따라 실제 이상 동작을 감지하지 못하는 케이스들이 발생할 수 있다.
본 문서(disclosure)(또는 명세서(specification), 발명(invention))의 다양한 실시예에 따른 전자 장치는 메모리, 및 상기 메모리와 작동적으로 연결되는 프로세서를 포함할 수 있다.
일 실시예에 따르면, 상기 메모리는, 복수의 어플리케이션 및 상기 복수의 어플리케이션 각각에 대응하는 복수의 리소스 사용량을 맵핑하여 기록하는 리소스 사용 데이터 세트를 저장할 수 있다.
일 실시예에 따르면, 상기 메모리는, 상기 프로세서에 의해 실행 시에, 상기 전자 장치가, 제1어플리케이션이 실행되는 경우, 상기 실행된 제1어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 상기 확인된 적어도 하나의 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하도록 하는 인스트럭션들을 저장할 수 있다.
일 실시예에 따르면, 상기 인스트럭션들은, 상기 전자 장치가, 상기 메모리에 저장된 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 제1이상치 임계 값을 결정하고, 및 상기 메모리에 기 저장된 상기 제1어플리케이션 및 상기 적어도 하나의 리소스 각각에 대해 설정된 적어도 하나의 제2이상치 임계 값을 상기 결정된 적어도 하나의 제1이상치 임계 값에 기초하여 업데이트 하도록 하는 인스트럭션들을 더 포함할 수 있다.
본 문서의 다양한 실시예에 따르면, 다양한 어플리케이션을 설치 및 실행할 수 있는 전자 장치에서 리소스의 과다 사용의 기준이 되는 임계 값을 통계적 분석을 통해 결정함으로써, 이상 동작하는 어플리케이션을 정확하게 감지할 수 있는 전자 장치 및 전자 장치의 리소스를 과다 사용하는 어플리케이션을 감지하는 방법을 제공할 수 있다.
도 1은 다양한 실시예들에 따른, 네트워크 환경 내의 전자 장치의 블록도이다.
도 2는 일 실시예에 따른 프로그램의 블록도이다.
도 3은 일 실시예에 따른 서버 장치 및 복수의 전자 장치를 간략히 도시한 것이다.
도 4는 일 실시예에 따른 서버 장치의 블록도이다.
도 5는 일 실시예에 따른 서버 장치 및 전자 장치에서 실행되는 프로세스의 블록도이다.
도 6은 일 실시예에 따른 리소스 사용 데이터 세트를 도시한 것이다.
도 7은 일 실시예에 따른 서버 장치 및 전자 장치에서 실행되는 프로세스의 블록도이다.
도 8a 내지 8d는 일 실시예에 따른 전자 장치에서 이상 동작 감지 시 제공하는 UI를 도시한 것이다.
도 9a 내지 도 9d는 일 실시예에 따른 일 실시예에 따른 전자 장치가 어플리케이션의 이상 동작을 감지하는 방법의 흐름도이다.
도 10은 일 실시예에 따른 서버 장치의 이상치 임계 값을 결정하는 방법의 흐름도이다.
도 11은 일 실시예에 따른 전자 장치의 블록도이다.
도 12는 일 실시예에 따른 전자 장치에서 실행되는 프로세스의 블록도이다.
도 13은 일 실시예에 따른 전자 장치의 이상치 임계 값을 결정하는 방법의 흐름도이다.
이하에서는 도면을 참조하여 본 문서의 다양한 실시예에 대하여 당해 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 문서에 개시되는 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 도면의 설명과 관련하여, 동일하거나 유사한 구성요소에 대해서는 동일하거나 유사한 참조 부호가 사용될 수 있다. 또한, 도면 및 관련된 설명에서는, 잘 알려진 기능 및 구성에 대한 설명이 명확성과 간결성을 위해 생략될 수 있다.
도 1은, 다양한 실시예들에 따른, 네트워크 환경(100) 내의 전자 장치(101)의 블록도이다. 도 1을 참조하면, 네트워크 환경(100)에서 전자 장치(101)는 제 1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제 2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108) 중 적어도 하나와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 모듈(150), 음향 출력 모듈(155), 디스플레이 모듈(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 연결 단자(178), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(178))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(176), 카메라 모듈(180), 또는 안테나 모듈(197))은 하나의 구성요소(예: 디스플레이 모듈(160))로 통합될 수 있다.
프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 저장하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일실시예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(101)가 메인 프로세서(121) 및 보조 프로세서(123)를 포함하는 경우, 보조 프로세서(123)는 메인 프로세서(121)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.
보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능 모델이 수행되는 전자 장치(101) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(108))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.
메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서 모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다.
프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다.
입력 모듈(150)은, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(150)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다.
음향 출력 모듈(155)은 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 모듈(155)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.
디스플레이 모듈(160)은 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(160)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 디스플레이 모듈(160)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다.
오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(170)은, 입력 모듈(150)을 통해 소리를 획득하거나, 음향 출력 모듈(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.
센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다.
인터페이스(177)는 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.
연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(178)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.
햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.
카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.
전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(188)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.
배터리(189)는 전자 장치(101)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.
통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제 1 네트워크(198)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제 2 네트워크(199)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(104)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 또는 인증할 수 있다.
무선 통신 모듈(192)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(192)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(192)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(192)은 전자 장치(101), 외부 전자 장치(예: 전자 장치(104)) 또는 네트워크 시스템(예: 제 2 네트워크(199))에 규정되는 다양한 요구사항을 지원할 수 있다. 일실시예에 따르면, 무선 통신 모듈(192)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.
안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다.
다양한 실시예에 따르면, 안테나 모듈(197)은 mmWave 안테나 모듈을 형성할 수 있다. 일실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제 1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제 2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.
일실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(102, 또는 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(102, 104, 또는 108) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(101)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(104)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(108)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일실시예에 따르면, 외부의 전자 장치(104) 또는 서버(108)는 제 2 네트워크(199) 내에 포함될 수 있다. 전자 장치(101)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다.
도 2은 다양한 실시예에 따른 프로그램 모듈의 블록도이다.
일실시예에 따르면, 프로그램(140)은 전자 장치(101)의 하나 이상의 리소스들을 제어하기 위한 운영 체제(142), 미들 웨어(144), 또는 상기 운영 체제(142) 상에서 실행 가능한 어플리케이션(146)을 포함할 수 있다. 운영 체제(142)는, 예를 들면, AndroidTM, iOSTM, WindowsTM, SymbianTM, TizenTM, 또는 BadaTM를 포함할 수 있다. 프로그램(140) 중 적어도 일부 프로그램은, 예를 들면, 제조 시에 전자 장치(101)에 프리로드되거나, 또는 사용자의 사용 환경에서 외부 전자 장치(예: 전자 장치(102 또는 104), 또는 서버(108))로부터 다운로드되거나 갱신 될 수 있다.
운영 체제(142)는 전자 장치(101)의 시스템 리소스 (예: 프로세스, 메모리, 또는 전원)를 제어(예: 할당 또는 회수)할 수 있다. 운영 체제(142)는, 추가적으로 또는 대체적으로, 전자 장치(101)의 다른 하드웨어 디바이스, 예를 들면, 입력 장치(150), 음향 출력 장치(155), 표시 장치(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 구동하기 위한 하나 이상의 드라이버 프로그램들을 포함할 수 있다.
미들 웨어(144)는 어플리케이션(146)이 전자 장치(101)의 하나 이상의 리소스들이 제공하는 기능 또는 정보를 사용할 수 있도록 다양한 기능들을 어플리케이션(146)으로 제공할 수 있다. 미들 웨어(144)는, 예를 들면, 어플리케이션 매니저(201), 윈도우 매니저(203), 멀티미디어 매니저(205), 리소스 매니저(207), 파워 매니저(209), 데이터베이스 매니저(211), 패키지 매니저(213), 커넥티비티 매니저(215), 노티피케이션 매니저(217), 로케이션 매니저(219), 그래픽 매니저(221), 시큐리티 매니저(223), 통화 매니저(225), 또는 음성 인식 매니저(227)를 포함할 수 있다. 어플리케이션 매니저(201)는, 예를 들면, 어플리케이션(146)의 생명 주기를 관리할 수 있다. 윈도우 매니저(203)는, 예를 들면, 화면에서 사용되는 GUI 자원을 관리할 수 있다. 멀티미디어 매니저(205)는, 예를 들면, 미디어 파일들의 재생에 필요한 포맷을 파악하고, 해당 포맷에 맞는 코덱을 이용하여 미디어 파일의 인코딩 또는 디코딩을 수행할 수 있다. 리소스 매니저(207)는, 예를 들면, 어플리케이션(146)의 소스 코드 또는 메모리의 공간을 관리할 수 있다. 파워 매니저(209)는, 예를 들면, 배터리의 용량, 온도 또는 전원을 관리하고, 이 중 해당 정보를 이용하여 전자 장치(101)의 동작에 필요한 전력 정보를 결정 또는 제공할 수 있다. 일실시예에 따르면, 파워 매니저(209)는 바이오스(BIOS: basic input/output system)와 연동할 수 있다.
데이터베이스 매니저(211)는, 예를 들면, 어플리케이션(146)에서 사용될 데이터베이스를 생성, 검색, 또는 변경할 수 있다. 패키지 매니저(213)는, 예를 들면, 패키지 파일의 형태로 배포되는 어플리케이션의 설치 또는 갱신을 관리할 수 있다. 커넥티비티 매니저(215)는, 예를 들면, 전자 장치(101)와 외부 전자 장치 간의 무선 또는 유선 연결을 관리할 수 있다. 노티피케이션 매니저(217)는, 예를 들면, 발생된 이벤트(예: 통화, 메시지, 또는 알람)를 사용자에게 알리기 위한 기능을 제공할 수 있다. 로케이션 매니저(219)는, 예를 들면, 전자 장치(101)의 위치 정보를 관리할 수 있다. 그래픽 매니저(221)는, 예를 들면, 사용자에게 제공될 그래픽 효과 또는 이와 관련된 사용자 인터페이스를 관리할 수 있다. 시큐리티 매니저(223)는, 예를 들면, 시스템 보안 또는 사용자 인증을 제공할 수 있다. 통화(telephony) 매니저(225)는, 예를 들면, 전자 장치(101)의 음성 통화 또는 영상 통화 기능을 관리할 수 있다. 음성 인식 매니저(227)는, 예를 들면, 사용자의 음성 데이터를 서버(108)로 전송하고, 해당 음성 데이터에 기반하여 전자 장치(101)에서 수행될 기능에 대응하는 명령어(command) 또는 해당 음성 데이터에 기반하여 변환된 문자 데이터를 수신할 수 있다. 일 실시예에 따르면, 미들 웨어(244)는 동적으로 기존의 구성요소를 일부 삭제하거나 새로운 구성요소들을 추가할 수 있다. 일 실시예에 따르면, 미들 웨어(144)의 적어도 일부는 운영 체제(142)의 일부로 포함되거나, 또는 운영 체제(142)와는 별도의 소프트웨어로 구현될 수 있다.
어플리케이션(146)은, 예를 들면, 홈(251), 다이얼러(253), SMS/MMS(255), IM(instant message)(257), 브라우저(259), 카메라(261), 알람(263), 컨택트(265), 음성 인식(267), 이메일(269), 달력(271), 미디어 플레이어(273), 앨범(275), 와치(277), 헬스(279)(예: 운동량 또는 혈당 등을 측정), 또는 환경 정보(281)(예: 기압, 습도, 또는 온도 정보) 어플리케이션을 포함할 수 있다. 일실시예에 따르면, 어플리케이션(146)은 전자 장치(101)와 외부 전자 장치 사이의 정보 교환을 지원할 수 있는 정보 교환 어플리케이션(미도시)을 더 포함할 수 있다. 정보 교환 어플리케이션은, 예를 들면, 외부 전자 장치로 지정된 정보 (예: 통화, 메시지, 또는 알람)를 전달하기 위한 노티피케이션 릴레이 어플리케이션, 또는 외부 전자 장치를 관리하기 위한 장치 관리 어플리케이션을 포함할 수 있다. 노티피케이션 릴레이 어플리케이션은, 예를 들면, 전자 장치(101)의 다른 어플리케이션(예: 이메일 어플리케이션(269))에서 발생된 이벤트(예: 메일 수신)에 대응하는 알림 정보를 외부 전자 장치로 전달하거나, 또는 외부 전자 장치로부터 알림 정보를 수신하여 전자 장치(101)의 사용자에게 제공할 수 있다. 장치 관리 어플리케이션은, 예를 들면, 전자 장치(101)와 통신하는 외부 전자 장치 또는 그 일부 구성 요소(예: 표시 장치(160) 또는 카메라 모듈(180))의 전원(예: 턴-온 또는 턴-오프) 또는 기능(예: 표시 장치(160) 또는 카메라 모듈(180)의 밝기, 해상도, 또는 포커스)을 제어할 수 있다. 장치 관리 어플리케이션은, 추가적으로 또는 대체적으로, 외부 전자 장치에서 동작하는 어플리케이션의 설치, 삭제, 또는 갱신을 지원할 수 있다.
도 3은 일 실시예에 따른 서버 장치 및 복수의 전자 장치를 간략히 도시한 것이다.
도 3을 참조하면, 서버 장치(400)는 네트워크를 통해 복수의 전자 장치(300)와 연결될 수 있다. 전자 장치(300)는 스마트 폰, 태블릿 PC, 랩탑 PC와 같은 장치일 수 있으며, 그 종류에는 정함이 없다. 전자 장치(300)는 도 1의 전자 장치(101)의 구성 및/또는 기능 중 적어도 일부를 포함할 수 있다.
일 실시예에 따르면, 전자 장치(300)는 다양한 어플리케이션을 설치 및 실행할 수 있다. 예를 들어, 전자 장치(300)는 도 2의 어플리케이션(146) 중 적어도 일부를 실행할 수 있으며, 또한 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 다운로드 받아 설치한 적어도 하나의 어플리케이션을 실행할 수 있다. 전자 장치(300)는 포 그라운드 및 백 그라운드에서 복수의 어플리케이션을 동시에 실행할 수 있다.
일 실시예에 따르면, 전자 장치(300)가 특정 어플리케이션을 실행하는 경우, 실행된 어플리케이션은 전자 장치(300)의 리소스(resource)(또는 시스템 리소스)를 사용할 수 있다. 여기서, 어플리케이션이 사용하는 전자 장치(300)의 리소스는 CPU(central processing unit), 메모리, I/O(input/output), 스레드(thread), 팝업 윈도우(popup window), 가상 디스플레이(virtual display), 알림(notification), 펜딩 인텐트(pending intent)를 예로 들 수 있으며, 이에 한정되지는 않는다. 실행되는 어플리케이션에 따라 사용하는 리소스의 종류는 다를 수 있으며, 동일한 어플리케이션의 경우에도 동작 상태 및/또는 환경 설정에 따라 사용하는 리소스의 종류가 다를 수 있다.
일 실시예에 따르면, 전자 장치(300) 상에서 실행 중인 어플리케이션이 특정 리소스를 과다하게 사용하는 경우, 이상 동작이 발생할 수 있다. 어플리케이션 스토어에 업로드 된 어플리케이션은 성능 및 안정성을 담보하지 않으며, 일부 어플리케이션은 일부 리소스를 과다하게 사용하는 이상 동작을 발생할 수 있다. 또한, 전자 장치(300)마다 하드웨어 성능 및 환경 설정이 상이하기 때문에, 대부분 전자 장치(300) 상에서 잘 동작하는 어플리케이션도 일부 전자 장치(300)에서 이상 동작을 발생시킬 수 있다.
일 실시예에 따르면, 서버 장치(400)는 복수의 전자 장치(300)로부터 리소스 사용량 정보를 수신하고, 수신된 리소스 사용량 정보를 리소스 사용 데이터 세트에 누적 저장하고, 누적 저장된 리소스 사용 데이터 세트에 기초하여, 이상치 임계 값을 계산할 수 있다. 예를 들어, 전자 장치(300)가 특정 어플리케이션을 실행하는 경우, 적어도 하나의 리소스를 사용하게 되며, 실행된 어플리케이션 및 사용된 적어도 하나의 리소스의 사용량을 맵핑하여 저장할 수 있다. 전자 장치(300)는 어플리케이션이 리소스를 사용하는 경우마다 및/또는 서버 장치(400)로부터 요청을 수신하는 경우, 리소스 사용량 정보를 서버 장치(400)로 전송할 수 있다.
일 실시예에 따르면, 서버 장치(400)는 여러 전자 장치(300)의 리소스 사용량 정보를 포함하는 리소스 사용 데이터 세트에 대해 통계적 분석을 이용하여, 이상치 임계 값을 계산할 수 있다. 서버 장치(400)는 각각의 어플리케이션 및 각각의 리소스에 대해 이상치 임계 값을 결정할 수 있다. 예를 들어, SNS 어플리케이션의 CPU 사용량, 메모리 사용량, pending intent 생성 개수 각각에 대해 통계적 분석을 통해 이상치 임계 값을 결정할 수 있다. 서버 장치(400)는 통계적 분석 시, IQR(inter quartile range) 및/또는 표준 편차(standard deviation)를 이용하여, 일반적인 사용량에 대비하여 오차가 큰 값을 이상치 임계 값으로 설정할 수 있다.
일 실시예에 따르면, 서버 장치(400)는 계산된 이상치 임계 값을 각 전자 장치(300)에 제공할 수 있다. 전자 장치(300)는 서버 장치(400)로부터 수신한 이상치 임계 값으로 기 저장된 이상치 임계 값을 업데이트 할 수 있다. 전자 장치(300)는 특정 어플리케이션의 실행 시, 적어도 하나의 리소스의 사용량을 확인하고, 각각의 리소스의 사용량이 각 리소스의 이상치 임계 값 이상인지 확인할 수 있다. 예를 들어, SNS 어플리케이션이 실행되는 경우, CPU 사용량을 CPU 사용량의 이상치 임계 값과 비교하고, 메모리 사용량을 메모리 사용량의 이상치 임계 값과 비교하고, 및 pending intent 생성 개수를 pending intent 생성 개수의 이상치 임계 값과 비교할 수 있다.
일 실시예에 따르면, 전자 장치(300)는 어플리케이션의 실행 시 사용되는 특정 리소스의 사용량이 이상치 임계 값 이상인 경우, 해당 어플리케이션의 실행으로 인해 이상 동작이 발생한 것으로 결정할 수 있다. 전자 장치(300)는 이상 동작이 발생한 것으로 결정되는 경우, 사용자에게 피드백을 제공하거나, 해당 어플리케이션을 강제 종료하거나, 및/또는 해당 어플리케이션을 삭제할 수 있다.
일 실시예에 따르면, 이상치 임계 값을 결정하는 동작은 서버 장치(400)가 아닌 각각의 전자 장치(300)에 의해 수행될 수도 있다. 예를 들어, 전자 장치(300)는 메모리에 리소스 사용 데이터 세트를 저장하고, 각각의 어플리케이션이 실행되는 경우, 리소스 사용량 정보를 리소스 사용 데이터 세트에 기록할 수 있다. 전자 장치(300)는 리소스 사용 데이터 세트에 충분한 데이터가 수집되는 경우, 및/또는 정해진 주기마다, 통계적 분석을 통해 각 어플리케이션의 각 리소스에 대한 이상치 임계 값을 결정할 수 있다.
본 문서에서는, 서버 장치(400)가 이상치 임계 값을 결정하는 실시예를 제1실시예로, 각 전자 장치(300)가 이상치 임계 값을 결정하는 실시예를 제2실시예로 지칭할 수 있다. 이하에서는 도 4 내지 도 10을 통해 제1실시예에 대해 설명하고, 도 11 내지 도 13을 통해 제2실시예에 대해 설명하기로 한다. 각 실시예에서 중복되거나, 다른 실시예의 내용으로부터 유추 가능한 내용은 그 설명을 생략할 수도 있다.
도 4는 일 실시예에 따른 서버 장치의 블록도이다.
도 4를 참조하면, 서버 장치(400)는 통신 인터페이스(430), 프로세서(410) 및 메모리(420)를 포함할 수 있다. 도시된 구성 중 일부가 생략 또는 치환되더라도 본 문서의 다양한 실시예들을 구현할 수 있다.
일 실시예에 따르면, 통신 인터페이스(430)는 네트워크를 통한 다양한 전자 장치(예: 도 3의 전자 장치(300))와의 통신을 지원할 수 있다. 통신 인터페이스(430)는 HTTP(hypertext transfer protocol), REST(representational state transfer), MQTT(message queuing telemetry transport), 소켓(socket)과 같은 다양한 인터페이스를 제공할 수 있다. 서버 장치(400)는 통신 인터페이스(430)를 통해 전자 장치에 리소스 사용량 정보의 전송을 요청하고, 전자 장치로부터 리소스 사용량 정보를 수신할 수 있다.
일 실시예에 따르면, 메모리(420)는 다양한 데이터를 일시적 또는 비일시적으로 저장할 수 있다. 메모리(420)는 RAM(random access memory), 가상 메모리, 캐시 메모리, 및/또는 플래시 메모리와 같은 다양한 종류의 메모리들을 포함할 수 있다. 메모리(420)는 서버 장치(400)(또는 프로세서(410))에 의해 실행될 수 있는 다양한 인스트럭션(instructions)들을 저장할 수 있다.
일 실시예에 따르면, 메모리(420)는 복수의 전자 장치로부터 수신한 리소스 사용량 정보를 누적하여 저장하는 리소스 사용 데이터 세트를 저장할 수 있다. 리소스 사용 데이터 세트는 각각의 어플리케이션과 각각의 리소스의 사용량 정보를 맵핑해서 저장할 수 있다. 리소스 사용 데이터 세트는 전자 장치로부터 수신한 리소스 사용량의 RAW_DATA를 누적 저장하는 RAW_DATA set를 포함하며, 추가적으로, 리소스 사용량과 관련된 COUNT, SUM, SQUARE_SUM 및 FREQUENCY_TABLE과 같은 데이터를 누적 저장하는 COUNT set, SUM set, SQUARE_SUM set 및 FREQUENCY_TABLE set를 더 포함할 수 있다.
일 실시예에 따르면, 프로세서(410)는 서버 장치(400)의 각 구성 요소들의 제어 및/또는 통신에 관한 연산이나 데이터 처리를 수행할 수 있는 구성으로써, 하나 이상의 프로세서들로 구성될 수 있다. 후술할 프로세서(410)(또는 서버 장치(400))의 동작들은 메모리(420)에 저장된 인스트럭션들을 실행함으로써 수행될 수 있다.
일 실시예에 따르면, 프로세서(410)는 전자 장치로부터 수신한 리소스 사용 정보를 리소스 사용 데이터 세트에 저장하는 동작 및 리소스 사용 데이터 세트에 저장된 데이터로부터 이상치 임계 값을 생성하는 동작을 수행하기 위한 다양한 서버 프로세스 또는 스레드들을 실행할 수 있다.
일 실시예에 따르면, 프로세서(410)는 통신 인터페이스(430)를 통해 전자 장치에 리소스 사용량 정보의 전송을 요청할 수 있다. 예를 들어, 프로세서(410)는 정해진 주기마다, 또는 리소스 사용 데이터 세트에 누적 기록된 데이터의 양에 기초하여 각각의 전자 장치에 리소스 사용량 정보의 전송을 요청할 수 있다.
일 실시예에 따르면, 프로세서(410)는 통신 인터페이스(430)를 통해 전자 장치로부터 리소스 사용량 정보가 수신되는 경우, 이를 메모리(420)의 리소스 사용 데이터 세트에 저장할 수 있다. 리소스 사용 데이터 세트에 누적 저장되는 데이터의 구조에 대해서는 도 6을 통해 보다 상세히 설명하기로 한다.
일 실시예에 따르면, 프로세서(410)는 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 특정 어플리케이션 및 특정 어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정할 수 있다. 프로세서(410)는 복수의 어플리케이션 각각에 대해 리소스 각각에 대응하는 이상치 임계 값을 결정하는 동작을 수행할 수 있다. i개의 어플리케이션 및 j개의 리소스에 대한 이상치 임계 값을 구하는 경우, App0의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산하고, App1의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산하고, ... , Appi의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산할 수 있다.
일 실시예에 따르면, 프로세서(410)는 리소스 사용 데이터 세트의 특정 어플리케이션 및 특정 리소스의 데이터에 대하여, 정규성을 검증할 수 있다. 여기서, 정규성 검증은 Kolmogorov-Smirnov test, Shapiro-Wilk test, 및/또는 왜도, 첨도, 표준 오차 검증에 기초할 수 있으며, 이에 한정되지는 않는다.
일 실시예에 따르면, 프로세서(410)는 특정 리소스의 리소스 사용 데이터 세트의 데이터가 정규 분포를 따르는 경우, 해당 데이터들의 평균 및 표준 편차를 계산할 수 있다. 프로세서(410)는 표준 편차 및 해당 리소스에 대해 미리 정해진 가중치(예: w1)에 기초하여 이상치 임계 값을 결정할 수 있다. 예를 들어, 프로세서(410)는 표준 편차와 가중치의 곱으로 이상치 임계 값을 결정할 수 있다. 여기서, 가중치 w1은 각 리소스 별로 서로 다른 값으로 결정될 수 있다.
일 실시예에 따르면, 프로세서(410)는 특정 리소스의 리소스 사용 데이터 세트의 데이터가 정규 분포를 따르지 않는 경우, IQR(inter quartile range)을 계산하고, IQR 및 해당 리소스에 대해 미리 정해진 가중치에 기초하여 이상치 임계 값을 결정할 수 있다. 여기서, IQR은 각 데이터를 그 값에 따라 순차적으로(예: 오름차순으로) 정렬한 후, 하위 25%에 해당하는 데이터와 상위 25%에 해당하는 데이터 사이의 차이로 결정될 수 있다. 프로세서(410)는 Q3 값과 Q1 값을 구한 후 그 차이로 IQR을 구할 수 있다. 프로세서(410)는 IQR과 가중치(예: w2)를 곱한 값을 Q3 값에 더한 값을 이상치 임계 값으로 결정할 수 있다. 여기서, 가중치 w2는 각 리소스 별로 서로 다른 값으로 결정될 수 있다.
일 실시예에 따르면, 프로세서(410)는 데이터에 대한 정규성 검증 없이, 모든 데이터에 대해 IQR 및 가중치 w2에 기초하여 이상치 임계 값을 계산할 수도 있다.
일 실시예에 따르면, 프로세서(410)는 계산된 이상치 임계 값을 통신 인터페이스(430)를 통해 각각의 전자 장치로 전송할 수 있다. 전자 장치는 수신한 이상치 임계 값을 저장하고, 어플리케이션의 실행 시 사용된 각 리소스의 사용량을 각 이상치 임계 값과 비교하여, 이상 동작 여부를 결정할 수 있다.
도 5는 일 실시예에 따른 서버 장치 및 전자 장치에서 실행되는 프로세스의 블록도이다.
일 실시예에 따르면, 서버 장치(예: 도 3 및 도 4의 서버 장치(400))에서 실행되는 서버 프로세스(450)는 이상치 임계 값 계산기(outlier threshold calculator)(470)를 포함하고, 이상치 임계 값 계산기(470)는 서버 장치의 메모리(예: 도 4의 메모리(420))에 저장된 리소스 사용 데이터 세트(460)에 액세스 할 수 있다.
일 실시예에 따르면, 전자 장치(예: 도 3의 전자 장치(300))에서 실행되는 전자 장치 프로세스(350)는 리소스 생성기(resource generator)(360) 및 리소스 매니저 데몬(resource manager daemon)(370)을 포함할 수 있다.
일 실시예에 따르면, 리소스 생성기(360)는 어플리케이션이 실행되어 적어도 하나의 리소스를 사용하는 경우, 어플리케이션의 리소스 사용에 대응하는 이벤트를 생성하여, 리소스 매니저 데몬(370)으로 전달할 수 있다. 리소스 생성기(360)는 클래스(예: ResEvt.class(.java))(361), JNI(java native interface) 라이브러리(예: ResEvt JNI library(.cpp))(362) 및/또는 SO(shared object)(예: LibresEvt.so)(363) 형태로 제공될 수 있다. 리소스 생성기(360)는 시스템 프로세스의 일부로 실행될 수 있으며, 시스템 프로세스에서 리소스를 이용 중인 상황을 플러그-인(plug-in)을 통해 이벤트로 생성하여 리소스 매니저 데몬(370)으로 전달할 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(370)은 리소스 사용 통계(371)를 기록하고, 이상치 임계 값(372)을 관리할 수 있다. 리소스 매니저 데몬(370)에서 리소스 생성기(360)로부터 어플리케이션 및 리소스 사용량 정보를 수신하고, 이를 리소스 사용 통계(371)에 기록할 수 있다. 리소스 사용 통계(371)에는 복수의 어플리케이션 및 각 어플리케이션이 사용한 각각의 리소스의 사용량 정보가 테이블 형태로 저장될 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(370)은 리소스 생성기(360)로부터 이벤트를 수신하는 경우, 각각의 리소스 사용량을 각 리소스에 대응하는 이상치 임계 값과 비교할 수 있다. 비교 결과, 해당 이벤트의 어플리케이션이 특정 리소스를 이상치 임계 값 이상으로 사용한 것으로 확인되는 경우, 리소스 매니저 데몬(370)은 해당 어플리케이션이 리소스를 과다 사용하여 이상 동작하는 것으로 결정할 수 있다. 이 경우, 리소스 매니저 데몬(370)은 해당 이벤트에 포함된 각 리소스의 사용량 정보를 리소스 사용 통계(371)에 기록하지 않을 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(370)은 서버 장치로부터 데이터 전송 요청이 있는 경우, 및/또는 어플리케이션의 리소스 사용 이벤트가 전달될 때마다, 리소스 사용 통계에 누적 저장된 리소스 사용량 통계(371)를 서버 장치로 전송할 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(370)은 특정 어플리케이션이 이상 동작하는 것으로 결정하는 경우, 해당 어플리케이션의 동작을 중지하고(또는 실행을 종료하고), 리소스를 회수할 수 있다. 리소스 매니저 데몬(370)은 해당 어플리케이션의 동작을 중지한 후 출력 장치(예: 디스플레이, 스피커, 햅틱)를 통해 사용자에게 이상 동작을 지시하는 알림을 제공하고, 해당 어플리케이션을 재시작 하도록 유도할 수 있다. 리소스 매니저 데몬(370)은 해당 어플리케이션의 재시작 이후에도 리소스를 과다하게 사용하는 문제가 기준 횟수 이상으로 반복해서 발생하는 경우, 출력 장치를 통해 사용자에게 해당 어플리케이션의 삭제를 유도하는 사용자 인터페이스를 제공할 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(370)은 서버 장치로부터 수신한 이상치 임계 값을 저장하고, 서버 장치로부터 새로운 이상치 임계 값이 수신되는 경우 미리 저장된 이상치 임계 값(372)을 업데이트 할 수 있다.
일 실시예에 따르면, 서버 장치는 전자 장치로부터 리소스 사용량 정보가 수신되는 경우, 리소스 사용 데이터 세트(460)에 저장할 수 있다. 리소스 사용 데이터 세트(460)는 복수의 전자 장치로부터 획득된 리소스 사용량 정보를 누적해서 저장할 수 있으며, 각각의 어플리케이션과 각각의 리소스의 사용량 정보를 맵핑해서 저장할 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(470)는 리소스 사용 데이터 세트(460)에 기초하여, 미리 정해진 통계적 분석을 통해 특정 어플리케이션 및 특정 어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정할 수 있다. 이상치 임계 값 계산기(470)는 복수의 어플리케이션 각각에 대해 리소스 각각에 대응하는 이상치 임계 값을 결정하는 동작을 수행할 수 있다. 예를 들어, i개의 어플리케이션 및 j개의 리소스에 대한 이상치 임계 값을 구하는 경우, App0의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산하고, App1의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산하고, ... , Appi의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산할 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(470)는 특정 어플리케이션의 특정 리소스의 사용량 데이터의 정규성을 테스트하여, 정규 분포를 따르는 지 여부를 확인할 수 있다. 데이터가 정규 분포를 따르는 경우, 이상치 임계 값 계산기(470)는 표준 편차를 계산하고, 표준 편차 및 미리 정해진 가중치에 기초하여 이상치 임계 값을 계산할 수 있다. 데이터가 정규 분포를 따르지 않는 경우, 이상치 임계 값 계산기(470)는 IQR(inter quartile range)를 계산하고, IQR 및 미리 정해진 가중치에 기초하여 이상치 임계 값을 계산할 수 있다.
도 6은 일 실시예에 따른 리소스 사용 데이터 세트를 도시한 것이다.
일 실시예에 따르면, 서버 장치는 복수의 전자 장치로부터 수신되는 리소스 사용량 정보를 리소스 사용 데이터 세트(460)에 누적해서 저장할 수 있다. 도 6은 각 전자 장치에서 실행되는 어플리케이션이 사용하는 리소스의 사용 통계를 모으기 위한 리소스 사용 데이터 세트(460)의 자료 구조를 도시하고 있다.
도 6을 참조하면, 리소스 사용 데이터 세트(460)의 각 행은 전자 장치 상에서 실행될 수 있는 복수의 어플리케이션을 나타내고, 각 열은 각 어플리케이션이 사용할 수 있는 리소스(resource)를 나타낼 수 있다. 예를 들어, 어플리케이션들은 SNS 어플리케이션, 멀티 미디어 어플리케이션, 또는 게임 어플리케이션과 같이, 어플리케이션 스토어에서 제공되는 어플리케이션을 포함할 수 있으며, 리소스들은 어플리케이션의 실행 시 사용될 수 있는 시스템 리소스로써, CPU(central processing unit) 사용량, 메모리 사용량, I/O 사용량, 스레드 생성 개수, 팝업 윈도우 생성 개수, 가상 디스플레이 생성 개수, 알림(notification) 발생 횟수, 펜딩 인텐트(pending intent) 생성 개수를 예로 들 수 있다. 어플리케이션 및 리소스의 예는 상기 예시에 한정되지 않는다.
도 6을 참조하면, 특정 어플리케이션(예: App5)의 특정 리소스(예: 리소스 1)에 대해 맵핑되어 저장된 리소스 사용량 데이터(465)는 보다 상세히 도시되어 있다. App5 및 리소스1의 리소스 사용량 데이터는 특정 전자 장치에서 App5의 실행 시 리소스1의 사용량을 획득하여 누적 기록한 것일 수 있다.
특정 어플리케이션 및 특정 리소스에 대해 기록된 리소스 사용량 데이터(465)는 SUM, COUNT, SQUARE_SUM, FREQUENCY_TABLE, RAW_DATA를 포함할 수 있다.
여기서, xk는 어플리케이션이 사용한 리소스의 크기이고, N은 어플리케이션이 자원을 요청한 횟수 또는 샘플의 개수 일 수 있다. RAW_DATA는 xk의 집합일 수 있으며, FREQUENCY_TABLE은 xk의 계급(또는 구간) 및 계급별 도수를 저장하는 자료 구조일 수 있다. COUNT, SUM, SQUARE_SUM은 아래의 식 1, 식 2 및 식 3과 같이 계산될 수 있다.
식 1과 같이 COUNT는 N과 동일하고, 식 2와 같이 SUM은 해당 어플리케이션이 사용한 리소스의 크기의 합으로 계산될 수 있다. 식 3과 같이 SQUARE_SUM은 해당 어플리케이션이 사용한 리소스의 크기의 제곱의 합으로 계산될 수 있다.
일 실시예에 따르면, 서버 장치는 특정 어플리케이션 및 특정 리소스에 대해 여러 전자 장치로부터 수신한 데이터를 누적하여 리소스 사용 데이터 세트(460)에 저장할 수 있다. 예를 들어, 서버 장치는 k개의 전자 장치의 리소스 사용량과 관련된 COUNT, SUM, SQUARE_SUM 및 FREQUENCY_TABLE 값을 합산하여 각각 COUNT set, SUM set, SQUARE_SUM set, FREQUENCY_TABLE set로 아래의 식 4 내지 식 7과 같이 계산할 수 있다.
식 5와 같이, SUM set는 k개의 전자 장치에서 실행 어플리케이션이 사용한 리소스의 크기의 합으로 계산될 수 있다. 식 6과 같이, SQUARE_SUM set는 k개의 전자 장치 각각에서 해당 어플리케이션이 사용한 리소스의 크기의 제곱을 합한 값으로 계산될 수 있다. 식 7과 같이, FREQUENCY_TABLE set의 i번째 계급(또는 구간)의 도수는 k개의 전자 장치 각각에서 리소스 사용량이 해당 계급에 속하는 도수를 합한 값으로 계산될 수 있다. RAW_DATA set는 서버 프로세스에서 정규성 테스트를 위한 것으로, 각각의 전자 장치에 설치된 어플리케이션이 사용한 리소스 사용량 정보의 전체 또는 일부를 샘플링 한 자료인 RAW_DATA를 합산한 것일 수 있다.
표 1은 복수의 전자 장치로부터 App5(예: SNS 어플리케이션) 및 리소스1(예: pending intent)에 대해 수집한 리소스 사용량 정보 세트를 나타낸 것이다.
| COUNT | SUM | SQUARE_SUM | RAW_DATA | FREQUENCY_TABLE |
|||||||
| 30~ | 40~ | 50~ | 60~ | 70~ | 80~ | 90~ | |||||
| Terminal 1 | 5 | 316 | 22462 | 33 52 98 56 77 | 1 | 0 | 2 | 0 | 1 | 0 | 1 |
| Terminal 2 | 5 | 332 | 24762 | 53 96 32 88 63 | 1 | 0 | 1 | 1 | 0 | 1 | 1 |
| Terminal 3 | 5 | 286 | 17746 | 83 38 68 42 55 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
| Terminal 4 | 5 | 262 | 15768 | 61 31 86 51 33 | 2 | 0 | 1 | 1 | 0 | 1 | 0 |
| Terminal 5 | 5 | 282 | 17152 | 81 53 34 65 49 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
| Terminal 6 | 4 | 224 | 13502 | 79 58 51 36 | 1 | 0 | 2 | 0 | 1 | 0 | 0 |
서버 장치는 표 1과 같이 리소스 사용량 정보가 수신되는 경우, 각 전자 장치의 리소스 사용량 정보를 아래의 표 2와 같이 합산할 수 있다.
| COUNT set |
SUM set |
SQUARE_SUM set |
RAW_DATA set |
FREQUENCY_TABLE set |
|||||||
| 30~ | 40~ | 50~ | 60~ | 70~ | 80~ | 90~ | |||||
| SERVER | 29 | 1702 | 111392 | 33 52 98 56 77 53 96 32 88 63 83 38 68 42 55 61 31 86 51 33 81 53 34 65 49 79 58 51 36 |
7 | 2 | 8 | 4 | 2 | 4 | 2 |
서버 장치는 표 2와 같이 합산된 COUNT set, SUM set, SQUARE_SUM set, RAW_DATA set 및 FREQUENCY_TABLE set를 리소스 사용 데이터 세트(460)에 저장할 수 있다.
일 실시예에 따르면, 각각의 전자 장치는 특정 어플리케이션이 사용하는 특정 리소스에 대해 리소스 사용량 정보(예: RAW_DATA)만 서버 장치로 전송할 수 있으며, 이 경우 서버 장치는 수신한 RAW_DATA에 기반하여 해당 전자 장치의 COUNT, SUM, SQUARE_SUM, FREQUENCY TABLE과 같은 데이터를 계산할 수 있다. 다른 실시예에 따르면, 각각의 전자 장치는 특정 어플리케이션이 사용하는 특정 리소스에 대해 리소스 사용량 정보를 획득한 후, COUNT, SUM, SQUARE_SUM, FREQUENCY TABLE과 같은 데이터를 계산하여 서버 장치에 전송할 수 있다.
도 7은 일 실시예에 따른 서버 장치 및 전자 장치에서 실행되는 프로세스의 블록도이다.
일 실시예에 따르면, 서버 프로세스(450)에서 리소스 사용 데이터 세트(460)는 다양한 전자 장치로부터 수신한 리소스 사용량 정보를 누적하여 저장할 수 있다. 서버 장치에서 저장하는 리소스 사용 데이터 세트(460)에 대해서는 도 6을 통해 상세히 설명한 바 있다.
일 실시예에 따르면, 서버 프로세스(450)는 메모리(예: 도 4의 메모리(420))에 저장된 리소스 사용 데이터 세트(460)에 기초하여, 미리 정해진 통계적 분석을 통해 특정 어플리케이션 및 특정 어플리케이션이 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정할 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(460)는 리소스 사용 데이터 세트(460)에 저장된 리소스 사용량 정보 중 적어도 일부에 대해, 정규성 테스트(normality test)(472)를 수행하여, 해당 리소스 사용량 정보가 정규성을 갖는 지 확인할 수 있다. 이상치 임계 값 계산기(460)는 리소스 사용량 정보가 정규성을 갖는 경우, 표준 편차를 계산하고 각 리소스 사용량 정보의 평균, 표준 편차 및 해당 리소스에 대해 미리 정해진 가중치에 기초하여 이상치 임계 값을 결정할 수 있다(473). 또한, 이상치 임계 값 계산기(460)는 리소스 사용량 정보가 정규성을 갖지 않는 경우, IQR(inter quartile range)을 계산하고, IQR 및 해당 리소스에 대해 미리 정해진 가중치에 기초하여 이상치 임계 값을 결정할 수 있다(474).
일 실시예에 따르면, 이상치 임계 값 계산기(460)는 전자 장치의 리소스 매니저 데몬(370)에서 전송되는 각 어플리케이션의 각각의 리소스 사용량 통계(371)를 수집하고, 리소스 사용 데이터 세트(460)에 누적해서 저장할 수 있다. 예를 들어, 서버 장치는 정해진 주기에 따라 전자 장치에 리소스 사용량 정보를 전송하도록 요청하거나, 또는 전자 장치는 어플리케이션의 실행에 따른 리소스 사용 이벤트가 발생할 때마다 서버 장치에 리소스 사용량 정보를 전송할 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(460)는 복수의 전자 장치로부터 수집한 특정 어플리케이션이 사용하는 특정 리소스의 통계 정보(예: SUM set, COUNT set, SQUARE_SUM set, FREQUNCY_TABLE set)를 이용하여 통계 값을 구하고, 정규성을 검정(472)할 수 있다. 여기서, 정규성 검증은 Kolmogorov-Smirnov test, Shapiro-Wilk test, 및/또는 왜도, 첨도, 표준 오차 검증에 기초할 수 있으며, 이에 한정되지는 않는다.
일 실시예에 따르면, 이상치 임계 값 계산기(460)는 데이터가 정규성을 갖는 경우, 표준 편차를 계산할 수 있다. 예를 들어, 표 2의 RAW_DATA에 포함된 29개 수치가 정규성을 갖는 경우, 29개 수치의 평균 및 표준 편차를 계산할 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(460)는 계산된 표준 편차(SD) 및 해당 리소스에 대해 미리 정해진 가중치(w1)에 기초하여 이상치 임계 값(outlier threshold)을 결정할 수 있다. 예를 들어, 리소스 사용량 정보가 정규성을 갖는 경우, 이상치 임계 값은 아래의 식 8과 같이 계산될 수 있다.
[수학식 8]
AVG = SUM set / COUNT set
Outlier threshold = AVG + SD * w1
여기서, AVG는 리소스 사용 데이터 세트에 기록된 각각의 리소스 사용량의 평균으로써, 기록된 SUM set에서 COUNT set를 나눈 값으로 계산될 수 있다. 가중치 w1은 각각의 리소스 별로 서로 다른 값으로 결정될 수 있다.
일 실시예에 따르면, 가중치 임계 값 계산기(460)는 데이터가 정규성을 갖는 경우, IQR(inter quartile range)을 계산할 수 있다. 여기서, IQR은 각 데이터를 그 값에 따라 순차적으로(예: 오름차순으로) 정렬한 후, 하위 25%에 해당하는 데이터와 상위 25%에 해당하는 데이터 사이의 차이로 결정될 수 있다.
아래의 표 3은 특정 어플리케이션의 특정 리소스 사용량에 대한 FREQUENCY_TABLE set를 도수 분포표로 나타낸 것이다.
| 계급 구간 | 도수 | 누적 도수 |
| 30 - 40 | 7 | 7 |
| 40 - 50 | 2 | 9 |
| 50 - 60 | 8 | 17 |
| 60 - 70 | 4 | 21 |
| 70 - 80 | 2 | 23 |
| 80 - 90 | 4 | 27 |
| 90 - 100 | 2 | 29 |
| 계 | 29 |
상기 표 3의 데이터에서 오름차순으로 데이터를 정렬한 후 하위 25%의 데이터의 순번에 해당하는 Q1 index 및 상위 25%의 데이터의 순번에 해당하는 Q3 index는 다음의 식 9 및 식 10과 같이 계산될 수 있다.
[수학식 9]
Q1 index = (29+1) * 1/4 ≒ 7
[수학식 10]
Q3 index = (29+1) *3/4 ≒ 22
또한, 하위 25%의 데이터의 값에 해당하는 Q1 값 및 상위 25%의 데이터의 값에 해하는 Q3 값은 다음의 식 11과 같이 계산될 수 있다.
[수학식 11]
Q1 value = 30 + (40-30) * (Q1 index - 0) / 7 = 40
Q3 value = 70 + (80-70) * (Q3 index - 21) / 2 = 75
상기 표 3의 예에서 Q1 값 및 Q3 값은 29개의 데이터를 오름차순으로 나열한 후 7번째 및 22번째 순서의 데이터를 찾는 것으로 구할 수 있다. 다만, 실제 서버 장치에서 획득하는 리소스 사용 데이터 세트(460)는 수많은 데이터를 포함하기 때문에, 모든 데이터를 오름차순으로 나열하여 각 순번에 맞는 데이터를 찾는 것이 연산 시간 측면에서 비효율적일 수 있다. 이에, 일 실시예에 따르면, 서버 장치는 식 11과 같은 방법으로, Q1 index, Q3 index가 속하는 계급(또는 구간)을 찾고, 해당 계급에서의 Q1 index, Q3 index의 순서를 보간법으로 유추하여, Q1 값 및 Q3 값을 계산할 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(460)는 IQR 및 해당 리소스에 대해 미리 정해진 가중치(w2)에 기초하여 이상치 임계 값을 계산할 수 있다. 식 12는 IQR에 기반하여 이상치 임계 값을 계산하는 수식이다.
[수학식 12]
Outlier threshold = Q3 + (Q3-Q1) * w2
상기 표 3의 예시에서 outlier threshold는 아래의 식 13과 같이 계산될 수 있다. 여기서, 가중치 w2는 1.5로 대입하였는데 이에 한정되지 않는다.
[수학식 13]
Outlier threshold = 75 + (75-40) * 1.5 = 127.5
앞에서 설명한 실시예에 따르면, 이상치 임계 값 계산기(460)는 리소스 사용 데이터 세트(460)의 데이터들이 정규성을 갖는 지 여부에 따라 이상치 임계 값을 계산하는 방법을 다르게 결정하였다. 다른 일 실시예에 따르면, 이상치 임계 값 계산기(460)는 정규성 테스트를 하지 않고, 모든 데이터에 대해 IQR에 기초하여 이상치 임계 값을 계산할 수도 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(460)는 리소스 사용 데이터 세트(460)에서 각각의 어플리케이션 및 이와 대응되는 각각의 리소스에 대해 이상치 임계 값을 계산할 수 있다. 예를 들어, 도 7에 도시된 바와 같이, A0 내지 Ai의 어플리케이션 및 R0 내지 Rj의 리소스 사용량이 리소스 사용 데이터 세트(460)에 기록된 경우, 이상치 임계 값 계산기(460)는 어플리케이션 Ai 및 리소스 Rj에 대응하는 이상치 임계 값 THij를 각각의 어플리케이션 및 리소스에 대해 계산할 수 있다. 이 경우, 일부 어플리케이션은 리소스 중 일부를 사용하지 않을 수 있는데, 이 경우 이상치 임계 값 계산기(460)는 해당 어플리케이션 및 리소스에 대응하는 이상치 임계 값을 제외하거나, 0 이하의 값(예: -1)로 기록할 수 있다.
도 8a 내지 8d는 일 실시예에 따른 전자 장치에서 리소스의 과다 사용으로 인한 이상 동작 감지 시 제공하는 UI를 도시한 것이다.
일 실시예에 따르면, 전자 장치(300)는 특정 어플리케이션이 실행되는 경우, 실행된 어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 이 중 특정 리소스의 사용량이 해당 어플리케이션 및 리소스에 대해 설정된 이상치 임계 값(outlier threshold) 이상인 경우, 상기 실행된 어플리케이션으로 인해 이상 동작이 발생한 것으로 결정할 수 있다.
일 실시예에 따르면, 전자 장치(300)는 이상 동작이 발생한 경우, 리소스를 과다 사용한 어플리케이션의 실행을 종료할 수 있다. 또한, 전자 장치(300)는 이상 동작이 발생된 어플리케이션을 지시하는 정보 및 임계 값을 초과하여 사용된 적어도 하나의 리소스를 지시하는 정보를 포함하는 알림을 출력 장치를 통해 제공할 수 있다. 여기서, 알림은 디스플레이 상에 시각적으로 제공되는 사용자 인터페이스, 햅틱을 이용한 진동 및 스피커를 이용한 오디오 정보 중 적어도 하나를 포함할 수 있다.
도 8a 내지 8d는 이상 동작 감지 시 디스플레이를 통해 제공하는 UI를 도시하고 있다.
일 실시예에 따르면, 전자 장치(300)는 특정 어플리케이션이 이상치 임계 값 이상으로 리소스를 과다 사용하여 이상 동작이 발생한 것으로 결정한 경우, 이상 동작을 지시하는 UI를 디스플레이 상에 표시할 수 있다. 예를 들어, 전자 장치(300)는 이상 동작을 지시하는 UI를 도 8a에 도시된 것처럼 화면 중앙 영역에 팝업 형태의 UI(810)로 표시하거나, 및/또는 도 8b에 도시된 것처럼 화면 상단에서 제공되는 상태 바(status bar) 상의 UI(820)를 통해 제공할 수 있다. 일 실시예에 따르면, 전자 장치(300)는 이상 동작을 발생시킨 어플리케이션을 강제로 종료하고, 이와 적어도 일부 동시에 도 8a 또는 도 8b와 같은 UI(810, 820)를 디스플레이를 통해 제공할 수 있다.
도 8a 또는 도 8b와 같은 UI(810, 820)에서 사용자가 상세 확인 버튼(811, 821)을 선택하는 경우, 전자 장치(300)는 도 8c에 도시된 바와 같은 과다 사용된 리소스를 지시하는 정보를 UI(830)를 통해 제공할 수 있다.
도 8c를 참조하면, 전자 장치(300)는 실행된 어플리케이션이 사용하는 리소스(예: pending intent, 팝업 윈도우(popup window), 가상 디스플레이(virtual display))의 정보를 제공하고, 이 중 이상치 임계 값 이상으로 사용된 리소스(예: pending intent)를 사용자가 인식할 수 있도록 제공할 수 있다.
일 실시예에 따르면, 전자 장치(300)는 특정 어플리케이션의 실행 시 이상 동작의 발생으로 인해 종료한 횟수가 기준 횟수(예: 3회) 이상인 경우, 사용자에게 피드백을 제공할 수 있다. 여기서, 피드백은 해당 어플리케이션의 삭제를 유도하는 정보를 포함할 수 있다.
도 8a 내지 8c와 같은 UI(810, 820, 830)가 표시된 상태에서 사용자가 정해진 버튼을 선택하거나, 및/또는 특정 어플리케이션의 이상 동작의 발생으로 인해 종료한 횟수가 기준 횟수 이상인 경우, 전자 장치(300)는 도 8d에 도시된 바와 같이, 어플리케이션의 삭제 여부를 선택할 수 있는 UI(840)를 디스플레이를 통해 제공할 수 있다. UI(840)가 표시된 상태에서 사용자가 확인(841)을 선택하는 경우, 전자 장치(300)는 해당 어플리케이션을 삭제할 수 있다.
도 9a 내지 도 9d는 일 실시예에 따른 일 실시예에 따른 전자 장치가 어플리케이션의 이상 동작을 감지하는 방법의 흐름도이다.
도 9a 내지 도 9d에 도시된 방법은 전자 장치의 프로세서(예: 도 1의 프로세서(120))에 의해 수행될 수 있으며, 예를 들어, 도시된 동작 중 적어도 일부는 도 5의 리소스 생성기(resource generator)(360) 및/또는 리소스 매니저 데몬(resource manager daemon)(370)에 의해 수행될 수 있다. 도시된 방법은 전자 장치(또는 전자 장치의 프로세서)에 의해 실행될 수 있는 인스트럭션들로 구현될 수 있다. 이러한 인스트럭션들은 컴퓨터로 판독 가능한 기록 매체(computer readable recording medium) 상에 저장될 수 있다.
도 9a는 전자 장치가 리소스 매니저 데몬을 초기화 한 후 이상치 임계 값을 획득하여 업데이트 하는 방법을 도시하고 있다.
일 실시예에 따르면, 동작 902에서, 전자 장치는 리소스 매니저 데몬을 초기화 할 수 있다. 리소스 매니저 데몬은 어플리케이션의 실행 시 사용되는 적어도 하나의 리소스의 사용량 정보를 기록하고, 각 어플리케이션 및 각 리소스에 대응하는 이상치 임계 값을 관리할 수 있다.
일 실시예에 따르면, 동작 904에서, 전자 장치는 이상치 임계 값을 0보다 작은 값(예: -1)으로 설정할 수 있다. 여기서, 이상치 임계 값을 0보다 작은 값으로 초기화 하는 이유는 특정 어플리케이션이 특정 리소스를 사용한 정보에 대한 통계적인 이상치를 구하기 이전의 상황이므로, 이상치 임계 값을 음수로 설정하여 어플리케이션의 실행 시 이상 동작으로 판단하지 않도록 하기 위함 일 수 있다. 일 실시예에 따르면, 전자 장치는 특정 어플리케이션이 실행되어 리소스를 사용 시, 해당 리소스에 대해 이상치 임계 값이 0보다 작은 값으로 설정되어 있는 상황인 경우, 해당 리소스의 사용량과 무관하게 이상 동작이 아닌 것으로 판단할 수 있다. 다른 일 실시예에 따르면, 전자 장치는 리소스 매니저 데몬의 초기화 과정에서 이상치 임계 값을 0보다 작은 값이 아닌 통계적으로 무의미한 정도의 큰 값으로 설정할 수도 있다.
일 실시예에 따르면, 동작 906에서, 전자 장치는 서버 장치로부터 이상치 임계 값이 수신되는 지 확인할 수 있다. 도 3 내지 도 7을 통해 설명한 바와 같이, 서버 장치는 다양한 전자 장치로부터 획득한 리소스 사용량 정보에 기초하여, 통계적 분석을 통해 각각의 어플리케이션 및 각각의 리소스에 대응하는 이상치 임계 값을 계산할 수 있다. 서버 장치는 리소스 사용 데이터 세트에 충분한 데이터가 쌓이는 경우 이상치 임계 값을 계산할 수 있으며, 계산된 이상치 임계 값을 각 전자 장치에 제공할 수 있다.
일 실시예에 따르면, 서버 장치로부터 이상치 임계 값이 수신되는 경우, 동작 908에서, 전자 장치는 서버 장치로부터 전달받은 이상치 임계 값으로 기 저장된 이상치 임계 값을 업데이트 할 수 있다. 예를 들어, 리소스 매니저 데몬의 초기화 과정에서 0보다 작은 값(예: -1)으로 설정되어 있던 이상치 임계 값을 서버 장치로부터 획득한 이상치 임계 값으로 업데이트 할 수 있다. 이 후, 전자 장치는 어플리케이션이 실행되어 적어도 하나의 리소스를 사용하는 경우, 각각의 리소스 사용량이 각각의 업데이트 된 이상치 임계 값 이상인지 여부를 확인할 수 있다.
도 9b는 전자 장치가 리소스 사용량 정보를 서버 장치에 전송하고, 기 저장된 데이터를 초기화 하는 방법에 대해 도시하고 있다.
일 실시예에 따르면, 동작 922에서, 전자 장치는 서버 장치로부터 데이터 전송 요청을 수신할 수 있다.
일 실시예에 따르면, 동작 924에서, 전자 장치는 메모리에 기록되어 있는 리소스 사용량 정보를 서버 장치로 전송할 수 있다. 예를 들어, 전자 장치는 서버 장치의 데이터 전송 요청에 응답하여, 메모리에 기록되어 있는 각 어플리케이션의 각 리소스 사용량과 관련된 COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE, 및 RAW_DATA를 서버 장치에 전송할 수 있다. 리소스 사용량 정보에 포함되는 COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE, 및 RAW_DATA에 대해서는 앞서 도 6을 통해 설명한 바 있다. 일 실시예에 따르면, 전자 장치는 RAW_DATA만 메모리에 기록한 후 서버 장치에 전송할 수 있으며, 이 경우 서버 장치는 수신한 RAW_DATA에 기반하여 해당 전자 장치의 COUNT, SUM, SQUARE_SUM, FREQUENCY TABLE과 같은 데이터를 계산할 수 있다.
일 실시예에 따르면, 동작 926에서, 전자 장치는 메모리에 기록되어 있던 COUNT, SUM, SQUARE_SUM의 값을 0으로 초기화 할 수 있다. 또한, 동작 928에서, 전자 장치는 FREQUENCY_TABLE 및 RAW_DATA를 초기화 할 수 있다. 전자 장치는 리소스 사용량 정보를 서버 장치에 전송한 후, 기록되어 있던 데이터를 초기화 할 수 있다.
전자 장치는 리소스 사용량 정보를 초기화 한 후, 이 후 어플리케이션의 실행에 따른 리소스 사용 이벤트가 발생하면, 사용된 리소스의 사용량 정보를 메모리에 기록할 수 있다.
도 9c는 전자 장치가 리소스 사용량 정보를 메모리에 기록하는 방법에 대해 도시하고 있다.
일 실시예에 따르면, 동작 942에서, 전자 장치는 특정 어플리케이션의 특정 리소스 사용에 대한 이벤트를 수신할 수 있다. 예를 들어, 어플리케이션이 실행되는 경우, 적어도 하나의 리소스(예: CPU 사용, 메모리 사용, pending intent 생성)를 사용할 수 있으며, 리소스 생성기(예: 도 5의 리소스 생성기(360))는 어플리케이션의 각 리소스 사용에 대한 이벤트를 리소스 매니저 데몬(예: 도 5의 리소스 매니저 데몬(370))으로 전달할 수 있다. 전자 장치는 특정 어플리케이션의 특정 리소스 사용량을 변수 R에 저장할 수 있다.
일 실시예에 따르면, 동작 944에서, 전자 장치는 리소스 사용량이 현재의 이상치 임계 값 미만인지, 또는 이상치 임계 값이 0보다 작은 값인지 여부를 확인할 수 있다. 전자 장치는 리소스 매니저 데몬의 초기화 과정에서 이상치 임계 값을 0보다 작은 값(예: -1)으로 설정할 수 있으며, 이상치 임계 값이 0보다 작은 값인 경우는 서버 장치로부터 획득된 이상치 임계 값이 없는 경우일 수 있다.
일 실시예에 따르면, 이상치 임계 값이 0보다 큰 값으로 설정되어 있고, 어플리케이션의 실행에 따라 사용된 리소스의 사용량이 현재 설정된 이상치 임계 값 이상인 경우, 동작 946에서, 전자 장치는 어플리케이션의 실행에 따라 리소스를 과다 사용하여 이상 동작이 발생한 것으로 결정할 수 있다. 이 경우, 전자 장치는 이상 동작의 발생에 대응하여, 어플리케이션을 종료하거나, 및/또는 이상 동작을 알리기 위한 알림을 출력 장치(예: 디스플레이, 햅틱, 스피커)를 통해 출력할 수 있다. 또한, 사용된 리소스의 사용량이 현재 설정된 이상치 임계 값 이상인 경우, 전자 장치는 동작 948 이하의 리소스 사용량 정보를 기록하는 동작을 수행하지 않을 수 있다.
일 실시예에 따르면, 현재 설정된 이상치 임계 값이 0보다 작은 수이거나, 어플리케이션의 실행에 따라 사용된 리소스 사용량이 이상치 임계 값 미만인 경우, 동작 948 이하의 리소스 사용량 정보를 기록하는 동작을 수행할 수 있다. 전자 장치는 동작 948에서, 특정 어플리케이션 및 특정 리소스에 대해 현재 메모리에 저장된 값인 COUNT에서 1을 더하고, SUM에 R을 더하고, SQUARE_SUN에 R*R을 더할 수 있다. 여기서, R은 동작 942에서 실행된 어플리케이션의 사용량이므로, 동작 948에 따라 해당 어플리케이션의 리소스 사용량 정보가 메모리에 기록될 수 있다.
일 실시예에 따르면, 동작 950에서, 전자 장치는 현재 데이터의 저장이 요구되는 지 확인할 수 있다. 예를 들어, 전자 장치는 동작 942에서 실행된 어플리케이션의 특정 리소스 사용량에 관련된 정보가 이미 메모리에 충분한 개수만큼 저장되어 있는 경우, 추가 데이터의 저장이 불필요한 것으로 판단할 수 있다. 또는, 전자 장치는 해당 어플리케이션 및/또는 해당 리소스에 대응하는 이상치 임계 값이 서버 장치로부터 제공되는 지 여부에 기초하여 현재 데이터의 저장이 요구되는 지 확인할 수 있다.
일 실시예에 따르면, 현재 데이터의 저장이 요구되는 것으로 판단되는 경우, 동작 952에서, 전자 장치는 RAW_DATA에 현재 데이터를 저장할 수 있다.
일 실시예에 따르면, 동작 954에서, 전자 장치는 FREQEUNCY_TABLE에 현재의 리소스 사용량(또는 R 값)을 포함하는 계급의 도수를 1 증가시킬 수 있다. 예를 들어, 리소스 사용량의 수치 범위를 복수의 계급으로 분할할 수 있으며, 전자 장치는 복수의 계급 중 동작 942에서 획득한 리소스 사용량이 속하는 계급의 도수를 1 증가시킬 수 있다. 일 실시예에 따르면, 각 리소스의 사용량과 관련된 복수의 계급의 크기는 리소스의 종류 별로 임의로 결정될 수 있으며, 또는 서버 장치에 의해 지정될 수 있다.
일 실시예에 따르면, 전자 장치는 클래스(class)를 R 값을 포함하는 계급의 string 값으로 정의할 수 있다. FREQUENCY_TABLE에 해당 클래스의 값이 존재하지 않는 경우, 전자 장치는 해당 클래스의 도수를 0으로 설정할 수 있다. 전자 장치는 FREQUENCY_TABLE에 해당 클래스의 값이 존재하는 경우, 해당 클래스의 도수를 1 증가시킬 수 있다.
도 9d는 전자 장치가 특정 어플리케이션의 실행에 따라, 이상 동작 발생 시의 동작을 도시하고 있다.
일 실시예에 따르면, 동작 962에서, 전자 장치는 전자 장치는 특정 어플리케이션의 특정 리소스 사용에 대한 이벤트를 수신할 수 있다.
일 실시예에 따르면, 동작 964에서, 전자 장치는 리소스 사용량이 현재의 이상치 임계 값 이상이고, 및 이상치 임계 값이 0 이상인지 여부를 확인할 수 있다. 이상치 임계 값이 0 이상인 경우는 서버 장치로부터 획득된 이상치 임계 값으로 설정된 것을 의미할 수 있다.
일 실시예에 따르면, 동작 962의 이벤트의 리소스 사용량이 이상치 임계 값 미만이거나, 또는 현재 이상치 임계 값이 0보다 작은 수로 설정된 경우, 동작 966에서, 전자 장치는 이상 동작이 아닌 것으로 결정하고, 리소스 사용량을 메모리에 기록할 수 있다. 예를 들어, 전자 장치는 도 9c의 동작 948 이하의 리소스 사용량 정보를 기록하는 동작을 수행할 수 있다.
일 실시예에 따르면, 동작 962의 이벤트의 리소스 사용량이 이상치 임계 값 이상인 경우, 전자 장치는 리소스의 과다 사용으로 인한 이상 동작으로 결정할 수 있다. 전자 장치는 동작 968에서, 이상 동작을 발생시킨 어플리케이션을 강제 종료할 수 있다.
일 실시예에 따르면, 동작 970에서, 전자 장치는 해당 어플리케이션의 강제 종료 횟수가 기준 횟수 이상인지 확인할 수 있다. 여기서, 기준 횟수는 3회일 수 있으나, 이에 한정되지는 않는다.
일 실시예에 따르면, 강제 종료 횟수가 기준 횟수 미만인 경우, 동작 974에서, 전자 장치는 어플리케이션의 이상 동작을 지시하는 UI를 디스플레이를 통해 제공할 수 있다. 예를 들어, 전자 장치는 이상 동작을 지시하는 UI를 도 8a와 같이 팝업 형태로 제공하거나, 및/또는 도 8b와 같이 상태 바(status bar) 상에서 제공할 수 있다. 또는, 전자 장치는 디스플레이가 아닌 다른 종류의 출력 장치(예: 햅틱, 스피커)를 통해 어플리케이션의 이상 동작을 지시하는 알림을 제공할 수 있다.
일 실시예에 따르면, 강제 종료 횟수가 기준 횟수 이상인 경우, 동작 972에서, 전자 장치는 사용자에게 어플리케이션의 삭제를 유도하는 UI를 제공할 수 있다. 예를 들어, 전자 장치는 도 9d의 UI를 디스플레이를 통해 제공할 수 있다. 일 실시예에 따르면, 전자 장치는 동작 974에서 제공되는 UI 상에서 사용자가 정해진 버튼을 선택하는 경우, 동작 972의 어플리케이션의 삭제를 유도하는 UI를 제공할 수 있다.
도 10은 일 실시예에 따른 서버 장치의 이상치 임계 값을 결정하는 방법의 흐름도이다.
도 10에 도시된 방법은 서버 장치의 프로세서(예: 도 4의 프로세서(410))에 의해 수행될 수 있으며, 앞서 설명한 바 있는 기술적 특징에 대해서는 이하에서 그 설명을 생략할 수도 있다. 도시된 방법은 서버 장치(예: 서버 장치(400)의 프로세서(410))에 의해 실행될 수 있는 인스트럭션들로 구현될 수 있다. 이러한 인스트럭션들은 컴퓨터로 판독 가능한 기록 매체(computer readable recording medium) 상에 저장될 수 있다.
일 실시예에 따르면, 동작 1010에서, 서버 장치는 전자 장치로부터 특정 어플리케이션의 실행 시 사용되는 적어도 하나의 리소스의 사용량을 포함하는 리소스 사용량 정보를 수신할 수 있다. 예를 들어, 서버 장치는 특정 어플리케이션 및 특정 리소스에 대응하는 COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE, RAW_DATA를 수신할 수 있다. 여기서, COUNT는 어플리케이션이 자원을 요청한 횟수 또는 샘플의 개수이고, RAW_DATA는 획득된 리소스 사용량의 집합이고, SUM은 해당 어플리케이션이 사용한 리소스의 크기의 합이고, SQUARE_SUM은 해당 어플리케이션이 사용한 리소스의 크기의 제곱의 합일 수 있다. 일 실시예에 따르면, 서버 장치는 전자 장치로부터 RAW_DATA만 수신할 수 있으며, 이 경우 서버 장치가 수신한 RAW_DATA에 기초하여, COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE과 같은 다른 데이터를 계산할 수 있다.
일 실시예에 따르면, 동작 1020에서, 서버 장치는 메모리에 저장된 리소스 사용 데이터 세트에 전자 장치로부터 수신한 리소스 사용량 정보를 추가할 수 있다. 예를 들어, 서버 장치는 리소스 사용 데이터 세트의 COUNT set, SUM set 및 SQUARE_SUM set에 각각 전자 장치로부터 수신한 COUNT, SUM 및 SQUARE_SUM을 더할 수 있다. 또한, 서버 장치는 RAW_DATA set에 전자 장치로부터 수신한 RAW_DATA를 추가할 수 있다. 서버 장치에서 누적해서 저장하는 리소스 사용 데이터 세트에 대해서는 도 6을 통해 상세히 설명한 바 있다.
일 실시예에 따르면, 서버 장치는 전자 장치로부터 수신한 FREQUENCY_TABLE에 기초하여 FREQUENCY_TABLE set를 업데이트 할 수 있다. 예를 들어, 서버 장치는 클래스를 FREQUENCY_TABLE의 최초 계급의 스트링 값으로 결정하고, 수신한 FREQUENCY_TABLE에 해당 클래스가 존재하는 경우, FREQUENCY_TABLE set에서 해당 클래스의 도수 값에 수신한 FREQUENCY_TABLE에서 해당 클래스의 도수 값을 더할 수 있다. 이 후, 서버 장치는 클래스를 다음 계급의 스트링 값으로 결정하고, 상기와 같이 FREQUENCY_TABLE set에서 해당 클래스의 도수 값에 수신한 FREQUENCY_TABLE에서 해당 클래스의 도수 값을 더하는 동작을 더 추가할 클래스가 없을 때까지 반복 수행할 수 있다.
일 실시예에 따르면, 동작 1030에서, 서버 장치는 리소스 사용 데이터 세트의 특징 어플리케이션 및 리소스 사용량에 대해 정규성 검증(normality test)을 수행할 수 있다. 여기서, 정규성 검증은 Kolmogorov-Smirnov test, Shapiro-Wilk test, 및/또는 왜도, 첨도, 표준 오차 검증에 기초할 수 있으며, 이에 한정되지는 않는다. 동작 1032에서, 서버 장치는 정규성 검증 결과 데이터가 정규 분포를 따르는 지 확인할 수 있다. 데이터가 정규 분포를 따르는 경우, 동작 1052 및 1054를 수행하고, 정규 분포를 따르지 않는 경우, 동작 1042, 1044 및 1046을 수행할 수 있다.
일 실시예에 따르면, 데이터가 정규분포를 따르는 경우, 동작 1052에서, 서버 장치는 해당 어플리케이션 및 리소스의 리소스 사용 데이터 세트에 포함된 각 데이터의 표준 편차를 계산할 수 있다. 예를 들어, 표준 편차는 식 14와 같이 계산될 수 있다.
일 실시예에 따르면, 동작 1054에서, 서버 장치는 계산된 표준 편차 및 해당 리소스에 대해 미리 정해진 가중치(w1)에 기초하여, 이상치 임계 값을 계산할 수 있다. 예를 들어, 이상치 임계 값은 식 15와 같이 계산될 수 있다.
[수학식 15]
AVG = SUM set / COUNT set
Outlier threshold = AVG + SD * w1
여기서, AVG는 리소스 사용 데이터 세트에 기록된 각각의 리소스 사용량의 평균으로써, 기록된 SUM set에서 COUNT set를 나눈 값으로 계산될 수 있다. 가중치 w1은 각각의 리소스 별로 서로 다른 값으로 결정될 수 있다.
일 실시예에 따르면, 데이터가 정규분포를 따르지 않는 경우, 동작 1042에서, 서버 장치는 Q1 index 및 Q3 index를 계산할 수 있다. 여기서, Q1 index는 데이터를 오름차순으로 정렬한 후 하위 25%의 데이터의 순번에 해당하고, Q3 index는 상위 25%의 데이터의 순번에 해당할 수 있다. Q1 index 및 Q3 index는 각각 식 16 및 식 17에 따라 계산될 수 있다.
[수학식 16]
Q1 index = int(COUNT set + 1) * 1/4
[수학식 17]
Q3 index = int(COUNT set + 1) * 3/4
일 실시예에 따르면, 동작 1044에서, 서버 장치는 IQR(inter quartile range)를 계산할 수 있다. 여기서, IQR은 Q3 값과 Q1 값의 차이로 결정될 수 있다. 서버 장치는 Q3 index의 Q3 값 및 Q1 index의 Q1 값을 확인하고, 그 차이를 통해 IQR을 계산할 수 있다. 일 실시예에 따르면, 서버 장치는 Q1 index, Q3 index가 속하는 계급(또는 구간)을 찾고, 해당 계급에서의 Q1 index, Q3 index의 순서를 보간법으로 유추하여, Q1 값 및 Q3 값을 계산할 수 있다.
일 실시예에 따르면, 동작 1046에서, 서버 장치는 계산된 IQR 및 미리 정해진 가중치(예: w2)에 기초하여 이상치 임계 값을 계산할 수 있다. 예를 들어, 이상치 임계 값은 식 18과 같이 계산될 수 있다.
[수학식 18]
Outlier threshold = Q3 + (Q3-Q1) * w2
가중치 w2는 각 리소스에 따라 달라질 수 있다.
일 실시예에 따르면, 동작 1060에서, 서버 장치는 결정된 이상치 임계 값을 각 전자 장치로 전송할 수 있다. 전자 장치는 수신한 이상치 임계 값을 저장하고, 어플리케이션의 실행 시 사용된 각 리소스의 사용량을 각 이상치 임계 값과 비교하여, 이상 동작 여부를 결정할 수 있다.
도 11은 일 실시예에 따른 전자 장치의 블록도이다.
도 11을 참조하면, 일 실시예에 따른 전자 장치(1100)는 프로세서(1110), 메모리(1120), 통신 모듈(1130) 및 적어도 하나의 출력 장치(1140)를 포함할 수 있다. 도시된 구성 중 일부가 생략 또는 다른 구성으로 치환되더라도 본 문서의 다양한 실시예를 구현할 수 있다. 전자 장치(1100)는 도시된 구성 이외에도 도 1의 전자 장치(101)의 구성 및/또는 기능 중 적어도 일부를 더 포함할 수 있다. 도시된(또는 도시되지 않은) 전자 장치(1100)의 각 구성 중 적어도 일부는 상호 작동적으로(operatively), 기능적으로(functionally) 및/또는 전기적으로 (electrically) 연결될 수 있다.
일 실시예에 따르면, 전자 장치(1100)는 사용자에게 시각적, 청각적, 또는 촉각적인 알림(또는 피드백)을 제공하기 위한 적어도 하나의 출력 장치(1140)를 포함할 수 있다. 예를 들어, 적어도 하나의 출력 장치(1140)는 디스플레이(1150), 스피커(1160), 및 햅틱 모듈(1170)을 포함할 수 있다.
일 실시예에 따르면, 디스플레이(1150)는 액정 디스플레이(liquid crystal display(LCD)), 발광 다이오드(light-emitting diode(LED)) 디스플레이, 유기 발광 다이오드(organic light-emitting diode(OLED)) 디스플레이 중 어느 하나로 구현될 수 있으며, 이에 한정되지는 않는다. 디스플레이(1150)는 사용자의 신체 일부(예: 손가락) 또는 입력 장치(예: 스타일러스 펜)를 이용한 터치 및/또는 근접 터치(또는 호버링) 입력을 감지하는 터치 스크린으로 구성될 수 있다. 디스플레이(1150)는 도 1의 디스플레이 모듈(160)의 구성 및/또는 기능 중 적어도 일부를 포함할 수 있다. 디스플레이(1150)는 적어도 일부가 플렉서블(flexible) 할 수 있으며, 폴더블(foldable) 디스플레이, 롤러블(rollable) 디스플레이로 구현될 수도 있다.
일 실시예에 따르면, 햅틱 모듈(1170)은 모터와 같은 기계적인 구조를 통해 사용자가 인지할 수 있는 진동을 발생시킬 수 있다. 햅틱 모듈(1170)은 도 1의 햅틱 모듈(179)의 구성 및/또는 기능 중 적어도 일부를 포함할 수 있다.
일 실시예에 따르면, 스피커(1160)는 오디오 신호를 외부로 출력할 수 있다. 스피커(1160)는 도 1의 음향 출력 모듈(155)의 구성 및/또는 기능 중 적어도 일부를 포함할 수 있다.
일 실시예에 따르면, 전자 장치(1100)는 디스플레이(1150), 햅틱 모듈(1170), 스피커(1160) 이외에도 사용자가 다양한 감각을 통해 인지 가능한 알림을 제공할 수 있는 다른 종류의 출력 장치(1140)를 더 포함할 수 있다.
일 실시예에 따르면, 통신 모듈(1130)은 외부 장치(예 도 3의 서버 장치(400))와의 무선 통신을 지원하기 위한 다양한 하드웨어 및/또는 소프트웨어 구성을 포함할 수 있다. 통신 모듈(1130)은 근거리 무선 통신(예: Wi-Fi, Bluetooth) 및 셀룰러 무선 통신(예: 4G LTE, 5G NR)을 지원할 수 있다. 통신 모듈(1130)은 도 1의 통신 모듈(190)의 구성 및/또는 기능 중 적어도 일부를 포함할 수 있다.
일 실시예에 따르면, 메모리(1120)는 휘발성 메모리 및 비휘발성 메모리를 포함하여, 다양한 데이터들을 일시적 또는 영구적으로 저장할 수 있다. 메모리(1120)는 도 1의 메모리(130)의 구성 및/또는 기능 중 적어도 일부를 포함하고, 도 1의 프로그램(140) 및/또는 도 2의 프로그램(140) 중 적어도 일부를 저장할 수 있다.
일 실시예에 따르면, 메모리(1120)는 프로세서(1110)에서 수행될 수 있는 다양한 인스트럭션(instruction)들을 저장할 수 있다. 이와 같은 인스트럭션들은 프로세서(1110)에 의해 인식될 수 있는 산술 및 논리 연산, 데이터 이동, 입출력과 같은 제어 명령을 포함할 수 있다.
일 실시예에 따르면, 프로세서(1110)는 전자 장치(1100)의 각 구성 요소들의 제어 및/또는 통신에 관한 연산이나 데이터 처리를 수행할 수 있는 구성으로써, 하나 이상의 프로세서(1110)들로 구성될 수 있다. 프로세서(1110)는 메모리(1120), 출력 장치(1140), 및 통신 모듈(1130)을 포함하는 전자 장치(1100)의 각 구성 요소와 전기적으로, 기능적으로, 및/또는 작동적으로 연결될 수 있다. 프로세서(1110)는 도 1의 프로세서(120)의 구성 및/또는 기능 중 적어도 일부를 포함할 수 있다.
일 실시예에 따르면, 전자 장치(1100)는 dual, quad, octa 코어(core)와 같은 멀티-프로세서 컴퓨터 아키텍쳐를 포함할 수 있다. 예를 들어, 전자 장치(1100)는 연산 작업과 같은 핵심적인 동작을 수행하는 복수의 코어를 하나의 집적회로 상에서 통합하여 프로세서(1110)를 구성할 수 있다. 일 실시예에 따르면, 프로세서(1110)는 싱글 코어 프로세서로 구현될 수도 있다.
일 실시예에 따르면, 프로세서(1110)가 전자 장치(1100) 상에서 구현할 수 있는 연산 및 데이터 처리 기능에는 한정됨이 없을 것이나, 이하에서는 어플리케이션의 실행 시 리소스 사용 이벤트를 확인하여 리소스 사용량 정보를 메모리(1120)에 기록하고, 메모리(1120)에 저장된 리소스 사용 데이터 세트에 기초하여 각 리소스에 대응하는 이상치 임계 값을 계산하고, 및 특정 리소스 사용량이 이상치 임계 값 이상인 경우 이상 동작으로 결정하여 이상 동작의 발생에 대응하는 피드백을 제공하는 다양한 실시예들에 대해 설명하기로 한다. 후술할 전자 장치(1100) 또는 프로세서(1110)의 동작들은 메모리(1120)에 저장된 인스트럭션들을 로딩(loading)함으로써 수행될 수 있다.
일 실시예에 따르면, 전자 장치(1100)는 다양한 어플리케이션을 설치 및 실행할 수 있다. 예를 들어, 전자 장치(1100)는 도 2의 어플리케이션(146) 중 적어도 일부를 실행할 수 있으며, 또한 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 다운로드 받아 설치한 적어도 하나의 어플리케이션을 실행할 수 있다. 전자 장치(1100)는 포 그라운드 및 백 그라운드에서 복수의 어플리케이션을 동시에 실행할 수 있다.
일 실시예에 따르면, 프로세서(1110)가 메모리(1120)에 저장된 특정 어플리케이션을 실행하는 경우, 실행된 어플리케이션은 전자 장치(1100)의 리소스를 사용할 수 있다. 여기서, 어플리케이션이 사용하는 전자 장치(1100)의 리소스는 CPU(central processing unit), 메모리, I/O, 스레드, 팝업 윈도우, 가상 디스플레이, 알림(notification), 펜딩 인텐트(pending intent)를 예로 들 수 있으며, 이에 한정되지는 않는다. 실행되는 어플리케이션에 따라 사용하는 리소스의 종류는 다를 수 있으며, 동일한 어플리케이션의 경우에도 동작 상태 및/또는 환경 설정에 따라 사용하는 리소스의 종류가 다를 수 있다.
일 실시예에 따르면, 메모리(1120)는 복수의 어플리케이션 및 복수의 어플리케이션 각각에 대응하는 복수의 리소스 사용량을 맵핑하여 기록하는 리소스 사용 데이터 세트를 저장할 수 있다. 리소스 사용 데이터 세트는 각각의 어플리케이션과 각각의 리소스의 사용량 정보를 맵핑해서 저장할 수 있다. 또한, 리소스 사용 데이터 세트는 COUNT, SUM, SQUARE_SUM, FREQUENCY_TABLE과 같은 리소스 사용량과 관련된 데이터를 저장할 수 있다. 예를 들어, 리소스 사용 데이터 세트는 도 6에서 설명한 서버 장치 상에 저장되는 리소스 사용 데이터 세트와 자료 구조가 동일할 수 있다.
일 실시예에 따르면, 프로세서(1110)는 특정 어플리케이션이 실행되는 경우, 실행된 어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인할 수 있다. 예를 들어, 사용자의 입력에 따라 특정 어플리케이션이 실행되는 경우, 실행된 어플리케이션은 적어도 하나의 리소스(예: CPU 사용, 메모리 사용, pending intent 생성)를 사용할 수 있으며, 프로세서(1110)는 리소스 사용에 관련된 이벤트를 확인할 수 있다.
일 실시예에 따르면, 프로세서(1110)는 어플리케이션의 실행에 따라 사용된 적어도 하나의 리소스의 사용량 정보를 메모리(1120)에 저장된 리소스 사용 데이터 세트에 기록할 수 있다. 예를 들어, 리소스 사용 데이터 세트는 각각의 어플리케이션의 실행 시 사용되는 각각의 리소스의 사용량 정보를 누적해서 기록할 수 있으며, 프로세서(1110)는 상기 어플리케이션의 실행에 따라 사용된 적어도 하나의 리소스의 사용량 정보를 리소스 사용 데이터 세트에서 대응되는 어플리케이션 및 리소스의 데이터에 추가할 수 있다. 일 실시예에 따르면, 프로세서(1110)는 실행된 어플리케이션이 사용하는 적어도 하나의 리소스 중 그 사용량이 이상치 임계 값 이상인 것이 있는 경우, 이상 동작으로 판단할 수 있으며, 이 경우 리소스 사용 데이터 세트에 기록하는 동작은 수행하지 않을 수 있다.
일 실시예에 따르면, 프로세서(1110)는 메모리(1120)에 저장된 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 특정 어플리케이션 및 특정 어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값(예: 제1이상치 임계 값)을 결정할 수 있다. 예를 들어, 프로세서(1110)가 이상치 임계 값을 결정하는 방법은 앞서 도 4 내지 도 10을 통해 설명한 서버 장치가 이상치 임계 값을 결정하는 동작에 방법에 대응될 수 있다.
일 실시예에 따르면, 프로세서(1110)는 리소스 사용 데이터 세트의 특징 어플리케이션 및 리소스 사용량에 대해 정규성 검증(normality test)을 수행할 수 있다. 여기서, 정규성 검증은 Kolmogorov-Smirnov test, Shapiro-Wilk test, 및/또는 왜도, 첨도, 표준 오차 검증에 기초할 수 있으며, 이에 한정되지는 않는다.
일 실시예에 따르면, 프로세서(1110)는 데이터가 정규분포를 따르는 경우, 표준 편차 및 미리 정해진 가중치(w1)에 기초하여 이상치 임계 값을 결정할 수 있다. 예를 들어, 프로세서(1110)는 정규 분포를 따르는 데이터들의 평균 및 표준 편차를 계산할 수 있다. 프로세서(1110)는 표준 편차와 가중치의 곱으로 이상치 임계 값을 결정할 수 있다. 여기서, 가중치 w1은 각 리소스 별로 서로 다른 값으로 결정될 수 있다.
일 실시예에 따르면, 프로세서(1110)는 데이터가 정규분포를 따르지 않는 경우, IQR 및 해당 리소스에 대해 미리 정해진 가중치(w2)에 기초하여 이상치 임계 값을 결정할 수 있다. 여기서, IQR은 각 데이터를 그 값에 따라 순차적으로(예: 오름차순으로) 정렬한 후, 하위 25%에 해당하는 데이터와 상위 25%에 해당하는 데이터 사이의 차이로 결정될 수 있다. 프로세서(1110)는 Q3 값과 Q1 값을 구한 후 그 차이로 IQR을 구할 수 있다. 프로세서(1110)는 IQR과 가중치(예: w2)를 곱한 값을 Q3 값에 더한 값을 이상치 임계 값으로 결정할 수 있다. 여기서, 가중치 w2는 각 리소스 별로 서로 다른 값으로 결정될 수 있다.
일 실시예에 따르면, 프로세서(1110)는 데이터에 대한 정규성 검증 없이, 모든 데이터에 대해 IQR 및 가중치 w2에 기초하여 이상치 임계 값을 계산할 수도 있다.
일 실시예에 따르면, 프로세서(1110)는 이상치 임계 값(예: 제1이상치 임계 값)이 계산되는 경우, 해당 어플리케이션 및 리소스에 대해 메모리(1120)에 현재 저장된 이상치 임계 값(예: 제2이상치 임계 값)을 계산된 이상치 임계 값으로 업데이트 할 수 있다. 이상치 임계 값은 초기화 상태에서 0보다 작은 값으로 설정될 수 있으며, 이상치 임계 값이 계산되는 경우 그 값으로 업데이트 될 수 있다. 프로세서(1110)는 리소스 사용 데이터 세트에 충분한 양의 데이터가 수집되는 경우에, 이상치 임계 값을 계산하는 동작을 수행할 수 있다.
일 실시예에 따르면, 프로세서(1110)는 특정 어플리케이션이 실행되어 적어도 하나의 리소스를 사용하는 경우, 리소스의 사용량이 해당 리소스에 대응하여 설정된 이상치 임계 값을 초과하는지 여부를 확인할 수 있다. 일 실시예에 따르면, 프로세서(1110)는 리소스 사용량이 이상치 임계 값을 초과하는 경우, 해당 어플리케이션의 실행에 따라 이상 동작이 발생한 것으로 결정할 수 있다.
일 실시예에 따르면, 프로세서(1110)는 이상 동작을 발생시킨 어플리케이션을 강제로 종료할 수 있다. 또한, 프로세서(1110)는 도 8a 내지 도 8d에 도시된 것과 같이, 어플리케이션의 이상 동작을 지시하는 사용자 인터페이스를 디스플레이(1150)를 통해 제공할 수 있다. 또는, 프로세서(1110)는 햅틱 모듈(1170) 또는 스피커(1160)와 같은 다른 출력 장치(1140)를 통해 어플리케이션의 이상 동작을 지시하는 알림을 제공할 수 있다.
일 실시예에 따르면, 프로세서(1110)는 이상 동작을 발생시킨 어플리케이션의 강제 종료 횟수가 기준 횟수 이상인지 확인할 수 있다. 여기서, 기준 횟수는 3회일 수 있으나, 이에 한정되지는 않는다. 프로세서(1110)는 강제 종료 횟수가 기준 이상인 경우, 해당 어플리케이션의 삭제를 유도하기 위한 사용자 인터페이스(예: 도 9d의 사용자 인터페이스)를 제공할 수 있다.
도 12는 일 실시예에 따른 전자 장치에서 실행되는 프로세스의 블록도이다.
도 12를 참조하면, 전자 장치의 프로세서(예: 도 11의 프로세서(1110))에서 실행되는 프로세스들(1200)은 리소스 매니저 데몬(resource manager daemon)(1210) 및 이상치 임계 값 계산기(outlier threshold calculator)(1250)를 포함할 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(1210)은 어플리케이션이 실행되어 적어도 하나의 리소스를 사용하는 경우, 어플리케이션의 리소스 사용에 대응하는 이벤트를 확인할 수 있다. 예를 들어, 리소스 생성 이벤트는 클래스(예: ResEvt.class(.java)), JNI(java native interface) 라이브러리(예: ResEvt JNI library(.cpp)) 및/또는 SO(shared object)(예: LibresEvt.so) 형태로 제공될 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(1210)은 리소스 사용 통계(1220)를 기록하고, 이상치 임계 값(1230)을 관리할 수 있다. 리소스 매니저 데몬(1210)은 어플리케이션의 실행 시 어플리케이션 및 리소스 사용량 정보를 수신하고, 이를 리소스 사용 통계(1220)에 기록할 수 있다. 리소스 사용 통계(1220)에는 복수의 어플리케이션 및 각 어플리케이션이 사용한 각각의 리소스의 사용량 정보가 테이블 형태로 저장될 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(1250)는 메모리에 누적 저장된 리소스 사용 데이터 세트(1260)에 정해진 양의 데이터가 누적 저장된 경우, 이상치 임계 값을 계산하는 동작을 수행할 수 있다. 이상치 임계 값 계산기(1250)는 리소스 사용 데이터 세트(1260)에 기초하여, 미리 정해진 통계적 분석을 통해 특정 어플리케이션 및 특정 어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정할 수 있다. 이상치 임계 값 계산기(1250)는 복수의 어플리케이션 각각에 대해 리소스 각각에 대응하는 이상치 임계 값을 결정하는 동작을 수행할 수 있다. 예를 들어, i개의 어플리케이션 및 j개의 리소스에 대한 이상치 임계 값을 구하는 경우, App0의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산하고, App1의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산하고, ... , Appi의 리소스0에 대한 이상치 임계 값, 리소스1에 대한 이상치 임계 값, ... , 리소스 j에 대한 이상치 임계 값을 계산할 수 있다.
일 실시예에 따르면, 이상치 임계 값 계산기(1250)는 특정 어플리케이션의 특정 리소스의 사용량 데이터의 정규성을 테스트(1270)하여, 정규 분포를 따르는 지 여부를 확인할 수 있다. 데이터가 정규 분포를 따르는 경우, 이상치 임계 값 계산기(1250)는 표준 편차를 계산하고, 표준 편차 및 미리 정해진 가중치에 기초하여 이상치 임계 값을 계산할 수 있다(1271). 데이터가 정규 분포를 따르지 않는 경우, 이상치 임계 값 계산기(1250)는 IQR(inter quartile range)를 계산하고, IQR 및 미리 정해진 가중치에 기초하여 이상치 임계 값을 계산할 수 있다(1272).
이상치 임계 값 계산기(1250)가 이상치 임계 값을 계산하는 방법은 도 4 내지 도 10을 통해 설명한 서버 장치의 이상치 임계 값 계산기(1250)가 이상치 임계 값을 계산하는 방법에 대응될 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(1210)은 리소스 사용 이벤트를 확인하는 경우, 각각의 리소스 사용량을 각 리소스에 대응하는 이상치 임계 값과 비교할 수 있다. 비교 결과, 해당 이벤트의 어플리케이션이 특정 리소스를 이상치 임계 값 이상으로 사용한 것으로 확인되는 경우, 리소스 매니저 데몬(1210)은 해당 어플리케이션이 리소스를 과다 사용하여 이상 동작하는 것으로 결정할 수 있다. 이 경우, 리소스 매니저 데몬(1210)은 해당 이벤트에 포함된 각 리소스의 사용량 정보를 리소스 사용 통계에 기록하지 않을 수 있다.
일 실시예에 따르면, 리소스 매니저 데몬(1210)은 특정 어플리케이션이 이상 동작하는 것으로 결정하는 경우, 해당 어플리케이션의 동작을 중지하고(또는 실행을 종료하고), 리소스를 회수할 수 있다. 리소스 매니저 데몬(1210)은 해당 어플리케이션의 동작을 중지한 후 출력 장치(예: 디스플레이, 스피커, 햅틱)를 통해 사용자에게 이상 동작을 지시하는 알림을 제공하고, 해당 어플리케이션을 재시작 하도록 유도할 수 있다. 리소스 매니저 데몬(1210)은 해당 어플리케이션의 재시작 이후에도 리소스를 과다하게 사용하는 문제가 기준 횟수 이상으로 반복해서 발생하는 경우, 출력 장치를 통해 사용자에게 해당 어플리케이션의 삭제를 유도하는 UI를 제공할 수 있다.
도 13은 일 실시예에 따른 전자 장치의 이상치 임계 값을 결정하는 방법의 흐름도이다.
도시된 방법은 전자 장치(예: 도 11의 전자 장치(1100))에 의해 수행될 수 있으며, 이하에서는 앞서 설명한 바 있는 기술적 특징에 대해서는 그 설명을 생략할 수도 있다.
일 실시예에 따르면, 동작 1310에서, 전자 장치는 어플리케이션이 실행되는 경우, 실행된 어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인할 수 있다. 예를 들어, 사용자의 입력에 따라 특정 어플리케이션이 실행되는 경우, 실행된 어플리케이션은 적어도 하나의 리소스(예: CPU 사용, 메모리 사용, pending intent 생성)를 사용할 수 있으며, 전자 장치는 리소스 사용에 관련된 이벤트를 확인할 수 있다.
일 실시예에 따르면, 동작 1320에서, 전자 장치는 리소스의 사용량 정보를 리소스 사용량 데이터 세트에 기록할 수 있다. 예를 들어, 리소스 사용 데이터 세트는 각각의 어플리케이션의 실행 시 사용되는 각각의 리소스의 사용량 정보를 누적해서 기록할 수 있으며, 전자 장치는 상기 어플리케이션의 실행에 따라 사용된 적어도 하나의 리소스의 사용량 정보를 리소스 사용 데이터 세트에서 대응되는 어플리케이션 및 리소스의 데이터에 추가할 수 있다.
일 실시예에 따르면, 동작 1330에서, 전자 장치는 통계적 분석을 통해 어플리케이션 및 리소스 각각에 대응하는 이상치 임계 값을 결정할 수 있다.
일 실시예에 따르면, 전자 장치는 리소스 사용 데이터 세트의 특징 어플리케이션 및 리소스 사용량에 대해 정규성 검증(normality test)을 수행할 수 있다. 특정 리소스 사용량 정보가 정규성을 갖는 것으로 확인되는 경우, 전자 장치는 리소스 사용량의 표준 편차를 계산하고, 계산된 표준 편차 및 미리 정해진 가중치(w1)에 기초하여 이상치 임계 값을 결정할 수 있다. 특정 리소스 사용량 정보가 정규성을 갖지 않는 경우, 전자 장치는 리소스 사용량 정보의 IQR(inter quartile range)를 계산하고, IQR 및 미리 정해진 가중치(w2)에 기초하여 이상치 임계 값을 결정할 수 있다. 여기서, 가중치(w1) 및 가중치(w2)는 각각의 리소스 별로 결정될 수 있다.
일 실시예에 따르면, 전자 장치는 각각의 어플리케이션 및 리소스에 대응하는 각각의 이상치 임계 값을 결정할 수 있다.
일 실시예에 따르면, 동작 1340에서, 전자 장치는 계산된 이상치 임계 값으로 기 저장된 이상치 임계 값을 업데이트 할 수 있다. 일 실시예에 따르면, 전자 장치는 초기화 단계에서 이상치 임계 값을 0보다 작은 값으로 설정할 수 있으며, 이 후 이상치 임계 값이 계산되는 경우 계산된 값으로 업데이트 할 수 있다. 전자 장치는 리소스 사용 데이터 세트에 충분한 양의 데이터가 수집되는 경우, 이상치 임계 값을 계산하는 동작을 수행하고 계산된 이상치 임계 값을 다시 업데이트 할 수 있다.
일 실시예에 따르면, 전자 장치는 특정 어플리케이션이 실행되는 경우, 실행된 어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 이 중 특정 리소스의 사용량이 해당 어플리케이션 및 리소스에 대해 설정된 이상치 임계 값 이상인 경우, 상기 실행된 어플리케이션으로 인해 이상 동작이 발생한 것으로 결정할 수 있다. 전자 장치는 이상 동작이 발생한 경우, 리소스를 과다 사용한 어플리케이션의 실행을 종료할 수 있다. 또한, 전자 장치는 이상 동작이 발생된 어플리케이션을 지시하는 정보 및 임계 값을 초과하여 사용된 적어도 하나의 리소스를 지시하는 정보를 포함하는 알림을 출력 장치를 통해 제공할 수 있다.
본 문서의 다양한 실시예에 따른 전자 장치는, 메모리, 및 상기 메모리와 작동적으로 연결되는 프로세서를 포함할 수 있다.
일 실시예에 따르면, 상기 메모리는, 복수의 어플리케이션 및 상기 복수의 어플리케이션 각각에 대응하는 복수의 리소스 사용량을 맵핑하여 기록하는 리소스 사용 데이터 세트를 저장할 수 있다.
일 실시예에 따르면, 상기 프로세서는, 제1어플리케이션이 실행되는 경우, 상기 실행된 제1어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 상기 확인된 적어도 하나의 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록할 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 메모리에 저장된 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 제1이상치 임계 값을 결정하고, 및 상기 메모리에 기 저장된 상기 제1어플리케이션 및 상기 적어도 하나의 리소스 각각에 대해 설정된 적어도 하나의 제2이상치 임계 값을 상기 결정된 적어도 하나의 이상치 임계 값에 기초하여 업데이트 하도록 설정될 수 있다.
일 실시예에 따르면, 상기 메모리는, 상기 프로세서에 의해 실행 시에, 상기 전자 장치가, 제1어플리케이션이 실행되는 경우, 상기 실행된 제1어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 상기 확인된 적어도 하나의 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하고, 상기 메모리에 저장된 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 제1이상치 임계 값을 결정하고, 및 상기 결정된 적어도 하나의 제1이상치 임계 값에 기초하여, 상기 메모리에 기 저장된 상기 제1어플리케이션 및 상기 적어도 하나의 리소스 각각에 대해 설정된 적어도 하나의 제2이상치 임계 값을 업데이트 하도록 하는 인스트럭션들을 저장할 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 실행된 제1어플리케이션이 사용하는 제1리소스의 사용량이 상기 제1어플리케이션 및 상기 제1리소스에 대응하여 설정된 이상치 임계 값을 초과하는 경우, 상기 제1리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하지 않도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 메모리에 저장된 리소스 사용 데이터 세트에서 제2어플리케이션에 대응되는 제2리소스의 사용량 정보가 기준 개수 이상으로 저장된 경우, 상기 제2어플리케이션 및 상기 제2리소스에 대응하는 이상치 임계 값을 결정하도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 제2어플리케이션에 대응되어 기록된 복수의 제2리소스의 사용량 정보의 IQR(inter quartile range)를 계산하고, 상기 계산된 IQR 및 상기 제2리소스에 대응하는 가중치에 기초하여, 상기 제2어플리케이션 및 상기 제2리소스에 대응하는 이상치 임계 값을 결정하도록 설정될 수 있다.
일 실시예에 따르면, 상기 가중치는 각각의 리소스 별로 결정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 제2어플리케이션에 대응되어 기록된 복수의 제2리소스의 사용량 정보가 정규성을 갖는 지 확인하고, 정규성을 갖는 것으로 확인되는 경우, 상기 복수의 제2리소스의 사용량 정보의 표준 편차를 계산하고, 상기 계산된 표준 편차에 기초하여 상기 제2어플리케이션 및 상기 제2리소스에 대응하는 이상치 임계 값을 결정하도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 제3어플리케이션이 실행되는 경우, 상기 실행된 제3어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 상기 확인되는 적어도 하나의 리소스의 사용량 중 제3리소스의 사용량이 상기 제3어플리케이션 및 상기 제3리소스에 대응하여 현재 설정된 이상치 임계 값 이상인 경우, 상기 제3어플리케이션의 실행으로 인해 이상 동작이 발생한 것으로 결정하도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 이상 동작이 발생한 것으로 결정되는 경우, 상기 제3어플리케이션의 실행을 종료하도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 제3어플리케이션의 실행 시 이상 동작의 발생으로 인해 종료한 횟수가 기준 횟수 이상인 경우, 사용자에게 피드백을 제공하도록 설정될 수 있다.
일 실시예에 따르면, 상기 전자 장치는 디스플레이를 더 포함하고, 상기 프로세서는, 상기 이상 동작이 발생된 제3어플리케이션을 지시하는 정보 및 상기 이상치 임계 값을 초과하여 사용된 적어도 하나의 리소스를 지시하는 정보를 포함하는 사용자 인터페이스를 상기 디스플레이를 통해 제공하도록 설정될 수 있다.
본 문서의 다양한 실시예에 따른 서버 장치는, 통신 인터페이스, 메모리, 및 상기 통신 인터페이스 및 상기 메모리와 작동적으로 연결되는 프로세서를 포함할 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 통신 인터페이스를 통해, 복수의 전자 장치로부터 제1어플리케이션의 실행 시에 사용된 적어도 하나의 리소스의 사용량 정보를 수신하고, 상기 수신한 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하고, 상기 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정하고, 상기 통신 인터페이스를 통해, 상기 결정된 이상치 임계 값을 상기 복수의 전자 장치로 전송하도록 설정될 수 있다.
일 실시예에 따르면, 상기 메모리는, 상기 프로세서에 의해 실행 시에, 상기 프로세서가, 상기 통신 인터페이스를 통해, 복수의 전자 장치로부터 제1어플리케이션의 실행 시에 사용된 적어도 하나의 리소스의 사용량 정보를 수신하고, 상기 수신한 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하고, 상기 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정하고, 상기 통신 인터페이스를 통해, 상기 결정된 이상치 임계 값을 상기 복수의 전자 장치로 전송하도록 하는 인스트럭션들을 저장할 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 메모리에 저장된 리소스 사용 데이터 세트에서 상기 제1어플리케이션에 대응되는 제1리소스의 사용량 정보가 기준 개수 이상으로 저장된 경우, 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 제1어플리케이션에 대응되어 기록된 복수의 제1리소스의 사용량 정보의 IQR(inter quartile range)를 계산하고, 상기 계산된 IQR 및 상기 제1리소스에 대응하는 가중치에 기초하여, 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하도록 설정될 수 있다.
일 실시예에 따르면, 상기 가중치는 각각의 리소스 별로 결정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 제1어플리케이션에 대응되어 기록된 복수의 제1리소스의 사용량 정보가 정규성을 갖는 지 확인하고, 정규성을 갖는 것으로 확인되는 경우, 상기 복수의 제1리소스의 사용량 정보의 표준 편차를 계산하고, 상기 계산된 표준 편차에 기초하여 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하도록 설정될 수 있다.
본 문서의 다양한 실시예에 따른, 서버 장치에 의해 수행되는 방법은, 복수의 전자 장치로부터 제1어플리케이션의 실행 시에 사용된 적어도 하나의 리소스의 사용량 정보를 수신하는 동작, 상기 수신한 리소스의 사용량 정보를 메모리에 저장된 리소스 사용 데이터 세트에 기록하는 동작, 상기 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정하는 동작, 및 상기 결정된 이상치 임계 값을 상기 복수의 전자 장치로 전송하는 동작을 포함할 수 있다.
일 실시예에 따르면, 상기 적어도 하나의 이상치 임계 값을 결정하는 동작은, 상기 저장된 리소스 사용 데이터 세트에서 상기 제1어플리케이션에 대응되는 제1리소스의 사용량 정보가 기준 개수 이상으로 저장된 경우, 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하는 동작을 포함할 수 있다.
일 실시예에 따르면, 상기 적어도 하나의 이상치 임계 값을 결정하는 동작은, 상기 제1어플리케이션에 대응되어 기록된 복수의 제1리소스의 사용량 정보의 IQR(inter quartile range)를 계산하는 동작, 및 상기 계산된 IQR 및 상기 제1리소스에 대응하는 가중치에 기초하여, 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하는 동작을 포함할 수 있다.
일 실시예에 따르면, 상기 가중치는 각각의 리소스 별로 결정될 수 있다.
일 실시예에 따르면, 상기 적어도 하나의 이상치 임계 값을 결정하는 동작은, 상기 제1어플리케이션에 대응되어 기록된 복수의 제1리소스의 사용량 정보가 정규성을 갖는 지 확인하는 동작, 및 정규성을 갖는 것으로 확인되는 경우, 상기 복수의 제1리소스의 사용량 정보의 표준 편차를 계산하고, 상기 계산된 표준 편차에 기초하여 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하는 동작을 포함할 수 있다.
본 문서의 다양한 실시예에 따른 전자 장치는, 디스플레이, 메모리, 및 상기, 디스플레이, 및 상기 메모리와 작동적으로 연결되는 프로세서를 포함할 수 있다.
일 실시예에 따르면, 상기 메모리는, 복수의 어플리케이션 및 복수의 리소스에 각각 대응하는 복수의 이상치 임계 값을 저장할 수 있다.
일 실시예에 따르면, 상기 프로세서는, 제1어플리케이션이 실행되는 경우, 상기 실행된 제1어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고, 상기 메모리에서, 상기 제1어플리케이션 및 상기 사용되는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 확인하고, 상기 확인된 적어도 하나의 리소스 중 제1리소스의 사용량을 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 제1이상치 임계 값과 비교하고, 및 상기 제1리소스의 사용량이 상기 제1이상치 임계 값 이상인 경우, 상기 제1어플리케이션의 실행으로 인해 이상 동작이 발생한 것으로 결정하도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 이상 동작이 발생한 것으로 결정되는 경우, 상기 제1어플리케이션의 실행을 종료하도록 설정될 수 있다.
일 실시예에 따르면, 상기 프로세서는, 상기 제1어플리케이션의 실행 시 이상 동작의 발생으로 인해 종료한 횟수가 기준 횟수 이상인 경우, 사용자에게 피드백을 제공하도록 설정될 수 있다.
본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.
본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제3구성요소를 통하여 연결될 수 있다는 것을 의미한다.
본 문서의 다양한 실시예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일 실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다.
본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(101)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(140))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(101))의 프로세서(예: 프로세서(120))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, ‘비일시적’은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.
일 실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.
Claims (15)
- 전자 장치에 있어서,메모리; 및상기 메모리와 작동적으로 연결되는 프로세서를 포함하고,상기 메모리는,복수의 어플리케이션 및 상기 복수의 어플리케이션 각각에 대응하는 복수의 리소스 사용량을 맵핑하여 기록하는 리소스 사용 데이터 세트를 저장하고,상기 프로세서에 의해 실행 시에, 상기 전자 장치가,제1어플리케이션이 실행되는 경우, 상기 실행된 제1어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고,상기 확인된 적어도 하나의 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하고,상기 메모리에 저장된 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 제1이상치 임계 값을 결정하고, 및상기 메모리에 기 저장된 상기 제1어플리케이션 및 상기 적어도 하나의 리소스 각각에 대해 설정된 적어도 하나의 제2이상치 임계 값을 상기 결정된 적어도 하나의 제1이상치 임계 값에 기초하여 업데이트 하도록 하는 인스트럭션들을 저장하는 전자 장치.
- 제 1항에 있어서,상기 인스트럭션들은, 상기 전자 장치가,상기 실행된 제1어플리케이션이 사용하는 제1리소스의 사용량이 상기 제1어플리케이션 및 상기 제1리소스에 대응하여 설정된 이상치 임계 값을 초과하는 경우, 상기 제1리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하지 않도록 하는 인스트럭션들을 포함하는 전자 장치.
- 제 1항 또는 제 2항에 있어서,상기 인스트럭션들은, 상기 전자 장치가,상기 메모리에 저장된 리소스 사용 데이터 세트에서 제2어플리케이션에 대응되는 제2리소스의 사용량 정보가 기준 개수 이상으로 저장된 경우, 상기 제2어플리케이션 및 상기 제2리소스에 대응하는 이상치 임계 값을 결정하도록 하는 인스트럭션들을 포함하는 전자 장치.
- 제 3항에 있어서,상기 인스트럭션들은, 상기 전자 장치가,상기 제2어플리케이션에 대응되어 기록된 복수의 제2리소스의 사용량 정보의 IQR(inter quartile range)를 계산하고,상기 계산된 IQR 및 상기 제2리소스에 대응하는 가중치에 기초하여, 상기 제2어플리케이션 및 상기 제2리소스에 대응하는 이상치 임계 값을 결정하도록 하는 인스트럭션들을 포함하는 전자 장치.
- 제 4항에 있어서,상기 가중치는 각각의 리소스 별로 결정되는 전자 장치.
- 제 3항에 있어서,상기 인스트럭션들은, 상기 전자 장치가,상기 제2어플리케이션에 대응되어 기록된 복수의 제2리소스의 사용량 정보가 정규성을 갖는 지 확인하고,정규성을 갖는 것으로 확인되는 경우, 상기 복수의 제2리소스의 사용량 정보의 표준 편차를 계산하고, 상기 계산된 표준 편차에 기초하여 상기 제2어플리케이션 및 상기 제2리소스에 대응하는 이상치 임계 값을 결정하도록 하는 인스트럭션들을 포함하는 전자 장치.
- 제 1항에 있어서,상기 인스트럭션들은, 상기 전자 장치가,제3어플리케이션이 실행되는 경우, 상기 실행된 제3어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하고,상기 확인되는 적어도 하나의 리소스의 사용량 중 제3리소스의 사용량이 상기 제3어플리케이션 및 상기 제3리소스에 대응하여 현재 설정된 이상치 임계 값 이상인 경우, 상기 제3어플리케이션의 실행으로 인해 이상 동작이 발생한 것으로 결정하도록 하는 인스트럭션들을 포함하는 전자 장치.
- 제 7항에 있어서,상기 인스트럭션들은, 상기 전자 장치가,상기 이상 동작이 발생한 것으로 결정되는 경우, 상기 제3어플리케이션의 실행을 종료하도록 하는 인스트럭션들을 포함하는 전자 장치.
- 제 7항에 있어서,디스플레이를 더 포함하고,상기 인스트럭션들은, 상기 전자 장치가,상기 이상 동작이 발생된 제3어플리케이션을 지시하는 정보 및 상기 이상치 임계 값을 초과하여 사용된 적어도 하나의 리소스를 지시하는 정보를 포함하는 사용자 인터페이스를 상기 디스플레이를 통해 제공하도록 하는 인스트럭션들을 포함하는 전자 장치.
- 서버 장치에 있어서,통신 인터페이스;메모리; 및상기 통신 인터페이스 및 상기 메모리와 작동적으로 연결되는 프로세서를 포함하고,상기 메모리는, 상기 프로세서에 의해 실행 시에, 상기 서버 장치가,상기 통신 인터페이스를 통해, 복수의 전자 장치로부터 제1어플리케이션의 실행 시에 사용된 적어도 하나의 리소스의 사용량 정보를 수신하고,상기 수신한 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하고,상기 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정하고,상기 통신 인터페이스를 통해, 상기 결정된 이상치 임계 값을 상기 복수의 전자 장치로 전송하도록 하는 인스트럭션들을 포함하는 서버 장치.
- 제 10항에 있어서,상기 인스트럭션들은, 상기 서버 장치가,상기 메모리에 저장된 리소스 사용 데이터 세트에서 상기 제1어플리케이션에 대응되는 제1리소스의 사용량 정보가 기준 개수 이상으로 저장된 경우, 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하도록 하는 인스트럭션들을 포함하는 서버 장치.
- 제 11항에 있어서,상기 인스트럭션들은, 상기 서버 장치가,상기 제1어플리케이션에 대응되어 기록된 복수의 제1리소스의 사용량 정보의 IQR(inter quartile range)를 계산하고,상기 계산된 IQR 및 상기 제1리소스에 대응하는 가중치에 기초하여, 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하도록 하는 인스트럭션들을 포함하는 서버 장치.
- 제 12항에 있어서,상기 인스트럭션들은, 상기 서버 장치가,상기 제1어플리케이션에 대응되어 기록된 복수의 제1리소스의 사용량 정보가 정규성을 갖는 지 확인하고,정규성을 갖는 것으로 확인되는 경우, 상기 복수의 제1리소스의 사용량 정보의 표준 편차를 계산하고, 상기 계산된 표준 편차에 기초하여 상기 제1어플리케이션 및 상기 제1리소스에 대응하는 이상치 임계 값을 결정하도록 하는 인스트럭션들을 포함하는 서버 장치.
- 서버 장치에 의해 수행되는 방법에 있어서,복수의 전자 장치로부터 제1어플리케이션의 실행 시에 사용된 적어도 하나의 리소스의 사용량 정보를 수신하는 동작;상기 수신한 리소스의 사용량 정보를 메모리에 저장된 리소스 사용 데이터 세트에 기록하는 동작;상기 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 이상치 임계 값을 결정하는 동작; 및상기 결정된 이상치 임계 값을 상기 복수의 전자 장치로 전송하는 동작을 포함하는 방법.
- 컴퓨터로 판독 가능한 비-일시적 기록 매체에 있어서,복수의 어플리케이션 및 상기 복수의 어플리케이션 각각에 대응하는 복수의 리소스 사용량을 맵핑하여 기록하는 리소스 사용 데이터 세트를 저장하는 동작;제1어플리케이션이 실행되는 경우, 상기 실행된 제1어플리케이션이 사용하는 적어도 하나의 리소스의 사용량을 확인하는 동작;상기 확인된 적어도 하나의 리소스의 사용량 정보를 상기 메모리에 저장된 리소스 사용 데이터 세트에 기록하는 동작;상기 메모리에 저장된 리소스 사용 데이터 세트에 기초하여, 미리 정해진 통계적 분석을 통해 상기 제1어플리케이션 및 상기 제1어플리케이션의 실행 시에 사용하는 적어도 하나의 리소스 각각에 대응하는 적어도 하나의 제1이상치 임계 값을 결정하는 동작;기 저장된 상기 제1어플리케이션 및 상기 적어도 하나의 리소스 각각에 대해 설정된 적어도 하나의 제2이상치 임계 값을 상기 결정된 적어도 하나의 제1이상치 임계 값에 기초하여 업데이트 하는 동작을 수행하기 위한 인스트럭션들을 저장하는 기록 매체.
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2023-0072349 | 2023-06-05 | ||
| KR20230072349 | 2023-06-05 | ||
| KR1020230082921A KR20240173569A (ko) | 2023-06-05 | 2023-06-27 | 전자 장치 및 전자 장치의 리소스를 과다 사용하는 어플리케이션을 감지하는 방법 |
| KR10-2023-0082921 | 2023-06-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024253401A1 true WO2024253401A1 (ko) | 2024-12-12 |
Family
ID=93796154
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2024/007587 Ceased WO2024253401A1 (ko) | 2023-06-05 | 2024-06-03 | 전자 장치 및 전자 장치의 리소스를 과다 사용하는 어플리케이션을 감지하는 방법 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2024253401A1 (ko) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20120026046A (ko) * | 2009-04-30 | 2012-03-16 | 마이크로소프트 코포레이션 | 애플리케이션 효율 엔진 |
| KR20170065085A (ko) * | 2015-12-02 | 2017-06-13 | 삼성전자주식회사 | 시스템 리소스 관리를 위한 방법 및 장치 |
| US20180332107A1 (en) * | 2012-09-20 | 2018-11-15 | Amazon Technologies, Inc. | Automated profiling of resource usage |
| KR101987664B1 (ko) * | 2018-07-19 | 2019-06-11 | 나무기술 주식회사 | 클라우드 플랫폼에서 복수의 클러스터 및 어플리케이션을 모니터링하는 방법 |
| KR20200052361A (ko) * | 2017-10-13 | 2020-05-14 | 후아웨이 테크놀러지 컴퍼니 리미티드 | 클라우드-디바이스 협업적 실시간 사용자 사용 및 성능 비정상 검출을 위한 시스템 및 방법 |
-
2024
- 2024-06-03 WO PCT/KR2024/007587 patent/WO2024253401A1/ko not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20120026046A (ko) * | 2009-04-30 | 2012-03-16 | 마이크로소프트 코포레이션 | 애플리케이션 효율 엔진 |
| US20180332107A1 (en) * | 2012-09-20 | 2018-11-15 | Amazon Technologies, Inc. | Automated profiling of resource usage |
| KR20170065085A (ko) * | 2015-12-02 | 2017-06-13 | 삼성전자주식회사 | 시스템 리소스 관리를 위한 방법 및 장치 |
| KR20200052361A (ko) * | 2017-10-13 | 2020-05-14 | 후아웨이 테크놀러지 컴퍼니 리미티드 | 클라우드-디바이스 협업적 실시간 사용자 사용 및 성능 비정상 검출을 위한 시스템 및 방법 |
| KR101987664B1 (ko) * | 2018-07-19 | 2019-06-11 | 나무기술 주식회사 | 클라우드 플랫폼에서 복수의 클러스터 및 어플리케이션을 모니터링하는 방법 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020213818A1 (en) | Electronic device and method for performing fast transition between screens | |
| WO2020246822A1 (en) | Electronic device and method for switching electronic device between dual standby mode and single standby mode | |
| WO2018097557A2 (en) | Electronic device including antenna | |
| WO2019039868A1 (en) | ELECTRONIC DISPLAY DEVICE FOR APPLICATION AND METHOD FOR OPERATING THE SAME | |
| WO2022019484A1 (ko) | 디스플레이를 포함하는 전자 장치 및 그의 디스플레이 제어 방법 | |
| WO2024253401A1 (ko) | 전자 장치 및 전자 장치의 리소스를 과다 사용하는 어플리케이션을 감지하는 방법 | |
| WO2022215859A1 (ko) | 캡쳐 기능을 수행하는 전자 장치 및 전자 장치의 동작 방법 | |
| WO2023059012A1 (ko) | 다른 bss의 외부 전자 장치로부터 수신한 응답 신호에 기반하여 twt 파라미터를 설정하는 전자 장치 및 전자 장치의 동작 방법 | |
| WO2023033438A1 (ko) | 전자 장치들 간의 매칭을 수행하기 위한 전자 장치 및 이의 동작 방법 | |
| WO2022019715A1 (ko) | 전자 장치에서 키패드를 이용한 컨텐츠 검색을 제공하는 방법 및 장치 | |
| WO2022080806A1 (ko) | 플렉서블 디스플레이를 포함하는 전자 장치 및 이를 이용한 전자 장치의 상태에 따른 온도 제어 방법 | |
| WO2023085853A1 (ko) | 파일을 복구하기 위한 전자 장치 및 전자 장치의 동작 방법 | |
| WO2017082615A1 (en) | Electronic device for outputting audio signal and output device connected thereto | |
| WO2024158199A1 (ko) | 전자 장치 및 전자 장치의 성능 변화 감지 방법 | |
| WO2025018836A1 (ko) | 전자 장치 및 최근 화면 표시 방법 | |
| WO2025146990A1 (ko) | 수면 심박수 및/또는 수면 심박 변화율을 결정하는 전자 장치 및 전자 장치의 동작 방법 | |
| WO2025192910A1 (ko) | 메시지를 차단하기 위한 정책을 생성하는 전자 장치, 이의 동작 방법, 및 기록 매체 | |
| WO2026010319A1 (ko) | 기능을 실행하는 웨어러블 전자 장치, 이의 동작 방법, 및 기록 매체 | |
| WO2026023937A1 (ko) | 통신 에러를 처리하는 전자 장치, 및 그 동작 방법 및 저장 매체 | |
| WO2025211628A1 (ko) | 전자 장치 및 그의 동작 방법 | |
| WO2025220835A1 (ko) | 통신 연결을 유지하기 위한 전자 장치, 방법, 및 비-일시적 컴퓨터 판독 가능 기록 매체 | |
| WO2026010170A1 (ko) | 알림 정보를 포함하는 화면을 업데이트하기 위한 전자 장치, 방법, 및 저장 매체 | |
| WO2025028783A1 (ko) | 전자 장치 및 그 동작 방법 | |
| WO2026019040A1 (ko) | 접지를 포함하는 전자장치 | |
| WO2026034822A1 (ko) | 위치 찾기 서비스를 제공하는 전자 장치, 그 동작 방법 및 저장 매체 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24819552 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |