Electronic device and method for adaptively using model, and non-transitory computer-readable storage medium

By adaptively switching between local and remote model execution based on battery SoC and computation needs, the device addresses power consumption and discharge issues, ensuring efficient and uninterrupted operation.

WO2026038883A1PCT designated stage Publication Date: 2026-02-19SAMSUNG ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/012289
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-09-24
Filing Date
2025-08-13
Publication Date
2026-02-19

AI Technical Summary

Technical Problem

Electronic devices face challenges in efficiently utilizing trained models when the battery state of charge (SoC) is low, leading to increased power consumption and potential discharge issues, causing user inconvenience.

Method used

The electronic device adaptsively utilizes models based on the SoC and computation amount by executing trained models locally or remotely on a server, minimizing power consumption and ensuring continuous operation.

Benefits of technology

This approach reduces power consumption and prevents rapid battery discharge, maintaining device functionality and user satisfaction by optimizing model execution based on battery SoC and computational requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025012289_19022026_PF_FP_ABST
    Figure KR2025012289_19022026_PF_FP_ABST
Patent Text Reader

Abstract

This electronic device comprises: a memory storing instructions and including one or more storage media; a rechargeable battery; a communication circuit; and at least one processor including processing circuitry, wherein, when executed individually or collectively by the at least one processor, the instructions can instruct the electronic device to: identify an SoC of the battery; on the basis of data to be input into a trained model identified while the SoC is higher than a threshold SoC, perform processing related to data through a first operation of executing at least one trained model on the electronic device; on the basis of the data identified while the SoC is lower than the threshold SoC, determine, according to the computation amount related to the data, an operation to be performed on the data from among the first operation and a second operation, which executes at least another trained model on a server by using the communication circuit; and perform processing related to the data through the determined operation.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic devices, methods, and non-transitory computer-readable storage media for adaptively utilizing models

[0001] The present disclosure relates to electronic devices, methods, and non-transitory computer-readable storage media for adaptively utilizing models.

[0002] Artificial intelligence is a technology for simulating the neural activity of humans (or living things), such as perception and / or inference, and can be implemented by hardware, software, or a combination of these designed to perform computations for simulating neural activity.

[0003] The above information may be provided as background art to aid in understanding the present disclosure. No claim or determination is made as to whether any of the above is applicable as prior art related to the present disclosure.

[0004] An electronic device is described. The electronic device may include at least one processor storing instructions, the memory including one or more storage media, a rechargeable battery, communication circuitry, and processing circuitry. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a state of charge (SoC) of the battery. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify data to be input to a trained model. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data through a first operation of executing at least one trained model on the electronic device based on the identified data while the SoC is above a threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC is below the threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine, based on the computation amount, an operation to be performed on the data among the first operation and a second operation of executing at least one other trained model on a server using the communication circuit.The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data through the operation determined from among the first operation and the second operation.

[0005] A method is described. The method may be performed within an electronic device including a rechargeable battery and communication circuitry. The method may include receiving sensing data regarding the external light from the display. The method may include identifying a state of charge (SoC) of the battery. The method may include identifying data to be input to a trained model. The method may include performing processing related to the data through a first operation of executing at least one trained model on the electronic device based on the data identified while the SoC is above a threshold SoC. The method may include identifying a computation amount related to the data based on the data identified while the SoC is below the threshold SoC. The method may include determining an operation to be performed on the data between the first operation and a second operation of executing at least one other trained model on a server using the communication circuitry, based on the computation amount. The method may include an operation of performing processing related to the data through the operation determined from among the first operation and the second operation.

[0006] A non-transitory computer-readable storage medium is described. The non-transitory computer-readable storage medium may store one or more programs. The one or more programs may include instructions that, when executed by an electronic device including a rechargeable battery and communication circuitry, cause the electronic device to identify a state of charge (SoC) of the battery. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify data to be input to a trained model. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data through a first operation of executing at least one trained model on the electronic device based on the identified data while the SoC is above a threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC is lower than the threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the computation amount, an operation to be performed on the data among the first operation and a second operation of executing at least one other trained model on a server using the communication circuit. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing associated with the data through the operation determined among the first operation and the second operation.

[0007] An electronic device is described. The electronic device may include at least one processor, the processor including a memory storing instructions and including one or more storage media, a rechargeable battery, and a central processing unit (CPU) including processing circuitry and a neural processing unit (NPU) including processing circuitry. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a state of charge (SoC) of the battery. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify data to be input to a trained model. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data through the first operation of executing at least one trained model on the NPU based on the identified data while the SoC is above a threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC is below the threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine, based on the computation amount, an operation to be performed on the data among the first operation and a second operation of executing the at least one trained model on the CPU.The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data through the operation determined from among the first operation and the second operation.

[0008] A method is described. The method may be performed in an electronic device comprising a rechargeable battery, and at least one processor comprising a central processing unit (CPU) including processing circuitry and a neural processing unit (NPU) including processing circuitry. The method may include an operation of identifying a state of charge (SoC) of the battery. The method may include an operation of identifying data to be input to a trained model. The method may include an operation of performing processing related to the data through a first operation of executing at least one trained model on the NPU based on the data identified while the SoC is above a threshold SoC. The method may include an operation of identifying a computation amount related to the data based on the data identified while the SoC is below the threshold SoC. The method may include an operation of determining an operation to be performed on the data between the first operation and a second operation of executing the at least one trained model on the CPU, based on the computation amount. The method may include an operation of performing processing related to the data through the operation determined from among the first operation and the second operation.

[0009] A non-transitory computer-readable storage medium is described. The non-transitory computer-readable storage medium may store one or more programs. The one or more programs may include instructions that, when executed by an electronic device including a rechargeable battery and at least one processor including a central processing unit (CPU) including processing circuitry and a neural processing unit (NPU) including processing circuitry, cause the electronic device to identify a state of charge (SoC) of the battery. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify data to be input to a trained model. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data through a first operation of executing at least one trained model on the NPU based on the identified data while the SoC is above a threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC is below the threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the computation amount, an operation to be performed on the data among the first operation and a second operation of executing the at least one trained model on the CPU.The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data through the operation determined from among the first operation and the second operation.

[0010] In connection with the description of the drawings, the same or similar reference numerals may be used for the same or similar components.

[0011] Figure 1 illustrates an example in which at least one trained model is run while the state of charge (SoC) of the battery is below a threshold SoC.

[0012] Figure 2 is a simplified block diagram of an exemplary electronic device.

[0013] FIG. 3 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing according to the SoC of a battery.

[0014] Figure 4 illustrates an example of the amount of computation associated with data.

[0015] FIG. 5 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing according to the amount of computation.

[0016] FIG. 6 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing through the operation of executing at least one trained model on a server.

[0017] FIG. 7 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing through operations of executing trained models on electronic devices having different computational complexities depending on the amount of computation.

[0018] FIG. 8 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing by executing a trained model on at least one different processor, depending on the amount of computation.

[0019] Figure 9 illustrates an example of a user interface (UI) for notifying a change in a trained model running to process data while the battery's state of charge (SoC) is below a threshold SoC.

[0020] FIG. 10 is a flowchart illustrating exemplary operations of an electronic device for determining a processor to execute a trained model for processing data, depending on the SoC and computational power of the battery.

[0021] Figure 11 is a simplified system diagram of an exemplary electronic device.

[0022] FIG. 12 is a block diagram of an electronic device within a network environment according to various embodiments.

[0023] FIG. 13 illustrates an example of a generative artificial intelligence system according to one embodiment.

[0024] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the embodiments described herein. In connection with the description of the drawings, the same or similar reference numerals may be used for identical or similar components. Furthermore, in the drawings and related descriptions, descriptions of well-known functions and configurations may be omitted for clarity and conciseness.

[0025] Figure 1 illustrates an example in which at least one trained model is run while the state of charge (SoC) of the battery is below a threshold SoC.

[0026] Referring to FIG. 1, the electronic device (100) may be one of various forms of mobile devices, such as smartphones (e.g., bar-type smartphones, foldable-type smartphones, or rollable-type smartphones), tablets, wearable devices, cellular phones, laptops, and / or other similar computing devices, having various form factors that include circuits (or circuitry) for providing operations for executing a model.

[0027] The electronic device (100) may include a rechargeable battery (110) (e.g., the rechargeable battery (230) of FIG. 2). For example, the electronic device (100) may identify a state of charge (SoC) of the battery (110). For example, within a state (105), the electronic device (100) may identify a relatively low SoC of the battery (110). For example, the state (105) may be described as a state in which the SoC of the battery (110) is relatively low.

[0028] The electronic device (100) may include at least one trained model (115) (e.g., at least one trained model of FIG. 3). For example, the electronic device (100) may execute the at least one trained model (115) by providing input data (120) to the at least one trained model (115) to obtain output data (125). For example, the power consumed by executing the at least one trained model (115) within the electronic device (100) may be relatively high.

[0029] For example, the electronic device (100) may provide input data (120) to at least one trained model (115) while the SoC of the battery (110) is relatively low, or may identify that the SoC of the battery (110) has reached a relatively low threshold SoC while the input data (120) is provided to the at least one trained model (115). For example, even though the SoC of the battery (110) is relatively low, the electronic device (100) may run the at least one trained model (115), or may maintain the at least one trained model (115) running, thereby consuming relatively more power within the electronic device (100). For example, when the SoC of the battery (110) is relatively low (105), the execution of at least one trained model (115) may consume relatively much power within the electronic device (100), causing the battery (110) to discharge relatively quickly, or the battery (110) to discharge before acquiring output data (125). For example, the electronic device (100) may not be able to acquire output data (125) due to the discharge of the battery (110). If the battery (110) discharges relatively quickly, or the battery (110) discharges before acquiring output data (125), the user may feel uncomfortable.

[0030] A method may be required to alleviate user inconvenience caused by executing at least one trained model (115) or maintaining execution of at least one trained model (115) in a state (105) in which the SoC of the battery (110) is relatively low. To alleviate such user inconvenience, the electronic device (100) may adaptively utilize the model according to the SoC of the battery (110) and the amount of computation associated with the input data (120). The electronic device (100) may identify the SoC of the battery (110) and the amount of computation associated with the input data (120) in order to adaptively utilize the model.

[0031] The electronic device (100) may execute the operations exemplified in the descriptions of FIGS. 3 to 10 to adaptively utilize the model. The electronic device (100) may include components for executing the operations. The components may be exemplified in the description of FIG. 2.

[0032] Figure 2 is a simplified block diagram of an exemplary electronic device.

[0033] Referring to FIG. 2, the electronic device (200) may be one of various forms of mobile devices, such as smartphones having various form factors (e.g., bar-type smartphones, foldable-type smartphones, or rollable-type smartphones), tablets, wearable devices, cellular phones, laptops, and / or other similar computing devices. For example, the electronic device (200) may include the electronic device (100) of FIG. 1 or may correspond to the electronic device (100) of FIG. 1. For example, the electronic device (200) may include at least a portion of the electronic device (1201) of FIG. 12 or may correspond to at least a portion of the electronic device (1201) of FIG. 12. For example, the electronic device (200) may include at least one processor (210), a memory (220), a rechargeable battery (230), and a communication circuit (240).

