WO2024063437A1 - Method and device for managing artificial intelligence model - Google Patents

Method and device for managing artificial intelligence model Download PDF

Info

Publication number
WO2024063437A1
WO2024063437A1 PCT/KR2023/013789 KR2023013789W WO2024063437A1 WO 2024063437 A1 WO2024063437 A1 WO 2024063437A1 KR 2023013789 W KR2023013789 W KR 2023013789W WO 2024063437 A1 WO2024063437 A1 WO 2024063437A1
Authority
WO
WIPO (PCT)
Prior art keywords
artificial intelligence
intelligence model
information
model
request
Prior art date
Application number
PCT/KR2023/013789
Other languages
French (fr)
Korean (ko)
Inventor
콘다하르샤
고얄알록
라마 춘추스리
Original Assignee
쿠팡 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020230041868A external-priority patent/KR20240041201A/en
Application filed by 쿠팡 주식회사 filed Critical 쿠팡 주식회사
Publication of WO2024063437A1 publication Critical patent/WO2024063437A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • Embodiments of this specification relate to methods and devices for managing artificial intelligence models.
  • the embodiment of the present specification transmits control information confirmed based on information related to the request to an artificial intelligence model, and provides result information received from the artificial intelligence model to the client device, thereby facilitating interaction between the client device and artificial intelligence. It relates to a method and device for managing an artificial intelligence model that is controlled.
  • This disclosure is proposed to solve the above-mentioned problems and provides a method and device for managing an artificial intelligence model.
  • the present disclosure identifies identified control information based on information related to the request, transmits the identified control information to an artificial intelligence model related to the request, and provides result information received from the artificial intelligence model to a client device.
  • the purpose is to provide a method and device for managing an artificial intelligence model to control the interaction between a client device and an artificial intelligence model.
  • a method of managing an artificial intelligence model in an electronic device includes the steps of receiving a request from a client device; Confirming information related to the request; Based on the information, confirming at least one artificial intelligence model corresponding to the request; Transmitting control information identified based on the information to at least one artificial intelligence model; Receiving result information according to control information from at least one artificial intelligence model; and providing result information to a client device.
  • the information includes identification information about the request, information about at least one artificial intelligence model corresponding to the request, information about input data of at least one artificial intelligence model, and information about the execution type corresponding to the request. It may be characterized as including.
  • the step of transmitting control information to at least one artificial intelligence model includes checking the execution order of the at least one artificial intelligence model based on information about the input-output relationship for the at least one artificial intelligence model. ; and identifying control information based on the execution order.
  • the execution order of the at least one artificial intelligence model may include an execution order between the artificial intelligence models included in each of the plurality of groups, A plurality of groups may be characterized as being executed in parallel.
  • information about the execution type may be determined based on the expected time until result information is received.
  • providing the result information to the client device may include providing the result information to the waiting client device in response to receiving the result information.
  • providing result information to the client device may include transmitting the result information to a data processing platform.
  • receiving the request may include transmitting identification information to the client device in response to receiving the request.
  • result information stored in the data processing platform may be characterized by being identified by the client device based on identification information.
  • the step of confirming at least one artificial intelligence model includes identifying each of the at least one artificial intelligence model as one of a first type of processor unit-based artificial intelligence model and a second type of processor unit-based artificial intelligence model. May include steps.
  • the first group including a first type of processor unit-based artificial intelligence model among the at least one artificial intelligence model includes a keyword detection model, and a second type of processor among the at least one artificial intelligence model.
  • the second group, including unit-based artificial intelligence models may be characterized as including optical character recognition models.
  • the step of confirming at least one artificial intelligence model includes a first group including a first type of processor unit-based artificial intelligence model among the at least one artificial intelligence model, and a second group of the at least one artificial intelligence model. It may include assigning a second group including a type of processor unit-based artificial intelligence model to a first type of processor unit server and a second type of processor unit server, respectively.
  • the second type of processor unit server includes a plurality of instances, and the instances corresponding to each artificial intelligence model included in the second group are responsible for memory use of the artificial intelligence model included in the second group. It may be characterized as being determined based on historical data.
  • An electronic device for managing an artificial intelligence model includes a transceiver; Storage for storing one or more instructions; and receiving a request from a client device, confirming information related to the request, based on the information, identifying at least one artificial intelligence model corresponding to the request, and transmitting the identified control information based on the information to at least one artificial intelligence. It may include a processor that transmits to the model, receives result information according to control information from at least one artificial intelligence model, and provides the result information to the client device.
  • the recording medium according to the third aspect of the present disclosure may be a non-transitory computer-readable recording medium that records a program for executing a method for managing an artificial intelligence model on a computer.
  • an electronic device receives a request from a client device, it can check at least one artificial intelligence model corresponding to the request and control information for efficiently executing the at least one artificial intelligence model. Additionally, the electronic device can receive result information from an artificial intelligence model executed according to control information, and provide the received result information to the client device.
  • the function that regulates the interaction between client devices and artificial intelligence models is unified in electronic devices, latency is lowered and machine learning models can be managed efficiently.
  • FIG. 1 is a diagram illustrating a system in which a method of managing an artificial intelligence model by an electronic device according to various embodiments can be implemented.
  • Figure 2 is a flowchart showing how an electronic device manages an artificial intelligence model.
  • FIG. 3 is a diagram illustrating an embodiment in which an electronic device manages an artificial intelligence model when the execution type is the first type.
  • FIG. 4 is a diagram illustrating an embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
  • FIG. 5 is a diagram illustrating another embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
  • Figure 6 is a diagram for explaining an embodiment of changing the execution type.
  • Figure 7 is a diagram to explain an embodiment of dividing and managing an artificial intelligence model into a GPU-based artificial intelligence model and a CPU-based artificial intelligence model.
  • FIG. 8 is a diagram illustrating an embodiment of allocating a GPU instance corresponding to an artificial intelligence model based on history data about memory usage of the artificial intelligence model.
  • Figure 9 is a block diagram illustrating an electronic device for managing an artificial intelligence model according to an embodiment.
  • the “terminal” mentioned below may be implemented as a computer or portable terminal that can connect to a server or other terminal through a network.
  • the computer includes, for example, a laptop, desktop, laptop, etc. equipped with a web browser
  • the portable terminal is, for example, a wireless communication device that guarantees portability and mobility.
  • all types of communication-based terminals such as IMT (International Mobile Telecommunication), CDMA (Code Division Multiple Access), W-CDMA (W-Code Division Multiple Access), and LTE (Long Term Evolution), smartphones, tablet PCs, etc. It may include a handheld-based wireless communication device.
  • each block of the processing flow diagram diagrams and combinations of the flow diagram diagrams can be performed by computer program instructions.
  • These computer program instructions can be mounted on a processor of a general-purpose computer, special-purpose computer, or other programmable data processing equipment, so that the instructions performed through the processor of a computer or other programmable data processing equipment are described in the flow chart block(s). It creates the means to perform functions.
  • These computer program instructions may also be stored in computer-usable or computer-readable memory that can be directed to a computer or other programmable data processing equipment to implement a function in a particular manner, so that the computer-usable or computer-readable memory It is also possible to produce manufactured items containing instruction means that perform the functions described in the flowchart block(s).
  • Computer program instructions can also be mounted on a computer or other programmable data processing equipment, so that a series of operational steps are performed on the computer or other programmable data processing equipment to create a process that is executed by the computer and can be processed by the computer or other programmable data processing equipment. Instructions that perform processing equipment may also provide steps for executing the functions described in the flow diagram block(s).
  • each block may represent a module, segment, or portion of code that includes one or more executable instructions for executing specified logical function(s).
  • each block may represent a module, segment, or portion of code that includes one or more executable instructions for executing specified logical function(s).
  • FIG. 1 is a diagram illustrating a system in which a method of managing an artificial intelligence model by an electronic device according to various embodiments can be implemented.
  • system 10 may be implemented by various types of devices.
  • system 10 may include electronic device 100, client device 110, server 120, and data processing platform 130.
  • the system 10 shown in Figure 1 shows only components relevant to this embodiment. Accordingly, those skilled in the art can understand that other general-purpose components may be included in addition to the components shown in FIG. 1.
  • Electronic device 100, client device 110, server 120, and data processing platform 130 may each include a transceiver, storage, and processor.
  • the electronic device 100, client device 110, server 120, and data processing platform 130 each mean a unit that processes at least one function or operation, which is hardware or software, or hardware and It can be implemented through a combination of software.
  • the electronic device 100, the client device 110, the server 120, and the data processing platform 130 are each referred to as separate devices or servers, but this may have a logically divided structure, among which At least some of them may be implemented as separate functions in one device or server.
  • the electronic device 100, the client device 110, the server 120, and the data processing platform 130 may include a plurality of computer systems or computer software implemented as network servers.
  • the electronic device 100, client device 110, server 120, and data processing platform 130 may have sub-devices capable of communicating with other network servers via a computer network such as an intranet or the Internet. It may refer to a computer system and computer software that is connected and receives a request to perform a task, performs the task, and provides a performance result.
  • At least some of the electronic device 100, client device 110, server 120, and data processing platform 130 are built on a series of applications that can operate on a network server and other nodes inside or connected to It can be understood as a broad concept that includes various databases.
  • at least some of the electronic device 100, client device 110, server 120, and data processing platform 130 may run DOS, Windows, Linux, UNIX, or It can be implemented using various network server programs provided depending on the operating system such as MacOS.
  • Networks include Local Area Network (LAN), Wide Area Network (WAN), Value Added Network (VAN), mobile radio communication network, satellite communication network, and combinations thereof. It is a data communication network in a comprehensive sense that allows each network constituent shown in FIG. 1 to communicate smoothly with each other, and may include wired Internet, wireless Internet, and mobile wireless communication networks.
  • Wireless communications include, for example, wireless LAN (Wi-Fi), Bluetooth, Bluetooth low energy, ZigBee, WFD (Wi-Fi Direct), UWB (ultra wideband), and infrared communication (IrDA, infrared Data Association). ), NFC (Near Field Communication), etc., but are not limited thereto.
  • the electronic device 100 receives a request from the client device 110, checks information related to the request, checks at least one artificial intelligence model corresponding to the request based on the information, and receives the information.
  • Control information identified based on can be transmitted to at least one artificial intelligence model, result information according to the control information can be received from at least one artificial intelligence model, and the result information can be provided to the client device 110.
  • the operation of the electronic device 100 transmitting control information to at least one artificial intelligence model may include transmitting control information to the server 120 executing at least one artificial intelligence model.
  • the client device 110 may be a program that can access services on other computer systems such as the electronic device 100 through a network
  • the server 120 may be any processor unit server such as a GPU server or CPU server.
  • the client device 110 and server 120 are not limited thereto.
  • the client device 110 may operate in standby mode while connected to the electronic device 100 or may perform another task while disconnected from the electronic device 100. More specifically, when a time-consuming artificial intelligence model needs to be executed or when the available memory usage on the server 120 is low, the client device 110 operates in an asynchronous mode and sends a request to the electronic device. It may be more appropriate to disconnect from (100).
  • the electronic device 100 may publish the resulting information received from the server 120 to the data processing platform 130, and the client device ( 110) can identify result information among the data stored in the data processing platform 130 based on the request ID corresponding to the request, and subscribe or consume the identified result information. Accordingly, the client device 110 may indirectly receive result information from the electronic device 100.
  • the result information may include output data of at least one artificial intelligence model, and the output data of at least one artificial intelligence model may be stored separately in the data processing platform 130.
  • the client device 110 may identify result information including output data of at least one artificial intelligence model stored in the data processing platform 130 using the request ID.
  • the data processing platform 130 may be a data processing platform for data exchange between servers and electronic devices.
  • the data processing platform 130 may be a platform related to Apache Kafka, an open source message broker project, but is not limited thereto.
  • the electronic device 100 may operate as an orchestrator that regulates the interaction between the client device 110, the server 120, and the data processing platform 130, and the electronic device 100 may operate as an orchestrator. May include non-blocking I/O. According to this system 10, the waiting time of the client device 110 until the electronic device 100 receives a request from the client device 110 and provides result information can be significantly reduced, and non-blocking IO By introducing it, the high cost of input and output can be reduced. Additionally, by using non-blocking IO, other actions can be taken, such as running another artificial intelligence model before receiving the output data. In other words, the electronic device 100 can process requests from a large amount of traffic more efficiently.
  • the request transmitted by the client device 110 may be provided to the machine learning model through the electronic device 100 without separate processing through the data processing platform 130.
  • the client device 110 can easily check result information based on the received request ID, so the system for collecting output data of the artificial intelligence model can be unified in the electronic device 100 and be efficient. Below, a specific example in which the electronic device 100 manages an artificial intelligence model will be examined in detail.
  • Figure 2 is a flowchart showing how an electronic device manages an artificial intelligence model.
  • each operation in which an electronic device manages an artificial intelligence model involves some operations being changed, replaced, or some sequences between operations within the range clearly understood by those skilled in the art to which the present invention pertains. It can be clearly understood that can be changed.
  • step S210 the electronic device 100 may receive a request from a client device.
  • step S220 the electronic device 100 may check information related to the request.
  • the electronic device 100 may receive a request from the client device 110 and check information related to the request.
  • the client device 110 may use at least one artificial intelligence model when determining one feature among a plurality of features used for business decision making. That is, the request received from the client device 110 may be a request for running an artificial intelligence model in relation to determining features. For example, decision-making to improve the quality of providing items in the Internet environment may require comprehensive decision-making based on various features, such as the first feature for whether inappropriate keywords are included and the second feature for image verification. .
  • the client device 110 may transmit a request corresponding to the first feature to the electronic device 100.
  • the request may include identification information about the request, information about at least one artificial intelligence model corresponding to the request, information about input data of the artificial intelligence model, and information about the execution type corresponding to the request.
  • Identification information for a request is information for distinguishing a request from other requests, and may be set by the client device 110.
  • At least one artificial intelligence model may be an artificial intelligence model required to determine a first feature among a plurality of artificial intelligence models executable through a server. Whether or not the artificial intelligence model is required to determine the first feature may be determined by the client device 110.
  • the execution type of the request may be determined as one of the first type, Synchronous, and the second type, Asynchronous. After the electronic device 100 receives a request, whether the client device 110 and the electronic device 100 are connected may vary depending on the execution type of the request. Here, the execution type may be determined based on the expected time to receive result information corresponding to the request.
  • the electronic device 100 when the electronic device 100 confirms at least one artificial intelligence model corresponding to the request, the electronic device 100 generates output data of the at least one artificial intelligence model based on history data related to the inference of the at least one artificial intelligence model. You can check the estimated time to collect everything. In addition, the electronic device 100 can more accurately check the expected time based on the amount of memory currently available in the server 120. Based on the expected time, the electronic device 100 may determine whether the execution type of the corresponding request is appropriately set. An embodiment related to this will be examined in detail in FIG. 6.
  • the input data of the artificial intelligence model may be data used as input to at least one previously learned artificial intelligence model. More specifically, the input data may be list-type data including a plurality of images. Additionally, at least one artificial intelligence model may be based on one input data, but is not limited to this. For example, information related to the request may include information about input data corresponding to each of at least one artificial intelligence model.
  • step S230 the electronic device 100 may check at least one artificial intelligence model corresponding to the request based on the information.
  • the electronic device 100 may check the execution order of at least one artificial intelligence model.
  • the electronic device 100 may check the execution order of at least one artificial intelligence model based on a graph of the execution order of a plurality of artificial intelligence models. More specifically, the electronic device 100 may check a graph of the execution order of a plurality of artificial intelligence models based on information about the input-output relationship for at least one artificial intelligence model.
  • the graph may be information in the form of a tree diagram that includes the execution order of the artificial intelligence model.
  • the first artificial intelligence model may be an artificial intelligence model that uses data A and data B as input data and output data, respectively, and the second artificial intelligence model may use data B and data C as input data and output data, respectively.
  • the electronic device 100 configures the artificial intelligence model to execute the second artificial intelligence model after executing the first artificial intelligence model, based on information about the input-output relationship between the first artificial intelligence model and the second artificial intelligence model. You can check the graph of the execution order.
  • At least one artificial intelligence model can be performed in parallel for multiple groups. For example, when at least one artificial intelligence model is divided into multiple groups according to the characteristics and functions of the artificial intelligence model, checking the execution order of the artificial intelligence model involves executing the execution between artificial intelligence models included in each of the plurality of groups. This may include checking the order. More specifically, dividing at least one artificial intelligence model into a plurality of groups according to the characteristics and functions of the artificial intelligence model may mean separating the groups into groups that do not depend on each other in input-output relationships. For example, if the NLP-related artificial intelligence model and the computer vision-related artificial intelligence model do not depend on each other, the NLP-related artificial intelligence model and the computer vision-related artificial intelligence model can be executed in parallel with each other.
  • the electronic device 100 may determine each of the at least one artificial intelligence model as one of a first type of processor unit-based artificial intelligence model and a second type of processor unit-based artificial intelligence model.
  • the first type of processor unit and the second type of processor unit may correspond to a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU), respectively.
  • the A processor unit-based artificial intelligence model only refers to an artificial intelligence model that operates more efficiently on the processor unit server A, and may not mean an artificial intelligence model that operates only on the processor unit server A.
  • the first type of processor unit-based artificial intelligence model refers to an artificial intelligence model that operates more efficiently on a first type of processor unit server, and may operate on a second type of processor unit.
  • the second type of processor unit-based artificial intelligence model simply means an artificial intelligence model that operates more efficiently on the second type of processor unit server and can operate on the first type of processor unit server.
  • the performance of the artificial intelligence model is superior on either the GPU server or the CPU server may vary.
  • computer vision-related artificial intelligence models such as optical character recognition (OCR) model and logo detection model may be more efficient models when run based on a GPU server.
  • OCR optical character recognition
  • keyword detection models and age detection models which are examples of artificial intelligence models related to natural language processing, may be more efficient models when run based on a CPU server.
  • the criteria for an efficient model may include the latency, cost, and prediction accuracy of the artificial intelligence model.
  • the electronic device 100 comprehensively considers the type of task being executed or scheduled to be executed in the server 120, task status information, the type of at least one artificial intelligence model, and the execution order of at least one artificial intelligence model, Hardware resources allocated to at least one artificial intelligence model can be flexibly changed. For example, even if the artificial intelligence model operates more efficiently on the first type of processor unit, if there are many tasks being processed on the first type of processor unit server, the artificial intelligence model that runs through the second type of processor unit server may be used. It can work. When hardware resources are dynamically changed, information about a server corresponding to at least one artificial intelligence may be included in the control information.
  • step S240 the electronic device 100 may transmit control information identified based on the information to at least one artificial intelligence model.
  • the electronic device 100 may transmit control information identified based on the information to at least one artificial intelligence model.
  • the operation of transmitting control information to at least one artificial intelligence model may include transmitting control information to each server and executing the artificial intelligence model according to input data corresponding to the control information in each server. You can.
  • Control information may be information including information about the server on which the artificial intelligence model runs and the execution order of the artificial intelligence model.
  • step S250 the electronic device 100 may receive result information according to control information from at least one artificial intelligence model.
  • the electronic device 100 may receive output data of the artificial intelligence model as execution of the artificial intelligence model is completed. Accordingly, the electronic device 100 can collect result data of at least one artificial intelligence model and check result information. At this time, the result data of at least one artificial intelligence model may be output at different times, and the electronic device 100 waits until all result data of at least one artificial intelligence model are received, and then outputs the at least one artificial intelligence model. Output data from intelligent models can be collected.
  • step S260 the electronic device 100 may provide result information to the client device.
  • the electronic device 100 may provide result information to the client device 110 according to different methods, based on whether the execution type corresponding to the request is the first type or the second type. Additionally, the electronic device 100 may identify result information by collecting output data according to the operation of the artificial intelligence model from at least one artificial intelligence model driven in parallel. Accordingly, the electronic device 100 may return the identified result information to the client device 110.
  • FIG. 3 is a diagram illustrating an embodiment in which the electronic device 100 manages an artificial intelligence model when the execution type is the first type.
  • the client device 110 may use at least one artificial intelligence model when determining one feature among a plurality of features used for business decision making. For example, when determining features related to content creation of an SDP page, an OCR model, keyword detection model, brand detection model, and logo detection model may be needed. Referring to FIG. 3, FIG. 3 illustrates an embodiment using an OCR model and a brand detection model. Additionally, when determining features related to the creation of content on other pages, other artificial intelligence models may be used in addition to the OCR model, keyword detection model, brand detection model, and logo detection model.
  • the electronic device 100 may receive a request from the client device 110 and check information 300 related to the request.
  • the received request may include the following information.
  • the request ID 301 which is identification information for the request, may be '01a-c140-bf972'
  • the execution type 302 may be sync, which is the 'first type'
  • 'http://urllink1' may be a dummy URL for explanation.
  • the execution type according to the embodiment of FIG. 3 may be determined as the first type, Synchronous. Since the execution type 302 is the first type, the client device 110 may operate in standby mode while connected to the electronic device 100 after transmitting the request.
  • the electronic device 100 may determine the execution order of at least one artificial intelligence model. For example, as input data 'http://urllink1' is input to the OCR model, the OCR model uses 'http://urllink1' as input data to output device-readable text data as output data. You can. In addition, text data, which is the output data of the OCR model, can be used as input data of the brand detection model, and the OCR model and brand detection model may correspond to dependent artificial intelligence models. Accordingly, the electronic device 100 can confirm the execution order in which the brand detection model is executed after the OCR model, based on information about the input-output relationship between the OCR model and the brand detection model. Additionally, the electronic device 100 may generate control information including the confirmed execution order, at least one artificial intelligence model to be executed, and 'http://urllink1' as input data 304.
  • the electronic device 100 may transmit control information to at least one artificial intelligence model. Accordingly, at least one artificial intelligence model may be executed based on control information. More specifically, 1) the OCR model can generate text data as output data based on 'http://urllink1', which is the input data 304. The generated text data may be transmitted to the electronic device 100. Additionally, the generated text data can be used as input data for a brand detection model. 2) The brand detection model can generate brand data as output data based on text data received as input data. Additionally, the generated brand data may be transmitted to the electronic device 100.
  • the electronic device 100 may collect text data and brand data, which are output data, and transmit the resulting information including all output data to the client device 110 operating in standby mode. Additionally, the electronic device 100 may collect output data and then transmit result information including the output data to the client device 110.
  • the electronic device 100 When the execution type is the first type, the electronic device 100 provides result information to the client device 110 operating in standby mode, and the request ID, which is identification information for the request, may be unused data. . Therefore, when the execution type is the first type, the request ID, which is identification information for the request, may be information provided optionally.
  • FIG. 4 is a diagram illustrating an embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
  • the electronic device 100 may receive a request from the client device 110 and check information 400 related to the request.
  • the received request may include the following information.
  • the request ID 401 which is identification information for the request, may be '01a-c140-bf972', 2) the execution type 402 may be async, which is the 'second type', 3)
  • the request type 403, which is information about at least one artificial intelligence model, may be type A.
  • the request type may be a type preset in the client device 110 and the electronic device 100, and the request type may include information about at least one artificial intelligence model corresponding to the request type. Additionally, information about at least one artificial intelligence model included in the request type may be changed by the client device.
  • type A according to one embodiment may be a type that uses an OCR model, a keyword detection model, and an age detection model as at least one artificial intelligence model.
  • the Request Type 403 in FIG. 4 and the Detection 303 in FIG. 3 are both fields for at least one artificial intelligence model, and the Request Type and Detection may be optionally included in the information. 4)
  • the input data 404 for at least one artificial intelligence model may be 'http://urllink1'.
  • the execution type according to the embodiment of FIG. 4 may be the second type, Asynchronous. Accordingly, as the client device 110 receives the request ID from the electronic device 100, the connection between the client device 110 and the electronic device 100 may be disconnected. Accordingly, when the inference of the artificial intelligence model takes time, the client device 110 can perform other tasks.
  • the electronic device 100 may determine the execution order of at least one artificial intelligence model. Similar to the embodiment of FIG. 3, output data of the OCR model may be used as input data of the keyword detection model, and output data of the keyword detection model may be used as input data of the age detection model. Accordingly, the electronic device 100 can check the execution order in which the OCR model, keyword detection model, and age detection model are executed. Accordingly, the electronic device 100 generates control information including the confirmed execution order and 'http://urllink1', which is input data 304 of the at least one artificial intelligence model and OCR model that is the target of execution. You can.
  • the electronic device 100 may transmit control information to a server to run at least one artificial intelligence model. Accordingly, at least one artificial intelligence model may be executed based on control information. More specifically, 1) the OCR model can generate text data as output data based on 'http://urllink1', which is the input data 304. The generated text data may be transmitted to the electronic device 100. Additionally, the generated text data can be used as input data for a keyword detection model. 2) The keyword detection model can use the received text data as input data to generate keyword data as output data. Additionally, the generated keyword data may be transmitted to the electronic device 100. 3) The age detection model can use the received keyword data as input data to generate data about age as output data. Additionally, the generated data on age can be transmitted to the electronic device 100.
  • the electronic device 100 may not directly provide result information including output data of at least one artificial intelligence model to the client device 110. At this time, the electronic device 100 may publish the result information to the data processing platform 130.
  • the data processing platform 130 is not limited to Apache Kafka, but a specific example of transmitting result information to a client device using Apache Kafka will be described below.
  • the electronic device 100 may set the result information as a Kafka message and transmit it to the data processing platform 130.
  • the data processing platform 130 is a platform for Apache Kafka
  • the data processing platform 130 may include a Kafka cluster.
  • the data processing platform 130 may store the result information received from the electronic device 100 in a Kafka topic of the Kafka cluster. More specifically, the result information may be stored in a Kafka topic of the data processing platform 130 with the request ID as the name of the Kafka topic. Accordingly, the client device can easily identify the Kafka topic corresponding to the request by using the name of the Kafka topic, thereby filtering out irrelevant requests.
  • a Kafka topic corresponding to each client device 110 may be pre-designated, but is not limited to this.
  • Kafka topics may be divided into multiple partitions. Accordingly, the data processing platform 130 may store the output data of at least one artificial intelligence model in different partitions of the Kafka topic of the data processing platform 130 where the request ID is the name of the Kafka topic, but this is limited. That is not the case.
  • Client device 110 may conceal result information stored in data processing platform 130. More specifically, the client device 110 can use the request ID to identify the Kafka topic corresponding to the request among a plurality of topics. Accordingly, the client device 110 can receive result information stored in the Kafka topic corresponding to the request ID. In relation to this, the client device 110 may periodically check whether a Kafka topic with the name of the Kafka topic corresponding to the request ID exists in the data processing platform 130.
  • the operation of the client device 110 to periodically check whether a Kafka topic with the name of the Kafka topic corresponding to the request ID exists in the data processing platform 130 at a random time may be inefficient.
  • the electronic device 100 includes information about the execution state of at least one artificial intelligence model at the time of receiving the request, history data about the execution of at least one artificial intelligence model, and the server. Based on at least one of the information about the amount of available memory, the expected time until the resulting information is transmitted to the data processing platform 130 can be predicted.
  • the electronic device 100 may transmit information about the request ID and the expected time to the client device 110. That is, the client device 110 can check whether a Kafka topic with the name of the Kafka topic corresponding to the request ID exists in the data processing platform 130, based on information about the expected time, and receive the result information. there is. Accordingly, the overall cost of system 10 can be greatly reduced.
  • FIG. 5 is a diagram illustrating another embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
  • the electronic device 100 may receive a request from the client device 110 and check information 500 related to the request.
  • the received request may include the following information.
  • the request ID 501 which is identification information for the request, may be '01a-c140-bf972', and 2) the execution type 502 may be Async, which is the 'second type'. 3) Additionally, the data 503 may include a plurality of input data and information about an artificial intelligence model corresponding to each of the plurality of input data. More specifically, referring to FIG. 5, at least one artificial intelligence model corresponding to http://urllink1, which is the first input data, may include an OCR model, a keyword detection model, and an age detection model. Additionally, at least one artificial intelligence model corresponding to http://urllink2, which is the second input data, may include an authentication-related model.
  • requesttype and detection are not separately described as shown in FIGS. 3 and 4, but the detection field or requesttype field may be written together in the data field. Additionally, http://urllink1 and http://urllink2 may be dummy URLs for explanation purposes.
  • the electronic device 100 may determine the execution order of at least one artificial intelligence model. More specifically, when the artificial intelligence model corresponding to the request is divided into a plurality of groups, the execution order of at least one artificial intelligence model may include the execution order between the artificial intelligence models included in each of the plurality of groups, A plurality of groups may be characterized as being executed in parallel.
  • the OCR model, keyword detection model, age detection model, and authentication-related model can be divided into a first group related to text analysis through NLP and a second group related to image analysis through computer vision.
  • the first group may include an OCR model, a keyword detection model, and an age detection model
  • the second group may include an authentication-related model. Since the authentication-related model does not depend on computer-readable text data through OCR, the authentication-related model can be executed in parallel with the artificial intelligence model included in the first group. Accordingly, the electronic device 100 may check the execution order of the OCR model, keyword detection model, and age detection model included in the first group, as well as the execution order that allows the first group and the second group to be executed in parallel. Additionally, information related to the request received from the client device 110 may include information regarding the execution order and parallel execution of at least one artificial intelligence model. Accordingly, it may be possible for the client device 110 to specify the execution order of at least one artificial intelligence model.
  • the electronic device 100 may transmit control information including the confirmed execution order to the artificial intelligence model. More specifically, the electronic device 100 may transmit control information to the server 120, and the server 120 may 1) provide first input data “http://urllink1” as input data for the OCR model and 2) the second input data, “http://urllink2”, can be provided as input data for the authentication-related model. Detailed information related to the operation of the artificial intelligence model will be omitted as it is similar to Figure 4.
  • the electronic device 100 may receive output data including text data, keyword data, age data, and authentication data from the artificial intelligence model. Additionally, the electronic device 100 can collect the received output data and check the result information. The electronic device 100 may provide the request ID and result information to the data processing platform 130 so that the result information is stored in a Kafka topic of the data processing platform 130 using the request ID as the name of the Kafka topic. Accordingly, the client device 110 can receive result information from a topic that has the name of the topic corresponding to the request ID.
  • Figure 6 is a diagram for explaining an embodiment of changing the execution type.
  • the electronic device 100 may receive a request from the client device 110 and check information 600 related to the request.
  • the received request may include the following information.
  • the request ID 601 is “01a-c140-bf972”
  • the execution type 602 is the first type
  • the data 603 is a plurality of input data and each of the plurality of input data. May include information about the artificial intelligence model.
  • the electronic device 100 checks the execution order of at least one artificial intelligence model corresponding to the request and then receives result information based on information about the execution state of at least one artificial intelligence model.
  • time can be predicted. For example, if the expected time is longer than the set time, the electronic device 100 may determine that the execution type is improperly set. Accordingly, the electronic device 100 may transmit a request including whether to change the execution type from the first type to the second type to the client device 110.
  • the electronic device 100 may provide result information to the client device 110 by setting the execution type corresponding to the request as the first type.
  • the electronic device 100 may not publish result information including text data, keyword data, data about age, and data about authentication as output data to the data processing platform 130, and the electronic device 100 ) can directly transmit the result information to the waiting client device 110.
  • the electronic device 100 may receive a response changing the execution type from the client device 110 within a set time. Accordingly, the electronic device 100 publishes result information including text data, keyword data, age data, and authentication data as output data to the data processing platform 130, and the client device 110 receives the request. You can use the ID to conceal the result information stored in the Kafka topic corresponding to the request. At this time, since the operation of the electronic device 100 in FIG. 6 is the same as the operation of the electronic device 100 in FIG. 5, detailed information will be omitted.
  • Figure 7 is a diagram to explain an embodiment of dividing and managing an artificial intelligence model into a GPU-based artificial intelligence model and a CPU-based artificial intelligence model.
  • the electronic device 100 may identify each of the at least one artificial intelligence model as one of a first type of processor unit-based artificial intelligence model and a second type of processor unit-based artificial intelligence model.
  • the first type of processor unit and the second type of processor unit may correspond to a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU), respectively.
  • the electronic device 100 may allocate the first type of processor unit-based artificial intelligence model and the second type of processor unit-based artificial intelligence model to the first type of processor unit server and the second type of processor unit server.
  • the first type of processor unit-based artificial intelligence model and the second type of processor unit-based artificial intelligence model cannot be run only on the first type of processor unit server and the second type of processor unit server, respectively.
  • the artificial intelligence model operates more efficiently on the first type of processor unit server, if there are many tasks currently being processed on the first type of processor unit server, the artificial intelligence that runs through the second type of processor unit server It can act as a model.
  • the first type of processor unit server and the second type of processor unit server may correspond to the CPU server 720 and GPU server 710 of FIG. 7, respectively.
  • artificial intelligence models can be divided into GPU-based artificial intelligence models and CPU-based artificial intelligence models.
  • the electronic device 100 may classify the artificial intelligence model corresponding to the request into one of a CPU-based artificial intelligence model and a GPU-based artificial intelligence model.
  • computer vision-related artificial intelligence models such as optical character recognition (OCR) models and logo detection models
  • OCR optical character recognition
  • logo detection models may be more efficient models when based on GPUs.
  • the optical character recognition model and logo detection model can run on both CPU-based devices and GPU-based devices, but may be an artificial intelligence model that runs more efficiently on GPU-based devices.
  • keyword detection models and age detection models which are examples of artificial intelligence models related to natural language processing, may be more efficient models when based on CPU.
  • the keyword detection model and age detection model can be run on both CPU-based devices and GPU-based devices, but may be an artificial intelligence model that runs more efficiently on CPU-based devices.
  • the server 120 of FIG. 7 may include a GPU server 710 and a CPU server 720.
  • Using the GPU server 710 for inference of an artificial intelligence model allows the artificial intelligence model to be managed more efficiently in many aspects than using only the CPU server 720.
  • the efficiency of the system 10 can be increased in terms of processing speed for providing result information according to a request and cost considering the latency of the client device.
  • the GPU instance is an element that constitutes the GPU server 710, and may be a sub-server of the GPU server used in artificial intelligence, etc. in frameworks and applications.
  • the electronic device 100 allocates a first group including a CPU-based artificial intelligence model to the CPU server 720, and assigns a second group including a GPU-based artificial intelligence model to the GPU server 710. can be assigned to .
  • information about servers corresponding to a plurality of artificial intelligence models may be set in the electronic device 100. That is, the electronic device 100 may determine a server corresponding to an artificial intelligence model based on information about servers corresponding to a plurality of artificial intelligence models.
  • the operation of determining a server may include determining a GPU instance included in the GPU server 710 or a container included in the CPU server 720.
  • the electronic device 100 may allocate an artificial intelligence model included in the first group to one of a plurality of containers included in the CPU server 720.
  • the CPU server 720 may be the Kubernetes open source platform, but is not limited thereto.
  • the electronic device 100 may allocate an artificial intelligence model included in the second group to one of a plurality of instances included in the GPU server 720.
  • the instances or containers that are actually executed may be different.
  • the OCR model may be assigned to a first instance included in the GPU server 710
  • the keyword detection model may be assigned to a first container included in the CPU server 720.
  • GPU instances and containers can be connected to artificial intelligence models through a web server.
  • the server address operated by each artificial intelligence model may be included in the control information. More specifically, the endpoint related to the server address for each artificial intelligence model may be included in the control information.
  • the electronic device 100 may call an endpoint corresponding to each artificial intelligence model.
  • the endpoint may be a point such as a URL that allows access to resources such as output data on the server.
  • adding a new artificial intelligence model under the system 10 can be easily performed using the endpoint. Specifically, by setting 1) the input data of the new artificial intelligence model and 2) the end point of the new artificial intelligence model, the electronic device 100 can easily manage the new artificial intelligence model. For example, when adding a chart detection model, 1) first data as input data and 2) first URL as endpoint may be set, and the electronic device 100 may set the first data and first URL based on the first data and first URL. , the output data of the chart detection model can be obtained.
  • GPU server 710 may include spot instances in addition to on-demand instances.
  • a spot instance can be called an instance that can be stopped arbitrarily by the administrator, but is efficient in terms of cost. However, since it can be stopped arbitrarily, it is necessary to appropriately adjust the amount of memory allocated to spot instances. Accordingly, when the spot instance is interrupted, the electronic device 100 may run an artificial intelligence model based on another GPU instance based on a preset replacement rule. Additionally, each GPU instance may be characterized as being connected to the corresponding machine learning model through a single thread.
  • FIG. 8 is a diagram illustrating an embodiment of allocating a GPU instance corresponding to an artificial intelligence model based on history data about memory usage of the artificial intelligence model.
  • FIG. 8 shows the electronic device 100 allocating an OCR model, a keyword detection model, a gender detection model, an age detection model, and an authentication-related model to the GPU server 810 and the CPU server 820 included in the server 120. An example is shown.
  • the electronic device 100 may determine the GPU instance corresponding to at least one artificial intelligence model based on history data about memory usage of the artificial intelligence model included in the second group. For example, each GPU instance may be allocated 16GB of memory. Additionally, historical data on the memory usage of artificial intelligence models shows that the OCR model, gender detection model, and age detection model can use 12GB, 6GB, and 6GB of memory on average, respectively. At this time, if the OCR model and another artificial intelligence model are allocated to the same GPU instance, there may be a risk of exceeding the amount of memory allocated to the GPU instance. Accordingly, the electronic device 100 may 1) assign an OCR model to the first instance, and 2) assign a gender detection model and an age detection model to the second instance based on history data about memory usage of the artificial intelligence model. there is.
  • the electronic device 100 may allocate a new instance to the artificial intelligence model included in the second group. For example, the electronic device 100 may assign a second instance and a third instance to the gender detection model and the age detection model, respectively, by adding the third instance.
  • This process is similarly applicable to the operation of determining a container corresponding to an artificial intelligence model included in the first group.
  • the memory usage of keyword detection models and authentication-related models can be large. Accordingly, the electronic device 100 may 1) allocate a keyword detection model to the first container and 2) allocate an authentication-related model to the second container based on history data about memory usage of the artificial intelligence model.
  • connection means that the artificial intelligence model through the container can be run before and after the artificial intelligence model through the GPU instance.
  • text data which is the output data of the OCR model
  • text data generated by executing the OCR model through the first instance of the GPU server 810 may be transmitted to the first container of the CPU server 820.
  • keyword data generated by executing the keyword detection model through the first container of the CPU server 820 may be transmitted to the second instance of the GPU server 810.
  • the process of determining the instance or container corresponding to each artificial intelligence model is not fixed, and can be flexibly adjusted based on the memory usage history data of the artificial intelligence model. For example, 1) If the OCR model, gender detection model, and age detection model consume 4GB, 4GB, and 4GB of memory on average, respectively, then the OCR model, gender detection model, and age detection model can be assigned to one GPU instance. There is. Conversely, as the capacity of the model and input data increases, the OCR model, gender detection model, and age detection model use 12 GB, 10 GB, and 10 GB of memory on average, respectively. Can be assigned to different GPU instances.
  • the GPU-based artificial intelligence model may be operated through a container of the CPU server 820. It may be possible.
  • Figure 9 is a block diagram illustrating an electronic device for managing an artificial intelligence model according to an embodiment.
  • the electronic device 900 of FIG. 9 may correspond to the electronic device 100 of the present specification.
  • the electronic device 900 of the present disclosure may include a transceiver 910, a storage 920, and a processor 930, according to an embodiment.
  • the components shown in FIG. 9 are not essential for implementing the electronic device, so the electronic device 900 described herein may have more or fewer components than the components listed above.
  • the processor 930 may include at least one processor.
  • the transceiver 910 can communicate with an external device using wired or wireless communication technology and may include the transceiver 910.
  • the external device can be a client device, terminal, open source platform, or server.
  • communication technologies used by the transceiver 910 include GSM (Global System for Mobile communication), CDMA (Code Division Multi Access), LTE (Long Term Evolution), 5G, WLAN (Wireless LAN), and Wi-Fi (Wireless-Fidelity). ), Bluetooth, RFID (Radio Frequency Identification), Infrared Data Association (IrDA), ZigBee, NFC (Near Field Communication), etc., but are not limited thereto.
  • the transceiver 910 may receive a request from the client device 110 and transmit control information to at least one artificial intelligence model. Additionally, the transceiver 910 may receive result information according to control information from at least one artificial intelligence model. If the execution type is the first type, the electronic device 100 may directly transmit result information to the client device 110. If the execution type is the second type, the electronic device 100 may transmit result information to the data processing platform 130.
  • the storage 920 may store information for performing at least one method described above with reference to FIGS. 1 to 9 .
  • Storage 920 may be referred to as memory and may be volatile memory or non-volatile memory. Additionally, the storage 920 may store one or more instructions required to perform the operation of the processor 930, and may temporarily store data stored on the platform or in an external memory. For example, the storage 920 may store information about input-output relationships for at least one artificial intelligence model and history data about memory usage of the artificial intelligence model.
  • the processor 930 can control the overall operation of the electronic device 900 and process data and signals.
  • the processor 930 may perform one of the methods described above with reference to FIGS. 1 to 9 .
  • the processor 930 controls embodiments performed by the electronic device 900 through interaction with the transceiver 910 and the storage 920 and further components that the electronic device 900 may include. You can.
  • the processor 930 receives a request from the client device 110, confirms information related to the request, based on the information, verifies at least one artificial intelligence model corresponding to the request, and generates the information.
  • Control information identified based on can be transmitted to at least one artificial intelligence model, result information according to the control information can be received from at least one artificial intelligence model, and the result information can be provided to the client device 110.
  • the electronic device or terminal includes a processor, memory for storing and executing program data, permanent storage such as a disk drive, a communication port for communicating with an external device, a touch panel, and a key. , user interface devices such as icons, etc.
  • Methods implemented as software modules or algorithms may be stored on a computer-readable recording medium as computer-readable codes or program instructions executable on the processor.
  • computer-readable recording media include magnetic storage media (e.g., ROM (read-only memory), RAM (random-access memory), floppy disk, hard disk, etc.) and optical read media (e.g., CD-ROM). ), DVD (Digital Versatile Disc), etc.
  • the computer-readable recording medium is distributed among computer systems connected to a network, so that computer-readable code can be stored and executed in a distributed manner.
  • the media may be readable by a computer, stored in memory, and executed by a processor.
  • This embodiment can be represented by functional block configurations and various processing steps. These functional blocks may be implemented in various numbers of hardware or/and software configurations that execute specific functions. For example, embodiments include integrated circuit configurations such as memory, processing, logic, look-up tables, etc. that can execute various functions under the control of one or more microprocessors or other control devices. can be hired. Similar to how the components can be implemented as software programming or software elements, this embodiment includes various algorithms implemented as combinations of data structures, processes, routines or other programming constructs, such as C, C++, Java ( It can be implemented in a programming or scripting language such as Java, assembler, Python, etc. Functional aspects may be implemented as algorithms running on one or more processors.
  • this embodiment may employ conventional technologies for electronic environment settings, signal processing, and/or data processing.
  • Terms such as “mechanism,” “element,” “means,” and “composition” can be used broadly and are not limited to mechanical and physical components. The term may include the meaning of a series of software routines in connection with a processor, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed is a method for managing an artificial intelligence model in an electronic device. Specifically, the method for managing an artificial intelligence model may comprise the steps of: receiving a request from a client device; identifying information related to the request; identifying at least one artificial intelligence model corresponding to the request on the basis of the information; transmitting control information identified on the basis of the information to the at least one artificial intelligence model; receiving result information according to the control information from the at least one artificial intelligence model; and providing the result information to the client device.

Description

인공지능 모델을 관리하기 위한 방법 및 장치Method and device for managing artificial intelligence models
본 명세서의 실시 예는 인공지능 모델을 관리하기 위한 방법 및 장치에 관한 것이다. 본 명세서의 실시 예는 리퀘스트와 관련된 정보에 기반하여 확인된 제어 정보를 인공지능 모델로 전송하고, 인공지능 모델로부터 수신한 결과 정보를 클라이언트 장치로 제공함으로써, 클라이언트 장치와 인공지능 사이의 상호 작용을 조절하는 인공지능 모델을 관리하기 위한 방법 및 이를 위한 장치에 관한 것이다.Embodiments of this specification relate to methods and devices for managing artificial intelligence models. The embodiment of the present specification transmits control information confirmed based on information related to the request to an artificial intelligence model, and provides result information received from the artificial intelligence model to the client device, thereby facilitating interaction between the client device and artificial intelligence. It relates to a method and device for managing an artificial intelligence model that is controlled.
최근 온라인 마케팅 등 인터넷 환경에서 서비스를 제공할 때, 비즈니스 의사 결정을 빠르게 결정하는 것이 요구되고 있다. 과거에는 이러한 의사 결정을 수동으로 하였지만, 최근에는 머신러닝 모델을 이용함으로써 의사 결정을 자동화하여 의사 결정을 하는 경향이 증가하고 있다. 다만, 서비스의 확장에 따른 높은 트래픽을 처리해야 하는 바, 의사 결정에 소요되는 시간이 길어질 우려가 있었다. 따라서, 이와 같은 문제를 해결하기 위한 방법 및 장치가 요구된다.Recently, when providing services in an Internet environment such as online marketing, it is required to make business decisions quickly. In the past, these decisions were made manually, but recently, there has been an increasing tendency to automate decision making by using machine learning models. However, there were concerns that the time required for decision-making would be long as high traffic had to be handled due to the expansion of the service. Accordingly, methods and devices for solving this problem are required.
본 개시는 상술한 문제점을 해결하기 위해 제안된 것으로, 인공지능 모델을 관리하기 위한 방법 및 장치를 제공하는데 있다.This disclosure is proposed to solve the above-mentioned problems and provides a method and device for managing an artificial intelligence model.
보다 구체적으로, 본 개시는 리퀘스트와 관련된 정보에 기반하여 확인된 제어 정보를 식별하고, 식별된 제어 정보를 리퀘스트와 관련된 인공지능 모델로 전송하고, 인공지능 모델로부터 수신된 결과 정보를 클라이언트 장치로 제공함으로써, 클라이언트 장치와 인공지능 모델 사이의 상호작용을 조절하기 위한 인공지능 모델을 관리하는 방법 및 이를 위한 장치를 제공하는 것을 목적으로 한다.More specifically, the present disclosure identifies identified control information based on information related to the request, transmits the identified control information to an artificial intelligence model related to the request, and provides result information received from the artificial intelligence model to a client device. By doing so, the purpose is to provide a method and device for managing an artificial intelligence model to control the interaction between a client device and an artificial intelligence model.
본 실시 예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 이하의 실시 예들로부터 또 다른 기술적 과제들이 유추될 수 있다.The technical challenges that this embodiment aims to achieve are not limited to the technical challenges described above, and other technical challenges can be inferred from the following embodiments.
상술한 과제를 달성하기 위한 기술적 수단으로서, 본 개시의 제1측면에 따른 전자 장치에서 인공지능 모델을 관리하는 방법은 클라이언트 장치로부터 리퀘스트를 수신하는 단계; 리퀘스트와 관련된 정보를 확인하는 단계; 정보에 기반하여, 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인하는 단계; 정보에 기반하여 식별된 제어 정보를 적어도 하나의 인공지능 모델에 전송하는 단계; 적어도 하나의 인공지능 모델로부터 제어 정보에 따른 결과 정보를 수신하는 단계; 및 결과 정보를 클라이언트 장치로 제공하는 단계를 포함할 수 있다.As a technical means for achieving the above-described problem, a method of managing an artificial intelligence model in an electronic device according to the first aspect of the present disclosure includes the steps of receiving a request from a client device; Confirming information related to the request; Based on the information, confirming at least one artificial intelligence model corresponding to the request; Transmitting control information identified based on the information to at least one artificial intelligence model; Receiving result information according to control information from at least one artificial intelligence model; and providing result information to a client device.
일 실시 예에 따르면, 정보는 리퀘스트에 대한 식별 정보, 리퀘스트에 대응하는 적어도 하나의 인공지능 모델에 대한 정보, 적어도 하나의 인공지능 모델의 입력 데이터에 대한 정보 및 리퀘스트에 대응하는 실행 타입에 대한 정보를 포함하는 것을 특징으로 할 수 있다.According to one embodiment, the information includes identification information about the request, information about at least one artificial intelligence model corresponding to the request, information about input data of at least one artificial intelligence model, and information about the execution type corresponding to the request. It may be characterized as including.
일 실시 예에 따르면, 제어 정보를 적어도 하나의 인공지능 모델에 전송하는 단계는 적어도 하나의 인공지능 모델에 대한 입출력 관계에 대한 정보에 기반하여, 적어도 하나의 인공지능 모델의 실행 순서를 확인하는 단계; 및 실행 순서에 기반하여, 제어 정보를 식별하는 단계를 포함할 수 있다.According to one embodiment, the step of transmitting control information to at least one artificial intelligence model includes checking the execution order of the at least one artificial intelligence model based on information about the input-output relationship for the at least one artificial intelligence model. ; and identifying control information based on the execution order.
일 실시 예에 따르면, 적어도 하나의 인공지능 모델이 복수 개의 그룹으로 구분될 때, 적어도 하나의 인공지능 모델의 실행 순서는 복수 개의 그룹 각각에 포함되는 인공지능 모델 간의 실행 순서를 포함할 수 있고, 복수 개의 그룹은 병렬적으로 실행되는 것을 특징으로 할 수 있다.According to one embodiment, when at least one artificial intelligence model is divided into a plurality of groups, the execution order of the at least one artificial intelligence model may include an execution order between the artificial intelligence models included in each of the plurality of groups, A plurality of groups may be characterized as being executed in parallel.
일 실시 예에 따르면, 실행 타입에 대한 정보는 결과 정보를 수신하기까지 예상 시간에 기반하여 결정되는 것을 특징으로 할 수 있다.According to one embodiment, information about the execution type may be determined based on the expected time until result information is received.
일 실시 예에 따르면, 실행 타입이 제1 타입인 경우, 결과 정보를 클라이언트 장치로 제공하는 단계는 결과 정보의 수신에 대응하여 결과 정보를 대기 중인 클라이언트 장치로 제공하는 단계를 포함할 수 있다.According to one embodiment, when the execution type is the first type, providing the result information to the client device may include providing the result information to the waiting client device in response to receiving the result information.
일 실시 예에 따르면, 실행 타입이 제2 타입인 경우, 결과 정보를 클라이언트 장치로 제공하는 단계는 결과 정보를 데이터 처리 플랫폼에 전송하는 단계를 포함할 수 있다.According to one embodiment, when the execution type is the second type, providing result information to the client device may include transmitting the result information to a data processing platform.
일 실시 예에 따르면, 리퀘스트를 수신하는 단계는 리퀘스트의 수신에 대응하여, 식별 정보를 클라이언트 장치로 전송하는 단계를 포함할 수 있다.According to one embodiment, receiving the request may include transmitting identification information to the client device in response to receiving the request.
일 실시 예에 따르면, 데이터 처리 플랫폼에 저장된 결과 정보는 식별 정보에 기반하여 클라이언트 장치에 의해 식별되는 것을 특징으로 할 수 있다.According to one embodiment, result information stored in the data processing platform may be characterized by being identified by the client device based on identification information.
일 실시 예에 따르면, 적어도 하나의 인공지능 모델을 확인하는 단계는 적어도 하나의 인공지능 모델 각각을 제1 타입의 프로세서 유닛 기반 인공지능 모델 및 제2 타입의 프로세서 유닛 기반 인공지능 모델 중 하나로 확인하는 단계를 포함할 수 있다.According to one embodiment, the step of confirming at least one artificial intelligence model includes identifying each of the at least one artificial intelligence model as one of a first type of processor unit-based artificial intelligence model and a second type of processor unit-based artificial intelligence model. May include steps.
일 실시 예에 따르면, 적어도 하나의 인공지능 모델 중 제1 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제1 그룹은 키워드 감지 모델을 포함하고, 및 적어도 하나의 인공지능 모델 중 제2 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제2 그룹은 광학 문자 인식 모델을 포함하는 것을 특징으로 할 수 있다.According to one embodiment, the first group including a first type of processor unit-based artificial intelligence model among the at least one artificial intelligence model includes a keyword detection model, and a second type of processor among the at least one artificial intelligence model. The second group, including unit-based artificial intelligence models, may be characterized as including optical character recognition models.
일 실시 예에 따르면, 적어도 하나의 인공지능 모델을 확인하는 단계는 적어도 하나의 인공지능 모델 중 제1 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제1 그룹 및 적어도 하나의 인공지능 모델 중 제2 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제2 그룹을 각각 제1 타입의 프로세서 유닛 서버 및 제2 타입의 프로세서 유닛 서버에 할당하는 단계를 포함할 수 있다.According to one embodiment, the step of confirming at least one artificial intelligence model includes a first group including a first type of processor unit-based artificial intelligence model among the at least one artificial intelligence model, and a second group of the at least one artificial intelligence model. It may include assigning a second group including a type of processor unit-based artificial intelligence model to a first type of processor unit server and a second type of processor unit server, respectively.
일 실시 예에 따르면, 제2 타입의 프로세서 유닛 서버는 복수 개의 인스턴스를 포함하고, 및 제2 그룹에 포함되는 인공지능 모델 각각에 대응되는 인스턴스는 제2 그룹에 포함되는 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 기반하여 결정되는 것을 특징으로 할 수 있다.According to one embodiment, the second type of processor unit server includes a plurality of instances, and the instances corresponding to each artificial intelligence model included in the second group are responsible for memory use of the artificial intelligence model included in the second group. It may be characterized as being determined based on historical data.
본 개시의 제2측면에 따른 인공지능 모델을 관리하기 위한 전자 장치는 트랜시버; 하나 이상의 명령어를 저장하는 스토리지; 및 클라이언트 장치로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보를 확인하고, 정보에 기반하여, 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인하고, 정보에 기반하여 식별된 제어 정보를 적어도 하나의 인공지능 모델에 전송하고, 적어도 하나의 인공지능 모델로부터 제어 정보에 따른 결과 정보를 수신하고, 및 결과 정보를 클라이언트 장치로 제공하는 프로세서를 포함할 수 있다.An electronic device for managing an artificial intelligence model according to a second aspect of the present disclosure includes a transceiver; Storage for storing one or more instructions; and receiving a request from a client device, confirming information related to the request, based on the information, identifying at least one artificial intelligence model corresponding to the request, and transmitting the identified control information based on the information to at least one artificial intelligence. It may include a processor that transmits to the model, receives result information according to control information from at least one artificial intelligence model, and provides the result information to the client device.
본 개시의 제3측면에 따른 기록매체는 인공지능 모델을 관리하는 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 비일시적 기록매체일 수 있다.The recording medium according to the third aspect of the present disclosure may be a non-transitory computer-readable recording medium that records a program for executing a method for managing an artificial intelligence model on a computer.
본 명세서의 실시 예에 따르면, 전자 장치는 클라이언트 장치로부터 리퀘스트를 수신함에 따라, 리퀘스트에 대응하는 적어도 하나의 인공지능 모델 및 적어도 하나의 인공지능 모델을 효율적으로 실행시키기 위한 제어 정보를 확인할 수 있다. 또한, 전자 장치는 제어 정보에 따라 실행된 인공지능 모델로부터 결과 정보를 수신할 수 있고, 수신된 결과 정보를 클라이언트 장치로 제공할 수 있다. 클라이언트 장치와 인공지능 모델 간의 상호 작용을 조절하는 기능이 전자 장치로 일원화 됨에 따라 레이턴시가 낮아지고, 머신러닝 모델을 효율적으로 관리할 수 있다.According to an embodiment of the present specification, as an electronic device receives a request from a client device, it can check at least one artificial intelligence model corresponding to the request and control information for efficiently executing the at least one artificial intelligence model. Additionally, the electronic device can receive result information from an artificial intelligence model executed according to control information, and provide the received result information to the client device. As the function that regulates the interaction between client devices and artificial intelligence models is unified in electronic devices, latency is lowered and machine learning models can be managed efficiently.
발명의 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 청구범위의 기재로부터 당해 기술 분야의 통상의 기술자에게 명확하게 이해될 수 있을 것이다.The effect of the invention is not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the description of the claims.
도 1은 다양한 실시 예에 따른 전자 장치가 인공지능 모델을 관리하는 방법이 구현될 수 있는 시스템을 설명하기 위한 도면이다.FIG. 1 is a diagram illustrating a system in which a method of managing an artificial intelligence model by an electronic device according to various embodiments can be implemented.
도 2는 전자 장치가 인공지능 모델을 관리하는 방법을 나타낸 흐름도이다.Figure 2 is a flowchart showing how an electronic device manages an artificial intelligence model.
도 3은 실행 타입이 제1 타입인 경우, 전자 장치가 인공지능 모델을 관리하는 일 실시 예를 설명하기 위한 도면이다.FIG. 3 is a diagram illustrating an embodiment in which an electronic device manages an artificial intelligence model when the execution type is the first type.
도 4는 실행 타입이 제2 타입인 경우, 전자 장치가 인공지능 모델을 관리하는 일 실시 예를 설명하기 위한 도면이다.FIG. 4 is a diagram illustrating an embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
도 5는 실행 타입이 제2 타입인 경우, 전자 장치가 인공지능 모델을 관리하는 다른 일 실시 예를 설명하기 위한 도면이다.FIG. 5 is a diagram illustrating another embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
도 6은 실행 타입을 변경하는 일 실시 예를 설명하기 위한 도면이다.Figure 6 is a diagram for explaining an embodiment of changing the execution type.
도 7은 인공지능 모델을 GPU 기반 인공지능 모델 및 CPU 기반 인공지능 모델로 나누어 관리하는 일 실시 예를 설명하기 위한 도면이다.Figure 7 is a diagram to explain an embodiment of dividing and managing an artificial intelligence model into a GPU-based artificial intelligence model and a CPU-based artificial intelligence model.
도 8은 인공지능 모델에 대응되는 GPU 인스턴스를 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 기반하여 할당하는 실시 예를 설명하기 위한 도면이다.FIG. 8 is a diagram illustrating an embodiment of allocating a GPU instance corresponding to an artificial intelligence model based on history data about memory usage of the artificial intelligence model.
도 9는 일 실시 예에 따른 인공지능 모델을 관리하기 위한 전자 장치를 도식화한 블록도이다.Figure 9 is a block diagram illustrating an electronic device for managing an artificial intelligence model according to an embodiment.
실시 예들에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다.The terms used in the embodiments are general terms that are currently widely used as much as possible while considering the functions in the present disclosure, but this may vary depending on the intention or precedent of a person working in the art, the emergence of new technology, etc. In addition, in certain cases, there are terms arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the relevant description. Therefore, the terms used in this disclosure should be defined based on the meaning of the term and the overall content of this disclosure, rather than simply the name of the term.
명세서 전체에서 어떤 부분이 어떤 구성요소를 “포함”한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 명세서에 기재된 “...부”, “...모듈” 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다.When a part in the entire specification is said to “include” a certain element, this means that it does not exclude other elements but may further include other elements, unless specifically stated to the contrary. In addition, terms such as “...unit” and “...module” used in the specification refer to a unit that processes at least one function or operation, which is implemented as hardware or software, or as a combination of hardware and software. It can be.
명세서 전체에서 기재된 “a, b, 및 c 중 적어도 하나”의 표현은, ‘a 단독’, ‘b 단독’, ‘c 단독’, ‘a 및 b’, ‘a 및 c’, ‘b 및 c’, 또는 ‘a,b,c 모두’를 포괄할 수 있다.The expression “at least one of a, b, and c” used throughout the specification means ‘a alone’, ‘b alone’, ‘c alone’, ‘a and b’, ‘a and c’, ‘b and c’. ', or 'all a, b, c'.
이하에서 언급되는 "단말"은 네트워크를 통해 서버나 타 단말에 접속할 수 있는 컴퓨터나 휴대용 단말로 구현될 수 있다. 여기서, 컴퓨터는 예를 들어, 웹 브라우저(WEB Browser)가 탑재된 노트북, 데스크톱(desktop), 랩톱(laptop) 등을 포함하고, 휴대용 단말은 예를 들어, 휴대성과 이동성이 보장되는 무선 통신 장치로서, IMT(International Mobile Telecommunication), CDMA(Code Division Multiple Access), W-CDMA(W-Code Division Multiple Access), LTE(Long Term Evolution) 등의 통신 기반 단말, 스마트폰, 태블릿 PC 등과 같은 모든 종류의 핸드헬드(Handheld) 기반의 무선 통신 장치를 포함할 수 있다.The “terminal” mentioned below may be implemented as a computer or portable terminal that can connect to a server or other terminal through a network. Here, the computer includes, for example, a laptop, desktop, laptop, etc. equipped with a web browser, and the portable terminal is, for example, a wireless communication device that guarantees portability and mobility. , all types of communication-based terminals such as IMT (International Mobile Telecommunication), CDMA (Code Division Multiple Access), W-CDMA (W-Code Division Multiple Access), and LTE (Long Term Evolution), smartphones, tablet PCs, etc. It may include a handheld-based wireless communication device.
아래에서는 첨부한 도면을 참고하여 본 개시의 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다.Below, with reference to the attached drawings, embodiments of the present disclosure will be described in detail so that those skilled in the art can easily practice them. However, the present disclosure may be implemented in many different forms and is not limited to the embodiments described herein.
이하, 본 발명의 실시 예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings.
실시 예를 설명함에 있어서 본 발명이 속하는 기술 분야에 익히 알려져 있고 본 발명과 직접적으로 관련이 없는 기술 내용에 대해서는 설명을 생략한다. 이는 불필요한 설명을 생략함으로써 본 발명의 요지를 흐리지 않고 더욱 명확히 전달하기 위함이다.In describing the embodiments, description of technical content that is well known in the technical field to which the present invention belongs and that is not directly related to the present invention will be omitted. This is to convey the gist of the present invention more clearly without obscuring it by omitting unnecessary explanation.
마찬가지 이유로 첨부 도면에 있어서 일부 구성요소는 과장되거나 생략되거나 개략적으로 도시되었다. 또한, 각 구성요소의 크기는 실제 크기를 전적으로 반영하는 것이 아니다. 각 도면에서 동일한 또는 대응하는 구성요소에는 동일한 참조 번호를 부여하였다.For the same reason, some components are exaggerated, omitted, or schematically shown in the accompanying drawings. Additionally, the size of each component does not entirely reflect its actual size. In each drawing, identical or corresponding components are assigned the same reference numbers.
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시 예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시 예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시 예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.The advantages and features of the present invention and methods for achieving them will become clear by referring to the embodiments described in detail below along with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below and may be implemented in various different forms. The present embodiments are merely provided to ensure that the disclosure of the present invention is complete and to provide common knowledge in the technical field to which the present invention pertains. It is provided to fully inform those who have the scope of the invention, and the present invention is only defined by the scope of the claims. Like reference numerals refer to like elements throughout the specification.
이 때, 처리 흐름도 도면들의 각 블록과 흐름도 도면들의 조합들은 컴퓨터 프로그램 인스트럭션들에 의해 수행될 수 있음을 이해할 수 있을 것이다. 이들 컴퓨터 프로그램 인스트럭션들은 범용 컴퓨터, 특수용 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서에 탑재될 수 있으므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서를 통해 수행되는 그 인스트럭션들이 흐름도 블록(들)에서 설명된 기능들을 수행하는 수단을 생성하게 된다. 이들 컴퓨터 프로그램 인스트럭션들은 특정 방식으로 기능을 구현하기 위해 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 지향할 수 있는 컴퓨터 이용 가능 또는 컴퓨터 판독 가능 메모리에 저장되는 것도 가능하므로, 그 컴퓨터 이용가능 또는 컴퓨터 판독 가능 메모리에 저장된 인스트럭션들은 흐름도 블록(들)에서 설명된 기능을 수행하는 인스트럭션 수단을 내포하는 제조 품목을 생산하는 것도 가능하다. 컴퓨터 프로그램 인스트럭션들은 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에 탑재되는 것도 가능하므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에서 일련의 동작 단계들이 수행되어 컴퓨터로 실행되는 프로세스를 생성해서 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 수행하는 인스트럭션들은 흐름도 블록(들)에서 설명된 기능들을 실행하기 위한 단계들을 제공하는 것도 가능하다.At this time, it will be understood that each block of the processing flow diagram diagrams and combinations of the flow diagram diagrams can be performed by computer program instructions. These computer program instructions can be mounted on a processor of a general-purpose computer, special-purpose computer, or other programmable data processing equipment, so that the instructions performed through the processor of a computer or other programmable data processing equipment are described in the flow chart block(s). It creates the means to perform functions. These computer program instructions may also be stored in computer-usable or computer-readable memory that can be directed to a computer or other programmable data processing equipment to implement a function in a particular manner, so that the computer-usable or computer-readable memory It is also possible to produce manufactured items containing instruction means that perform the functions described in the flowchart block(s). Computer program instructions can also be mounted on a computer or other programmable data processing equipment, so that a series of operational steps are performed on the computer or other programmable data processing equipment to create a process that is executed by the computer and can be processed by the computer or other programmable data processing equipment. Instructions that perform processing equipment may also provide steps for executing the functions described in the flow diagram block(s).
또한, 각 블록은 특정된 논리적 기능(들)을 실행하기 위한 하나 이상의 실행 가능한 인스트럭션들을 포함하는 모듈, 세그먼트 또는 코드의 일부를 나타낼 수 있다. 또, 몇 가지 대체 실행 예들에서는 블록들에서 언급된 기능들이 순서를 벗어나서 발생하는 것도 가능함을 주목해야 한다. 예컨대, 잇달아 도시되어 있는 두 개의 블록들은 사실 실질적으로 동시에 수행되는 것도 가능하고 또는 그 블록들이 때때로 해당하는 기능에 따라 역순으로 수행되는 것도 가능하다.Additionally, each block may represent a module, segment, or portion of code that includes one or more executable instructions for executing specified logical function(s). Additionally, it should be noted that in some alternative execution examples it is possible for the functions mentioned in the blocks to occur out of order. For example, it is possible for two blocks shown in succession to be performed substantially at the same time, or it is possible for the blocks to be performed in reverse order depending on the corresponding function.
도 1은 다양한 실시 예에 따른 전자 장치가 인공지능 모델을 관리하는 방법이 구현될 수 있는 시스템을 설명하기 위한 도면이다.FIG. 1 is a diagram illustrating a system in which a method of managing an artificial intelligence model by an electronic device according to various embodiments can be implemented.
도 1을 참조하면, 다양한 실시 예에 따른 시스템(10)은 다양한 종류의 장치들에 의해 구현될 수 있다. 예를 들어, 시스템(10)은 전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130)을 포함할 수 있다. 도1에 도시된 시스템(10)은 본 실시 예와 관련된 구성요소들만 도시되어 있다. 따라서, 도 1에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 본 실시 예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다 Referring to FIG. 1, system 10 according to various embodiments may be implemented by various types of devices. For example, system 10 may include electronic device 100, client device 110, server 120, and data processing platform 130. The system 10 shown in Figure 1 shows only components relevant to this embodiment. Accordingly, those skilled in the art can understand that other general-purpose components may be included in addition to the components shown in FIG. 1.
전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130) 각각은 트랜시버, 스토리지 및 프로세서를 포함할 수 있다. 또한, 전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130) 각각은 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어, 또는, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 한편 실시 예 전반에서 전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130) 각각은 분리된 장치 또는 서버로 언급되나 이는 논리적으로 나누어진 구조일 수 있으며, 이들 중 적어도 일부가 하나의 장치 또는 서버에서 분리된 기능에 의해 구현될 수 있다. Electronic device 100, client device 110, server 120, and data processing platform 130 may each include a transceiver, storage, and processor. In addition, the electronic device 100, client device 110, server 120, and data processing platform 130 each mean a unit that processes at least one function or operation, which is hardware or software, or hardware and It can be implemented through a combination of software. Meanwhile, throughout the embodiment, the electronic device 100, the client device 110, the server 120, and the data processing platform 130 are each referred to as separate devices or servers, but this may have a logically divided structure, among which At least some of them may be implemented as separate functions in one device or server.
일 실시 예에 따르면, 전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130)은 네트워크 서버로 구현되는 다수의 컴퓨터 시스템 또는 컴퓨터 소프트웨어를 포함할 수 있다. 예를 들면 전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130) 중 적어도 일부는 인트라넷 또는 인터넷과 같은 컴퓨터 네트워크를 통해 다른 네트워크 서버와 통신할 수 있는 하위 장치와 연결되어 작업 수행 요청을 접수하고, 그에 대한 작업을 수행하여 수행 결과를 제공하는 컴퓨터 시스템 및 컴퓨터 소프트웨어를 지칭할 수 있다. 이외에도, 전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130) 중 적어도 일부는 네트워크 서버 상에서 동작할 수 있는 일련의 응용 프로그램과, 내부 혹은 연결된 다른 노드에 구축되어 있는 각종 데이터베이스를 포함하는 광의의 개념으로 이해될 수 있다. 예컨대, 전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130) 중 적어도 일부는 도스(DOS), 윈도우(Windows), 리눅스(Linux), 유닉스(UNIX), 또는 맥OS(MacOS) 등의 운영 체제에 따라 다양하게 제공되는 네트워크 서버 프로그램을 이용하여 구현될 수 있다.According to one embodiment, the electronic device 100, the client device 110, the server 120, and the data processing platform 130 may include a plurality of computer systems or computer software implemented as network servers. For example, at least some of the electronic device 100, client device 110, server 120, and data processing platform 130 may have sub-devices capable of communicating with other network servers via a computer network such as an intranet or the Internet. It may refer to a computer system and computer software that is connected and receives a request to perform a task, performs the task, and provides a performance result. In addition, at least some of the electronic device 100, client device 110, server 120, and data processing platform 130 are built on a series of applications that can operate on a network server and other nodes inside or connected to It can be understood as a broad concept that includes various databases. For example, at least some of the electronic device 100, client device 110, server 120, and data processing platform 130 may run DOS, Windows, Linux, UNIX, or It can be implemented using various network server programs provided depending on the operating system such as MacOS.
전자 장치(100), 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130)은 네트워크(미도시)를 통해서 서로 통신할 수 있다. 네트워크는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN), 부가가치 통신망(Value Added Network; VAN), 이동 통신망(mobile radio communication network), 위성 통신망 및 이들의 상호 조합을 포함하며, 도 1에 도시된 각 네트워크 구성 주체가 서로 원활하게 통신을 할 수 있도록 하는 포괄적인 의미의 데이터 통신망이며, 유선 인터넷, 무선 인터넷 및 모바일 무선 통신망을 포함할 수 있다. 무선 통신은 예를 들어, 무선 랜(Wi-Fi), 블루투스, 블루투스 저 에너지(Bluetooth low energy), 지그비, WFD(Wi-Fi Direct), UWB(ultra wideband), 적외선 통신(IrDA, infrared Data Association), NFC(Near Field Communication) 등이 있을 수 있으나, 이에 한정되는 것은 아니다. Electronic device 100, client device 110, server 120, and data processing platform 130 may communicate with each other through a network (not shown). Networks include Local Area Network (LAN), Wide Area Network (WAN), Value Added Network (VAN), mobile radio communication network, satellite communication network, and combinations thereof. It is a data communication network in a comprehensive sense that allows each network constituent shown in FIG. 1 to communicate smoothly with each other, and may include wired Internet, wireless Internet, and mobile wireless communication networks. Wireless communications include, for example, wireless LAN (Wi-Fi), Bluetooth, Bluetooth low energy, ZigBee, WFD (Wi-Fi Direct), UWB (ultra wideband), and infrared communication (IrDA, infrared Data Association). ), NFC (Near Field Communication), etc., but are not limited thereto.
일 실시 예에 따르면, 전자 장치(100)는 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보를 확인하고, 정보에 기반하여 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인하고, 정보에 기반하여 식별된 제어 정보를 적어도 하나의 인공지능 모델에 전송하고, 적어도 하나의 인공지능 모델로부터 제어 정보에 따른 결과 정보를 수신하고, 및 결과 정보를 클라이언트 장치(110)에게 제공할 수 있다. 여기서, 전자 장치(100)가 제어 정보를 적어도 하나의 인공지능 모델로 전송하는 동작은 적어도 하나의 인공지능 모델을 실행하는 서버(120)로 제어 정보를 전송하는 동작을 포함할 수 있다. 여기서, 클라이언트 장치(110)는 네트워크를 통하여 전자 장치(100) 등 다른 컴퓨터 시스템 상의 서비스에 접속할 수 있는 프로그램일 수 있고, 서버(120)는 GPU 서버 또는 CPU 서버와 같은 임의의 프로세서 유닛 서버일 수 있으나, 클라이언트 장치(110) 및 서버(120)는 이에 한정되는 것은 아니다.According to one embodiment, the electronic device 100 receives a request from the client device 110, checks information related to the request, checks at least one artificial intelligence model corresponding to the request based on the information, and receives the information. Control information identified based on can be transmitted to at least one artificial intelligence model, result information according to the control information can be received from at least one artificial intelligence model, and the result information can be provided to the client device 110. Here, the operation of the electronic device 100 transmitting control information to at least one artificial intelligence model may include transmitting control information to the server 120 executing at least one artificial intelligence model. Here, the client device 110 may be a program that can access services on other computer systems such as the electronic device 100 through a network, and the server 120 may be any processor unit server such as a GPU server or CPU server. However, the client device 110 and server 120 are not limited thereto.
또한, 클라이언트 장치(110)는 전자 장치(100)와 연결된 채 대기 모드로 동작하거나 전자 장치(100)와 비 연결(disconnect)된 채 다른 테스크를 수행하고 있을 수 있다. 보다 상세하게는, 시간이 많이 소요되는 인공지능 모델의 실행이 필요하거나 서버(120)에 사용 가능한 메모리 사용량이 적으면, 클라이언트 장치(110)는 비동기 모드로 동작하여 리퀘스트를 전송한 이후에 전자 장치(100)와의 연결이 해제하는 것이 더 적절할 수 있다.Additionally, the client device 110 may operate in standby mode while connected to the electronic device 100 or may perform another task while disconnected from the electronic device 100. More specifically, when a time-consuming artificial intelligence model needs to be executed or when the available memory usage on the server 120 is low, the client device 110 operates in an asynchronous mode and sends a request to the electronic device. It may be more appropriate to disconnect from (100).
전자 장치(100)와 클라이언트 장치(110) 사이의 연결이 해제되면, 전자 장치(100)는 서버(120)로부터 수신한 결과 정보를 데이터 처리 플랫폼(130)에 퍼블리시할 수 있고, 클라이언트 장치(110)는 리퀘스트에 대응하는 리퀘스트 아이디에 기반하여 데이터 처리 플랫폼(130)에 저장된 데이터 중 결과 정보를 식별하고, 식별된 결과 정보를 구독(subscribe) 또는 컨숨(consume)할 수 있다. 이에 따라, 클라이언트 장치(110)는 전자 장치(100)로부터 간접적으로 결과 정보를 제공받을 수 있다. 여기서, 결과 정보는 적어도 하나의 인공지능 모델의 출력 데이터를 포함할 수 있고, 적어도 하나의 인공지능 모델의 출력 데이터는 데이터 처리 플랫폼(130)에 분리되어 저장될 수 있다. 또한, 클라이언트 장치(110)는 리퀘스트 아이디를 이용하여 데이터 처리 플랫폼(130)에 저장된 적어도 하나의 인공지능 모델의 출력 데이터를 포함하는 결과 정보를 식별할 수 있다. 여기서, 데이터 처리 플랫폼(130)은 서버, 전자 장치 등의 데이터 교환을 위한 데이터 처리 플랫폼일 수 있다. 예를 들어, 데이터 처리 플랫폼(130)은 오픈 소스 메시지 브로커 프로젝트인 아파치 카프카에 관한 플랫폼일 수 있으나, 이에 한정되는 것은 아니다.When the connection between the electronic device 100 and the client device 110 is disconnected, the electronic device 100 may publish the resulting information received from the server 120 to the data processing platform 130, and the client device ( 110) can identify result information among the data stored in the data processing platform 130 based on the request ID corresponding to the request, and subscribe or consume the identified result information. Accordingly, the client device 110 may indirectly receive result information from the electronic device 100. Here, the result information may include output data of at least one artificial intelligence model, and the output data of at least one artificial intelligence model may be stored separately in the data processing platform 130. Additionally, the client device 110 may identify result information including output data of at least one artificial intelligence model stored in the data processing platform 130 using the request ID. Here, the data processing platform 130 may be a data processing platform for data exchange between servers and electronic devices. For example, the data processing platform 130 may be a platform related to Apache Kafka, an open source message broker project, but is not limited thereto.
일 실시 예에 따르면, 전자 장치(100)는 클라이언트 장치(110), 서버(120) 및 데이터 처리 플랫폼(130) 간의 상호 작용을 조절하는 오케스트레이터로 동작할 수 있고, 전자 장치(100)는 논 블로킹 아이오(Non-blocking I/O)를 포함할 수 있다. 이와 같은 시스템(10)에 따라, 전자 장치(100)가 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 결과 정보를 제공하기까지 클라이언트 장치(110)의 대기 시간이 크게 줄어들 수 있고, 논 블로킹 아이오를 도입함에 따라 입출력의 높은 비용을 낮출 수 있다. 또한, 논 블로킹 아이오를 이용함으로써, 출력 데이터를 수신하기 전에 다른 인공지능 모델을 실행시키는 등의 다른 액션을 취할 수 있다. 즉, 전자 장치(100)는 많은 트래픽의 리퀘스트를 보다 효율적으로 처리할 수 있다.According to one embodiment, the electronic device 100 may operate as an orchestrator that regulates the interaction between the client device 110, the server 120, and the data processing platform 130, and the electronic device 100 may operate as an orchestrator. May include non-blocking I/O. According to this system 10, the waiting time of the client device 110 until the electronic device 100 receives a request from the client device 110 and provides result information can be significantly reduced, and non-blocking IO By introducing it, the high cost of input and output can be reduced. Additionally, by using non-blocking IO, other actions can be taken, such as running another artificial intelligence model before receiving the output data. In other words, the electronic device 100 can process requests from a large amount of traffic more efficiently.
또한, 클라이언트 장치(110)가 전송하는 리퀘스트가 데이터 처리 플랫폼(130)을 통한 별도의 처리없이 전자 장치(100)를 통해 머신러닝 모델에 제공될 수 있다. 또한, 클라이언트 장치(110)는 수신된 리퀘스트 아이디에 기반하여 결과 정보를 용이하게 확인할 수 있는 바, 인공지능 모델의 출력 데이터를 취합하는 체계가 전자 장치(100)로 일원화되어 효율적일 수 있다. 하기에서 전자 장치(100)가 인공지능 모델을 관리하는 구체적인 실시 예는 자세히 살펴보기로 한다.Additionally, the request transmitted by the client device 110 may be provided to the machine learning model through the electronic device 100 without separate processing through the data processing platform 130. In addition, the client device 110 can easily check result information based on the received request ID, so the system for collecting output data of the artificial intelligence model can be unified in the electronic device 100 and be efficient. Below, a specific example in which the electronic device 100 manages an artificial intelligence model will be examined in detail.
도 2는 전자 장치가 인공지능 모델을 관리하는 방법을 나타낸 흐름도이다.Figure 2 is a flowchart showing how an electronic device manages an artificial intelligence model.
도 2를 참조하면, 전자 장치가 인공지능 모델을 관리하는 각 동작은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해되는 범위 내에서 일부 동작이 변경, 치환되거나 동작 간의 일부 순서가 변경될 수 있음은 자명하게 이해될 수 있다.Referring to FIG. 2, each operation in which an electronic device manages an artificial intelligence model involves some operations being changed, replaced, or some sequences between operations within the range clearly understood by those skilled in the art to which the present invention pertains. It can be clearly understood that can be changed.
단계 S210에서, 전자 장치(100)는 클라이언트 장치로부터 리퀘스트를 수신할 수 있다.In step S210, the electronic device 100 may receive a request from a client device.
단계 S220에서, 전자 장치(100)는 리퀘스트와 관련된 정보를 확인할 수 있다.In step S220, the electronic device 100 may check information related to the request.
일 실시 예에 따르면, 전자 장치(100)는 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보를 확인할 수 있다. 비지니스 의사 결정 등에 머신러닝을 이용할 때, 복수 개의 피처에 기반하여 의사 결정을 내릴 수 있다. 이때, 클라이언트 장치(110)는 비즈니스 의사 결정에 이용되는 복수 개의 피처 중 하나의 피처를 결정할 때 적어도 하나의 인공지능 모델을 이용할 수 있다. 즉, 클라이언트 장치(110)로부터 수신되는 리퀘스트는 피처를 결정하는 것과 관련하여 인공지능 모델을 구동하기 위한 리퀘스트일 수 있다. 예를 들어, 인터넷 환경에 아이템을 제공하는 퀄리티를 높이기 위한 의사 결정에는 부적절한 키워드 포함 여부에 대한 제1 피처, 이미지 검증에 대한 제2 피처 등 다양한 피처에 기반하여 종합적인 의사 결정이 요구될 수 있다. 이때, 부적절한 키워드 포함 여부에 대한 제1 피처를 확인하기 위해, 클라이언트 장치(110)는 제1 피처에 대응하는 리퀘스트를 전자 장치(100)에 전송할 수 있다.According to one embodiment, the electronic device 100 may receive a request from the client device 110 and check information related to the request. When using machine learning for business decision-making, etc., decisions can be made based on multiple features. At this time, the client device 110 may use at least one artificial intelligence model when determining one feature among a plurality of features used for business decision making. That is, the request received from the client device 110 may be a request for running an artificial intelligence model in relation to determining features. For example, decision-making to improve the quality of providing items in the Internet environment may require comprehensive decision-making based on various features, such as the first feature for whether inappropriate keywords are included and the second feature for image verification. . At this time, in order to check whether the first feature includes an inappropriate keyword, the client device 110 may transmit a request corresponding to the first feature to the electronic device 100.
일 실시 예에 따르면, 리퀘스트는 리퀘스트에 대한 식별 정보, 리퀘스트에 대응하는 적어도 하나의 인공지능 모델에 대한 정보, 인공지능 모델의 입력 데이터에 대한 정보 및 리퀘스트에 대응하는 실행 타입에 대한 정보를 포함할 수 있다. 리퀘스트에 대한 식별 정보는 리퀘스트를 다른 리퀘스트와 구별하기 위한 정보로, 클라이언트 장치(110)에 의해 설정될 수 있다. 적어도 하나의 인공지능 모델은 서버를 통해 실행 가능한 복수 개의 인공지능 모델 중 제1 피처를 결정하는데 필요한 인공지능 모델일 수 있다. 제1 피처를 결정하는데 필요한 인공지능 모델인지 여부는 클라이언트 장치(110)에 의해 결정될 수 있다.According to one embodiment, the request may include identification information about the request, information about at least one artificial intelligence model corresponding to the request, information about input data of the artificial intelligence model, and information about the execution type corresponding to the request. You can. Identification information for a request is information for distinguishing a request from other requests, and may be set by the client device 110. At least one artificial intelligence model may be an artificial intelligence model required to determine a first feature among a plurality of artificial intelligence models executable through a server. Whether or not the artificial intelligence model is required to determine the first feature may be determined by the client device 110.
리퀘스트의 실행 타입은 제1 타입인 동기(Synchronous) 및 제2 타입인 비동기(Asynchronous) 중 하나로 결정될 수 있다. 전자 장치(100)가 리퀘스트를 수신한 후에, 클라이언트 장치(110)와 전자 장치(100)의 연결 유무는 리퀘스트의 실행 타입에 따라 달라질 수 있다. 여기서, 실행 타입은 리퀘스트에 대응하는 결과 정보를 수신하기까지 예상 시간에 기반하여 결정될 수 있다.The execution type of the request may be determined as one of the first type, Synchronous, and the second type, Asynchronous. After the electronic device 100 receives a request, whether the client device 110 and the electronic device 100 are connected may vary depending on the execution type of the request. Here, the execution type may be determined based on the expected time to receive result information corresponding to the request.
보다 구체적으로, 전자 장치(100)는 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인하면, 적어도 하나의 인공지능 모델의 추론과 관련된 히스토리 데이터에 기반하여, 적어도 하나의 인공지능 모델의 출력 데이터를 모두 취합하기까지의 예상 시간을 확인할 수 있다. 이에 더해, 전자 장치(100)는 현재 서버(120)에 사용 가능한 메모리 양에 더 기반하여, 예상 시간을 더 정확하게 확인할 수 있다. 예상 시간을 기반으로, 전자 장치(100)는 해당 리퀘스트의 실행 타입이 적절하게 설정되어 있는지 여부를 결정할 수 있다. 이와 관련된 일 실시 예는 도 6에서 자세히 살펴보기로 한다.More specifically, when the electronic device 100 confirms at least one artificial intelligence model corresponding to the request, the electronic device 100 generates output data of the at least one artificial intelligence model based on history data related to the inference of the at least one artificial intelligence model. You can check the estimated time to collect everything. In addition, the electronic device 100 can more accurately check the expected time based on the amount of memory currently available in the server 120. Based on the expected time, the electronic device 100 may determine whether the execution type of the corresponding request is appropriately set. An embodiment related to this will be examined in detail in FIG. 6.
인공지능 모델의 입력 데이터는 기 학습된 적어도 하나의 인공지능 모델의 입력으로 이용되는 데이터일 수 있다. 보다 상세하게는, 입력 데이터는 복수 개의 이미지를 포함하는 리스트 타입의 데이터일 수 있다. 또한, 적어도 하나의 인공지능 모델은 하나의 입력 데이터에 기반할 수 있으나, 이에 한정되는 것은 아니다. 예를 들어, 리퀘스트와 관련된 정보는 적어도 하나의 인공지능 모델 각각에 대응하는 입력 데이터에 대한 정보를 포함할 수 있다.The input data of the artificial intelligence model may be data used as input to at least one previously learned artificial intelligence model. More specifically, the input data may be list-type data including a plurality of images. Additionally, at least one artificial intelligence model may be based on one input data, but is not limited to this. For example, information related to the request may include information about input data corresponding to each of at least one artificial intelligence model.
단계 S230에서, 전자 장치(100)는 정보에 기반하여, 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인할 수 있다.In step S230, the electronic device 100 may check at least one artificial intelligence model corresponding to the request based on the information.
일 실시 예에 따르면, 전자 장치(100)는 적어도 하나의 인공지능 모델의 실행 순서를 확인할 수 있다. 전자 장치(100)는 복수 개의 인공지능 모델의 실행 순서에 대한 그래프에 기반하여, 적어도 하나의 인공지능 모델의 실행 순서를 확인할 수 있다. 보다 상세하게는, 전자 장치(100)는 적어도 하나의 인공지능 모델에 대한 입출력 관계에 대한 정보에 기반하여, 복수 개의 인공지능 모델의 실행 순서에 대한 그래프를 확인할 수 있다. 여기서, 그래프는 인공지능 모델의 실행 순서를 포함하는 일종의 트리 다이어그램 형태의 정보일 수 있다.According to one embodiment, the electronic device 100 may check the execution order of at least one artificial intelligence model. The electronic device 100 may check the execution order of at least one artificial intelligence model based on a graph of the execution order of a plurality of artificial intelligence models. More specifically, the electronic device 100 may check a graph of the execution order of a plurality of artificial intelligence models based on information about the input-output relationship for at least one artificial intelligence model. Here, the graph may be information in the form of a tree diagram that includes the execution order of the artificial intelligence model.
예를 들어, 제1 인공지능 모델은 데이터 A, 데이터 B를 각각 입력 데이터 및 출력 데이터로 하는 인공지능 모델이고, 제2 인공지능 모델은 데이터 B 및 데이터 C를 각각 입력 데이터 및 출력 데이터로 할 수 있다. 이때, 전자 장치(100)는 제1 인공지능 모델 및 제2 인공지능 모델의 입출력 관계에 대한 정보에 기반하여, 제1 인공지능 모델을 실행한 후에 제2 인공지능 모델이 실행되도록 인공지능 모델의 실행 순서에 대한 그래프를 확인할 수 있다. For example, the first artificial intelligence model may be an artificial intelligence model that uses data A and data B as input data and output data, respectively, and the second artificial intelligence model may use data B and data C as input data and output data, respectively. there is. At this time, the electronic device 100 configures the artificial intelligence model to execute the second artificial intelligence model after executing the first artificial intelligence model, based on information about the input-output relationship between the first artificial intelligence model and the second artificial intelligence model. You can check the graph of the execution order.
또한, 적어도 하나의 인공지능 모델은 복수 개의 그룹 별로 병렬적으로 수행될 수 있다. 예를 들어, 적어도 하나의 인공지능 모델이 인공지능 모델의 특성, 기능 등에 따라 복수 개의 그룹으로 구분될 때, 인공지능 모델의 실행 순서를 확인하는 것은 복수개의 그룹 각각에 포함되는 인공지능 모델 간의 실행 순서를 확인하는 것을 포함할 수 있다. 보다 상세하게는, 적어도 하나의 인공지능 모델을 인공지능 모델의 특성, 기능 등에 따라 복수 개의 그룹으로 구분하는 것은 입출력 관계에 서로 의존성이 없는 그룹으로 분리하는 것일 수 있다. 예를 들어, NLP 관련 인공지능 모델과 컴퓨터 비전 관련 인공지능 모델이 서로 의존성이 없는 경우, NLP 관련 인공지능 모델 및 컴퓨터 비전 관련 인공지능 모델은 서로 병렬적으로 실행될 수 있다.Additionally, at least one artificial intelligence model can be performed in parallel for multiple groups. For example, when at least one artificial intelligence model is divided into multiple groups according to the characteristics and functions of the artificial intelligence model, checking the execution order of the artificial intelligence model involves executing the execution between artificial intelligence models included in each of the plurality of groups. This may include checking the order. More specifically, dividing at least one artificial intelligence model into a plurality of groups according to the characteristics and functions of the artificial intelligence model may mean separating the groups into groups that do not depend on each other in input-output relationships. For example, if the NLP-related artificial intelligence model and the computer vision-related artificial intelligence model do not depend on each other, the NLP-related artificial intelligence model and the computer vision-related artificial intelligence model can be executed in parallel with each other.
일 실시 예에 따르면, 전자 장치(100)는 적어도 하나의 인공지능 모델 각각을 제1 타입의 프로세서 유닛 기반 인공지능 모델 및 제2 타입의 프로세서 유닛 기반 인공지능 모델 중 하나로 결정할 수 있다. 예를 들어, 제1 타입의 프로세서 유닛 및 제2 타입의 프로세서 유닛은 각각 CPU(Central Processing Unit) 및 GPU(Graphics Processing Unit)에 대응할 수 있다.According to one embodiment, the electronic device 100 may determine each of the at least one artificial intelligence model as one of a first type of processor unit-based artificial intelligence model and a second type of processor unit-based artificial intelligence model. For example, the first type of processor unit and the second type of processor unit may correspond to a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU), respectively.
본원에서, A 프로세서 유닛 기반 인공지능 모델은 A라는 프로세서 유닛 서버에서 더 효율적으로 동작하는 인공지능 모델을 의미할 뿐, A라는 프로세서 유닛 서버에서만 동작하는 인공지능 모델을 의미하는 것은 아닐 수 있다. 보다 상세하게는, 제1 타입의 프로세서 유닛 기반 인공지능 모델은 제1 타입의 프로세서 유닛 서버에서 더 효율적으로 동작하는 인공지능 모델을 의미할 뿐, 제2 타입의 프로세서 유닛에서 동작할 수 있다. 즉, 제1 타입의 프로세서 유닛에서 더 효율적으로 동작하는 인공지능 모델이라도 제1 타입의 프로세서 유닛 서버에서 처리 중인 테스크가 많은 경우, 제2 타입의 프로세서 유닛 서버를 통해 구동되는 인공지능 모델로 동작할 수 있다. 마찬가지로, 제2 타입의 프로세서 유닛 기반 인공지능 모델은 제2 타입의 프로세서 유닛 서버에서 더 효율적으로 동작하는 인공지능 모델을 의미할 뿐, 제1 타입의 프로세서 유닛 서버에서 동작할 수 있다. In the present application, the A processor unit-based artificial intelligence model only refers to an artificial intelligence model that operates more efficiently on the processor unit server A, and may not mean an artificial intelligence model that operates only on the processor unit server A. More specifically, the first type of processor unit-based artificial intelligence model refers to an artificial intelligence model that operates more efficiently on a first type of processor unit server, and may operate on a second type of processor unit. In other words, even if an artificial intelligence model operates more efficiently on the first type of processor unit, if there are many tasks being processed on the first type of processor unit server, it may operate as an artificial intelligence model driven by the second type of processor unit server. You can. Likewise, the second type of processor unit-based artificial intelligence model simply means an artificial intelligence model that operates more efficiently on the second type of processor unit server and can operate on the first type of processor unit server.
인공지능 모델마다 GPU 서버 및 CPU 서버 중 어느 서버에서 인공지능 모델의 퍼포먼스가 우수한지 여부는 상이할 수 있다. 예를 들어, 인공지능 모델 중 광학 문자 인식(Optical Character Recognition; OCR) 모델 및 로고 감지 모델과 같은 컴퓨터 비전 관련 인공지능 모델은 GPU 서버를 기반으로 구동될 때 더 효율적인 모델일 수 있다. 반대로, 인공지능 모델 중 자연어 처리 관련 인공지능 모델의 예인 키워드 감지 모델 및 나이 감지 모델 등은 CPU 서버를 기반으로 구동될 때 더 효율적인 모델일 수 있다. 여기서, 효율적인 모델의 기준은 인공지능 모델의 레이턴시, 비용 및 예측의 정확도 등을 포함할 수 있다.For each artificial intelligence model, whether the performance of the artificial intelligence model is superior on either the GPU server or the CPU server may vary. For example, among artificial intelligence models, computer vision-related artificial intelligence models such as optical character recognition (OCR) model and logo detection model may be more efficient models when run based on a GPU server. Conversely, among artificial intelligence models, keyword detection models and age detection models, which are examples of artificial intelligence models related to natural language processing, may be more efficient models when run based on a CPU server. Here, the criteria for an efficient model may include the latency, cost, and prediction accuracy of the artificial intelligence model.
전자 장치(100)는 서버(120)에서 실행 중이거나 실행 예정인 테스크의 종류, 테스크의 상태 정보와 적어도 하나의 인공지능 모델의 타입 및 적어도 하나의 인공지능 모델의 실행 순서 등을 종합적으로 고려하여, 적어도 하나의 인공지능 모델에 할당되는 하드웨어 자원을 유동적으로 변경할 수 있다. 예를 들어, 제1 타입의 프로세서 유닛에서 더 효율적으로 동작하는 인공지능 모델이라도 제1 타입의 프로세서 유닛 서버에서 처리 중인 테스크가 많은 경우, 제2 타입의 프로세서 유닛 서버를 통해 구동되는 인공지능 모델로 동작할 수 있다. 하드웨어 자원이 유동적으로 변경될 때, 적어도 하나의 인공지능에 대응하는 서버에 대한 정보는 제어 정보에 포함될 수 있다.The electronic device 100 comprehensively considers the type of task being executed or scheduled to be executed in the server 120, task status information, the type of at least one artificial intelligence model, and the execution order of at least one artificial intelligence model, Hardware resources allocated to at least one artificial intelligence model can be flexibly changed. For example, even if the artificial intelligence model operates more efficiently on the first type of processor unit, if there are many tasks being processed on the first type of processor unit server, the artificial intelligence model that runs through the second type of processor unit server may be used. It can work. When hardware resources are dynamically changed, information about a server corresponding to at least one artificial intelligence may be included in the control information.
단계 S240에서, 전자 장치(100)는 정보에 기반하여 식별된 제어 정보를 적어도 하나의 인공지능 모델에 전송할 수 있다.In step S240, the electronic device 100 may transmit control information identified based on the information to at least one artificial intelligence model.
각각의 인공지능 모델이 구동되는 서버 및 인공지능 모델의 실행 순서가 결정되면, 전자 장치(100)는 정보에 기반하여 식별된 제어 정보를 적어도 하나의 인공지능 모델에 전송할 수 있다. 여기서, 제어 정보를 적어도 하나의 인공지능 모델에 전송하는 동작은 제어 정보를 각각의 서버에 전송하는 동작 및 각각의 서버에서 제어 정보에 대응되는 입력 데이터에 따라 인공지능 모델을 실행시키는 동작을 포함할 수 있다. 제어 정보는 인공지능 모델이 구동되는 서버 및 인공지능 모델의 실행 순서에 대한 정보를 포함하는 정보일 수 있다.Once the server on which each artificial intelligence model runs and the execution order of the artificial intelligence model are determined, the electronic device 100 may transmit control information identified based on the information to at least one artificial intelligence model. Here, the operation of transmitting control information to at least one artificial intelligence model may include transmitting control information to each server and executing the artificial intelligence model according to input data corresponding to the control information in each server. You can. Control information may be information including information about the server on which the artificial intelligence model runs and the execution order of the artificial intelligence model.
단계 S250에서, 전자 장치(100)는 적어도 하나의 인공지능 모델로부터 제어 정보에 따른 결과 정보를 수신할 수 있다.In step S250, the electronic device 100 may receive result information according to control information from at least one artificial intelligence model.
일 실시 예에 따르면, 전자 장치(100)는 인공지능 모델의 실행이 완료됨에 따라, 인공지능 모델의 출력 데이터를 수신할 수 있다. 이에 따라, 전자 장치(100)는 적어도 하나의 인공지능 모델의 결과 데이터를 취합하여 결과 정보를 확인할 수 있다. 이때, 적어도 하나의 인공지능 모델의 결과 데이터는 상이한 시간에 출력될 수 있는 바, 전자 장치(100)는 적어도 하나의 인공지능 모델의 결과 데이터 모두를 수신할 때까지 대기한 후, 적어도 하나의 인공지능 모델의 출력 데이터를 취합할 수 있다.According to one embodiment, the electronic device 100 may receive output data of the artificial intelligence model as execution of the artificial intelligence model is completed. Accordingly, the electronic device 100 can collect result data of at least one artificial intelligence model and check result information. At this time, the result data of at least one artificial intelligence model may be output at different times, and the electronic device 100 waits until all result data of at least one artificial intelligence model are received, and then outputs the at least one artificial intelligence model. Output data from intelligent models can be collected.
단계 S260에서, 전자 장치(100)는 결과 정보를 클라이언트 장치로 제공할 수 있다.In step S260, the electronic device 100 may provide result information to the client device.
일 실시 예에 따르면, 전자 장치(100)는 리퀘스트에 대응하는 실행 타입이 제1 타입 또는 제2 타입인지 여부에 기반하여, 상이한 방법에 따라 결과 정보를 클라이언트 장치(110)에게 제공할 수 있다. 또한, 병렬적으로 구동된 적어도 하나의 인공지능 모델로부터 전자 장치(100)는 인공지능 모델의 구동에 따른 출력 데이터를 취합하여 결과 정보를 식별할 수 있다. 이에 따라, 전자 장치(100)는 식별된 결과 정보를 클라이언트 장치(110)에 리턴할 수 있다.According to one embodiment, the electronic device 100 may provide result information to the client device 110 according to different methods, based on whether the execution type corresponding to the request is the first type or the second type. Additionally, the electronic device 100 may identify result information by collecting output data according to the operation of the artificial intelligence model from at least one artificial intelligence model driven in parallel. Accordingly, the electronic device 100 may return the identified result information to the client device 110.
실행 타입이 제1 타입(Synchronous)인 경우에 대한 결과 정보를 클라이언트 장치(110)에게 제공하는 구체적인 동작은 도 3에서 살펴보기로 하고, 실행 타입이 제2 타입(Asynchronous)인 경우에 대한 결과 정보를 클라이언트 장치(110)에게 제공하는 구체적인 동작은 도 4 및 도 5에서 살펴보기로 한다.The specific operation of providing result information for the case where the execution type is the first type (Synchronous) to the client device 110 will be examined in FIG. 3, and the result information for the case where the execution type is the second type (Asynchronous). The specific operation of providing to the client device 110 will be described in FIGS. 4 and 5.
도 3은 실행 타입이 제1 타입인 경우, 전자 장치(100)가 인공지능 모델을 관리하는 일 실시 예를 설명하기 위한 도면이다.FIG. 3 is a diagram illustrating an embodiment in which the electronic device 100 manages an artificial intelligence model when the execution type is the first type.
도 2에서 살펴본 바와 같이, 클라이언트 장치(110)는 비즈니스 의사 결정에 이용되는 복수 개의 피처 중 하나의 피처를 결정할 때 적어도 하나의 인공지능 모델을 이용할 수 있다. 예를 들어, SDP 페이지의 컨텐츠 생성과 관련된 피처를 결정할 때, OCR 모델, 키워드 감지 모델, 브랜드 감지 모델 및 로고 감지 모델 등이 필요할 수 있다. 도 3을 참조하면, 도 3은 OCR 모델 및 브랜드 감지 모델을 이용하는 일 실시 예를 설명하고 있다. 또한, 다른 페이지의 컨텐츠의 생성과 관련된 피처를 결정할 때, OCR 모델, 키워드 감지 모델, 브랜드 감지 모델, 로고 감지 모델 이외에 다른 인공지능 모델이 이용될 수 있다.As seen in FIG. 2, the client device 110 may use at least one artificial intelligence model when determining one feature among a plurality of features used for business decision making. For example, when determining features related to content creation of an SDP page, an OCR model, keyword detection model, brand detection model, and logo detection model may be needed. Referring to FIG. 3, FIG. 3 illustrates an embodiment using an OCR model and a brand detection model. Additionally, when determining features related to the creation of content on other pages, other artificial intelligence models may be used in addition to the OCR model, keyword detection model, brand detection model, and logo detection model.
일 실시 예에 따르면, 전자 장치(100)는 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보(300)를 확인할 수 있다. 도3을 참조하면, 수신된 리퀘스트는 다음과 같은 정보를 포함할 수 있다.According to one embodiment, the electronic device 100 may receive a request from the client device 110 and check information 300 related to the request. Referring to Figure 3, the received request may include the following information.
{{
"requestId" : "01a-c140-bf972","requestId" : "01a-c140-bf972",
"execution" : "sync","execution" : "sync",
"detections" : ["OCR","brand_detection"],"detections" : ["OCR","brand_detection"],
"data" : [{"imageurl" : "http://urllink1"}]"data" : [{"imageurl" : "http://urllink1"}]
}}
도 3을 참조하면, 1) 리퀘스트에 대한 식별 정보인 리퀘스트 아이디(301)는 '01a-c140-bf972'일 수 있고, 2) 실행 타입(302)은 '제1 타입'인 sync일 수 있고, 3) 적어도 하나의 인공지능 모델에 대한 정보인 Detection(303)은 'OCR 모델' 및 '브랜드 감지 모델'일 수 잇고, 4) 적어도 하나의 인공지능 모델에 대한 입력 데이터(304)는 'http://urllink1'일 수 있다. 여기서, 'http://urllink1'는 설명을 위한 dummy URL일 수 있다.Referring to FIG. 3, 1) the request ID 301, which is identification information for the request, may be '01a-c140-bf972', 2) the execution type 302 may be sync, which is the 'first type', 3) Detection (303), which is information about at least one artificial intelligence model, can be ‘OCR model’ and ‘brand detection model’, and 4) input data (304) about at least one artificial intelligence model is ‘http: //urllink1'. Here, 'http://urllink1' may be a dummy URL for explanation.
리퀘스트에 대응하는 피처를 결정하는데 2개의 인공지능 모델만을 이용하는 바, 전자 장치(100)가 리퀘스트에 대응하는 결과 정보를 수신하기까지 상대적으로 짧은 시간이 소요될 수 있다. 이에, 도 3의 일 실시 예에 따른 실행 타입은 제1 타입인 동기(Synchronous)로 결정되는 것이 적절할 수 있다. 실행 타입(302)이 제1 타입인 바, 클라이언트 장치(110)는 리퀘스트를 전송한 후, 전자 장치(100)와 연결된 채 대기 모드로 동작할 수 있다. Since only two artificial intelligence models are used to determine the feature corresponding to the request, it may take a relatively short time for the electronic device 100 to receive result information corresponding to the request. Accordingly, it may be appropriate for the execution type according to the embodiment of FIG. 3 to be determined as the first type, Synchronous. Since the execution type 302 is the first type, the client device 110 may operate in standby mode while connected to the electronic device 100 after transmitting the request.
일 실시 예에 따르면, 전자 장치(100)는 적어도 하나의 인공지능 모델의 실행 순서를 결정할 수 있다. 예를 들어, OCR 모델로 입력 데이터인 'http://urllink1'로 입력됨에 따라, OCR 모델은 'http://urllink1'을 입력 데이터로 이용하여 디바이스가 판독 가능한 텍스트 데이터를 출력 데이터로 출력할 수 있다. 또한, OCR 모델의 출력 데이터인 텍스트 데이터는 브랜드 감지 모델의 입력 데이터로 이용될 수 있는 바, OCR 모델 및 브랜드 감지 모델은 의존성이 있는 인공지능 모델에 해당될 수 있다. 따라서, 전자 장치(100)는 OCR 모델 및 브랜드 감지 모델의 입출력 관계에 대한 정보에 기반하여, OCR 모델 후에 브랜드 감지 모델이 실행되도록 하는 실행 순서를 확인할 수 있다. 또한, 전자 장치(100)는 확인된 실행 순서, 실행의 대상이 되는 적어도 하나의 인공지능 모델 및 입력 데이터(304)인 'http://urllink1'를 포함하는 제어 정보를 생성할 수 있다.According to one embodiment, the electronic device 100 may determine the execution order of at least one artificial intelligence model. For example, as input data 'http://urllink1' is input to the OCR model, the OCR model uses 'http://urllink1' as input data to output device-readable text data as output data. You can. In addition, text data, which is the output data of the OCR model, can be used as input data of the brand detection model, and the OCR model and brand detection model may correspond to dependent artificial intelligence models. Accordingly, the electronic device 100 can confirm the execution order in which the brand detection model is executed after the OCR model, based on information about the input-output relationship between the OCR model and the brand detection model. Additionally, the electronic device 100 may generate control information including the confirmed execution order, at least one artificial intelligence model to be executed, and 'http://urllink1' as input data 304.
일 실시 예에 따르면, 전자 장치(100)는 제어 정보를 적어도 하나의 인공지능 모델에 전송할 수 있다. 이에 따라, 적어도 하나의 인공지능 모델은 제어 정보에 기반하여 실행될 수 있다. 보다 상세하게는, 1) OCR 모델은 입력 데이터(304)인 'http://urllink1'에 기반하여, 출력 데이터로 텍스트 데이터를 생성할 수 있다. 생성된 텍스트 데이터는 전자 장치(100)로 전송될 수 있다. 또한, 생성된 텍스트 데이터는 브랜드 감지 모델의 입력 데이터로 이용될 수 있다. 2) 브랜드 감지 모델은 입력 데이터로 수신된 텍스트 데이터에 기반하여, 출력 데이터로 브랜드 데이터를 생성할 수 있다. 또한 생성된 브랜드 데이터는 전자 장치(100)로 전송될 수 있다.According to one embodiment, the electronic device 100 may transmit control information to at least one artificial intelligence model. Accordingly, at least one artificial intelligence model may be executed based on control information. More specifically, 1) the OCR model can generate text data as output data based on 'http://urllink1', which is the input data 304. The generated text data may be transmitted to the electronic device 100. Additionally, the generated text data can be used as input data for a brand detection model. 2) The brand detection model can generate brand data as output data based on text data received as input data. Additionally, the generated brand data may be transmitted to the electronic device 100.
일 실시 예에 따르면, 전자 장치(100)는 출력 데이터인 텍스트 데이터 및 브랜드 데이터를 취합하고, 출력 데이터를 모두 포함하는 결과 정보를 대기 모드로 동작 중인 클라이언트 장치(110)에게 전송할 수 있다. 또한, 전자 장치(100)는 출력 데이터를 취합한 후, 출력 데이터를 포함하는 결과 정보를 클라이언트 장치(110)에게 전송하는 것을 특징으로 할 수 있다.According to one embodiment, the electronic device 100 may collect text data and brand data, which are output data, and transmit the resulting information including all output data to the client device 110 operating in standby mode. Additionally, the electronic device 100 may collect output data and then transmit result information including the output data to the client device 110.
실행 타입이 제1 타입인 경우, 전자 장치(100)는 대기 모드로 동작하고 있는 클라이언트 장치(110)에게 결과 정보를 제공하는 바, 리퀘스트에 대한 식별 정보인 리퀘스트 아이디는 사용되지 않는 데이터일 수 있다. 따라서, 실행 타입이 제1 타입인 경우, 리퀘스트에 대한 식별 정보인 리퀘스트 아이디는 선택적으로(Optional) 제공되는 정보일 수 있다.When the execution type is the first type, the electronic device 100 provides result information to the client device 110 operating in standby mode, and the request ID, which is identification information for the request, may be unused data. . Therefore, when the execution type is the first type, the request ID, which is identification information for the request, may be information provided optionally.
도 4는 실행 타입이 제2 타입인 경우, 전자 장치가 인공지능 모델을 관리하는 일 실시 예를 설명하기 위한 도면이다.FIG. 4 is a diagram illustrating an embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
일 실시 예에 따르면, 전자 장치(100)는 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보(400)를 확인할 수 있다. 도4를 참조하면, 수신된 리퀘스트는 다음과 같은 정보를 포함할 수 있다.According to one embodiment, the electronic device 100 may receive a request from the client device 110 and check information 400 related to the request. Referring to Figure 4, the received request may include the following information.
{{
"requestId" : "01a-c140-bf972","requestId" : "01a-c140-bf972",
"execution" : "async","execution"::"async",
"requesttype" : ["Type A"],"requesttype" : ["Type A"],
"data" : [{"imageurl" : "http://urllink1"}]"data" : [{"imageurl" : "http://urllink1"}]
}}
도 4를 참조하면, 1) 리퀘스트에 대한 식별 정보인 리퀘스트 아이디(401)는 '01a-c140-bf972'일 수 있고, 2) 실행 타입(402)은 '제2 타입'인 async일 수 있고, 3) 적어도 하나의 인공지능 모델에 대한 정보인 리퀘스트 타입(403)은 A 타입일 수 있다. 리퀘스트 타입은 클라이언트 장치(110) 및 전자 장치(100)에 미리 설정되어 있는 타입일 수 있고, 리퀘스트 타입은 리퀘스트 타입에 대응되는 적어도 하나의 인공지능 모델에 대한 정보를 포함할 수 있다. 또한, 리퀘스트 타입에 포함되는 적어도 하나의 인공지능 모델에 대한 정보는 클라이언트 장치에 의해 변경될 수 있다. 도 4를 참조하면, 일 실시 예에 따른 A 타입은 OCR 모델, 키워드 감지 모델 및 나이 감지 모델을 적어도 하나의 인공지능 모델로 하는 타입일 수 있다. 또한, 도 4의 리퀘스트 타입(403) 및 도 3의 Detection(303)는 모두 적어도 하나의 인공지능 모델에 대한 필드인 바, 리퀘스트 타입 및 Detection은 선택적으로 정보에 포함되는 것을 특징으로 할 수 있다. 4) 적어도 하나의 인공지능 모델에 대한 입력 데이터(404)는 'http://urllink1'일 수 있다.Referring to FIG. 4, 1) the request ID 401, which is identification information for the request, may be '01a-c140-bf972', 2) the execution type 402 may be async, which is the 'second type', 3) The request type 403, which is information about at least one artificial intelligence model, may be type A. The request type may be a type preset in the client device 110 and the electronic device 100, and the request type may include information about at least one artificial intelligence model corresponding to the request type. Additionally, information about at least one artificial intelligence model included in the request type may be changed by the client device. Referring to FIG. 4, type A according to one embodiment may be a type that uses an OCR model, a keyword detection model, and an age detection model as at least one artificial intelligence model. In addition, the Request Type 403 in FIG. 4 and the Detection 303 in FIG. 3 are both fields for at least one artificial intelligence model, and the Request Type and Detection may be optionally included in the information. 4) The input data 404 for at least one artificial intelligence model may be 'http://urllink1'.
도 4의 일 실시 예에 따른 실행 타입은 제2 타입인 비동기(Asynchronous)일 수 있다. 따라서, 클라이언트 장치(110)는 전자 장치(100)로부터 리퀘스트 아이디를 수신함에 따라, 클라이언트 장치(110)와 전자 장치(100)의 연결은 해제될 수 있다. 따라서, 인공지능 모델의 추론에 시간이 소요될 때, 클라이언트 장치(110)는 다른 테스크를 수행할 수 있다.The execution type according to the embodiment of FIG. 4 may be the second type, Asynchronous. Accordingly, as the client device 110 receives the request ID from the electronic device 100, the connection between the client device 110 and the electronic device 100 may be disconnected. Accordingly, when the inference of the artificial intelligence model takes time, the client device 110 can perform other tasks.
일 실시 예에 따르면, 전자 장치(100)는 적어도 하나의 인공지능 모델의 실행 순서를 결정할 수 있다. 도 3의 일 실시 예와 비슷하게, OCR 모델의 출력 데이터가 키워드 감지 모델의 입력 데이터로 이용되고, 키워드 감지 모델의 출력 데이터는 나이 감지 모델의 입력 데이터로 이용될 수 있다. 따라서, 전자 장치(100)는 OCR 모델, 키워드 감지 모델 및 나이 감지 모델 순서로 실행되는 실행 순서를 확인할 수 있다. 이에 따라, 전자 장치(100)는 확인된 실행 순서와 실행의 대상이 되는 적어도 하나의 인공지능 모델 및 OCR 모델의 입력 데이터(304)인 'http://urllink1'를 포함하는 제어 정보를 생성할 수 있다.According to one embodiment, the electronic device 100 may determine the execution order of at least one artificial intelligence model. Similar to the embodiment of FIG. 3, output data of the OCR model may be used as input data of the keyword detection model, and output data of the keyword detection model may be used as input data of the age detection model. Accordingly, the electronic device 100 can check the execution order in which the OCR model, keyword detection model, and age detection model are executed. Accordingly, the electronic device 100 generates control information including the confirmed execution order and 'http://urllink1', which is input data 304 of the at least one artificial intelligence model and OCR model that is the target of execution. You can.
일 실시 예에 따르면, 전자 장치(100)는 제어 정보를 적어도 하나의 인공지능 모델을 구동하기 위해 서버로 전송할 수 있다. 이에 따라, 적어도 하나의 인공지능 모델은 제어 정보에 기반하여 실행될 수 있다. 보다 상세하게는, 1) OCR 모델은 입력 데이터(304)인 'http://urllink1'에 기반하여, 출력 데이터로 텍스트 데이터를 생성할 수 있다. 생성된 텍스트 데이터는 전자 장치(100)로 전송될 수 있다. 또한, 생성된 텍스트 데이터는 키워드 감지 모델의 입력 데이터로 이용될 수 있다. 2) 키워드 감지 모델은 수신된 텍스트 데이터를 입력 데이터로 이용하여 출력 데이터인 키워드 데이터를 생성할 수 있다. 또한 생성된 키워드 데이터는 전자 장치(100)로 전송될 수 있다. 3) 나이 감지 모델은 수신된 키워드 데이터를 입력 데이터로 이용하여 출력 데이터인 나이에 대한 데이터를 생성할 수 있다. 또한, 생성된 나이에 대한 데이터는 전자 장치(100)로 전송할 수 있다.According to one embodiment, the electronic device 100 may transmit control information to a server to run at least one artificial intelligence model. Accordingly, at least one artificial intelligence model may be executed based on control information. More specifically, 1) the OCR model can generate text data as output data based on 'http://urllink1', which is the input data 304. The generated text data may be transmitted to the electronic device 100. Additionally, the generated text data can be used as input data for a keyword detection model. 2) The keyword detection model can use the received text data as input data to generate keyword data as output data. Additionally, the generated keyword data may be transmitted to the electronic device 100. 3) The age detection model can use the received keyword data as input data to generate data about age as output data. Additionally, the generated data on age can be transmitted to the electronic device 100.
리퀘스트의 실행 타입이 제2 타입인 Async인 바, 전자 장치(100)는 클라이언트 장치(110)로 적어도 하나의 인공지능 모델의 출력 데이터를 포함하는 결과 정보를 직접적으로 제공하지 못할 수 있다. 이때, 전자 장치(100)는 결과 정보를 데이터 처리 플랫폼(130)에 퍼블리시할 수 있다. 데이터 처리 플랫폼(130)은 아파치 카프카에 한정되는 것은 아니나, 아래에서는 아파치 카프카를 이용하여 클라이언트 장치로 결과 정보를 전송하는 구체적인 실시 예를 설명한다.Since the execution type of the request is the second type, Async, the electronic device 100 may not directly provide result information including output data of at least one artificial intelligence model to the client device 110. At this time, the electronic device 100 may publish the result information to the data processing platform 130. The data processing platform 130 is not limited to Apache Kafka, but a specific example of transmitting result information to a client device using Apache Kafka will be described below.
일 실시 예에 따르면, 전자 장치(100)는 결과 정보를 카프카 메시지로 설정하여 데이터 처리 플랫폼(130)으로 전송할 수 있다. 데이터 처리 플랫폼(130)이 아파치 카프카에 대한 플랫폼인 경우, 데이터 처리 플랫폼(130)은 카프카 클러스터를 포함할 수 있다. 이때, 데이터 처리 플랫폼(130)은 전자 장치(100)로부터 수신된 결과 정보를 카프카 클러스터의 카프카 토픽에 저장할 수 있다. 보다 상세하게는, 결과 정보는 리퀘스트 아이디를 카프카 토픽의 이름으로 하는 데이터 처리 플랫폼(130)의 카프카 토픽에 저장되는 것을 특징으로 할 수 있다. 이에 따라, 클라이언트 장치는 카프카 토픽의 이름을 이용함으로써 리퀘스트에 대응하는 카프카 토픽을 용이하게 식별할 수 있는 바, 관련 없는 리퀘스트를 필터링할 수 있다. 또한, 클라이언트 장치(110) 별로 대응되는 카프카 토픽이 미리 지정되어 있을 수도 있으나, 이에 한정되는 것은 아니다.According to one embodiment, the electronic device 100 may set the result information as a Kafka message and transmit it to the data processing platform 130. If the data processing platform 130 is a platform for Apache Kafka, the data processing platform 130 may include a Kafka cluster. At this time, the data processing platform 130 may store the result information received from the electronic device 100 in a Kafka topic of the Kafka cluster. More specifically, the result information may be stored in a Kafka topic of the data processing platform 130 with the request ID as the name of the Kafka topic. Accordingly, the client device can easily identify the Kafka topic corresponding to the request by using the name of the Kafka topic, thereby filtering out irrelevant requests. Additionally, a Kafka topic corresponding to each client device 110 may be pre-designated, but is not limited to this.
일 실 시예에 따르면, 카프카 토픽은 복수 개의 파티션으로 구분될 수 있다. 따라서, 데이터 처리 플랫폼(130)은 리퀘스트 아이디를 카프카 토픽의 이름으로 하는 데이터 처리 플랫폼(130)의 카프카 토픽의 서로 다른 파티션에 적어도 하나의 인공지능 모델의 출력 데이터를 각각 저장할 수도 있으나, 이에 한정되는 것은 아니다. According to one embodiment, Kafka topics may be divided into multiple partitions. Accordingly, the data processing platform 130 may store the output data of at least one artificial intelligence model in different partitions of the Kafka topic of the data processing platform 130 where the request ID is the name of the Kafka topic, but this is limited. That is not the case.
클라이언트 장치(110)는 데이터 처리 플랫폼(130)에 저장된 결과 정보를 컨숨할 수 있다. 보다 상세하게는, 클라이언트 장치(110)는 리퀘스트 아이디를 이용하여, 복수 개의 토픽 중 리퀘스트에 대응하는 카프카 토픽을 식별할 수 있다. 이에 따라, 클라이언트 장치(110)는 리퀘스트 아이디에 대응하는 카프카 토픽에 저장된 결과 정보를 수신할 수 있다. 관련하여, 클라이언트 장치(110)는 주기적으로 리퀘스트 아이디에 대응하는 카프카 토픽의 이름을 가지는 카프카 토픽이 데이터 처리 플랫폼(130)에 있는지 여부를 확인할 수 있다. Client device 110 may conceal result information stored in data processing platform 130. More specifically, the client device 110 can use the request ID to identify the Kafka topic corresponding to the request among a plurality of topics. Accordingly, the client device 110 can receive result information stored in the Kafka topic corresponding to the request ID. In relation to this, the client device 110 may periodically check whether a Kafka topic with the name of the Kafka topic corresponding to the request ID exists in the data processing platform 130.
다만, 클라이언트 장치(110)가 임의의 시간에 주기적으로 리퀘스트 아이디에 대응하는 카프카 토픽의 이름을 가지는 카프카 토픽이 데이터 처리 플랫폼(130)에 있는지 여부를 확인하는 동작은 비효율적일 수 있다. 이와 관련하여, 일 실시 예에 따른 전자 장치(100)는 리퀘스트를 수신한 시점에서의 적어도 하나의 인공지능 모델의 실행 상태에 대한 정보, 적어도 하나의 인공지능 모델의 실행에 대한 히스토리 데이터 및 서버의 사용 가능한 메모리 양에 대한 정보 중 적어도 하나에 기반하여, 데이터 처리 플랫폼(130)에 결과 정보를 전송하기까지의 예상 시간을 예측할 수 있다.However, the operation of the client device 110 to periodically check whether a Kafka topic with the name of the Kafka topic corresponding to the request ID exists in the data processing platform 130 at a random time may be inefficient. In this regard, the electronic device 100 according to one embodiment includes information about the execution state of at least one artificial intelligence model at the time of receiving the request, history data about the execution of at least one artificial intelligence model, and the server. Based on at least one of the information about the amount of available memory, the expected time until the resulting information is transmitted to the data processing platform 130 can be predicted.
일 실시 예에 따라 전자 장치(100)가 예상 시간을 예측하면, 리퀘스트를 수신함에 따라, 전자 장치(100)는 리퀘스트 아이디 및 예상 시간에 대한 정보를 클라이언트 장치(110)로 전송할 수 있다. 즉, 클라이언트 장치(110)는 예상 시간에 대한 정보를 기반으로, 리퀘스트 아이디에 대응하는 카프카 토픽의 이름을 가지는 카프카 토픽이 데이터 처리 플랫폼(130)에 있는지 여부를 확인하고, 결과 정보를 수신할 수 있다. 따라서, 시스템(10)의 전체적인 비용이 크게 절약될 수 있다.According to one embodiment, when the electronic device 100 predicts the expected time, upon receiving a request, the electronic device 100 may transmit information about the request ID and the expected time to the client device 110. That is, the client device 110 can check whether a Kafka topic with the name of the Kafka topic corresponding to the request ID exists in the data processing platform 130, based on information about the expected time, and receive the result information. there is. Accordingly, the overall cost of system 10 can be greatly reduced.
도 5는 실행 타입이 제2 타입인 경우, 전자 장치가 인공지능 모델을 관리하는 다른 일 실시 예를 설명하기 위한 도면이다.FIG. 5 is a diagram illustrating another embodiment in which an electronic device manages an artificial intelligence model when the execution type is the second type.
일 실시 예에 따르면, 전자 장치(100)는 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보(500)를 확인할 수 있다. 도5를 참조하면, 수신된 리퀘스트는 다음과 같은 정보를 포함할 수 있다.According to one embodiment, the electronic device 100 may receive a request from the client device 110 and check information 500 related to the request. Referring to Figure 5, the received request may include the following information.
{{
"requestId": "01a-c140-bf972","requestId": "01a-c140-bf972",
"execution": "async","execution": "async",
"data": [{"imageurl" : "http://urllink1","data": [{"imageurl" : "http://urllink1",
detection: ["OCR", "keyword_detection", "age_detection"]},detection: ["OCR", "keyword_detection", "age_detection"]},
{"imageurl" : "http://urllink2",{"imageurl" : "http://urllink2",
detections: "Certification"}]detections: "Certification"}]
}}
도 5를 참조하면, 1) 리퀘스트에 대한 식별 정보인 리퀘스트 아이디(501)는 '01a-c140-bf972'일 수 있고, 2) 실행 타입(502)은 '제2 타입'인 Async일 수 있다. 3) 또한, 데이터(503)는 복수 개의 입력 데이터 및 복수 개의 입력 데이터 각각에 대응하는 인공지능 모델에 대한 정보를 포함할 수 있다. 보다 상세하게는, 도 5를 참조하면, 제1 입력 데이터인 http://urllink1와 대응되는 적어도 하나의 인공지능 모델은 OCR 모델, 키워드 감지 모델 및 나이 감지 모델을 포함할 수 있다. 또한, 제2 입력 데이터인 http://urllink2와 대응되는 적어도 하나의 인공지능 모델은 인증 관련 모델을 포함할 수 있다. 따라서, 리퀘스트에 대응하는 입력 데이터가 복수 개일 때, 도 3 및 도 4와 같이 requesttype 및 detection 등이 따로 기재되지 않고, data 필드 안에 detection 필드 또는 requesttype 필드가 함께 기재될 수 있다. 또한, http://urllink1 및 http://urllink2는 설명을 위한 dummy URL일 수 있다.Referring to FIG. 5, 1) the request ID 501, which is identification information for the request, may be '01a-c140-bf972', and 2) the execution type 502 may be Async, which is the 'second type'. 3) Additionally, the data 503 may include a plurality of input data and information about an artificial intelligence model corresponding to each of the plurality of input data. More specifically, referring to FIG. 5, at least one artificial intelligence model corresponding to http://urllink1, which is the first input data, may include an OCR model, a keyword detection model, and an age detection model. Additionally, at least one artificial intelligence model corresponding to http://urllink2, which is the second input data, may include an authentication-related model. Accordingly, when there is a plurality of input data corresponding to a request, requesttype and detection are not separately described as shown in FIGS. 3 and 4, but the detection field or requesttype field may be written together in the data field. Additionally, http://urllink1 and http://urllink2 may be dummy URLs for explanation purposes.
일 실시 예에 따르면, 전자 장치(100)는 적어도 하나의 인공지능 모델의 실행 순서를 결정할 수 있다. 보다 상세하게는, 리퀘스트에 대응하는 인공지능 모델이 복수 개의 그룹으로 구분될 때, 적어도 하나의 인공지능 모델의 실행 순서는 복수 개의 그룹 각각에 포함되는 인공지능 모델 간의 실행 순서를 포함할 수 있고, 복수 개의 그룹은 병렬적으로 실행되는 것을 특징으로 할 수 있다.According to one embodiment, the electronic device 100 may determine the execution order of at least one artificial intelligence model. More specifically, when the artificial intelligence model corresponding to the request is divided into a plurality of groups, the execution order of at least one artificial intelligence model may include the execution order between the artificial intelligence models included in each of the plurality of groups, A plurality of groups may be characterized as being executed in parallel.
도 5를 참조하면, OCR 모델, 키워드 감지 모델, 나이 감지 모델 및 인증 관련 모델은 NLP를 통한 텍스트 분석과 관련된 제1 그룹과 컴퓨터 비전을 통한 이미지 분석과 관련된 제2 그룹으로 나누어질 수 있다. 예를 들어, 제1 그룹은 OCR 모델, 키워드 감지 모델 및 나이 감지 모델을 포함할 수 있고, 제2 그룹은 인증 관련 모델을 포함할 수 있다. 인증 관련 모델은 OCR을 통한 컴퓨터로 판독 가능한 텍스트 데이터에 의존하지 않는 바, 인증 관련 모델은 제1 그룹에 포함되는 인공지능 모델과 병렬적으로 실행 가능할 수 있다. 따라서, 전자 장치(100)는 제1 그룹에 포함되는 OCR 모델, 키워드 감지 모델 및 나이 감지 모델의 실행 순서와 함께 제1 그룹과 제2 그룹이 병렬적으로 실행되도록 하는 실행 순서를 확인할 수 있다. 또한, 클라이언트 장치(110)로부터 수신된 리퀘스트와 관련된 정보는 적어도 하나의 인공지능 모델의 실행 순서 및 병렬 실행 여부에 관한 정보를 포함할 수 있다. 따라서, 클라이언트 장치(110)가 적어도 하나의 인공지능 모델의 실행 순서를 지정하는 것도 가능할 수 있다.Referring to FIG. 5, the OCR model, keyword detection model, age detection model, and authentication-related model can be divided into a first group related to text analysis through NLP and a second group related to image analysis through computer vision. For example, the first group may include an OCR model, a keyword detection model, and an age detection model, and the second group may include an authentication-related model. Since the authentication-related model does not depend on computer-readable text data through OCR, the authentication-related model can be executed in parallel with the artificial intelligence model included in the first group. Accordingly, the electronic device 100 may check the execution order of the OCR model, keyword detection model, and age detection model included in the first group, as well as the execution order that allows the first group and the second group to be executed in parallel. Additionally, information related to the request received from the client device 110 may include information regarding the execution order and parallel execution of at least one artificial intelligence model. Accordingly, it may be possible for the client device 110 to specify the execution order of at least one artificial intelligence model.
또한, 전자 장치(100)는 확인된 실행 순서를 포함하는 제어 정보를 인공지능 모델에 전송할 수 있다. 보다 상세하게는, 전자 장치(100)는 제어 정보를 서버(120)에 전송할 수 있고, 서버(120)는 1) 제1 입력 데이터인 "http://urllink1"를 OCR 모델의 입력 데이터로 제공하고, 2) 제2 입력 데이터인 "http://urllink2"를 인증 관련 모델의 입력 데이터로 제공할 수 있다. 인공지능 모델의 동작과 관련된 자세한 내용은 도 4와 유사한 바 생략하기로 한다.Additionally, the electronic device 100 may transmit control information including the confirmed execution order to the artificial intelligence model. More specifically, the electronic device 100 may transmit control information to the server 120, and the server 120 may 1) provide first input data “http://urllink1” as input data for the OCR model and 2) the second input data, “http://urllink2”, can be provided as input data for the authentication-related model. Detailed information related to the operation of the artificial intelligence model will be omitted as it is similar to Figure 4.
전자 장치(100)는 인공지능 모델로부터 텍스트 데이터, 키워드 데이터, 나이에 대한 데이터 및 인증에 대한 데이터를 포함하는 출력 데이터를 수신할 수 있다. 또한, 전자 장치(100)는 수신한 출력 데이터를 취합하여 결과 정보를 확인할 수 있다. 전자 장치(100)는 결과 정보가 리퀘스트 아이디를 카프카 토픽의 이름으로 하는 데이터 처리 플랫폼(130)의 카프카 토픽에 저장되도록 리퀘스트 아이디 및 결과 정보를 데이터 처리 플랫폼(130)에 제공할 수 있다. 이에 따라, 클라이언트 장치(110)는 리퀘스트 아이디에 대응하는 토픽의 이름을 가지는 토픽으로부터 결과 정보를 수신할 수 있다.The electronic device 100 may receive output data including text data, keyword data, age data, and authentication data from the artificial intelligence model. Additionally, the electronic device 100 can collect the received output data and check the result information. The electronic device 100 may provide the request ID and result information to the data processing platform 130 so that the result information is stored in a Kafka topic of the data processing platform 130 using the request ID as the name of the Kafka topic. Accordingly, the client device 110 can receive result information from a topic that has the name of the topic corresponding to the request ID.
도 6은 실행 타입을 변경하는 일 실시 예를 설명하기 위한 도면이다.Figure 6 is a diagram for explaining an embodiment of changing the execution type.
일 실시 예에 따르면, 전자 장치(100)는 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보(600)를 확인할 수 있다. 도6를 참조하면, 수신된 리퀘스트는 다음과 같은 정보를 포함할 수 있다.According to one embodiment, the electronic device 100 may receive a request from the client device 110 and check information 600 related to the request. Referring to Figure 6, the received request may include the following information.
{{
"requestId": "01a-c140-bf972","requestId": "01a-c140-bf972",
"execution": "sync","execution": "sync",
"data": [{"imageurl" : "http://urllink1","data": [{"imageurl" : "http://urllink1",
detection: ["OCR", "keyword_detection", "age_detection"]},detection: ["OCR", "keyword_detection", "age_detection"]},
{"imageurl" : "http://urllink2",{"imageurl" : "http://urllink2",
detections: "Certification"}]detections: "Certification"}]
}}
도 6을 참조하면, 리퀘스트 아이디(601)는 "01a-c140-bf972"이고, 실행 타입(602)은 제1 타입이고, 데이터(603)는 복수 개의 입력 데이터 및 복수 개의 입력 데이터 각각에 대응하는 인공지능 모델에 대한 정보를 포함할 수 있다.Referring to FIG. 6, the request ID 601 is “01a-c140-bf972”, the execution type 602 is the first type, and the data 603 is a plurality of input data and each of the plurality of input data. May include information about the artificial intelligence model.
리퀘스트에 대응하는 인공지능 모델은 총 4개로, 인공지능 모델을 통한 추론에 시간이 많이 소요될 우려가 있다. 또한, 현재 서버(120)가 처리하고 있는 테스크가 많거나 또는 현재 전자 장치(100)와 연결 중인 다른 클라이언트 장치의 숫자가 많은 경우에 해당되는 경우에도 인공지능 모델을 통한 추론에 많은 시간이 소요될 우려가 있다. 다만, 실행 타입이 제1 타입으로 동기인 바, 클라이언트 장치(110)는 결과 정보를 수신할 때까지 전자 장치(100)와 연결된 채 대기 모드로 동작할 수 있다. 따라서, 클라이언트 장치(110)는 다른 기능을 수행하지 못하고, 과도한 시간을 대기할 우려가 있을 수 있다.There are a total of four artificial intelligence models that respond to requests, and there are concerns that inference through artificial intelligence models will take a lot of time. In addition, even in cases where there are many tasks currently being processed by the server 120 or when there are a large number of other client devices currently connected to the electronic device 100, there is a concern that inference through the artificial intelligence model will take a lot of time. There is. However, since the execution type is the first type and is synchronous, the client device 110 may operate in standby mode while connected to the electronic device 100 until result information is received. Accordingly, the client device 110 may not be able to perform other functions and may wait for an excessive amount of time.
일 실시 예에 따르면, 전자 장치(100)는 리퀘스트에 대응하는 적어도 하나의 인공지능 모델의 실행 순서를 확인한 후, 적어도 하나의 인공지능 모델의 실행 상태에 대한 정보에 기반하여 결과 정보를 수신하기까지의 시간을 예측할 수 있다. 예를 들어, 예상 시간이 설정된 시간 이상이면, 전자 장치(100)는 실행 타입이 부적절하게 설정되었다고 결정할 수 있다. 이에 따라, 전자 장치(100)는 실행 타입을 제1 타입에서 제2 타입으로 변경할지 여부를 포함하는 요청을 클라이언트 장치(110)로 전송할 수 있다.According to one embodiment, the electronic device 100 checks the execution order of at least one artificial intelligence model corresponding to the request and then receives result information based on information about the execution state of at least one artificial intelligence model. time can be predicted. For example, if the expected time is longer than the set time, the electronic device 100 may determine that the execution type is improperly set. Accordingly, the electronic device 100 may transmit a request including whether to change the execution type from the first type to the second type to the client device 110.
이때, 전자 장치(100)가 클라이언트 장치(110)로부터 실행 타입을 변경하지 않는다는 응답을 수신하거나 2) 설정된 시간 동안 전자 장치(100)가 클라이언트 장치(110)로부터 응답을 수신하지 못하는 경우, 전자 장치(100)는 리퀘스트에 대응하는 실행 타입을 제1 타입으로 하여 결과 정보를 클라이언트 장치(110)에 제공할 수 있다. 이때, 전자 장치(100)는 출력 데이터인 텍스트 데이터, 키워드 데이터, 나이에 대한 데이터 및 인증에 대한 데이터를 포함하는 결과 정보를 데이터 처리 플랫폼(130)에 퍼블리시하지 않을 수 있고, 전자 장치(100)는 결과 정보를 대기 중인 클라이언트 장치(110)로 직접 전송할 수 있다.At this time, if the electronic device 100 receives a response from the client device 110 indicating that the execution type will not be changed, or 2) the electronic device 100 does not receive a response from the client device 110 for a set time, the electronic device 110 100 may provide result information to the client device 110 by setting the execution type corresponding to the request as the first type. At this time, the electronic device 100 may not publish result information including text data, keyword data, data about age, and data about authentication as output data to the data processing platform 130, and the electronic device 100 ) can directly transmit the result information to the waiting client device 110.
반대로, 도 6의 일 실시 예와 같이 전자 장치(100)가 설정된 시간 안에 클라이언트 장치(110)로부터 실행 타입을 변경하는 응답을 수신할 수 있다. 이에, 전자 장치(100)는 출력 데이터인 텍스트 데이터, 키워드 데이터, 나이에 대한 데이터 및 인증에 대한 데이터를 포함하는 결과 정보를 데이터 처리 플랫폼(130)에 퍼블리시하고, 클라이언트 장치(110)는 리퀘스트 아이디를 이용하여 리퀘스트에 대응하는 카프카 토픽에 저장된 결과 정보를 컨숨할 수 있다. 이때, 도 6의 전자 장치(100)의 동작은 도 5의 전자 장치(100)의 동작과 동일한 바, 자세한 내용은 생략하기로 한다.Conversely, as in the embodiment of FIG. 6, the electronic device 100 may receive a response changing the execution type from the client device 110 within a set time. Accordingly, the electronic device 100 publishes result information including text data, keyword data, age data, and authentication data as output data to the data processing platform 130, and the client device 110 receives the request. You can use the ID to conceal the result information stored in the Kafka topic corresponding to the request. At this time, since the operation of the electronic device 100 in FIG. 6 is the same as the operation of the electronic device 100 in FIG. 5, detailed information will be omitted.
도 7은 인공지능 모델을 GPU 기반 인공지능 모델 및 CPU 기반 인공지능 모델로 나누어 관리하는 일 실시 예를 설명하기 위한 도면이다.Figure 7 is a diagram to explain an embodiment of dividing and managing an artificial intelligence model into a GPU-based artificial intelligence model and a CPU-based artificial intelligence model.
일 실시 예에 따르면, 전자 장치(100)는 적어도 하나의 인공지능 모델 각각을 제1 타입의 프로세서 유닛 기반 인공지능 모델 및 제2 타입의 프로세서 유닛 기반 인공지능 모델 중 하나로 확인할 수 있다. 여기서, 제1 타입의 프로세서 유닛 및 제2 타입의 프로세서 유닛은 각각 CPU(Central Processing Unit) 및 GPU(Graphics Processing Unit)에 대응할 수 있다.According to one embodiment, the electronic device 100 may identify each of the at least one artificial intelligence model as one of a first type of processor unit-based artificial intelligence model and a second type of processor unit-based artificial intelligence model. Here, the first type of processor unit and the second type of processor unit may correspond to a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU), respectively.
또한, 전자 장치(100)는 제1 타입의 프로세서 유닛 기반 인공지능 모델 및 제2 타입의 프로세서 유닛 기반 인공지능 모델을 제1 타입의 프로세서 유닛 서버 및 제2 타입의 프로세서 유닛 서버에 할당할 수 있다. 다만, 앞서 살펴본 바와 같이 제1 타입의 프로세서 유닛 기반 인공지능 모델 및 제2 타입의 프로세서 유닛 기반 인공지능 모델은 각각 제1 타입의 프로세서 유닛 서버 및 제2 타입의 프로세서 유닛 서버에서만 구동 가능한 것은 아니다. 예를 들어, 제1 타입의 프로세서 유닛 서버에서 더 효율적으로 동작하는 인공지능 모델이라도 제1 타입의 프로세서 유닛 서버에서 현재 처리 중인 테스크가 많은 경우, 제2 타입의 프로세서 유닛 서버를 통해 구동되는 인공지능 모델로 동작할 수 있다. 도 7을 참조하면, 제1 타입의 프로세서 유닛 서버 및 제2 타입의 프로세서 유닛 서버는 각각 도 7의 CPU 서버(720) 및 GPU 서버(710)에 대응할 수 있다.Additionally, the electronic device 100 may allocate the first type of processor unit-based artificial intelligence model and the second type of processor unit-based artificial intelligence model to the first type of processor unit server and the second type of processor unit server. . However, as seen above, the first type of processor unit-based artificial intelligence model and the second type of processor unit-based artificial intelligence model cannot be run only on the first type of processor unit server and the second type of processor unit server, respectively. For example, even if the artificial intelligence model operates more efficiently on the first type of processor unit server, if there are many tasks currently being processed on the first type of processor unit server, the artificial intelligence that runs through the second type of processor unit server It can act as a model. Referring to FIG. 7, the first type of processor unit server and the second type of processor unit server may correspond to the CPU server 720 and GPU server 710 of FIG. 7, respectively.
일 실시 예에 따르면, 인공지능 모델은 GPU 기반 인공지능 모델 및 CPU 기반 인공지능 모델로 나누어질 수 있다. 이에 따라, 전자 장치(100)는 리퀘스트에 대응되는 인공지능 모델을 CPU 기반 인공지능 모델 및 GPU 기반 인공지능 모델 중 하나로 분류할 수 있다. 구체적으로, 인공지능 모델 중 광학 문자 인식(Optical character recognition; OCR) 모델 및 로고 감지 모델과 같은 컴퓨터 비전 관련 인공지능 모델은 GPU를 기반으로 할 때 더 효율적인 모델일 수 있다. 보다 상세하게는, 광학 문자 인식 모델 및 로고 감지 모델은 CPU 기반의 장치 및 GPU 기반의 장치 모두에서 구동 가능하지만, GPU 기반의 장치에서 더 효율적으로 구동하는 인공지능 모델일 수 있다. 반대로, 인공지능 모델 중 자연어 처리 관련 인공지능 모델의 예인 키워드 감지 모델 및 나이 감지 모델 등은 CPU를 기반으로 할 때 더 효율적인 모델일 수 있다. 보다 상세하게는, 키워드 감지 모델 및 나이 감지 모델은 CPU 기반의 장치 및 GPU 기반의 장치 모두에서 구동 가능하지만, CPU 기반의 장치에서 더 효율적으로 구동하는 인공지능 모델일 수 있다.According to one embodiment, artificial intelligence models can be divided into GPU-based artificial intelligence models and CPU-based artificial intelligence models. Accordingly, the electronic device 100 may classify the artificial intelligence model corresponding to the request into one of a CPU-based artificial intelligence model and a GPU-based artificial intelligence model. Specifically, among artificial intelligence models, computer vision-related artificial intelligence models, such as optical character recognition (OCR) models and logo detection models, may be more efficient models when based on GPUs. More specifically, the optical character recognition model and logo detection model can run on both CPU-based devices and GPU-based devices, but may be an artificial intelligence model that runs more efficiently on GPU-based devices. Conversely, among artificial intelligence models, keyword detection models and age detection models, which are examples of artificial intelligence models related to natural language processing, may be more efficient models when based on CPU. More specifically, the keyword detection model and age detection model can be run on both CPU-based devices and GPU-based devices, but may be an artificial intelligence model that runs more efficiently on CPU-based devices.
일 실시 예에 따르면, 도 7의 서버(120)는 GPU 서버(710) 및 CPU 서버(720)를 포함할 수 있다. 인공지능 모델의 추론에 GPU 서버(710)를 이용하면 CPU 서버(720)만을 이용하는 것보다 여러가지 측면에서 더 효율적으로 인공지능 모델을 관리할 수 있다. 예를 들어, GPU 인스턴스를 이용함에 따라, 리퀘스트에 따른 결과 정보를 제공하는 처리 속도 및 클라이언트 장치의 레이턴시 등을 고려한 비용 등의 측면에서, 시스템(10)의 효율성이 증대될 수 있다. 여기서, GPU 인스턴스는 GPU 서버(710)를 구성하는 일 요소로, 프레임워크와 애플리케이션 등에서 인공지능 등에 이용되는 GPU 서버의 서브 서버일 수 있다.According to one embodiment, the server 120 of FIG. 7 may include a GPU server 710 and a CPU server 720. Using the GPU server 710 for inference of an artificial intelligence model allows the artificial intelligence model to be managed more efficiently in many aspects than using only the CPU server 720. For example, by using a GPU instance, the efficiency of the system 10 can be increased in terms of processing speed for providing result information according to a request and cost considering the latency of the client device. Here, the GPU instance is an element that constitutes the GPU server 710, and may be a sub-server of the GPU server used in artificial intelligence, etc. in frameworks and applications.
일 실시 예에 따르면, 전자 장치(100)는 CPU 기반 인공지능 모델을 포함하는 제1 그룹을 CPU 서버(720)에 할당하고, GPU 기반 인공지능 모델을 포함하는 제2 그룹을 GPU 서버(710)에 할당할 수 있다. 이와 관련하여, 복수 개의 인공지능 모델에 대응되는 서버에 대한 정보는 전자 장치(100)에 설정되어 있을 수 있다. 즉, 전자 장치(100)는 복수 개의 인공지능 모델에 대응되는 서버에 대한 정보에 기반하여, 인공지능 모델에 대응하는 서버를 결정할 수 있다. 서버를 결정하는 동작은 GPU 서버(710)에 포함되는 GPU 인스턴스 또는 CPU 서버(720)에 포함되는 컨테이너를 결정하는 동작을 포함할 수 있다.According to one embodiment, the electronic device 100 allocates a first group including a CPU-based artificial intelligence model to the CPU server 720, and assigns a second group including a GPU-based artificial intelligence model to the GPU server 710. can be assigned to . In this regard, information about servers corresponding to a plurality of artificial intelligence models may be set in the electronic device 100. That is, the electronic device 100 may determine a server corresponding to an artificial intelligence model based on information about servers corresponding to a plurality of artificial intelligence models. The operation of determining a server may include determining a GPU instance included in the GPU server 710 or a container included in the CPU server 720.
일 실시 예에 따르면, 전자 장치(100)는 제1 그룹에 포함되는 인공지능 모델을 CPU 서버(720)에 포함되는 복수 개의 컨테이너 중 하나에 할당할 수 있다. 여기서, CPU 서버(720)는 Kubernetes 오픈소스 플랫폼일 수 있으나, 이에 한정되는 것은 아니다. 전자 장치(100)는 제2 그룹에 포함되는 인공지능 모델을 GPU 서버(720)에 포함되는 복수 개의 인스턴스 중 하나에 할당할 수 있다. 즉, 인공지능 모델이 동일한 그룹에 속하더라도 실제로 실행되는 인스턴스 또는 컨테이너는 상이할 수 있다. 예를 들어, OCR 모델은 GPU 서버(710)에 포함되는 제1 인스턴스에 할당될 수 있고, 키워드 감지 모델은 CPU 서버(720)에 포함되는 제1 컨테이너에 할당될 수 있다. GPU 인스턴스 및 컨테이너는 웹 서버를 통해 인공지능 모델과 연결될 수 있다.According to one embodiment, the electronic device 100 may allocate an artificial intelligence model included in the first group to one of a plurality of containers included in the CPU server 720. Here, the CPU server 720 may be the Kubernetes open source platform, but is not limited thereto. The electronic device 100 may allocate an artificial intelligence model included in the second group to one of a plurality of instances included in the GPU server 720. In other words, even if the artificial intelligence models belong to the same group, the instances or containers that are actually executed may be different. For example, the OCR model may be assigned to a first instance included in the GPU server 710, and the keyword detection model may be assigned to a first container included in the CPU server 720. GPU instances and containers can be connected to artificial intelligence models through a web server.
인공지능 모델 별로 구동되는 서버 주소는 제어 정보에 포함될 수 있다. 보다 상세하게는, 인공지능 모델 별로 서버 주소와 관련된 엔드 포인트는 제어 정보에 포함될 수 있다. 전자 장치(100)는 인공지능 모델 각각에 대응하는 엔드 포인트를 호출할 수 있다. 여기서, 엔드 포인트는 서버에서 출력 데이터와 같은 리소스에 접근할 수 있도록 하는 URL 과 같은 포인트일 수 있다.The server address operated by each artificial intelligence model may be included in the control information. More specifically, the endpoint related to the server address for each artificial intelligence model may be included in the control information. The electronic device 100 may call an endpoint corresponding to each artificial intelligence model. Here, the endpoint may be a point such as a URL that allows access to resources such as output data on the server.
또한, 엔드 포인트를 이용하면 시스템(10)하에 새로운 인공지능 모델을 추가하는 작업은 용이하게 수행될 수 있다. 구체적으로, 1) 새로운 인공지능 모델의 입력 데이터 및 2) 새로운 인공지능 모델의 엔드 포인트를 설정하면, 전자 장치(100)는 새로운 인공지능 모델을 용이하게 관리할 수 있다. 예를 들어, 차트 감지 모델을 추가할 때, 1) 입력 데이터로 제1 데이터 및 2) 엔드 포인트로 제1 URL를 설정할 수 있고, 전자 장치(100)는 제1 데이터 및 제1 URL에 기반하여, 차트 감지 모델의 출력 데이터를 획득할 수 있다.Additionally, adding a new artificial intelligence model under the system 10 can be easily performed using the endpoint. Specifically, by setting 1) the input data of the new artificial intelligence model and 2) the end point of the new artificial intelligence model, the electronic device 100 can easily manage the new artificial intelligence model. For example, when adding a chart detection model, 1) first data as input data and 2) first URL as endpoint may be set, and the electronic device 100 may set the first data and first URL based on the first data and first URL. , the output data of the chart detection model can be obtained.
GPU 서버(710)의 GPU 인스턴스와 관련하여, GPU 서버(710)는 온디맨드 인스턴스 이외에 스팟 인스펀스를 포함할 수 있다. 여기서, 스팟 인스턴스는 관리자에 의해 임의로 중단 가능하지만, 비용 측면에서 효율적인 인스턴스를 호칭할 수 있다. 다만, 임의로 중단 가능한 바, 스팟 인스턴스에 할당되는 메모리양을 적절하게 조절할 필요가 있다. 따라서, 스팟 인스턴스가 중단되면, 전자 장치(100)는 미리 설정된 대체 규칙에 기반하여 다른 GPU 인스턴스에 기반하여 인공지능 모델을 구동할 수 있다. 또한 각각의 GPU 인스턴스는 단일 스레드를 통해 대응되는 머신러닝 모델과 연결되는 것을 특징으로 할 수 있다.Regarding GPU instances of GPU server 710, GPU server 710 may include spot instances in addition to on-demand instances. Here, a spot instance can be called an instance that can be stopped arbitrarily by the administrator, but is efficient in terms of cost. However, since it can be stopped arbitrarily, it is necessary to appropriately adjust the amount of memory allocated to spot instances. Accordingly, when the spot instance is interrupted, the electronic device 100 may run an artificial intelligence model based on another GPU instance based on a preset replacement rule. Additionally, each GPU instance may be characterized as being connected to the corresponding machine learning model through a single thread.
도 8은 인공지능 모델에 대응되는 GPU 인스턴스를 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 기반하여 할당하는 실시 예를 설명하기 위한 도면이다.FIG. 8 is a diagram illustrating an embodiment of allocating a GPU instance corresponding to an artificial intelligence model based on history data about memory usage of the artificial intelligence model.
도 8은 전자 장치(100)가 OCR 모델, 키워드 감지 모델, 성별 감지 모델, 나이 감지 모델 및 인증 관련 모델을 서버(120)에 포함되는 GPU 서버(810) 및 CPU 서버(820)에 할당하는 실시 예를 도시하고 있다.FIG. 8 shows the electronic device 100 allocating an OCR model, a keyword detection model, a gender detection model, an age detection model, and an authentication-related model to the GPU server 810 and the CPU server 820 included in the server 120. An example is shown.
일 실시 예에 따르면, 전자 장치(100)는 적어도 하나의 인공지능 모델에 대응하는 GPU 인스턴스를 제2 그룹에 포함되는 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 기반하여 결정할 수 있다. 예를 들어, 각각의 GPU 인스턴스에 16GB의 메모리가 할당될 수 있다. 또한, 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 따르면, OCR 모델, 성별 감지 모델 및 나이 감지 모델은 각각 12GB, 6GB 및 6GB의 메모리를 평균적으로 사용할 수 있다. 이때, OCR 모델과 다른 인공지능 모델이 동일한 GPU 인스턴스에 할당되면, GPU 인스턴스에 할당된 메모리 양을 초과할 우려가 있을 수 있다. 따라서, 전자 장치(100)는 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 기반하여 1) 제1 인스턴스에 OCR 모델을 할당하고, 2) 제2 인스턴스에 성별 감지 모델 및 나이 감지 모델을 할당할 수 있다.According to one embodiment, the electronic device 100 may determine the GPU instance corresponding to at least one artificial intelligence model based on history data about memory usage of the artificial intelligence model included in the second group. For example, each GPU instance may be allocated 16GB of memory. Additionally, historical data on the memory usage of artificial intelligence models shows that the OCR model, gender detection model, and age detection model can use 12GB, 6GB, and 6GB of memory on average, respectively. At this time, if the OCR model and another artificial intelligence model are allocated to the same GPU instance, there may be a risk of exceeding the amount of memory allocated to the GPU instance. Accordingly, the electronic device 100 may 1) assign an OCR model to the first instance, and 2) assign a gender detection model and an age detection model to the second instance based on history data about memory usage of the artificial intelligence model. there is.
또한, 앞서 살펴본 바와 같이 전자 장치(100)는 제2 그룹에 포함되는 인공지능 모델에 새로운 인스턴스를 할당할 수 있다. 예를 들어, 전자 장치(100)는 제3 인스턴스를 추가함으로써, 성별 감지 모델 및 나이 감지 모델에 제2 인스턴스 및 제3 인스턴스를 각각 할당할 수 있다.Additionally, as discussed above, the electronic device 100 may allocate a new instance to the artificial intelligence model included in the second group. For example, the electronic device 100 may assign a second instance and a third instance to the gender detection model and the age detection model, respectively, by adding the third instance.
이와 같은 프로세스는 제1 그룹에 포함되는 인공지능 모델에 대응되는 컨테이너를 결정하는 동작에도 유사하게 적용 가능하다. 구체적으로, 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 따르면, 키워드 감지 모델 및 인증 관련 모델의 메모리 사용량은 클 수 있다. 따라서, 전자 장치(100)는 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 기반하여 1) 제1 컨테이너에 키워드 감지 모델을 할당하고, 2) 제2 컨테이너에 인증 관련 모델을 할당할 수 있다.This process is similarly applicable to the operation of determining a container corresponding to an artificial intelligence model included in the first group. Specifically, according to historical data on memory usage of artificial intelligence models, the memory usage of keyword detection models and authentication-related models can be large. Accordingly, the electronic device 100 may 1) allocate a keyword detection model to the first container and 2) allocate an authentication-related model to the second container based on history data about memory usage of the artificial intelligence model.
또한, GPU 서버 내의 GPU 인스턴스 및 CPU 서버 내의 컨테이너는 서로 연결될 수 있다. 여기서, 연결은 GPU 인스턴스를 통한 인공지능 모델의 구동 전후에 컨테이너를 통한 인공지능 모델이 구동될 수 있음을 의미한다. 예를 들어, 도 8을 참조하면, 제1 인스턴스 및 제1 컨테이너는 연결될 수 있고, 제1 컨테이너와 제2 인스턴스도 연결될 수 있다. 구체적으로, OCR 모델의 출력 데이터인 텍스트 데이터는 키워드 감지 모델의 입력 데이터로 이용될 수 있다. 이때, GPU 서버(810)의 제1 인스턴스를 통해 OCR 모델을 실행함에 따라 생성된 텍스트 데이터는 CPU 서버(820)의 제1 컨테이너로 전달될 수 있다. 또한, CPU 서버(820)의 제1 컨테이너를 통해 키워드 감지 모델을 실행함에 따라 생성된 키워드 데이터는 GPU 서버(810)의 제2 인스턴스로 전달될 수 있다.Additionally, GPU instances within a GPU server and containers within a CPU server may be connected to each other. Here, connection means that the artificial intelligence model through the container can be run before and after the artificial intelligence model through the GPU instance. For example, referring to FIG. 8, a first instance and a first container may be connected, and a first container and a second instance may also be connected. Specifically, text data, which is the output data of the OCR model, can be used as input data of the keyword detection model. At this time, text data generated by executing the OCR model through the first instance of the GPU server 810 may be transmitted to the first container of the CPU server 820. Additionally, keyword data generated by executing the keyword detection model through the first container of the CPU server 820 may be transmitted to the second instance of the GPU server 810.
또한, 각각의 인공지능 모델에 대응되는 인스턴스 또는 컨테이너를 결정하는 프로세스는 고정되는 것이 아니고, 인공지능 모델의 메모리 사용 히스토리 데이터에 기반하여 유동적으로 조절될 수 있다. 예를 들어, 1) OCR 모델, 성별 감지 모델 및 나이 감지 모델이 각각 4GB, 4GB 및 4GB의 메모리를 평균적으로 사용하면, OCR 모델, 성별 감지 모델 및 나이 감지 모델은 하나의 GPU 인스턴스에 할당될 수 있다. 반대로, 모델 및 입력 데이터의 용량이 커짐에 따라, OCR 모델, 성별 감지 모델 및 나이 감지 모델이 각각 12GB, 10GB 및 10GB의 메모리를 평균적으로 사용하면, OCR 모델, 성별 감지 모델 및 나이 감지 모델은 서로 다른 GPU 인스턴스에 할당될 수 있다. 또한, 앞서 살펴본 바와 같이, GPU 기반 인공지능 모델이더라도, GPU 서버(810) 내의 제1 인스턴스 및 제2 인스턴스의 테스크가 많은 경우, GPU 기반 인공지능 모델은 CPU 서버(820)의 컨테이너를 통해 동작될 수도 있다.Additionally, the process of determining the instance or container corresponding to each artificial intelligence model is not fixed, and can be flexibly adjusted based on the memory usage history data of the artificial intelligence model. For example, 1) If the OCR model, gender detection model, and age detection model consume 4GB, 4GB, and 4GB of memory on average, respectively, then the OCR model, gender detection model, and age detection model can be assigned to one GPU instance. there is. Conversely, as the capacity of the model and input data increases, the OCR model, gender detection model, and age detection model use 12 GB, 10 GB, and 10 GB of memory on average, respectively. Can be assigned to different GPU instances. In addition, as seen above, even if it is a GPU-based artificial intelligence model, if the first instance and the second instance in the GPU server 810 have many tasks, the GPU-based artificial intelligence model may be operated through a container of the CPU server 820. It may be possible.
도 9는 일 실시 예에 따른 인공지능 모델을 관리하기 위한 전자 장치를 도식화한 블록도이다.Figure 9 is a block diagram illustrating an electronic device for managing an artificial intelligence model according to an embodiment.
도 9의 전자 장치(900)는 본원 명세서의 전자 장치(100)에 대응될 수 있다.The electronic device 900 of FIG. 9 may correspond to the electronic device 100 of the present specification.
본 개시의 전자 장치(900)는 일 실시 예에 따라, 트랜시버(910), 스토리지(920) 및 프로세서(930)를 포함할 수 있다. 도 9에 도시된 구성요소들은 전자 장치를 구현하는데 있어서 필수적인 것은 아니어서, 본 명세서 상에서 설명되는 전자 장치(900)는 위에서 열거된 구성요소들 보다 많거나, 또는 적은 구성요소들을 가질 수 있음을 본 실시 예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다. 한편 실시 예에서 프로세서(930)는 적어도 하나의 프로세서를 포함할 수 있다.The electronic device 900 of the present disclosure may include a transceiver 910, a storage 920, and a processor 930, according to an embodiment. The components shown in FIG. 9 are not essential for implementing the electronic device, so the electronic device 900 described herein may have more or fewer components than the components listed above. Anyone with ordinary knowledge in the technical field related to the embodiment can understand. Meanwhile, in an embodiment, the processor 930 may include at least one processor.
트랜시버(910)는 유무선 통신 기술을 이용하여 외부의 장치와 통신할 수 있으며 트랜시버(910)를 포함할 수 있다. 외부의 장치는 클라이언트 장치, 단말, 오픈소스 플랫폼 또는 서버가 될 수 있다. 또한, 트랜시버(910)가 이용하는 통신 기술에는 GSM(Global System for Mobile communication), CDMA(Code Division Multi Access), LTE(Long Term Evolution), 5G, WLAN(Wireless LAN), Wi-Fi(Wireless-Fidelity), 블루투스(Bluetooth), RFID(Radio Frequency Identification), 적외선 통신(Infrared Data Association; IrDA), ZigBee, NFC(Near Field Communication) 등이 있을 수 있으며, 이에 한정되는 것은 아니다.The transceiver 910 can communicate with an external device using wired or wireless communication technology and may include the transceiver 910. The external device can be a client device, terminal, open source platform, or server. In addition, communication technologies used by the transceiver 910 include GSM (Global System for Mobile communication), CDMA (Code Division Multi Access), LTE (Long Term Evolution), 5G, WLAN (Wireless LAN), and Wi-Fi (Wireless-Fidelity). ), Bluetooth, RFID (Radio Frequency Identification), Infrared Data Association (IrDA), ZigBee, NFC (Near Field Communication), etc., but are not limited thereto.
일 실시 예에 따라, 트랜시버(910)는 클라이언트 장치(110)로부터 리퀘스트를 수신할 수 있고, 제어 정보를 적어도 하나의 인공지능 모델에 전송할 수 있다. 또한, 트랜시버(910)는 적어도 하나의 인공지능 모델로부터 제어 정보에 따른 결과 정보를 수신할 수 있다. 실행 타입이 제1 타입이면, 전자 장치(100)는 결과 정보를 클라이언트 장치(110)에 직접적으로 전송할 수 있다. 실행 타입이 제2 타입이면, 전자 장치(100)는 결과 정보를 데이터 처리 플랫폼(130)에 전송할 수 있다.According to one embodiment, the transceiver 910 may receive a request from the client device 110 and transmit control information to at least one artificial intelligence model. Additionally, the transceiver 910 may receive result information according to control information from at least one artificial intelligence model. If the execution type is the first type, the electronic device 100 may directly transmit result information to the client device 110. If the execution type is the second type, the electronic device 100 may transmit result information to the data processing platform 130.
스토리지(920)는 도 1 내지 도 9를 통하여 전술한 적어도 하나의 방법을 수행하기 위한 정보를 저장할 수 있다. 스토리지(920)는 메모리로 호칭될 수 있고, 휘발성 메모리 또는 비휘발성 메모리일 수 있다. 또한, 스토리지(920)는 프로세서(930)의 동작을 수행하는데 필요한 하나 이상의 명령어를 저장할 수 있고, 플랫폼 상에 저장되거나 외부 메모리에 저장되는 데이터를 임시적으로 저장할 수 있다. 예를 들어, 스토리지(920)는 적어도 하나의 인공지능 모델에 대한 입출력 관계에 대한 정보 및 인공지능 모델의 메모리 사용에 대한 히스토리 데이터를 저장할 수 있다.The storage 920 may store information for performing at least one method described above with reference to FIGS. 1 to 9 . Storage 920 may be referred to as memory and may be volatile memory or non-volatile memory. Additionally, the storage 920 may store one or more instructions required to perform the operation of the processor 930, and may temporarily store data stored on the platform or in an external memory. For example, the storage 920 may store information about input-output relationships for at least one artificial intelligence model and history data about memory usage of the artificial intelligence model.
프로세서(930)는 전자 장치(900)의 전반적인 동작을 제어하고 데이터 및 신호를 처리할 수 있다. 프로세서(930)는 도 1 내지 도 9를 통하여 전술한 하나의 방법을 수행할 수 있다. 프로세서(930)는 트랜시버(910) 및 스토리지(920)와, 나아가 전자 장치(900)가 더 포함할 수 있는 구성요소들과의 상호 작용을 통해 전자 장치(900)가 수행하는 실시 예들을 제어할 수 있다. 일 실시 예에 따라, 프로세서(930)는 클라이언트 장치(110)로부터 리퀘스트를 수신하고, 리퀘스트와 관련된 정보를 확인하고, 정보에 기반하여, 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인하고, 정보에 기반하여 식별된 제어 정보를 적어도 하나의 인공지능 모델에 전송하고, 적어도 하나의 인공지능 모델로부터 제어 정보에 따른 결과 정보를 수신하고, 및 결과 정보를 클라이언트 장치(110)에게 제공할 수 있다.The processor 930 can control the overall operation of the electronic device 900 and process data and signals. The processor 930 may perform one of the methods described above with reference to FIGS. 1 to 9 . The processor 930 controls embodiments performed by the electronic device 900 through interaction with the transceiver 910 and the storage 920 and further components that the electronic device 900 may include. You can. According to one embodiment, the processor 930 receives a request from the client device 110, confirms information related to the request, based on the information, verifies at least one artificial intelligence model corresponding to the request, and generates the information. Control information identified based on can be transmitted to at least one artificial intelligence model, result information according to the control information can be received from at least one artificial intelligence model, and the result information can be provided to the client device 110.
한편, 본 명세서와 도면에는 본 발명의 바람직한 실시 예에 대하여 개시하였으며, 비록 특정 용어들이 사용되었으나, 이는 단지 본 발명의 기술 내용을 쉽게 설명하고 발명의 이해를 돕기 위한 일반적인 의미에서 사용된 것이지, 본 발명의 범위를 한정하고자 하는 것은 아니다. 여기에 개시된 실시 예 외에도 본 발명의 기술적 사상에 바탕을 둔 다른 변형 예들이 실시 가능하다는 것은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 자명한 것이다.Meanwhile, the specification and drawings disclose preferred embodiments of the present invention, and although specific terms are used, they are used in a general sense to easily explain the technical content of the present invention and to aid understanding of the present invention. It is not intended to limit the scope of the invention. In addition to the embodiments disclosed herein, it is obvious to those skilled in the art that other modifications based on the technical idea of the present invention can be implemented.
전술한 실시 예들에 따른 전자 장치 또는 단말은, 프로세서, 프로그램 데이터를 저장하고 실행하는 메모리, 디스크 드라이브와 같은 영구 저장부(permanent storage), 외부 장치와 통신하는 통신 포트, 터치 패널, 키(key), 아이콘 등과 같은 사용자 인터페이스 장치 등을 포함할 수 있다. 소프트웨어 모듈 또는 알고리즘으로 구현되는 방법들은 상기 프로세서상에서 실행 가능한 컴퓨터가 읽을 수 있는 코드들 또는 프로그램 명령들로서 컴퓨터가 읽을 수 있는 기록 매체 상에 저장될 수 있다. 여기서 컴퓨터가 읽을 수 있는 기록 매체로 마그네틱 저장 매체(예컨대, ROM(read-only memory), RAM(random-Access memory), 플로피 디스크, 하드 디스크 등) 및 광학적 판독 매체(예컨대, 시디롬(CD-ROM), 디브이디(DVD: Digital Versatile Disc)) 등이 있다. 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템들에 분산되어, 분산 방식으로 컴퓨터가 판독 가능한 코드가 저장되고 실행될 수 있다. 매체는 컴퓨터에 의해 판독가능하며, 메모리에 저장되고, 프로세서에서 실행될 수 있다. The electronic device or terminal according to the above-described embodiments includes a processor, memory for storing and executing program data, permanent storage such as a disk drive, a communication port for communicating with an external device, a touch panel, and a key. , user interface devices such as icons, etc. Methods implemented as software modules or algorithms may be stored on a computer-readable recording medium as computer-readable codes or program instructions executable on the processor. Here, computer-readable recording media include magnetic storage media (e.g., ROM (read-only memory), RAM (random-access memory), floppy disk, hard disk, etc.) and optical read media (e.g., CD-ROM). ), DVD (Digital Versatile Disc), etc. The computer-readable recording medium is distributed among computer systems connected to a network, so that computer-readable code can be stored and executed in a distributed manner. The media may be readable by a computer, stored in memory, and executed by a processor.
본 실시 예는 기능적인 블록 구성들 및 다양한 처리 단계들로 나타내어질 수 있다. 이러한 기능 블록들은 특정 기능들을 실행하는 다양한 개수의 하드웨어 또는/및 소프트웨어 구성들로 구현될 수 있다. 예를 들어, 실시 예는 하나 이상의 마이크로프로세서들의 제어 또는 다른 제어 장치들에 의해서 다양한 기능들을 실행할 수 있는, 메모리, 프로세싱, 로직(logic), 룩 업 테이블(look-up table) 등과 같은 직접 회로 구성들을 채용할 수 있다. 구성 요소들이 소프트웨어 프로그래밍 또는 소프트웨어 요소들로 실행될 수 있는 것과 유사하게, 본 실시 예는 데이터 구조, 프로세스들, 루틴들 또는 다른 프로그래밍 구성들의 조합으로 구현되는 다양한 알고리즘을 포함하여, C, C++, 자바(Java), 어셈블러(assembler), 파이썬(Python) 등과 같은 프로그래밍 또는 스크립팅 언어로 구현될 수 있다. 기능적인 측면들은 하나 이상의 프로세서들에서 실행되는 알고리즘으로 구현될 수 있다. 또한, 본 실시 예는 전자적인 환경 설정, 신호 처리, 및/또는 데이터 처리 등을 위하여 종래 기술을 채용할 수 있다. “매커니즘”, “요소”, “수단”, “구성”과 같은 용어는 넓게 사용될 수 있으며, 기계적이고 물리적인 구성들로서 한정되는 것은 아니다. 상기 용어는 프로세서 등과 연계하여 소프트웨어의 일련의 처리들(routines)의 의미를 포함할 수 있다.This embodiment can be represented by functional block configurations and various processing steps. These functional blocks may be implemented in various numbers of hardware or/and software configurations that execute specific functions. For example, embodiments include integrated circuit configurations such as memory, processing, logic, look-up tables, etc. that can execute various functions under the control of one or more microprocessors or other control devices. can be hired. Similar to how the components can be implemented as software programming or software elements, this embodiment includes various algorithms implemented as combinations of data structures, processes, routines or other programming constructs, such as C, C++, Java ( It can be implemented in a programming or scripting language such as Java, assembler, Python, etc. Functional aspects may be implemented as algorithms running on one or more processors. Additionally, this embodiment may employ conventional technologies for electronic environment settings, signal processing, and/or data processing. Terms such as “mechanism,” “element,” “means,” and “composition” can be used broadly and are not limited to mechanical and physical components. The term may include the meaning of a series of software routines in connection with a processor, etc.
전술한 실시 예들은 일 예시일 뿐 후술하는 청구항들의 범위 내에서 다른 실시 예들이 구현될 수 있다.The above-described embodiments are merely examples and other embodiments may be implemented within the scope of the claims described below.

Claims (15)

  1. 전자 장치에서 인공지능 모델을 관리하는 방법에 있어서,In a method of managing an artificial intelligence model in an electronic device,
    클라이언트 장치로부터 리퀘스트를 수신하는 단계;Receiving a request from a client device;
    상기 리퀘스트와 관련된 정보를 확인하는 단계;confirming information related to the request;
    상기 정보에 기반하여, 상기 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인하는 단계;Based on the information, confirming at least one artificial intelligence model corresponding to the request;
    상기 정보에 기반하여 식별된 제어 정보를 상기 적어도 하나의 인공지능 모델에 전송하는 단계;Transmitting control information identified based on the information to the at least one artificial intelligence model;
    상기 적어도 하나의 인공지능 모델로부터 상기 제어 정보에 따른 결과 정보를 수신하는 단계; 및Receiving result information according to the control information from the at least one artificial intelligence model; and
    상기 결과 정보를 상기 클라이언트 장치로 제공하는 단계를 포함하는 인공지능 모델을 관리하는 방법.A method of managing an artificial intelligence model including providing the result information to the client device.
  2. 제1 항에 있어서,According to claim 1,
    상기 정보는 상기 리퀘스트에 대한 식별 정보, 상기 리퀘스트에 대응하는 상기 적어도 하나의 인공지능 모델에 대한 정보, 상기 적어도 하나의 인공지능 모델의 입력 데이터에 대한 정보 및 상기 리퀘스트에 대응하는 실행 타입에 대한 정보를 포함하는 것을 특징으로 하는 인공지능 모델을 관리하는 방법.The information includes identification information about the request, information about the at least one artificial intelligence model corresponding to the request, information about input data of the at least one artificial intelligence model, and information about the execution type corresponding to the request. A method of managing an artificial intelligence model comprising:
  3. 제1 항에 있어서,According to claim 1,
    상기 제어 정보를 상기 적어도 하나의 인공지능 모델에 전송하는 단계는,The step of transmitting the control information to the at least one artificial intelligence model includes:
    상기 적어도 하나의 인공지능 모델에 대한 입출력 관계에 대한 정보에 기반하여, 상기 적어도 하나의 인공지능 모델의 실행 순서를 확인하는 단계; 및Confirming an execution order of the at least one artificial intelligence model based on information about the input-output relationship for the at least one artificial intelligence model; and
    상기 실행 순서에 기반하여, 상기 제어 정보를 식별하는 단계를 포함하는 인공지능 모델을 관리하는 방법.A method of managing an artificial intelligence model including identifying the control information based on the execution order.
  4. 제3 항에 있어서,According to clause 3,
    상기 적어도 하나의 인공지능 모델이 복수 개의 그룹으로 구분될 때, 상기 적어도 하나의 인공지능 모델의 실행 순서는 상기 복수 개의 그룹 각각에 포함되는 인공지능 모델 간의 실행 순서를 포함하고, 및When the at least one artificial intelligence model is divided into a plurality of groups, the execution order of the at least one artificial intelligence model includes an execution order between the artificial intelligence models included in each of the plurality of groups, and
    상기 복수 개의 그룹은 병렬적으로 실행되는 것을 특징으로 하는 인공지능 모델을 관리하는 방법.A method for managing an artificial intelligence model, wherein the plurality of groups are executed in parallel.
  5. 제2 항에 있어서,According to clause 2,
    상기 실행 타입에 대한 정보는 상기 결과 정보를 수신하기까지 예상 시간에 기반하여 결정되는 것을 특징으로 하는 인공지능 모델을 관리하는 방법.A method for managing an artificial intelligence model, characterized in that the information about the execution type is determined based on the expected time until receiving the result information.
  6. 제2 항에 있어서,According to clause 2,
    상기 실행 타입이 제1 타입인 경우, 상기 결과 정보를 상기 클라이언트 장치로 제공하는 단계는,When the execution type is the first type, providing the result information to the client device includes:
    상기 결과 정보의 수신에 대응하여 상기 결과 정보를 대기 중인 상기 클라이언트 장치로 제공하는 단계를 포함하는 인공지능 모델을 관리하는 방법.A method of managing an artificial intelligence model comprising providing the result information to the waiting client device in response to receiving the result information.
  7. 제2 항에 있어서,According to clause 2,
    상기 실행 타입이 제2 타입인 경우, 상기 결과 정보를 상기 클라이언트 장치로 제공하는 단계는,When the execution type is the second type, providing the result information to the client device includes:
    상기 결과 정보를 데이터 처리 플랫폼에 전송하는 단계를 포함하는 인공지능 모델을 관리하는 방법.A method of managing an artificial intelligence model including transmitting the result information to a data processing platform.
  8. 제7 항에 있어서,According to clause 7,
    상기 리퀘스트를 수신하는 단계는,The step of receiving the request is,
    상기 리퀘스트의 수신에 대응하여, 상기 식별 정보를 상기 클라이언트 장치로 전송하는 단계를 포함하는 인공지능 모델을 관리하는 방법.In response to receiving the request, a method for managing an artificial intelligence model comprising transmitting the identification information to the client device.
  9. 제8 항에 있어서,According to clause 8,
    상기 데이터 처리 플랫폼에 저장된 상기 결과 정보는 상기 식별 정보에 기반하여 상기 클라이언트 장치에 의해 식별되는 것을 특징으로 하는 인공지능 모델을 관리하는 방법.A method for managing an artificial intelligence model, wherein the result information stored in the data processing platform is identified by the client device based on the identification information.
  10. 제1 항에 있어서,According to claim 1,
    상기 적어도 하나의 인공지능 모델을 확인하는 단계는,The step of confirming the at least one artificial intelligence model is,
    상기 적어도 하나의 인공지능 모델 각각을 제1 타입의 프로세서 유닛 기반 인공지능 모델 및 제2 타입의 프로세서 유닛 기반 인공지능 모델 중 하나로 확인하는 단계를 포함하는 인공지능 모델을 관리하는 방법.A method for managing an artificial intelligence model, comprising the step of identifying each of the at least one artificial intelligence model as one of a first type of processor unit-based artificial intelligence model and a second type of processor unit-based artificial intelligence model.
  11. 제10 항에 있어서,According to claim 10,
    상기 적어도 하나의 인공지능 모델 중 상기 제1 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제1 그룹은 키워드 감지 모델을 포함하고, 및Among the at least one artificial intelligence model, a first group including the first type of processor unit-based artificial intelligence model includes a keyword detection model, and
    상기 적어도 하나의 인공지능 모델 중 상기 제2 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제2 그룹은 광학 문자 인식 모델을 포함하는 것을 특징으로 하는 인공지능 모델을 관리하는 방법.A method for managing an artificial intelligence model, wherein a second group including the second type of processor unit-based artificial intelligence model among the at least one artificial intelligence model includes an optical character recognition model.
  12. 제10 항에 있어서,According to claim 10,
    상기 적어도 하나의 인공지능 모델을 확인하는 단계는,The step of confirming the at least one artificial intelligence model is,
    상기 적어도 하나의 인공지능 모델 중 상기 제1 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제1 그룹 및 상기 적어도 하나의 인공지능 모델 중 상기 제2 타입의 프로세서 유닛 기반 인공지능 모델을 포함하는 제2 그룹을 각각 제1 타입의 프로세서 유닛 서버 및 제2 타입의 프로세서 유닛 서버에 할당하는 단계를 포함하는 인공지능 모델을 관리하는 방법.A first group including a processor unit-based artificial intelligence model of the first type among the at least one artificial intelligence model, and a second group including a processor unit-based artificial intelligence model of the second type among the at least one artificial intelligence model. A method for managing an artificial intelligence model comprising assigning groups to a first type of processor unit server and a second type of processor unit server, respectively.
  13. 제12 항에 이어서,Following paragraph 12,
    상기 제2 타입의 프로세서 유닛 서버는 복수 개의 인스턴스를 포함하고, 및The second type of processor unit server includes a plurality of instances, and
    상기 제2 그룹에 포함되는 인공지능 모델 각각에 대응되는 인스턴스는 상기 제2 그룹에 포함되는 인공지능 모델의 메모리 사용에 대한 히스토리 데이터에 기반하여 결정되는 것을 특징으로 하는 인공지능 모델을 관리하는 방법.A method for managing an artificial intelligence model, characterized in that the instance corresponding to each artificial intelligence model included in the second group is determined based on history data about memory usage of the artificial intelligence model included in the second group.
  14. 인공지능 모델을 관리하기 위한 전자 장치에 있어서,In an electronic device for managing an artificial intelligence model,
    트랜시버;transceiver;
    하나 이상의 명령어를 저장하는 스토리지; 및Storage for storing one or more instructions; and
    클라이언트 장치로부터 리퀘스트를 수신하고,Receive a request from a client device,
    리퀘스트와 관련된 정보를 확인하고,Check information related to the request,
    상기 정보에 기반하여, 상기 리퀘스트에 대응하는 적어도 하나의 인공지능 모델을 확인하고,Based on the information, identify at least one artificial intelligence model corresponding to the request,
    상기 정보에 기반하여 식별된 제어 정보를 상기 적어도 하나의 인공지능 모델에 전송하고,Transmitting control information identified based on the information to the at least one artificial intelligence model,
    상기 적어도 하나의 인공지능 모델로부터 상기 제어 정보에 따른 결과 정보를 수신하고, 및Receive result information according to the control information from the at least one artificial intelligence model, and
    상기 결과 정보를 상기 클라이언트 장치로 제공하는 프로세서를 포함하는 인공지능 모델을 관리하기 위한 전자 장치.An electronic device for managing an artificial intelligence model, including a processor that provides the result information to the client device.
  15. 제1 항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 비일시적 기록매체.A non-transitory computer-readable recording medium that records a program for executing the method of claim 1 on a computer.
PCT/KR2023/013789 2022-09-22 2023-09-14 Method and device for managing artificial intelligence model WO2024063437A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US202263408954P 2022-09-22 2022-09-22
US63/408,954 2022-09-22
KR1020230041868A KR20240041201A (en) 2022-09-22 2023-03-30 Method and appartus for managing an altificial intelligence model
KR10-2023-0041868 2023-03-30

Publications (1)

Publication Number Publication Date
WO2024063437A1 true WO2024063437A1 (en) 2024-03-28

Family

ID=90454859

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/013789 WO2024063437A1 (en) 2022-09-22 2023-09-14 Method and device for managing artificial intelligence model

Country Status (1)

Country Link
WO (1) WO2024063437A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050756A1 (en) * 2014-06-30 2019-02-14 Amazon Technologies, Inc. Machine learning service
KR20200109819A (en) * 2019-03-14 2020-09-23 삼성전자주식회사 Electronic apparatus and controlling method thereof
KR20210055560A (en) * 2019-11-07 2021-05-17 한국전자통신연구원 Apparatus and Method for Managing Performance about Artificial Intelligent Service
KR20220045800A (en) * 2020-10-06 2022-04-13 삼성전자주식회사 System and operating method for distributed processing an AI model
KR20220122566A (en) * 2022-03-22 2022-09-02 베이징 바이두 넷컴 사이언스 테크놀로지 컴퍼니 리미티드 Text recognition model training method, text recognition method, and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050756A1 (en) * 2014-06-30 2019-02-14 Amazon Technologies, Inc. Machine learning service
KR20200109819A (en) * 2019-03-14 2020-09-23 삼성전자주식회사 Electronic apparatus and controlling method thereof
KR20210055560A (en) * 2019-11-07 2021-05-17 한국전자통신연구원 Apparatus and Method for Managing Performance about Artificial Intelligent Service
KR20220045800A (en) * 2020-10-06 2022-04-13 삼성전자주식회사 System and operating method for distributed processing an AI model
KR20220122566A (en) * 2022-03-22 2022-09-02 베이징 바이두 넷컴 사이언스 테크놀로지 컴퍼니 리미티드 Text recognition model training method, text recognition method, and apparatus

Similar Documents

Publication Publication Date Title
WO2021060609A1 (en) Distributed computing system comprising plurality of edges and cloud and method for providing model for adaptive intelligence usage thereof
WO2020116928A1 (en) Method and apparatus for management of network based media processing functions in wireless communication system
WO2016137092A2 (en) Method for organizing group icon in messenger service, and apparatus therefor
WO2018155963A1 (en) Method of accelerating execution of machine learning based application tasks in a computing device
WO2020119117A1 (en) Distributed computing method, apparatus and system, device and readable storage medium
WO2015041436A1 (en) Method of managing control right, client device therefor, and master device therefor
WO2014003505A1 (en) System and method for configuring device sociality
WO2013048141A2 (en) System and method for displaying usage history of applications executed between devices
CN103916314A (en) Message transmitting control method, related device and physical host
WO2019103280A1 (en) Electronic device and method for managing computing resources of at least one cloud server for providing cloud service
EP3857855A1 (en) Method and apparatus for enhanced assertion management in cloud media processing
WO2016064158A1 (en) Reconfigurable processor and operation method therefor
WO2014119864A1 (en) Software migration method and apparatus in micro-server environment
WO2022139150A1 (en) Cloud-based distributed video rendering system, and autoscaling method thereof
EP3861443A1 (en) Service-aware serverless cloud computing system
EP3602299A1 (en) System for providing function as a service (faas), and operating method of system
WO2021118158A1 (en) Electronic device for controlling interface between a plurality of integrated circuits and operation method thereof
WO2022131602A1 (en) System and method for streaming in metaverse space
WO2021125502A1 (en) Container-based cloud service providing system and method therefor
WO2021210706A1 (en) Method for processing deep learning task in heterogeneous accelerators and cluster system for performing method
WO2020162715A1 (en) Electronic device, storage medium, and method for process scheduling
CN117061352A (en) Method, device, equipment and medium for implementing multi-mode virtual network element
WO2022139145A1 (en) Medical image labeling method based on flexible superpixel, and method therefor
WO2024063437A1 (en) Method and device for managing artificial intelligence model
EP3662368A1 (en) Method and apparatus for managing scheduling of services during boot-up

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23868491

Country of ref document: EP

Kind code of ref document: A1