[0034] At least one processor (210) may include processing circuitry. At least one processor (210) may include a central processing unit (CPU) (210-1) (e.g., including processing circuitry). At least one processor (210) may include a neural processing unit (NPU) (210-2) (e.g., including processing circuitry) and a graphic processing unit (GPU) (210-3) (e.g., including processing circuitry). For example, the NPU (210-2) and / or the GPU (210-3) may be used to execute at least one trained model or to process data in parallel. For example, they may be configured to control a memory (220), a rechargeable battery (230), and a communication circuit (240). At least one processor (210) may be configured to individually or collectively execute instructions stored in the memory (220) to cause the electronic device (200) (or the electronic device (100)) to perform at least some of the operations exemplified within the description of FIG. 1. At least one processor (210) may be configured to individually or collectively execute instructions stored in the memory (220) to cause the electronic device (200) to perform at least some of the operations exemplified within the description of FIGS. 3 through 10.

[0035] The memory (220) may include one or more storage media. The memory (220) may store various data used by at least one component of the electronic device (200) (e.g., at least one processor (210), a rechargeable battery (230), and / or a communication circuit (240)). For example, the data may include input data or output data for software and instructions related thereto. The memory (220) may include volatile memory or non-volatile memory.

[0036] A rechargeable battery (230) can supply power to at least one component (e.g., at least one processor (210), memory (220), and communication circuit (240)) of an electronic device (200). For example, the rechargeable battery (230) can include a rechargeable secondary battery. For example, the rechargeable battery (230) can be integrally disposed within the electronic device (200). For example, the SoC of the rechargeable battery (230) can be identified by at least one processor (210).

[0037] The communication circuit (240) may include hardware components for supporting transmission and / or reception of signals between the electronic device (200) and a server (e.g., the server (600) of FIG. 6). For example, the communication circuit (240) may include at least one of a modem (modulator and demodulator), an antenna, and an optical / electronic (O / E) converter. The communication circuit (240) may support wireless communication, such as cellular communication. The communication circuit (240) may support transmission and / or reception of electrical signals based on various types of protocols, such as Ethernet, a local area network (LAN), a wide area network (WAN), wireless-fidelity (WiFi), Bluetooth, Bluetooth low energy (BLE), ZigBee, long term evolution (LTE), and 5G new radio (NR). For example, the communication circuit (240) may be used to transmit requests and data to a server. For example, the communication circuit (240) can be used to receive data from a server.

[0038] The electronic device (200) illustrated in the description of FIG. 2 can execute at least some of the operations illustrated in the description of FIGS. 3 to 10. The operations illustrated in the description of FIGS. 3 to 10 can be caused by (or within) the electronic device (200) under the control of at least one processor (210).

[0039] FIG. 3 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing according to the SoC of a battery.

[0040] The flowchart illustrated in FIG. 3 is merely a flowchart according to one embodiment of the operation of the electronic device (200), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to one embodiment of the present disclosure, operations 300 to 330 may be performed by at least one processor (210) of the electronic device (200).

[0041] Referring to FIG. 3, at operation 300, at least one processor (210) may identify an SoC of a rechargeable battery (230). For example, the SoC of the battery (230) may be expressed as a ratio of a remaining capacity of the battery (230) (or a currently available capacity of the battery (230)) to a total capacity of the battery (230). As a non-limiting example, the at least one processor (210) may measure the SoC of the battery (230) by measuring the specific gravity or acidity of an electrolyte of the battery (230), or by measuring a voltage of the battery (230) or a current of the battery (230), or by measuring an internal pressure of the battery (230). However, the present invention is not limited thereto.

[0042] In operation 310, at least one processor (210) may compare the SoC of the battery (230) with a threshold SoC. For example, the threshold SoC may be described as a SoC set to determine whether the SoC of the battery (230) is relatively low. For example, the threshold SoC may be predetermined or set (or changed) by a user.

[0043] At least one processor (210) may identify data to be input to the trained model while identifying the SoC of the battery (230). For example, the trained model may include at least one trained model on the electronic device (200) and at least one other trained model on a server (e.g., server (600) of FIG. 6). For example, the data to be input to the trained model may be described as input data. For example, the data may include a prompt generated from a user's utterance or a user's text input, or data based on a user's input (e.g., text data, image data, audio data, and / or video data). For example, the at least one processor (210) may identify data to be input to the trained model based on an input (or event) for providing data to the trained model.

[0044] In operation 320, at least one processor (210) may identify data (e.g., input data) to be input to the trained model while the SoC of the battery (230) is higher than a threshold SoC. For example, a state in which the SoC of the battery (230) is higher than the threshold SoC may be explained as a state in which the SoC of the battery (230) is relatively high or a state in which the SoC of the battery (230) is sufficient for executing the trained model. The at least one processor (210) may perform processing related to the data (e.g., input data) through a first operation of executing at least one trained model on the electronic device (200) based on the identified data (e.g., input data) while the SoC of the battery (230) is higher than the threshold SoC.

[0045] For example, at least one trained model on the electronic device (200) may include a machine learning model, a deep learning model, and / or a generative artificial intelligence model included within the electronic device (200). For example, at least one trained model on the electronic device (200) may include the generative AI model (1330) of FIG. 13. For example, at least one trained model on the electronic device (200) may include a neural network model including a plurality of layers and / or operations (or calculations).As a non-limiting example, at least one trained model on the electronic device (200) may include one of a feedforward neural network (FNN), a deep neural network (DNN), a convolutional neural network (CNN), a region with convolution neural network (R-CNN), a region proposal network (RPN), a recurrent neural network (RNN), a stacking-based deep neural network (S-DNN), a state-space dynamic neural network (S-SDNN), a deconvolution network, a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), deep Q-networks, a fully convolutional network, a long short-term memory (LSTM) network, a classification network, or a combination of two or more thereof. However, the present invention is not limited thereto. For example, at least one trained model on the electronic device (200) may be trained on input data, and may perform operations based on being provided with the input data to obtain output data. At least one trained model on the electronic device (200) may include a hardware structure, or may include a software structure in addition to (or in place of) the hardware structure.

[0046] At least one processor (210) may perform a first operation of executing at least one trained model on the electronic device (200) by inputting (or providing) data (e.g., input data) to at least one trained model on the electronic device (200). For example, the at least one processor (210) may obtain other data from the at least one trained model on the electronic device (200) through the first operation. For example, the other data may be defined as output data.

[0047] For example, at least one processor (210) can minimize the latency of the time required to obtain other data (e.g., output data) through a first operation of executing at least one trained model on the electronic device (200). For example, by obtaining other data (e.g., output data) through the first operation, at least one processor (210) can protect or secure personal information included in data (e.g., input data) and other data (e.g., output data). For example, at least one processor (210) can obtain other data (e.g., output data) through the first operation while not connected to a server (e.g., server (600) of FIG. 6) (or in a state where communication with the server is not possible, or in a state where communication with the server is unstable). For example, at least one processor (210) can reduce the cost required to execute at least one other trained model on the server by obtaining other data (e.g., output data) through the first operation. For example, despite the above advantages of obtaining other data (e.g., output data) through the first operation, executing at least one trained model on the electronic device (200) may require relatively large power consumption within the electronic device (200). For example, at least one processor (210) may perform processing related to data (e.g., input data) through the first operation of executing at least one trained model on the electronic device (200) within a state where the SoC of the battery (230) is higher than a threshold SoC.

[0048] For example, at least one processor (210) may provide other data (e.g., output data) obtained from at least one trained model on the electronic device (200) to the user by displaying it through a display or outputting it through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through the first operation by obtaining other data (e.g., output data) from at least one trained model or providing other data (e.g., output data) to the user.

[0049] In operation 330, at least one processor (210) may identify data (e.g., input data) while the SoC of the battery (230) is lower than a threshold SoC, or identify that the SoC of the battery (230) reaches a threshold SoC while a trained model into which data (e.g., input data) is input is being executed. For example, a state in which the SoC of the battery (230) is lower than the threshold SoC may be described as a state in which the SoC of the battery (230) is relatively low or a state in which the SoC of the battery (230) is not sufficient to execute the trained model. For example, by executing or maintaining the execution of at least one trained model on an electronic device (200) that consumes relatively large power while the SoC of the battery (230) is lower than the threshold SoC, a problem in which the battery (230) is discharged may occur. For example, at least one processor (210) may identify a computational load associated with data (e.g., input data) based on the identified data (e.g., input data) while the SoC of the battery (230) is below a threshold SoC to determine whether to perform a second operation of executing at least one other trained model on the server instead of a first operation of executing at least one trained model on the electronic device (200). For example, the computational load associated with data (e.g., input data) may include a number of parameters for processing the data (e.g., input data), an embedding size of a trained model, and / or a batch size of the trained model. For example, the computational load associated with data (e.g., input data) may include a type of activation function for processing the data (e.g., input data), a batch size during inference for processing the data (e.g., input data), a number of fully connected layers for processing the data (e.g., input data), and a precision state of at least one model.For example, the amount of computation associated with data (e.g., input data) may be determined based on the usage pattern of the electronic device (200) and the state of the electronic device (200) (e.g., applications and processes running in the background, the ambient temperature of the electronic device (200), and / or the size of the available memory (220)). The amount of computation associated with data (e.g., input data) is exemplified within the description of FIG. 4.

[0050] Figure 4 illustrates an example of the amount of computation associated with data.

[0051] Referring to FIG. 4, a neural network (400) may be included in at least one training model on an electronic device (200). For example, a neural network (400) may be defined as a model that mimics the computational capabilities of a biological system using artificial neurons (or nodes). For example, a neural network (400) may perform human cognitive functions or learning processes through artificial neurons.

[0052] The neural network (400) may include a plurality of layers, including an input layer (410), one or more hidden layers (405), and an output layer (415). For example, the input layer (410) may generate a signal at each node in the input layer (410) by receiving a vector representing data (420) (e.g., input data). For example, signals generated at each node in the input layer (410) by data (420) (e.g., input data) may be transmitted from the input layer (410) to the hidden layers (405). For example, signals transmitted from the input layer (410) to the hidden layers (405) may be transmitted from the hidden layers (405) to the output layer (415). For example, the output layer (415) can generate other data (425) (e.g., output data) based on one or more signals received from the hidden layers (405).

[0053] For example, one or more hidden layers (405) may be convolution filters or fully connected layers in a convolutional neural network (CNN), or various types of filters or layers grouped based on specific functions or characteristics. For example, one or more hidden layers (405) may be layers based on a recurrent neural network (RNN) whose output values ​​are input back into the hidden layers (405). For example, since each of the hidden layers (405) processes signals generated from each of the nodes in the input layer (410) by data (420) (e.g., input data), the more hidden layers (405) there are, the more time and computational effort required for at least one trained model to process data (420) (e.g., input data). For example, the amount of computation associated with data (420) (e.g., input data) may be proportional to the number of hidden layers (405).

[0054] At least one processor (210) may perform tokenization processing on data (420) (e.g., input data) to input (or provide) the data (420) (e.g., input data) to at least one trained model. For example, tokenization may be described as an operation of dividing data into token units. For example, tokenization may be performed on a word-by-word basis, a character-by-character basis, and / or a sub-word basis. For example, tokenization may be a preprocessing operation on data performed for at least one trained model to efficiently process the data. For example, by performing tokenization processing on data (420) (e.g., input data), the data (420) (e.g., input data) may be composed of one or more tokens.

[0055] For example, since at least one trained model processes data (420) (e.g., input data) in token units, the more one or more tokens that make up the data (420) (e.g., input data), the more time and computation required for at least one trained model to process the data (420) (e.g., input data) may increase. For example, the computational amount associated with the data (420) (e.g., input data) may be proportional to the number of tokens that make up the data (420) (e.g., input data).

[0056] For example, at least one trained model can generate other data (425) (e.g., output data) composed of one or more tokens by inputting (or providing) data (420) (e.g., input data). For example, as the number of one or more tokens constituting other data (425) (e.g., output data) increases, the time and amount of computation required for at least one trained model to generate other data (425) (e.g., output data) may increase. For example, the amount of computation associated with data (420) (e.g., input data) may be proportional to the number of tokens constituting other data (425) (e.g., output data). Depending on the amount of computation associated with data (420) (e.g., input data), operations to be performed on data (420) (e.g., input data) to perform processing associated with data (420) (e.g., input data) are exemplified within the description of FIG. 5.

[0057] FIG. 5 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing according to the amount of computation.

[0058] The flowchart illustrated in FIG. 5 is merely a flowchart according to one embodiment of the operation of the electronic device (200), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to one embodiment of the present disclosure, operations 500 to 530 may be performed by at least one processor (210) of the electronic device (200).

[0059] Referring to FIG. 5, in operation 500, at least one processor (210) may identify a computational amount associated with data (e.g., input data) based on the identified data (e.g., input data) while the SoC of the battery (230) is lower than a threshold SoC. For example, operation 500 may correspond to operation 330 of FIG. 3, or may be referenced within the description of FIG. 4.

[0060] The amount of computation related to data (e.g., input data) may be identified to determine an operation to be performed on the data (e.g., input data) among a first operation of executing at least one trained model on the electronic device (200) and a second operation of executing at least one other trained model on a server (e.g., server 600 of FIG. 6). For example, the amount of computation related to data (e.g., input data) identified to determine an operation to be performed on the data (e.g., input data) among the first operation and the second operation may be identified further based on the network status of the electronic device (200). For example, depending on the network status of the electronic device (200), the power consumed within the electronic device (200) by the first operation of executing at least one trained model on the electronic device (200) and the power consumed within the electronic device (200) by the second operation of executing at least one other trained model on the server may be different. As a non-limiting example, within a network state where WiFi is available, the second operation of executing at least one other trained model on a server may consume relatively less power to process data (e.g., input data). Within a network state where WiFi is not available (e.g., LTE, 5G network state), the first operation of executing at least one trained model on an electronic device (200) may consume relatively less power to process data (e.g., input data).

[0061] In operation 510, at least one processor (210) may compare a computational amount associated with data (e.g., input data) with a first threshold computational amount. For example, the first threshold computational amount may be described as a computational amount set to identify whether a relatively high computational amount is required to process the data (e.g., input data). For example, the first threshold computational amount may be predetermined or set (or changed) by a user.

[0062] In operation 520, at least one processor (210) may determine an operation to be performed on the data (e.g., input data) based on a computational amount associated with the data (e.g., input data) that is higher than a first threshold computational amount, as a second operation of executing at least one other trained model on the server using the communication circuit (240). Performing processing associated with the data (e.g., input data) through the second operation is exemplified within the description of FIG. 6.

[0063] FIG. 6 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing through the operation of executing at least one trained model on a server.

[0064] The flowchart illustrated in FIG. 6 is merely a flowchart according to one embodiment of the operation of the electronic device (200), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations.

[0065] Referring to FIG. 6, in operation 610, at least one processor (210) may determine an operation to be performed on data (e.g., input data) based on a computational amount associated with the data (e.g., input data) that is higher than a first threshold computational amount, as a second operation of executing at least one other trained model on the server (600), using the communication circuit (240). For example, operation 610 may correspond to operation 520 of FIG. 5.

[0066] At operation 620, at least one processor (210) may transmit a request and data (e.g., input data) to the server (600) using the communication circuit (240) to execute at least one other trained model on the server (600) based on determining an operation to be performed on data (e.g., input data) as a second operation. The server (600) may receive the request and data (e.g., input data) from the electronic device (200).

[0067] In operation 630, the server (600) may execute at least one other trained model by inputting (or providing) data (e.g., input data) received from the electronic device (200) to at least one other trained model on the server (600) based on the request. For example, the at least one other trained model on the server (600) may include a machine learning model, a deep learning model, and / or a generative artificial intelligence model included in the server (600). For example, the at least one other trained model on the server (600) may include the generative AI model (1330) of FIG. 13. For example, the at least one other trained model on the server (600) may include a neural network model including multiple layers and / or operations (or calculations).As a non-limiting example, at least one trained model on the server (600) may include one of a feedforward neural network (FNN), a deep neural network (DNN), a convolutional neural network (CNN), a region with convolution neural network (R-CNN), a region proposal network (RPN), a recurrent neural network (RNN), a stacking-based deep neural network (S-DNN), a state-space dynamic neural network (S-SDNN), a deconvolution network, a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), deep Q-networks, a fully convolutional network, a long short-term memory (LSTM) network, a classification network, or a combination of two or more thereof. For example, at least one other trained model on the server (600) may be trained on input data, and may perform operations based on being provided with the input data to obtain output data. At least one other trained model on the server (600) may include a hardware structure, or may include a software structure in addition to (or in place of) the hardware structure.

[0068] For example, at least one processor (210) may perform a second operation of executing at least one other trained model on the server (600) using the communication circuit (240). The server (600) may obtain other data (e.g., output data) from the at least one other trained model on the server (600) by executing the at least one other trained model on the server (600).

[0069] In operation 640, the server (600) may transmit other data (e.g., output data) obtained from at least one other trained model on the server (600) to the electronic device (200). At least one processor (210) may receive other data (e.g., output data) from the server (600) using the communication circuit (240). For example, the at least one processor (210) may obtain other data (e.g., output data) through the second operation by receiving other data (e.g., output data) from the server (600).

[0070] For example, when the amount of computation associated with data (e.g., input data) is relatively high, the power consumed within the electronic device (200) for transmitting the data (e.g., input data) to the server (600) and receiving other data (e.g., output data) from the server (600) may be relatively less than the power consumed within the electronic device (200) for executing at least one trained model on the electronic device (200). For example, processing the data (e.g., input data) through a second operation of executing at least one other trained model on the server (600) may consume relatively less power within the electronic device (200) than processing the data (e.g., input data) through a first operation of executing at least one trained model on the electronic device (200). For example, at least one processor (210) may perform processing associated with the data (e.g., input data) through a second operation of executing at least one other trained model on the server (600) while the SoC of the battery (230) is lower than a threshold SoC.

[0071] For example, in a network state where WiFi is available, the power consumed within the electronic device (200) for transmitting data (e.g., input data) to the server (600) and receiving other data (e.g., output data) from the server (600) may be relatively less than the power consumed within the electronic device (200) for transmitting data (e.g., input data) to the server (600) and receiving other data (e.g., output data) from the server (600) in a network state where WiFi is not available (e.g., LTE, 5G network state). For example, in a network state where WiFi is available, at least one processor (210) may determine to perform processing related to data (e.g., input data) through a second operation of executing at least one other trained model on the server (600). For example, within a network state where WiFi is available, at least one processor (210) may perform processing related to data (e.g., input data) through a second operation of executing at least one other trained model on a server (600), thereby reducing power consumption within the electronic device (200).

[0072] For example, at least one processor (210) may provide other data (e.g., output data) obtained from at least one other trained model on the server (600) to the user by displaying it through a display or outputting it through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through a second operation by obtaining other data (e.g., output data) from at least one other trained model or providing other data (e.g., output data) to the user.

[0073] Referring back to FIG. 5 , at operation 530, at least one processor (210) may determine an operation to be performed on data (e.g., input data) as a first operation of executing at least one model on the electronic device (200) based on a computational amount associated with the data (e.g., input data) that is lower than a first threshold computational amount. For example, when the computational amount associated with the data (e.g., input data) is relatively low, the power consumed within the electronic device (200) for transmitting the data (e.g., input data) to a server (e.g., server (600) of FIG. 6 ) and receiving other data (e.g., output data) from the server may be relatively more than the power consumed within the electronic device (200) for executing at least one trained model on the electronic device (200). For example, processing data (e.g., input data) through a first operation of executing at least one trained model on the electronic device (200) may consume relatively less power within the electronic device (200) than processing data (e.g., input data) through a second operation of executing at least one other trained model on the server (600). For example, at least one processor (210) may perform processing related to data (e.g., input data) through the first operation of executing at least one trained model on the electronic device (200) while the amount of computation related to the data (e.g., input data) is lower than a first threshold amount of computation. For example, operation 530 may correspond to operation 320 of FIG. 3.

[0074] For example, in a network state where WiFi is not available (e.g., LTE, 5G network state), the power consumed within the electronic device (200) for transmitting data (e.g., input data) to the server (600) and receiving other data (e.g., output data) from the server (600) may be relatively more than the power consumed within the electronic device (200) for transmitting data (e.g., input data) to the server (600) and receiving other data (e.g., output data) from the server (600) in a network state where WiFi is available. For example, in a network state where WiFi is not available (e.g., LTE, 5G network state), at least one processor (210) may determine to perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the electronic device (200). For example, in a network state where WiFi is not available (e.g., a network state of LTE or 5G), at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the electronic device (200), thereby reducing power consumption within the electronic device (200).

[0075] For example, at least one processor (210) may determine a trained model to be executed to perform a first operation among at least one trained model on the electronic device (200). For example, the trained model to be executed to perform the first operation may be determined based on the amount of computation associated with data (e.g., input data). Determining a trained model to be executed to perform the first operation among at least one trained model on the electronic device (200) is exemplified within the description of FIG. 7.

[0076] FIG. 7 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing through operations of executing trained models on electronic devices having different computational complexities depending on the amount of computation.

[0077] The flowchart illustrated in FIG. 7 is merely a flowchart according to one embodiment of the operation of the electronic device (200), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to one embodiment of the present disclosure, operations 700 to 730 may be performed by at least one processor (210) of the electronic device (200).

[0078] Referring to FIG. 7, in operation 700, at least one processor (210) may determine an operation to be performed on data (e.g., input data) as a first operation based on an amount of operation associated with the data (e.g., input data) that is lower than a first threshold amount of operation. For example, operation 700 may correspond to operation 530 of FIG. 5.

[0079] In operation 710, at least one processor (210) may compare a computational amount associated with data (e.g., input data) with a second threshold computational amount. For example, the second threshold computational amount may be described as a computational amount set to identify whether a relatively high computational amount is required to process the data (e.g., input data). For example, the second threshold computational amount may be lower than the first threshold computational amount. For example, the second threshold computational amount may be predetermined or set (or changed) by a user.

[0080] At least one processor (210) may determine a model to perform a first operation from among at least one trained model on the electronic device (200) based on a computational amount associated with data (e.g., input data). For example, the at least one trained model on the electronic device (200) may include a first trained model having a first computational complexity and a second trained model having a second computational complexity. For example, the first computational complexity may be lower than the second computational complexity. For example, the first trained model may be described as a model having a relatively low first computational complexity, and the second trained model may be described as a model having a relatively high second computational complexity. For example, the first trained model may be described as a pruned or quantized light model.

[0081] In operation 720, at least one processor (210) may determine at least one trained model on the electronic device (200) to perform the first operation as a first trained model having a first computational complexity, based on a computational amount associated with data (e.g., input data) that is higher than a second threshold computational amount. The at least one processor (210) may perform a first operation of executing the first trained model on the electronic device (200) by inputting (or providing) data (e.g., input data) to the first trained model on the electronic device (200). For example, the at least one processor (210) may obtain other data (e.g., output data) from the first trained model through the first operation of executing the first trained model.

[0082] For example, when a trained model with a relatively high computational complexity on the electronic device (200) is used to process data (e.g., input data) with a relatively high amount of computation related to the data (e.g., input data) within a state where the SoC of the battery (230) is relatively low, a relatively large amount of computational complexity and time are required to obtain other data (e.g., output data), so that the battery (230) may be discharged before obtaining the other data (e.g., output data). For example, a first trained model with a relatively low first computational complexity may be executed to process data (e.g., input data) with a relatively high amount of computation related to the data (e.g., input data). For example, processing data (e.g., input data) through a first operation of executing a first trained model having a relatively low first computational complexity on the electronic device (200) may consume relatively less power within the electronic device (200) than processing data (e.g., input data) through a first operation of executing a second trained model having a relatively high second computational complexity on the electronic device (200). For example, at least one processor (210) may perform processing related to data (e.g., input data) through the first operation of executing the first trained model on the electronic device (200) while the amount of computation related to the data (e.g., input data) is higher than a second threshold amount of computation.

[0083] For example, at least one processor (210) may provide other data (e.g., output data) obtained from the first trained model on the electronic device (200) to the user by displaying the data or outputting the data through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through the first operation of executing the first trained model by obtaining other data (e.g., output data) from the first trained model or providing other data (e.g., output data) to the user.

[0084] In operation 730, at least one processor (210) may determine at least one trained model on the electronic device (200) to perform the first operation as a second trained model having a second computational complexity based on a computational amount associated with data (e.g., input data) that is lower than a second threshold computational amount. The at least one processor (210) may perform a first operation of executing the second trained model on the electronic device (200) by inputting (or providing) data (e.g., input data) to the second trained model on the electronic device (200). For example, the at least one processor (210) may obtain other data (e.g., output data) from the second trained model through the first operation of executing the second trained model.

[0085] For example, even if a trained model having a relatively high computational complexity on the electronic device (200) is used to process data (e.g., input data) with a relatively low amount of computation related to the data (e.g., input data) within a state where the SoC of the battery (230) is relatively low, a relatively small amount of computational complexity and time may not be required to obtain other data (e.g., output data). For example, the difference between the power consumed within the electronic device (200) to process data (e.g., input data) through a first operation of executing a first trained model having a relatively low first computational complexity on the electronic device (200) and the power consumed within the electronic device (200) to process data (e.g., input data) through a first operation of executing a second trained model having a relatively high second computational complexity on the electronic device (200) may not be large. For example, even if a second trained model having a relatively high second computational complexity is executed to process data (e.g., input data) having a relatively low computational amount related to the data (e.g., input data), the battery (230) may not be discharged. For example, at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing the second trained model on the electronic device (200) within a state in which the computational amount related to the data (e.g., input data) is lower than a second threshold computational amount. For example, since the second trained model on the electronic device (200) has a second computational complexity that is higher than the first computational complexity of the first trained model, other data (e.g., output data) obtained from the second trained model may include a response to data (e.g., input data) requested by the user.

[0086] For example, at least one processor (210) may provide other data (e.g., output data) obtained from the second trained model on the electronic device (200) to the user by displaying the data or outputting the data through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through the first operation of executing the second trained model by obtaining other data (e.g., output data) from the second trained model or providing other data (e.g., output data) to the user.

[0087] For example, at least one processor (210) may determine which processor among the at least one processor (210) will execute at least one trained model on the electronic device (200) to perform the first operation. For example, which processor among the at least one processor (210) will execute at least one trained model on the electronic device (200) to perform the first operation may be determined based on the amount of computation associated with data (e.g., input data). Determining which processor among the at least one processor (210) will execute at least one trained model on the electronic device (200) to perform the first operation is exemplified within the description of FIG. 8.

[0088] FIG. 8 is a flowchart illustrating exemplary operations of an electronic device for performing data-related processing by executing a trained model on at least one different processor, depending on the amount of computation.

[0089] The flowchart illustrated in FIG. 8 is merely a flowchart according to one embodiment of the operation of the electronic device (200), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to one embodiment of the present disclosure, operations 800 to 830 may be performed by at least one processor (210) of the electronic device (200).

[0090] Referring to FIG. 8, in operation 800, at least one processor (210) may determine an operation to be performed on data (e.g., input data) as a first operation based on an amount of operation associated with the data (e.g., input data) that is lower than a first threshold amount of operation. For example, operation 800 may correspond to operation 530 of FIG. 5.

[0091] In operation 810, at least one processor (210) may compare a computational amount associated with data (e.g., input data) with a third threshold computational amount. For example, the third threshold computational amount may be described as a computational amount set to identify whether a relatively high computational amount is required to process the data (e.g., input data). For example, the third threshold computational amount may be lower than the first threshold computational amount. For example, the third threshold computational amount may be predetermined or set (or changed) by a user.

[0092] According to another embodiment, at least one processor (210) may determine a model to perform a first operation among at least one trained model on the electronic device (200) based on a computational amount related to data (e.g., input data), and compare the computational amount related to data (e.g., input data) with a third threshold computational amount.

[0093] At least one processor (210) may determine a processor to execute at least one trained model on the electronic device (200) to perform a first operation among the at least one processor (210) according to the amount of computation related to data (e.g., input data). For example, the at least one processor (210) may include a CPU (210-1), an NPU (210-2), and a GPU (210-3). For example, the CPU (210-1) may perform various tasks within the electronic device (200), but since it cannot process data in parallel, the processing speed of a large amount of data on the CPU (210-1) may be relatively slow. For example, the NPU (210-2) (or the GPU (210-3)) may process a large amount of data relatively quickly by processing the data in parallel.

[0094] In operation 820, at least one processor (210) may determine at least one processor (210) to execute at least one trained model on the electronic device (200) to perform a first operation, based on a computational amount associated with data (e.g., input data) that is higher than a third threshold computational amount, as the NPU (210-2) (or GPU (210-3)). The at least one processor (210) may perform a first operation of executing at least one trained model on the NPU (210-2) (or GPU (210-3)) by inputting (or providing) data (e.g., input data) to the at least one trained model on the electronic device (200). For example, the at least one processor (210) may obtain other data (e.g., output data) from the at least one trained model through the first operation of executing the at least one trained model on the NPU (210-2) (or GPU (210-3)).

[0095] For example, in a state where the SoC of the battery (230) is relatively low, in order to process data (e.g., input data) having a relatively high amount of computation related to the data (e.g., input data), by executing at least one trained model on the NPU (210-2) (or GPU (210-3)) that processes the data (e.g., input data) in parallel, the data (e.g., input data) can be processed relatively quickly. For example, at least one processor (210) can process data (e.g., input data) before the battery (230) is discharged by executing at least one trained model on the NPU (210-2) (or GPU (210-3)) to process data (e.g., input data) having a relatively high amount of computation related to the data (e.g., input data). For example, at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the electronic device (200) on the NPU (210-2) (or GPU (210-3)) within a state where the amount of computation related to the data (e.g., input data) is higher than a third threshold amount of computation.

[0096] For example, at least one processor (210) may provide a user with other data (e.g., output data) obtained from at least one trained model on the electronic device (200) executed on the NPU (210-2) (or GPU (210-3)) by displaying the data or outputting the data through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the NPU (210-2) (or GPU (210-3)) by obtaining other data (e.g., output data) from the at least one trained model executed on the NPU (210-2) (or GPU (210-3)), or by providing the other data (e.g., output data) to the user.

[0097] In operation 830, at least one processor (210) may determine, based on a computational amount related to data (e.g., input data) that is less than a third threshold computational amount, that at least one processor (210) to execute at least one trained model on the electronic device (200) to perform the first operation, as the CPU (210-1). The at least one processor (210) may perform a first operation of executing at least one trained model on the CPU (210-1) by inputting (or providing) data (e.g., input data) to the at least one trained model on the electronic device (200). For example, the at least one processor (210) may obtain other data (e.g., output data) from the at least one trained model through the first operation of executing the at least one trained model on the CPU (210-1).

[0098] For example, in a state where the SoC of the battery (230) is relatively low, executing at least one trained model on the NPU (210-2) (or GPU (210-3)) that processes data (e.g., input data) in parallel to process data (e.g., input data) with a relatively low amount of computation related to the data (e.g., input data) may result in relatively high power consumption within the electronic device (200). For example, simple inference or processing of a small data set may be required on the CPU (210-1) to process data (e.g., input data) with a relatively low amount of computation related to the data (e.g., input data). For example, since the amount of computation related to data (e.g., input data) is relatively low, the difference between the time for processing data (e.g., input data) through at least one trained model running on the CPU (210-1) and the time for processing data (e.g., input data) through at least one trained model running on the NPU (210-2) (or GPU (210-3)) may be relatively small. For example, at least one processor (210) may execute at least one trained model on the CPU (210-1) to process data (e.g., input data) having a relatively low amount of computation related to data (e.g., input data), and may deactivate the NPU (210-2) (or GPU (210-3)), thereby reducing power consumption within the electronic device (200).For example, if the amount of computation associated with data (e.g., input data) is relatively low, or if at least one trained model on the electronic device (200) has relatively low complexity, the power consumed within the electronic device (200) to execute the trained model on the NPU (210-2) (or GPU (210-3)) may be greater than the power consumed within the electronic device (200) to execute the trained model on the CPU (210-1), as additional power is consumed within the electronic device (200) for the initialization overhead of the NPU (210-2) (or GPU (210-3)). For example, when the amount (or frequency) of data requiring inference (e.g., input data) is small, at least one processor (210) may reduce power consumption within the electronic device (200) by executing at least one trained model on the CPU (210-1) instead of executing at least one trained model on the NPU (210-2) (or GPU (210-3)). For example, the at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the electronic device (200) on the CPU (210-1) while the amount of computation related to the data (e.g., input data) is lower than a third threshold amount of computation.

[0099] For example, at least one processor (210) may provide a user with other data (e.g., output data) obtained from at least one trained model on the electronic device (200) running on the CPU (210-1) by displaying the data or outputting the data through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the CPU (210-1) by obtaining other data (e.g., output data) from at least one trained model on the electronic device (200) running on the CPU (210-1) or by providing the other data (e.g., output data) to the user.

[0100] For example, at least one processor (210) may be required to notify a user that a trained model running to process data (e.g., input data) has changed, or that at least one processor (210) executing a trained model to process data (e.g., input data) has changed, when the SoC of the battery (230) is lower than a threshold SoC. A user interface for notifying a user that a trained model running to process data (e.g., input data) has changed, or that at least one processor (210) executing a trained model to process data (e.g., input data) has changed is exemplified within the description of FIG. 9.

[0101] Figure 9 illustrates an example of a user interface for notifying a change in a trained model running to process data while the battery's state of charge (SoC) is below a threshold SoC.

[0102] Referring to FIG. 9, a state (900) can be described as a state in which the SoC of the battery (230) is lower than a threshold SoC. Within the state (900), at least one processor (210) can identify the SoC of the battery (230) being lower than the threshold SoC. For example, the electronic device (200) can further include a display (905). The at least one processor (210) can display an indicator (910) indicating the SoC of the battery (230) through the display (905), thereby informing the user of the SoC of the battery (230).

[0103] At least one processor (210) can receive an input for inputting (or providing) data (e.g., input data) to the trained model or an input for executing the trained model. For example, the at least one processor (210) can identify data (e.g., input data) to be input to the trained model based on the input for inputting (or providing) data (e.g., input data) to the trained model or the input for executing the trained model. For example, the at least one processor (210) can, while processing data (e.g., input data) based on data (e.g., input data) to be input to the trained model, display an indicator (915) through the display (905) to indicate that the data (e.g., input data) is being processed. For example, the at least one processor (210) can display the indicator (915) to indicate to a user that data (e.g., input data) is being processed or that other data (e.g., output data) is being generated.

[0104] At least one processor (210) may determine an operation to be performed on data (e.g., input data) among a first operation of executing at least one trained model on an electronic device (200) and a second operation of executing at least one other trained model on a server (e.g., server (600) of FIG. 6) using a communication circuit (240), based on data (e.g., input data) identified within a state (900) where the SoC of the battery (230) is lower than a threshold SoC, depending on the amount of computation of the data (e.g., input data). For example, the operation of determining an operation to be performed on data (e.g., input data) among the first operation and the second operation may correspond to operations 510, 520, and 530 of FIG. 5.

[0105] For example, at least one processor (210) may display a user interface (920) on the display (905) based on determining an action to be performed on data (e.g., input data) as a second action. For example, the user interface (920) may include text to indicate that a trained model to be executed to process the data (e.g., input data) has been determined or changed.

[0106] According to another embodiment, at least one processor (210) may determine a trained model to be executed for processing data (e.g., input data) from among at least one trained model on the electronic device (200) based on a computational amount of the data (e.g., input data) based on determining an operation to be performed on the data (e.g., input data) as a first operation. For example, the operation of determining a trained model to be executed for processing data (e.g., input data) from among at least one trained model on the electronic device (200) may correspond to operations 710, 720, and 730 of FIG. 7.

[0107] For example, at least one processor (210) may display a user interface (920) on the display (905) based on determining that the trained model to be executed for processing data (e.g., input data) is a first trained model. For example, the user interface (920) may include text to indicate that the trained model to be executed for processing data (e.g., input data) has been determined or changed.

[0108] According to another embodiment, at least one processor (210) may determine a processor to execute a trained model for processing data (e.g., input data) among the at least one processor (210) based on the amount of computation of the data (e.g., input data) based on determining an operation to be performed on the data (e.g., input data) as a first operation. For example, the operation of determining a processor to execute a trained model for processing data (e.g., input data) among the at least one processor (210) may correspond to operations 810, 820, and 830 of FIG. 8.

[0109] For example, at least one processor (210) may display a user interface (920) on the display (905) based on determining that the processor to execute the trained model for processing data (e.g., input data) is the CPU (210-1). For example, the user interface (920) may include text to indicate that the processor to execute the trained model for processing data (e.g., input data) has been determined or changed.

[0110] In another embodiment, at least one processor (210) may determine which processor among the at least one processor (210) will execute the trained model for processing data (e.g., input data) based on the SoC of the battery (230) and the amount of computation associated with the data (e.g., input data). Determining which processor among the at least one processor (210) will execute the trained model for processing data (e.g., input data) is exemplified in the description of FIG. 10.

[0111] FIG. 10 is a flowchart illustrating exemplary operations of an electronic device for determining a processor to execute a trained model for processing data, depending on the SoC and computational power of the battery.

[0112] The flowchart illustrated in FIG. 10 is merely a flowchart according to one embodiment of the operation of the electronic device (200), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to one embodiment of the present disclosure, operations 1000 to 1050 may be performed by at least one processor (210) of the electronic device (200).

[0113] Referring to FIG. 10, in operation 1000, at least one processor (210) may identify the SoC of the battery (230). For example, operation 1000 may correspond to operation 300 of FIG. 3.

[0114] In operation 1010, at least one processor (210) may compare the SoC of the battery (230) with a threshold SoC. While identifying the SoC of the battery (230), the at least one processor (210) may identify data (e.g., input data) to be input to a trained model, or may identify that the SoC of the battery (230) reaches the threshold SoC while a trained model into which data (e.g., input data) is input is executed. For example, the trained model may include at least one trained model on the electronic device (200). For example, operation 1010 may correspond to operation 310 of FIG. 3 .

[0115] In operation 1020, at least one processor (210) may identify data to be input to the trained model while the SoC of the battery (230) is higher than a threshold SoC. For example, a state in which the SoC of the battery (230) is higher than the threshold SoC may be explained as a state in which the SoC of the battery (230) is relatively high and a state in which the SoC of the battery (230) is sufficient to execute the trained model. At least one processor (210) may perform processing related to the data through a first operation in which at least one trained model is executed on the NPU (210-2) (or the GPU (210-3)) based on the identified data while the SoC of the battery (230) is higher than the threshold SoC.

[0116] At least one processor (210) can perform a first operation by inputting (or providing) data (e.g., input data) to at least one trained model running on the NPU (210-2) (or GPU (210-3)). For example, the at least one processor (210) can obtain other data (e.g., output data) from at least one trained model running on the NPU (210-2) (or GPU (210-3)) through the first operation.

[0117] For example, the NPU (210-2) (or GPU (210-3)) can process data (e.g., input data) relatively quickly by processing data in parallel. For example, by activating the NPU (210-2) (or GPU (210-3)) together with the CPU (210-1) for processing data (e.g., input data), power consumption within the electronic device (200) may increase. For example, at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the NPU (210-2) (or GPU (210-3)) within a state where the SoC of the battery (230) is higher than a threshold SoC.

[0118] For example, at least one processor (210) may provide to a user other data (e.g., output data) obtained from at least one trained model executed on the NPU (210-2) (or GPU (210-3)) by displaying it through a display or outputting it through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through the first operation by obtaining other data (e.g., output data) or providing other data (e.g., output data) to the user.

[0119] In operation 1030, at least one processor (210) may identify data (e.g., input data) while the SoC of the battery (230) is lower than a threshold SoC. For example, a state in which the SoC of the battery (230) is lower than the threshold SoC may be described as a state in which the SoC of the battery (230) is relatively low and in which the SoC of the battery (230) is not sufficient to execute a trained model. For example, by executing or maintaining execution of at least one trained model on the NPU (210-2) (or the GPU (210-3)) within a state in which the SoC of the battery (230) is lower than the threshold SoC, a problem in which the battery (230) is discharged due to activation of the NPU (210-2) (or the GPU (210-3)) may occur.

[0120] At least one processor (210) may identify a computational amount related to data (e.g., input data) based on the identified data (e.g., input data) while the SoC of the battery (230) is lower than a threshold SoC, to determine a processor that executes a trained model to process the data (e.g., input data). The computational amount related to the data (e.g., input data) may refer to the description of FIG. 4.

[0121] At least one processor (210) may compare a computational workload associated with data (e.g., input data) with a threshold computational workload. For example, the threshold computational workload may be described as a computational workload set to identify whether a relatively high computational workload is required to process the data (e.g., input data). For example, the threshold computational workload may be predetermined or set (or changed) by a user. The at least one processor (210) may determine a processor among the at least one processor (210) to execute a trained model to process the data (e.g., input data) based on the computational workload associated with the data (e.g., input data).

[0122] In operation 1040, at least one processor (210) may determine at least one processor (210) to execute at least one trained model as the NPU (210-2) (or GPU (210-3)) based on a computational amount associated with data (e.g., input data) that is higher than a threshold computational amount. The at least one processor (210) may perform a first operation of executing at least one trained model on the NPU (210-2) (or GPU (210-3)) by inputting (or providing) data (e.g., input data) to the at least one trained model on the electronic device (200). For example, the at least one processor (210) may obtain other data (e.g., output data) from the at least one trained model through the first operation of executing the at least one trained model on the NPU (210-2) (or GPU (210-3)).

[0123] For example, in a state where the SoC of the battery (230) is relatively low, in order to process data (e.g., input data) having a relatively high amount of computation related to the data (e.g., input data), by executing at least one trained model on the NPU (210-2) (or GPU (210-3)) that processes the data (e.g., input data) in parallel, the data (e.g., input data) can be processed relatively quickly. For example, at least one processor (210) can process data (e.g., input data) before the battery (230) is discharged by executing at least one trained model on the NPU (210-2) (or GPU (210-3)) to process data (e.g., input data) having a relatively high amount of computation related to the data (e.g., input data). For example, at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on an NPU (210-2) (or GPU (210-3)) on an electronic device (200) within a state where the amount of computation related to the data (e.g., input data) is higher than a threshold amount of computation.

[0124] For example, at least one processor (210) may provide a user with other data (e.g., output data) obtained from at least one trained model executed on the NPU (210-2) (or the GPU (210-3)) by displaying the data or outputting the data through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through a first operation of executing at least one trained model on the NPU (210-2) (or the GPU (210-3)) by obtaining other data (e.g., output data) from at least one trained model executed on the NPU (210-2) (or the GPU (210-3)) or by providing the other data (e.g., output data) to the user.

[0125] In operation 1050, at least one processor (210) may determine at least one processor (210) to execute at least one trained model as the CPU (210-1) based on a computational amount associated with data (e.g., input data) that is less than a threshold computational amount. The at least one processor (210) may perform a second operation of executing at least one trained model on the CPU (210-1) by inputting (or providing) data (e.g., input data) to the at least one trained model. For example, the at least one processor (210) may obtain other data (e.g., output data) from the at least one trained model through the second operation of executing the at least one trained model on the CPU (210-1).

[0126] For example, in a state where the SoC of the battery (230) is relatively low, executing at least one trained model on the NPU (210-2) (or GPU (210-3)) by activating the NPU (210-2) (or GPU (210-3)) to process data (e.g., input data) with a relatively low amount of computation related to the data (e.g., input data) may cause relatively high power consumption within the electronic device (200). For example, since the amount of computation related to the data (e.g., input data) is relatively low, the difference between the time for processing the data (e.g., input data) through at least one trained model running on the CPU (210-1) and the time for processing the data (e.g., input data) through at least one trained model running on the NPU (210-2) (or GPU (210-3)) may be relatively small. For example, at least one processor (210) may execute at least one trained model on the CPU (210-1) to process data (e.g., input data) having a relatively low amount of computation associated with the data, and may reduce power consumption within the electronic device (200) by disabling the NPU (210-2) (or the GPU (210-3)). For example, at least one processor (210) may perform processing associated with data (e.g., input data) through a second operation of executing at least one trained model on the CPU (210-1) on the electronic device (200) while the amount of computation associated with the data (e.g., input data) is lower than a threshold amount of computation.

[0127] For example, at least one processor (210) may provide to a user other data (e.g., output data) obtained from at least one trained model executed on the CPU (210-1) by displaying the data or outputting the data through a speaker. For example, at least one processor (210) may perform processing related to data (e.g., input data) through a second operation of executing at least one trained model on the CPU (210-1) by obtaining other data (e.g., output data) from at least one trained model executed on the CPU (210-1) or by providing the other data (e.g., output data) to a user.

[0128] Figure 11 is a simplified system diagram of an exemplary electronic device.

[0129] Referring to FIG. 11, the electronic device (200) may include a battery status check unit (1100), a computation amount check unit (1110), a model selection unit (1120), a network module (1130), at least one first trained model (1150), at least one second trained model (1160), and a hardware selection unit (1170). The battery status check unit (1100), the computation amount check unit (1110), the model selection unit (1120), the network module (1130), at least one first trained model (1150), at least one second trained model (1160), and the hardware selection unit (1170) may support a function of processing data (e.g., input data) through an algorithm stored in a memory (220). Although the battery status check unit (1100), the calculation amount check unit (1110), the model selection unit (1120), and the hardware selection unit (1170) are described as ‘units’, they can perform the following functions in software and / or functionally.

[0130] The battery status check unit (1100) can identify the SoC of the battery (230). For example, the battery status check unit (1100) can identify whether the SoC of the battery (230) is higher than the threshold SoC by comparing the SoC of the battery (230) with a threshold SoC. For example, the battery status check unit (1100) can perform operation 300 of FIG. 3 and operation 1000 of FIG. 10.

[0131] The computational amount verification unit (1110) can identify the computational amount related to data (e.g., input data) based on the SoC of the battery (230) that is lower than the threshold SoC. For example, the computational amount verification unit (1110) can identify whether the computational amount related to data (e.g., input data) is higher than the threshold computational amount by comparing the computational amount related to data (e.g., input data) with the threshold computational amount. For example, the computational amount verification unit (1110) can identify the computational amount related to data (e.g., input data) and provide the identified computational amount to the model selection unit (1120) and the hardware selection unit (1170). For example, the computational amount verification unit (1110) may transmit a command to the model selection unit (1120) to determine a model for processing data (e.g., input data) based on the battery (230) status (or computational amount related to data (e.g., input data)) received from the battery status verification unit (1100).

[0132] For example, the computation amount verification unit (1110) can receive information about the network status of the electronic device (200) from the network module (1130). For example, the computation amount verification unit (1110) can identify the computation amount related to data (e.g., input data) according to the network status of the electronic device (200). For example, while processing data (e.g., input data) using at least one model on a server in a network status where WiFi is not available (e.g., a network status of LTE or 5G), if using at least one model on the electronic device (200) consumes less power than using at least one model on the server, the computation amount verification unit (1110) can transmit a command to use at least one model on the electronic device (200) to the model selection unit (1120). For example, while processing data (e.g., input data) using at least one model on an electronic device (200) in a network state where WiFi is available, the computational amount verification unit (1110) may transmit a command to the model selection unit (1120) to use at least one model on the server if using at least one model on the server consumes less power in the electronic device (200) than using at least one model on the electronic device (200).

[0133] For example, the computational amount verification unit (1110) may determine hardware (e.g., CPU (210-1) or GPU (210-2)) for processing data (e.g., input data) by transmitting the remaining computational amount for processing data (e.g., input data) to the hardware selection unit (1170) based on a decision to use at least one model on the electronic device (200). For example, the computational amount verification unit (1110) may perform operations 500 and 510 of FIG. 5, operations 700 and 710 of FIG. 7, operations 800 and 810 of FIG. 8, and operations 1030 of FIG. 10.

[0134] The model selection unit (1120) can determine or change a trained model to be executed to process data (e.g., input data) based on the amount of computation received from the amount of computation verification unit (1110). For example, the model selection unit (1120) can determine an operation to be performed on data (e.g., input data) among a first operation of executing at least one trained model (e.g., a first trained model (1150) and a second trained model (1160)) on the electronic device (200) and a second operation of executing at least one other trained model (1140) on the server (600), depending on the amount of computation. For example, the model selection unit (1120) can perform operation 510 of FIG. 5 .

[0135] For example, the model selection unit (1120) may determine a trained model to be executed to perform processing related to data (e.g., input data) among at least one training (e.g., a first trained model (1150) and a second trained model (1160)) on the electronic device (200) according to the amount of computation. For example, the first trained model (1150) may have a first computational complexity, and the second trained model (1160) may have a second computational complexity that is higher than the first computational complexity. For example, the model selection unit (1120) may perform operation 710 of FIG. 7.

[0136] The hardware selection unit (1170) can determine or change a processor that executes a trained model to process data (e.g., input data) based on the amount of computation received from the amount of computation verification unit (1110). For example, the hardware selection unit (1170) can determine, based on the amount of computation, a processor (e.g., a CPU (210-1), an NPU (210-2), and a GPU (210-3)) that executes at least one trained model to perform processing related to data (e.g., input data) among at least one processor (210). For example, the hardware selection unit (1170) can perform operation 810 of FIG. 8, operation 1010 of FIG. 10, and operation 1030 of FIG. 10.

[0137] FIG. 12 is a block diagram of an electronic device within a network environment according to various embodiments.

[0138] Referring to FIG. 12, in a network environment (1200), an electronic device (1201) may communicate with an electronic device (1202) via a first network (1298) (e.g., a short-range wireless communication network), or may communicate with at least one of an electronic device (1204) or a server (1208) via a second network (1299) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (1201) may communicate with the electronic device (1204) via the server (1208). According to one embodiment, the electronic device (1201) may include a processor (1220), a memory (1230), an input module (1250), an audio output module (1255), a display module (1260), an audio module (1270), a sensor module (1276), an interface (1277), a connection terminal (1278), a haptic module (1279), a camera module (1280), a power management module (1288), a battery (1289), a communication module (1290), a subscriber identification module (1296), or an antenna module (1297). In some embodiments, the electronic device (1201) may omit at least one of these components (e.g., the connection terminal (1278)), or may have one or more other components added. In some embodiments, some of these components (e.g., sensor module (1276), camera module (1280), or antenna module (1297)) may be integrated into a single component (e.g., display module (1260)).

[0139] The processor (1220) may control at least one other component (e.g., hardware or software component) of the electronic device (1201) connected to the processor (1220) by executing, for example, software (e.g., program (1240)), and may perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (1220) may store commands or data received from other components (e.g., sensor module (1276) or communication module (1290)) in volatile memory (1232), process the commands or data stored in volatile memory (1232), and store result data in non-volatile memory (1234). According to one embodiment, the processor (1220) may include a main processor (1221) (e.g., a central processing unit or an application processor) or an auxiliary processor (1223) (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 (1221). For example, when the electronic device (1201) includes the main processor (1221) and the auxiliary processor (1223), the auxiliary processor (1223) may be configured to use less power than the main processor (1221) or to be specialized for a given function. The auxiliary processor (1223) may be implemented separately from the main processor (1221) or as a part thereof.

[0140] The auxiliary processor (1223) may control at least a portion of functions or states associated with at least one component (e.g., a display module (1260), a sensor module (1276), or a communication module (1290)) of the electronic device (1201), for example, on behalf of the main processor (1221) while the main processor (1221) is in an inactive (e.g., sleep) state, or together with the main processor (1221) while the main processor (1221) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (1223) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (1280) or a communication module (1290)). In one embodiment, the auxiliary processor (1223) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (1201) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (1208)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.

[0141] The memory (1230) can store various data used by at least one component (e.g., the processor (1220) or the sensor module (1276)) of the electronic device (1201). The data can include, for example, software (e.g., the program (1240)) and input data or output data for commands related thereto. The memory (1230) can include a volatile memory (1232) or a non-volatile memory (1234).

[0142] The program (1240) may be stored as software in memory (1230) and may include, for example, an operating system (1242), middleware (1244), or an application (1246).

[0143] The input module (1250) can receive commands or data to be used in a component of the electronic device (1201) (e.g., a processor (1220)) from an external source (e.g., a user) of the electronic device (1201). The input module (1250) 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).

[0144] The audio output module (1255) can output audio signals to the outside of the electronic device (1201). The audio output module (1255) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.

[0145] The display module (1260) can visually provide information to an external party (e.g., a user) of the electronic device (1201). The display module (1260) may include, for example, a display, a holographic device, or a projector, and a control circuit for controlling the device. In one embodiment, the display module (1260) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.

[0146] The audio module (1270) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (1270) can acquire sound through the input module (1250), output sound through the sound output module (1255), or an external electronic device (e.g., electronic device (1202)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (1201).

[0147] The sensor module (1276) can detect the operating status (e.g., power or temperature) of the electronic device (1201) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (1276) 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.

[0148] The interface (1277) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (1201) with an external electronic device (e.g., the electronic device (1202)). In one embodiment, the interface (1277) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

[0149] The connection terminal (1278) may include a connector through which the electronic device (1201) may be physically connected to an external electronic device (e.g., the electronic device (1202)). In one embodiment, the connection terminal (1278) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0150] The haptic module (1279) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. In one embodiment, the haptic module (1279) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

[0151] The camera module (1280) can capture still images and videos. According to one embodiment, the camera module (1280) may include one or more lenses, image sensors, image signal processors, or flashes.

[0152] The power management module (1288) can manage the power supplied to the electronic device (1201). According to one embodiment, the power management module (1288) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).

[0153] A battery (1289) may power at least one component of the electronic device (1201). In one embodiment, the battery (1289) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0154] The communication module (1290) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (1201) and an external electronic device (e.g., electronic device (1202), electronic device (1204), or server (1208)), and the performance of communication through the established communication channel. The communication module (1290) may operate independently from the processor (1220) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (1290) may include a wireless communication module (1292) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (1294) (e.g., a local area network (LAN) communication module, or a power line communication module). Any of these communication modules may communicate with an external electronic device (1204) via a first network (1298) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (1299) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules may be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (1292) may use subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (1296) to verify or authenticate the electronic device (1201) within a communication network such as the first network (1298) or the second network (1299).

[0155] The wireless communication module (1292) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (1292) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (1292) can support various technologies for securing performance in high-frequency bands, 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 (1292) can support various requirements specified in the electronic device (1201), an external electronic device (e.g., the electronic device (1204)), or a network system (e.g., the second network (1299)). According to one embodiment, the wireless communication module (1292) may support a peak data rate (e.g., 20 Gbps or more) for eMBB implementation, a loss coverage (e.g., 124 dB or less) for mMTC implementation, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC implementation.

[0156] The antenna module (1297) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (1297) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (1297) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (1298) or the second network (1299), may be selected from the plurality of antennas by, for example, the communication module (1290). A signal or power may be transmitted or received between the communication module (1290) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (1297).

[0157] According to various embodiments, the antenna module (1297) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high frequency band.

[0158] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).

[0159] According to one embodiment, commands or data may be transmitted or received between the electronic device (1201) and an external electronic device (1204) via a server (1208) connected to a second network (1299). Each of the external electronic devices (1202 or 1204) may be the same or a different type of device as the electronic device (1201). According to one embodiment, all or part of the operations executed in the electronic device (1201) may be executed in one or more of the external electronic devices (1202, 1204, or 1208). For example, when the electronic device (1201) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (1201) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (1201). The electronic device (1201) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (1201) may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing. In another embodiment, the external electronic device (1204) may include an Internet of Things (IoT) device. The server (1208) may be an intelligent server utilizing machine learning and / or a neural network.According to one embodiment, an external electronic device (1204) or server (1208) may be included within the second network (1299). The electronic device (1201) may be applied to intelligent services (e.g., smart homes, smart cities, smart cars, or healthcare) based on 5G communication technology and IoT-related technology.

[0160] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.

[0161] The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another component (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.

[0162] The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).

[0163] Various embodiments of the present document may be implemented as software (e.g., a program (1240)) including one or more instructions stored in a storage medium (e.g., an internal memory (1236) or an external memory (1238)) readable by a machine (e.g., an electronic device (1201)). For example, a processor (e.g., a processor (1220)) of the machine (e.g., an electronic device (1201)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.

[0164] According to one embodiment, the method according to various embodiments disclosed in this document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., 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™) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.

[0165] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and arranged in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.

[0166] FIG. 13 illustrates an example of a generative artificial intelligence system according to one embodiment.

[0167] Referring to FIG. 13, a generative artificial intelligence system (1300) illustrates an example of a system including a generative AI model (1330). For example, the generative artificial intelligence system (1300) may be included in an electronic device (200) and a server (e.g., server (600) of FIG. 6). For example, the generative AI model (1330) may include at least one trained model on the electronic device (200) and at least one other trained model on the server.

[0168] A user query / response interface (1310) can receive user input. The user input may be in the form of natural language, images, and / or videos. Furthermore, context information may also be transmitted when the user input is transmitted. The context information may include various additional information at the time of user input. For example, the various additional information may include information about the application currently being used by the user or information about the user's location. Furthermore, the user input may be in a mixed form of the aforementioned natural language, images, sounds, and context information. Furthermore, the user input may also be in a non-natural language form, such as selecting a menu. The user query / response interface (1310) can output the results of the generative artificial intelligence system (1300) to the user. The output may be in the form of natural language or specific content, and may also be provided in the form of an action requested by the user. The user query / response interface (1310) can output the results of the generative artificial intelligence system (1300) to the user. The output can be in natural language form, in the form of specific content, or in the form of an action requested by the user.

[0169] The AI ​​framework (1320) can receive user input and coordinate and control each component necessary to perform the user's intention based on the user's query.

[0170] User input received from the user question response interface (1310) can be transmitted to a prompt design component (1321). The prompt design component (1321) can be used to generate a prompt suitable for inputting the user input into an LLM or LMM. The prompt design component (1321) can be an AI component that uses a machine learning algorithm or a neural network to develop better prompts over time. The prompt design component (1321) can access knowledge repositories (1340) containing user preference data, a prompt library, and prompt examples based on the user input to generate a prompt, and transmit the generated prompt to the LLM or LMM.

[0171] The API / plug-in management component (1322) can communicate with external information when there is a request for additional information when passing user input as input to the generative model. The API / plug-in management component (1322) can establish a channel for communicating with the outside of the AI ​​Interface through the API, and can enable access to various data sources through the established channel. In addition, the API / plug-in management component (1322) can request an action through the API that performs the user input as a final action rather than an intermediate result in the application / service component (1350). Information obtained from the outside can be used to generate a prompt in the prompt design component (1321) together with the user input, or can be passed as an input to the generative AI model (1330).

[0172] The refiner component (1323) can fine-tune the output from the generative model. For example, the refiner component (1323) can verify that the content generated through the LLM and / or LMM is not irrelevant, biased, or harmful. Furthermore, the refiner component (1323) can determine the degree to which the content matches the user's desired result and, if necessary, perform additional processing. The refiner component (1323) can additionally configure and provide hints to the user to avoid undesirable output.

[0173] A generative AI model (1330) may generally refer to an artificial intelligence neural network that creates new types of data based on user input information. The generative AI model (1330) may include an image-generating model and / or a language-generating model. Representative models for generating images include a generative adversarial network (GAN) and a variational auto encoder (VAE), and examples include a Diffusion-based generative model that uses a VAE and a Transformer structure. A language-generating model is a model trained to output the most statistically appropriate output value based on input values, and representative examples include models such as CHAT-GPT 3 and CHAT-GPT 4.

[0174] For example, a language-generating model can refer to a language model that can perform inference without fine-tuning using methods such as few-shot learning, and can have more than 10 times more parameters (for example, about 100 billion parameters) than existing general language models. For example, large-scale language models such as GPT-3 (generative pre-trained transformer 3) and GPT-4 (generative pre-trained transformer 4) are excellent few-shot learners that can be controlled through natural text prompts. They can solve NLP (natural language processing) problems by understanding patterns with only a small amount of data through prompts, which is possible with in-context learning. For example, a language-generating model can also be a large multimodal model (LMM) that can recognize various types of data input, such as text, images, and speech, and generate new corresponding data.

[0175] The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary knowledge in the technical field to which the present disclosure pertains.

[0176] The electronic device (e.g., the electronic device (200) of FIG. 2) described above may include a memory (e.g., the memory (220) of FIG. 2) that stores instructions and includes one or more storage media, a rechargeable battery (e.g., the rechargeable battery (230) of FIG. 2), a communication circuit (e.g., the communication circuit (240) of FIG. 2), and at least one processor (e.g., the at least one processor of FIG. 2) that includes a processing circuit. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a state of charge (SoC) of the battery. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify data to be input to a trained model. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing associated with the data through a first operation of executing at least one trained model on the electronic device based on the data identified while the SoC was above a threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC was below the threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine, based on the computation amount, an operation to be performed on the data between the first operation and a second operation of executing at least one other trained model on a server using the communication circuit.The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data through the operation determined from among the first operation and the second operation.

[0177] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to compare the amount of computation with a threshold amount of computation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the second operation based on the amount of computation being higher than the threshold amount of computation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the first operation based on the amount of computation being lower than the threshold amount of computation.

[0178] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to compare the computational amount with a threshold computational amount based on determining the operation to be performed on the data as the first operation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform the processing associated with the data through the first operation of executing a first trained model from among the at least one trained model on the electronic device, the first trained model having a first computational complexity based on the computational amount being higher than the threshold computational amount. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform the processing associated with the data through the first operation of executing a second trained model from among the at least one trained model on the electronic device, the second trained model having a second computational complexity higher than the first computational complexity based on the computational amount being lower than the threshold computational amount.

[0179] For example, the at least one processor may include a central processing unit (CPU) including a processing circuit (e.g., CPU (210-1) of FIG. 2) and a neural processing unit (NPU) including a processing circuit (e.g., NPU (210-2) of FIG. 2). The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to compare the amount of computation with a threshold amount of computation based on determining the operation to be performed on the data as the first operation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform the processing related to the data through the first operation of executing the at least one trained model on the electronic device on the NPU based on the amount of computation being higher than the threshold amount of computation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform the processing related to the data through the first operation of executing the at least one trained model on the electronic device on the CPU based on the amount of computation that is less than the threshold amount of computation.

[0180] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the first operation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device, through the first operation, to provide the data to the at least one trained model on the electronic device. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform the processing associated with the data by obtaining other data from the at least one trained model on the electronic device.

[0181] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the second operation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to, through the second operation, transmit, using the communication circuitry, a request to the server to execute the at least one other trained model on the server. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform the processing associated with the data by receiving, using the communication circuitry, other data obtained from the at least one other trained model on the server from the server.

[0182] For example, the amount of computation may include the number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data.

[0183] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a state of a network of the electronic device. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify the amount of computation associated with the data, based on the state of the network.

[0184] The method described above may be performed in an electronic device including a rechargeable battery, communication circuitry, and at least one processor including a processing circuit. The method may include receiving sensing data regarding the external light from the display. The method may include identifying a state of charge (SoC) of the battery. The method may include identifying data to be input to a trained model. The method may include performing processing related to the data through a first operation of executing at least one trained model on the electronic device based on the data identified while the SoC is above a threshold SoC. The method may include identifying a computation amount related to the data based on the data identified while the SoC is below the threshold SoC. The method may include determining an operation to be performed on the data among the first operation and a second operation of executing at least one other trained model on a server using the communication circuitry, depending on the computation amount. The method may include an operation of performing processing related to the data through the operation determined from among the first operation and the second operation.

[0185] For example, the method may include an operation of comparing the amount of computation with a threshold amount of computation. The method may include an operation of determining the operation to be performed on the data as the second operation based on the amount of computation being higher than the threshold amount of computation. The method may include an operation of determining the operation to be performed on the data as the first operation based on the amount of computation being lower than the threshold amount of computation.

[0186] For example, the method may include an operation of comparing the amount of computation with a threshold amount of computation based on determining the operation to be performed on the data as the first operation. The method may include an operation of performing the processing related to the data through the first operation of executing a first trained model having a first computational complexity from among the at least one trained model on the electronic device based on the amount of computation being higher than the threshold amount of computation. The method may include an operation of performing the processing related to the data through the first operation of executing a second trained model having a second computational complexity higher than the first computational complexity from among the at least one trained model on the electronic device based on the amount of computation being lower than the threshold amount of computation.

[0187] For example, the at least one processor may include a central processing unit (CPU) including a processing circuit and a neural processing unit (NPU) including a processing circuit. The method may include an operation of comparing the amount of computation with a threshold amount of computation based on determining the operation to be performed on the data as the first operation. The method may include an operation of performing the processing related to the data through the first operation of executing the at least one trained model on the electronic device on the NPU based on the amount of computation being higher than the threshold amount of computation. The method may include an operation of performing the processing related to the data through the first operation of executing the at least one trained model on the electronic device on the CPU based on the amount of computation being lower than the threshold amount of computation.

[0188] For example, the method may include an operation of determining the operation to be performed on the data as the first operation. The method may include an operation of providing the data to the at least one trained model on the electronic device through the first operation. The method may include an operation of performing the processing related to the data by obtaining other data from the at least one trained model on the electronic device.

[0189] For example, the method may include an operation of determining the operation to be performed on the data as the second operation. The method may include an operation of transmitting, via the communication circuit, a request to the server to execute the at least one other trained model on the server through the second operation. The method may include an operation of performing the processing related to the data by receiving, via the communication circuit, other data obtained from the at least one other trained model on the server from the server.

[0190] For example, the amount of computation may include the number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data.

[0191] For example, the method may include an operation for identifying a state of a network of the electronic device. The method may include an operation for identifying the amount of computation associated with the data based on the state of the network.

[0192] The non-transitory computer-readable storage medium described above may store one or more programs. The one or more programs may include instructions that, when executed by an electronic device including a rechargeable battery, communication circuitry, and at least one processor including a processing circuit, cause the electronic device to identify a state of charge (SoC) of the battery. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify data to be input to a trained model. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data through a first operation of executing at least one trained model on the electronic device based on the identified data while the SoC is above a threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC is lower than the threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the computation amount, an operation to be performed on the data among the first operation and a second operation of executing at least one other trained model on a server using the communication circuit. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing associated with the data through the operation determined among the first operation and the second operation.

[0193] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to compare the amount of computation with a threshold amount of computation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the amount of computation being higher than the threshold amount of computation, the operation to be performed on the data as the second operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the amount of computation being lower than the threshold amount of computation, the operation to be performed on the data as the first operation.

[0194] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to compare the computational amount with a threshold computational amount based on determining the operation to be performed on the data as the first operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform the processing associated with the data through the first operation of executing a first trained model having a first computational complexity from among the at least one trained model on the electronic device based on the computational amount being higher than the threshold computational amount. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform the processing associated with the data through the first operation of executing a second trained model having a second computational complexity from among the at least one trained model on the electronic device based on the computational amount being lower than the threshold computational amount.

[0195] For example, the at least one processor may include a central processing unit (CPU) including a processing circuit and a neural processing unit (NPU) including a processing circuit. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to compare the amount of computation with a threshold amount of computation based on determining the operation to be performed on the data as the first operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform the processing associated with the data through the first operation of executing the at least one trained model on the electronic device on the NPU based on the amount of computation being higher than the threshold amount of computation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform the processing associated with the data through the first operation of executing the at least one trained model on the electronic device on the CPU based on the amount of computation being lower than the threshold amount of computation.

[0196] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine the operation to be performed on the data as the first operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to provide the data to the at least one trained model on the electronic device through the first operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform the processing associated with the data by obtaining other data from the at least one trained model on the electronic device.

[0197] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine the operation to be performed on the data as the second operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to, through the second operation, transmit a request to the server, using the communication circuitry, to execute the at least one other trained model on the server. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform the processing associated with the data by receiving, using the communication circuitry, other data obtained from the at least one other trained model on the server from the server.

[0198] For example, the amount of computation may include the number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data.

[0199] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify a state of a network of the electronic device. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify the amount of computation associated with the data based on the state of the network.

[0200] The electronic device as described above may include at least one processor including a memory storing instructions and one or more storage media, a rechargeable battery, and a central processing unit (CPU) including processing circuitry and a neural processing unit (NPU) including processing circuitry. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a state of charge (SoC) of the battery. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify data to be input to a trained model. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data through the first operation of executing at least one trained model on the NPU based on the identified data while the SoC is higher than a threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC is below the threshold SoC. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine, based on the computation amount, an operation to be performed on the data among the first operation and a second operation of executing the at least one trained model on the CPU.The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data through the operation determined from among the first operation and the second operation.

[0201] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to compare the amount of computation with a threshold amount of computation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the first operation based on the amount of computation being higher than the threshold amount of computation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the second operation based on the amount of computation being lower than the threshold amount of computation.

[0202] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the first operation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to, through the first operation, provide the data to the at least one trained model executing on the NPU. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data by obtaining other data from the at least one trained model executing on the NPU.

[0203] For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to determine the operation to be performed on the data as the second operation. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to, through the second operation, provide the data to the at least one trained model executing on the CPU. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to perform processing related to the data by obtaining other data from the at least one trained model executing on the CPU.

[0204] For example, the amount of computation may include the number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data.

[0205] The method as described above can be performed in an electronic device including at least one processor including a rechargeable battery, a central processing unit (CPU) including a processing circuit, and a neural processing unit (NPU) including a processing circuit. The method can include an operation of identifying a state of charge (SoC) of the battery. The method can include an operation of identifying data to be input to a trained model. The method can include an operation of performing processing related to the data through the first operation of executing at least one trained model on the NPU based on the data identified while the SoC is above a threshold SoC. The method can include an operation of identifying a computation amount related to the data based on the data identified while the SoC is below the threshold SoC. The method can include an operation of determining an operation to be performed on the data among the first operation and a second operation of executing the at least one trained model on the CPU, depending on the computation amount. The method may include an operation of performing processing related to the data through the operation determined from among the first operation and the second operation.

[0206] For example, the method may include an operation of comparing the amount of computation with a threshold amount of computation. The method may include an operation of determining the operation to be performed on the data as the first operation based on the amount of computation being higher than the threshold amount of computation. The method may include an operation of determining the operation to be performed on the data as the second operation based on the amount of computation being lower than the threshold amount of computation.

[0207] For example, the method may include an operation of determining the operation to be performed on the data as the first operation. The method may include an operation of providing the data to the at least one trained model running on the NPU through the first operation. The method may include an operation of performing processing related to the data by obtaining other data from the at least one trained model running on the NPU.

[0208] For example, the method may include an operation of determining the operation to be performed on the data as the second operation. The method may include an operation of providing the data to the at least one trained model executing on the CPU through the second operation. The method may include an operation of performing processing related to the data by obtaining other data from the at least one trained model executing on the CPU.

[0209] For example, the amount of computation may include the number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data.

[0210] The non-transitory computer-readable storage medium described above may store one or more programs. The one or more programs may include instructions that, when executed by an electronic device comprising at least one processor, the processor comprising a central processing unit (CPU) including a rechargeable battery and a processing circuit, and a neural processing unit (NPU) including a processing circuit, cause the electronic device to identify a state of charge (SoC) of the battery. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify data to be input to a trained model. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data through the first operation of executing at least one trained model on the NPU based on the identified data while the SoC is above a threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to identify a computation amount associated with the data based on the data identified while the SoC is below the threshold SoC. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the computation amount, an operation to be performed on the data among the first operation and a second operation of executing the at least one trained model on the CPU.The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data through the operation determined from among the first operation and the second operation.

[0211] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to compare the amount of computation with a threshold amount of computation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the amount of computation being higher than the threshold amount of computation, the operation to be performed on the data as the first operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine, based on the amount of computation being lower than the threshold amount of computation, the operation to be performed on the data as the second operation.

[0212] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine the operation to be performed on the data as the first operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to provide the data to the at least one trained model executing on the NPU through the first operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data by obtaining other data from the at least one trained model executing on the NPU.

[0213] For example, the one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to determine the operation to be performed on the data as the second operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to provide the data to the at least one trained model executing on the CPU through the second operation. The one or more programs may include instructions that, when executed by the electronic device, cause the electronic device to perform processing related to the data by obtaining other data from the at least one trained model executing on the CPU.

[0214] For example, the amount of computation may include the number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data.

[0215] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains.

Claims

1. In an electronic device (200), A memory (220) storing instructions and including one or more storage media; Rechargeable battery (230); Communication circuit (240); and At least one processor (210) comprising a processing circuit, The above instructions, when executed individually or collectively by the at least one processor (210), Identify the SoC (state of charge) of the above battery (230), Identify the data to be input into the trained model, Performing processing related to the data through a first operation of executing at least one trained model on the electronic device (200) based on the data identified while the SoC is higher than the threshold SoC, and Based on the data identified while the above SoC is lower than the above threshold SoC: Identify the computation amount associated with the above data, Depending on the amount of the above operation, an operation to be performed on the data is determined among the first operation and the second operation of executing at least one other trained model on the server (600) using the communication circuit (240), and To perform processing related to the data through the operation determined from among the first operation and the second operation, causing the above electronic device (200), Electronic device (200).

2. In claim 1, The above instructions, when executed individually or collectively by the at least one processor (210), Compare the above computational amount with the critical computational amount, Based on the above operation amount that is higher than the above threshold operation amount, the operation to be performed on the data is determined as the second operation, and Based on the amount of operation lower than the threshold amount of operation, the operation to be performed on the data is determined as the first operation. causing the above electronic device (200), Electronic device (200).

3. In claim 1, The above instructions, when executed individually or collectively by the at least one processor (210), Based on determining the operation to be performed on the above data as the first operation, comparing the amount of operation with the threshold amount of operation, and Performing the processing related to the data through the first operation of executing a first trained model having a first computational complexity among the at least one trained model on the electronic device (200) based on the computational amount higher than the threshold computational amount, and To perform the processing related to the data through the first operation of executing a second trained model having a second computational complexity higher than the first computational complexity among the at least one trained model on the electronic device (200) based on the computational amount lower than the threshold computational amount. causing the above electronic device (200), Electronic device (200).

4. In claim 1, At least one processor (210) above, It includes a central processing unit (CPU) (210-1) including a processing circuit and a neural processing unit (NPU) (210-2) including a processing circuit, The above instructions, when executed individually or collectively by the at least one processor (210), Based on determining the operation to be performed on the above data as the first operation, comparing the amount of operation with the threshold amount of operation, and Based on the above computation amount higher than the above threshold computation amount, the processing related to the data is performed through the first operation of executing the at least one trained model on the electronic device (200) on the NPU (210-2), and To perform the processing related to the data through the first operation of executing the at least one trained model on the electronic device (200) on the CPU (210-1) based on the amount of the operation lower than the threshold amount of operation, causing the above electronic device (200), Electronic device (200).

5. In claim 1, The above instructions, when executed individually or collectively by the at least one processor (210), The operation to be performed on the above data is determined as the first operation, Through the first operation, the data is provided to the at least one trained model on the electronic device (200), and By obtaining other data from the at least one trained model on the electronic device (200), to perform the processing related to the data, causing the above electronic device (200), Electronic device (200).

6. In claim 1, The above instructions, when executed individually or collectively by the at least one processor (210), The operation to be performed on the above data is determined as the second operation, Through the second operation, using the communication circuit (240), a request is sent to the server (600) to execute the at least one other trained model on the server (600), and By using the above communication circuit (240), by receiving other data obtained from the at least one other trained model on the server (600) from the server (600), the processing related to the data is performed. causing the above electronic device (200), Electronic device (200).

7. In claim 1, The above calculation amount is, The number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data. Electronic device (200).

8. In claim 1, The above instructions, when executed individually or collectively by the at least one processor (210), Identifying the status of the network of the above electronic device (200), and According to the above state of the above network, to identify the amount of computation related to the above data, causing the above electronic device (200), Electronic device (200).

9. In the electronic device (200), A memory (220) storing instructions and including one or more storage media; a rechargeable battery (230); and At least one processor (210) including a central processing unit (CPU) (210-1) including a processing circuit and a neural processing unit (NPU) (210-2) including a processing circuit, The above instructions, when executed individually or collectively by the at least one processor (210), Identify the SoC (state of charge) of the above battery (230), Identify the data to be input into the trained model, Performing processing related to the data through the first operation of executing at least one trained model on the NPU (210-2) based on the data identified while the SoC is higher than the threshold SoC, and Based on the data identified while the above SoC is lower than the above threshold SoC: Identify the computation amount associated with the above data, Depending on the amount of the above operation, an operation to be performed on the data is determined among the first operation and the second operation of executing the at least one trained model on the CPU (210-1), and To perform processing related to the data through the operation determined from among the first operation and the second operation, causing the above electronic device (200), Electronic device (200).

10. In claim 9, The above instructions, when executed individually or collectively by the at least one processor (210), Compare the above computational amount with the critical computational amount, Based on the above operation amount that is higher than the above threshold operation amount, the operation to be performed on the data is determined as the first operation, and Based on the amount of operation lower than the threshold amount of operation, the operation to be performed on the data is determined as the second operation. causing the above electronic device (200), Electronic device (200).

11. In claim 9, The above instructions, when executed individually or collectively by the at least one processor (210), The operation to be performed on the above data is determined as the first operation, Through the first operation, the data is provided to the at least one trained model running on the NPU (210-2), and By obtaining other data from the at least one trained model running on the NPU (210-2), processing related to the data is performed. causing the above electronic device (200), Electronic device (200).

12. In claim 9, The above instructions, when executed individually or collectively by the at least one processor (210), The operation to be performed on the above data is determined as the second operation, Through the second operation, the data is provided to the at least one trained model running on the CPU (210-1), and By obtaining other data from the at least one trained model running on the CPU (210-1), processing related to the data is performed. causing the above electronic device (200), Electronic device (200).

13. In claim 9, The above calculation amount is, The number of hidden layers for performing the processing related to the data, the number of tokens for performing the processing related to the data, the type of activation function for performing the processing related to the data, and / or the number of fully connected layers for performing the processing related to the data. Electronic device (200).

14. A method executed within an electronic device (200) comprising a rechargeable battery (230), a communication circuit (240), and at least one processor (210) comprising a processing circuit, the method comprising: An operation for identifying the SoC (state of charge) of the above battery (230), and The action of identifying the data to be input to the trained model, and An operation of performing processing related to the data through a first operation of executing at least one trained model on the electronic device (200) based on the data identified while the SoC is higher than the threshold SoC, and Based on the data identified while the above SoC is lower than the above threshold SoC: An operation for identifying the computation amount associated with the above data, and An operation for determining an operation to be performed on the data among the first operation and the second operation of executing at least one other trained model on the server (600) using the communication circuit (240) according to the amount of the above operation, and Including an operation for performing processing related to the data through the operation determined from among the first operation and the second operation. method.

15. In claim 14, the method comprises: An operation of comparing the above operation amount with a critical operation amount, An operation for determining the operation to be performed on the data as the second operation based on the operation amount higher than the threshold operation amount, and An operation that determines the operation to be performed on the data as the first operation based on the operation amount lower than the threshold operation amount, method.

Citation Information

Patent Citations

  • Electronic apparatus for changing state of charging battery according to state of battery

    KR1020180116059A

  • Gate Cutting Device

    KR1020200123367A

  • Secondary battery, battery pack including the same, and secondary battery manufacturing method

    KR1020260013669A

  • Method and apparatus for diagnosing battery status through soc estimation

    KR102599803B1

  • Neural network system, and Operating method of neural network system

    KR102610820B1