Method, program and apparatus for demand forecasting using multi task learning
The multi-task learning approach effectively addresses data scarcity and complex interactions in demand forecasting by generating embedding vectors and using neural networks to enhance forecasting accuracy in diverse industrial sectors.
Patent Information
- Application Number
- KR1020250058126
- Authority / Receiving Office
- KR · KR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-02
- Publication Date
- 2026-11-10
AI Technical Summary
Existing time series forecasting models struggle with learning complex interactions between variables and are inadequate for handling data scarcity or imbalance, leading to degraded performance in demand forecasting tasks.
A method utilizing multi-task learning that involves generating embedding vectors from demand data, applying a first neural network to learn common patterns, and using multiple second neural networks to generate time series data for demand forecasting, with dynamic weight adjustments to balance task-specific losses.
Enhances learning of common patterns and interactions between tasks, effectively addressing data scarcity and improving forecasting accuracy across various industrial sectors, including agriculture, manufacturing, logistics, and energy.
Smart Images

Figure PAT00002_ABST
Abstract
Description
Technology Field
[0001] The present disclosure relates to a technology for demand forecasting, and specifically to a method and apparatus for performing time series forecasting for various types of demand using multi-task learning. Background Technology
[0003] Time series forecasting plays a pivotal role in various industrial sectors, including agriculture, manufacturing, logistics, energy, and finance. For instance, demand forecasting is essential for allocating necessary resources in a timely manner or establishing production plans, while raw material price forecasting enables companies to reduce costs and manage funds efficiently. In particular, supply chain and inventory management rely heavily on accurate time-series data prediction, and the accuracy of such forecasts directly determines the efficiency of business operations.
[0004] Existing models for demand forecasting are based on single task learning (STL), which trains each task independently. While this approach is effective for learning the characteristics of individual tasks, it has limitations in that it fails to utilize common information obtainable from other tasks. Consequently, learning performance degrades significantly when data is scarce or imbalanced. Transfer learning partially compensates for the limitations of single task learning by transferring knowledge learned from one task to another; however, because it consists of a structure of pre-training and fine-tuning rather than simultaneous learning between tasks, it fails to adequately reflect interaction information.
[0005] Furthermore, traditional time series forecasting models (e.g., ARIMA, SARIMA, PROPHET) are suitable for specific data structures but struggle to effectively learn complex interactions between variables. Tree-based models (e.g., XGBoost, LightGBM) demonstrate strengths with small-scale data but have limitations in handling temporal continuity. As such, existing technologies are insufficient for solving complex time series problems in demand forecasting. Prior art literature
[0007] Korean Patent Publication No. 10-2786927 (March 25, 2025) The problem to be solved
[0008] The present disclosure is devised in response to the aforementioned background technology and aims to provide a method for constructing and utilizing a demand forecasting model capable of learning common patterns and interactions between tasks by learning multiple tasks simultaneously.
[0009] However, the problems to be solved in this disclosure are not limited to those mentioned above, and other unmentioned problems may be clearly understood based on the description below. means of solving the problem
[0011] A method for demand forecasting using multi-task learning, performed by a computing device according to an embodiment of the present disclosure for realizing the aforementioned tasks, is disclosed. The method may include: a step of acquiring demand data including variables related to temporal order; a step of generating a first token by converting features of the demand data into embedding vectors; a step of generating a second token that reflects the relationship between features of the demand data by inputting the first token into a first neural network that learns common patterns between a plurality of tasks required for demand forecasting; and a step of generating time series data for demand forecasting by inputting the second token into at least one of a plurality of second neural networks corresponding to the plurality of tasks.
[0012] Alternatively, the variables related to the above temporal order may include at least one of date, time, seasonality, time of day, trend, or weather.
[0013] Alternatively, if the demand data includes numeric data, the embedding vector may be generated by performing normalization on the numeric data and applying a weight vector to the normalized numeric data.
[0014] Alternatively, if the demand data includes categorical data, the embedding vector can be generated by converting the categorical data into a one-hot encoded vector.
[0015] Alternatively, the first token may include a first sub-token that aggregates information about the features of the demand data; and a second sub-token generated by connecting individual vectors about the features of the demand data.
[0016] Alternatively, the second token may be generated by modifying the first sub-token through the first neural network.
[0017] Alternatively, the first neural network may include a first sub-neural network that performs a self-attention operation to emphasize the relationship between features included in the first token; and a second sub-neural network that non-linearly transforms the representation of features included in the first token.
[0018] Alternatively, the total loss function for training the first neural network and the plurality of second neural networks may be composed of a weighted sum of the plurality of task-specific loss functions. Furthermore, the task-specific weights configured for the weighted sum in the total loss function may be dynamically adjusted to relatively suppress tasks with high losses and relatively strengthen tasks with low losses.
[0019] According to one embodiment of the present disclosure for realizing the aforementioned tasks, a computer program stored on a computer-readable storage medium is disclosed. When the computer program is executed on one or more processors, it performs operations for predicting demand using multi-task learning. At this time, the operations may include: an operation of acquiring demand data including variables related to temporal order; an operation of converting features of the demand data into embedding vectors to generate a first token; an operation of inputting the first token into a first neural network that learns common patterns among a plurality of tasks required for demand prediction to generate a second token that reflects the relationships between the features of the demand data; and an operation of inputting the second token into at least one of a plurality of second neural networks corresponding to the plurality of tasks to generate time-series data for demand prediction.
[0020] According to one embodiment of the present disclosure for realizing the aforementioned task, a computing device for predicting demand using multi-task learning is disclosed. The device may include a processor comprising at least one core; a memory comprising program codes executable on the processor; and a network unit for acquiring demand data comprising variables related to temporal order. In this case, the processor may generate a first token by converting the features of the demand data into an embedding vector, input the first token into a first neural network that learns a common pattern between a plurality of tasks required for demand prediction, generate a second token that reflects the relationship between the features of the demand data, and input the second token into at least one of a plurality of second neural networks corresponding to the plurality of tasks to generate time series data for demand prediction. Effects of the invention
[0022] The present disclosure can solve the problem of data scarcity by effectively learning common patterns and interactions between tasks using multi-task learning. Furthermore, the present disclosure can comprehensively solve various time series forecasting problems, such as product shipment volume forecasting, inventory management, energy demand forecasting, raw material consumption forecasting, and raw material price forecasting, by effectively learning the characteristics of time series data through multi-task learning.
[0023] Therefore, the present disclosure overcomes the limitations of existing technologies and can be widely utilized in various industrial fields requiring demand forecasting, such as agriculture, manufacturing, logistics, and energy. Brief explanation of the drawing
[0025] FIG. 1 is a block diagram of a computing device according to one embodiment of the present disclosure. FIG. 2 is a block diagram illustrating a time series forecasting process using a multi-task learning-based model according to one embodiment of the present disclosure. FIG. 3 is a flowchart illustrating a demand forecasting method using multi-task learning according to one embodiment of the present disclosure. Specific details for implementing the invention
[0026] Embodiments of the present disclosure are described below with reference to the attached drawings so that those skilled in the art (hereinafter, those skilled in the art) can easily implement them. The embodiments presented in the present disclosure are provided to enable those skilled in the art to use or implement the contents of the present disclosure. Accordingly, various modifications to the embodiments of the present disclosure will be apparent to those skilled in the art. That is, the present disclosure may be embodied in various different forms and is not limited to the embodiments below.
[0027] Throughout the specification of the present disclosure, identical or similar reference numerals refer to identical or similar components. Additionally, to clearly explain the present disclosure, reference numerals in the drawings that are unrelated to the description of the present disclosure may be omitted.
[0028] The term “or” as used in this disclosure is intended to mean an implicit “or” rather than an exclusive “or.” That is, unless otherwise specified in this disclosure or its meaning is not clear from the context, “X uses A or B” should be understood to mean one of the natural implicit substitutions. For example, unless otherwise specified in this disclosure or its meaning is not clear from the context, “X uses A or B” may be interpreted as X using A, X using B, or X using both A and B.
[0029] The term “and / or” as used in this disclosure should be understood to refer to and include all possible combinations of one or more of the enumerated related concepts.
[0030] The terms “comprising” and / or “comprising” as used in this disclosure should be understood to mean the presence of certain features and / or components. However, the terms “comprising” and / or “comprising” should be understood not to exclude the presence or addition of one or more other features, other components and / or combinations thereof.
[0031] Where not otherwise specified in the present disclosure or where it is not clear from the context that the singular form indicates, the singular should generally be interpreted as including “one or more.”
[0032] The term “the N (N is a natural number)” used in this disclosure may be understood as an expression used to distinguish the components of this disclosure from one another according to certain criteria, such as functional perspectives, structural perspectives, or convenience of explanation. For example, components performing different functional roles in this disclosure may be distinguished as a first component or a second component. However, components that are substantially identical within the technical scope of this disclosure but must be distinguished for the convenience of explanation may also be distinguished as a first component or a second component.
[0033] The term “connection” as used in the present disclosure should be interpreted to include not only cases where the components are “directly connected,” but also cases where other components are “present” in between, and cases where they are “electrically connected” with other components in between.
[0034] The term “acquisition” as used in this disclosure may be understood to refer not only to receiving data through a wireless communication network with an external device or system, but also to generating or receiving data in an on-device form.
[0035] Meanwhile, the terms "module" or "unit" used in this disclosure may be understood as referring to an independent functional unit that processes computing resources, such as a computer-related entity, firmware, software or a part thereof, hardware or a part thereof, or a combination of software and hardware. In this case, "module" or "unit" may be a unit composed of a single element, or a unit expressed as a combination or set of multiple elements. For example, in a narrow sense, "module" or "unit" may refer to a hardware element of a computing device or a set thereof, an application program that performs a specific function of software, a procedure implemented through software execution, or a set of instructions for program execution. Furthermore, in a broad sense, "module" or "unit" may refer to the computing device itself that constitutes the system, or an application executed on the computing device. However, since the above-described concept is merely an example, the concept of "module" or "part" may be defined in various ways within the scope understandable to those skilled in the art based on the contents of this disclosure.
[0036] As used in this disclosure, the term “model” may be understood as a system implemented using mathematical concepts and language to solve a specific problem, a set of software units to solve a specific problem, or an abstract model regarding a process to solve a specific problem. For example, a machine learning “model” may refer to an overall system that possesses problem-solving capabilities through learning based on data.
[0037] The explanation of the foregoing terms is intended to aid in understanding the present disclosure. Accordingly, it should be noted that unless a foregoing term is explicitly stated as a matter limiting the content of the present disclosure, it is not to be used in the sense of limiting the technical concept of the content of the present disclosure.
[0038] FIG. 1 is a block diagram of a computing device according to one embodiment of the present disclosure.
[0039] A computing device (100) according to one embodiment of the present disclosure may be a hardware device or a part of a hardware device that performs comprehensive processing and computation of data, or it may be a software-based computing environment connected to a communication network. For example, the computing device (100) may be a server that performs intensive data processing functions and shares resources through communication with clients. Additionally, the computing device (100) may be a cloud system that enables multiple servers and clients to process data comprehensively. Since the above description is merely one example regarding the type of computing device (100), the type of computing device (100) may be configured in various ways within a range understandable to those skilled in the art based on the contents of the present disclosure.
[0040] Referring to FIG. 1, a computing device (100) according to one embodiment of the present disclosure may include a processor (110), a memory (120), and a network unit (130). However, since FIG. 1 is merely an example, the computing device (100) may include other configurations for implementing a computing environment. Additionally, only some of the disclosed configurations may be included in the computing device (100).
[0041] A processor (110) according to one embodiment of the present disclosure may be understood as a constituent unit comprising hardware and / or software for performing computing operations. For example, the processor (110) may process instructions generated as a result of user interaction through a user interface. Additionally, the processor (110) may read a computer program and perform data processing for machine learning. The processor (110) may process computational processes such as processing input data for machine learning, feature extraction for machine learning, and error calculation based on backpropagation. A processor (110) for performing such data processing and operations may include a central processing unit (CPU), a general purpose graphics processing unit (GPGPU), a tensor processing unit (TPU), an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA). Since the above-described type of processor (110) is merely an example, the type of processor (110) can be configured in various ways within a range understandable to those skilled in the art based on the contents of the present disclosure.
[0042] The processor (110) can perform preprocessing to convert demand data, which includes variables related to temporal order, into a form suitable for input to a multi-task learning-based neural network model. Demand data is data representing demand in various application fields such as agricultural products, manufactured goods, and logistics, and may include various temporal variables such as date, time, seasonality, time of day, trend, or weather. Therefore, demand data has temporal continuity and may exhibit complex patterns due to the superposition of the influences of various factors affecting demand. Additionally, demand data is highly likely to contain a mixture of categorical and numerical data. The processor (110) can vectorize the categorical or numerical data included in such demand data to convert it into a form suitable for input to a multi-task learning-based neural network model capable of mixed processing of various data. For example, the processor (110) can perform normalization on the numerical data included in the demand data to convert it to a uniform scale and apply a weight vector to convert it into an embedding vector. Additionally, the processor (110) can convert categorical data included in the demand data into an embedding vector after encoding. Here, the embedding vector may correspond to features present in the demand data. If numerical data and categorical data are mixed in the demand data, the processor (110) can independently perform the embedding operation described above and combine the results to generate a token that can be input into a model.
[0043] The processor (110) can train a neural network model based on multi-task learning to generate time-series data for various tasks required for demand forecasting based on preprocessed demand data. For example, assume that time-series forecasting of agricultural product prices is performed for demand forecasting in the field of agricultural management. Although cabbage and tomatoes are independent targets for demand forecasting, they have in common that they are influenced by factors such as climate or economic conditions. Therefore, if common change trends and patterns observed among demand data for each type of agricultural product can be clearly captured, future prices for all agricultural products can be predicted with higher accuracy. According to this approach, the processor (110) can define types of crops such as cabbage, strawberries, tomatoes, and rice as tasks that the neural network model must process. Furthermore, the processor (110) can train the neural network model to capture common patterns and interactions regarding demand characteristics for each type of crop and to generate time-series data for demand forecasting for each type of crop based on this. Specifically, the neural network model can generate tokens that reflect the relationships between the features of the demand data by extracting and reinforcing shared features between the aforementioned tasks from the demand data generated in the form of tokens through preprocessing. Then, the neural network model can generate time series data for each task based on these tokens. Here, the time series data may be data in which the demand quantity is organized in chronological order so that changes in demand from the past to a specific future point in time can be verified. The time series data generated by the neural network model can be compared with a label corresponding to an actual observation value through a loss function such as mean squared error or cross-entropy. The processor (110) can update the parameters constituting the neural network of the neural network model through backpropagation using the loss value generated through this comparison.This computational process can be performed repeatedly over several epochs.
[0044] The processor (110) can perform demand forecasting based on a neural network model that has been trained as described above. A neural network model based on multi-task learning can be flexibly applied to various industries and demand forecasting scenarios depending on which application field the training was performed on. For example, the processor (110) can train a neural network model based on multi-task learning to solve time series forecasting problems such as [Table 1] below and utilize it to solve actual problems.
[0045] Prediction problem applied area Product shipment volume forecast - Production planning and logistics management in manufacturing - Sales trend analysis and seasonal shipment optimization - Coordination of logistics flow within the supply chain Inventory forecast - Prevention of excess and shortages - Setting and managing safety stock levels - Optimization of warehouse and logistics space Energy Demand Forecast - Forecasting electricity, gas, and oil consumption - Forecasting fluctuations in renewable energy (solar, wind, etc.) production - Optimizing energy supply and distribution Raw material requirements forecast - Establishing raw material purchasing plans for the manufacturing industry - Optimizing production processes and reducing costs - Establishing raw material securing strategies for supply chain stability Raw material price forecast - Managing raw material market price volatility - Optimizing long-term contract and purchase timing - Forecasting global resource extraction and trade costs
[0046] Meanwhile, since [Table 1] is merely an example, the demand forecasting problem of the present disclosure can be expanded in various ways based on the content disclosed in [Table 1]. A memory (120) according to one embodiment of the present disclosure can be understood as a configuration unit including hardware and / or software for storing and managing data processed by a computing device (100). That is, the memory (120) can store data of any form generated or determined by the processor (110) and data of any form received by the network unit (130). For example, the memory (120) may include at least one type of storage medium among flash memory type, hard disk type, multimedia card micro type, card type memory, RAM (random access memory), SRAM (static random access memory), ROM (read-only memory), EEPROM (electrically erasable programmable read-only memory), PROM (programmable read-only memory), magnetic memory, magnetic disk, or optical disk. Additionally, the memory (120) may include a database system that controls and manages data in a predetermined system. Since the above-described types of memory (120) are merely examples, the types of memory (120) may be configured in various ways within a range understandable to those skilled in the art based on the contents of the present disclosure.
[0047] Memory (120) can structure and organize data, combinations of data, and program code executable by the processor (110) that are necessary for the processor (110) to perform calculations. For example, memory (120) can store program code that causes the processor (110) to process data, program code that causes the processor (110) to create a machine learning model and perform demand forecasting calculations using the created machine learning model, and various data generated as the program code is executed.
[0048] A network unit (130) according to one embodiment of the present disclosure may be understood as a configuration unit that transmits and receives data through any known form of wired or wireless communication system. For example, the network unit (130) may perform data transmission and reception using wired or wireless communication systems such as a local area network (LAN), wideband code division multiple access (WCDMA), long term evolution (LTE), wireless broadband internet (WiBro), 5th generation mobile communication (5G), ultra-wide-band wireless communication, ZigBee, radio frequency (RF) communication, wireless LAN, wireless fidelity (Wi-Fi), near field communication (NFC), or Bluetooth. Since the communication systems described above are merely examples, wired or wireless communication systems for data transmission and reception of the network unit (130) may be applied in various ways other than those described above.
[0049] The network unit (130) can receive data necessary for the processor (110) to perform calculations through wired or wireless communication with any system or any client. Additionally, the network unit (130) can transmit data generated through the processor (110)'s calculations through wired or wireless communication with any system or any client. The network unit (130) can transmit and receive data generated through interaction with an entity through communication with any entity. For example, the network unit (130) can obtain demand data including variables indicating temporal order through communication with a database. Furthermore, the network unit (130) can transmit data processed by the processor (110) to a database or a client for verifying demand forecast results.
[0050] FIG. 2 is a block diagram illustrating a time series forecasting process using a multi-task learning-based model according to one embodiment of the present disclosure. The demand forecasting framework disclosed in FIG. 2, consisting of a preprocessing module (200), a first neural network (300), and a plurality of second neural networks (400), can be performed by a processor (110) of a computing device (100) according to one embodiment of the present disclosure.
[0051] A preprocessing module (200) according to one embodiment of the present disclosure may generate a first token (13) by converting features of demand data (11) including variables related to temporal order into an embedding vector. At this time, the variables related to temporal order included in the demand data (11) may include at least one of date, time, seasonality, time of day, trend, or weather. Date or time may include year, month, day, day of the week, quarter, whether it is a public holiday, whether it is a weekend, etc. Seasonality may include seasons such as spring, summer, autumn, and winter, as well as seasons when specific events such as Black Friday occur. Time of day may include hour, minute, AM, PM, night, etc. Trend may represent a pattern of rising or falling over time. Weather may include temperature, precipitation, humidity, wind speed, etc. The demand data (11) may be configured in at least one form of categorical or numerical by including these variables related to temporal order.
[0052] If the demand data (11) includes numeric data, the preprocessing module (200) can perform normalization on the numeric data and apply a weight vector to the normalized numeric data to generate an embedding vector. At this time, the application of the weight vector can be understood as performing a mathematical operation such as multiplying the features included in the numeric data by the weight vector. If the demand data (11) includes categorical data, the preprocessing module (200) can generate an embedding vector by converting the categorical data into a one-hot encoded vector. Then, the preprocessing module (200) can generate a first token (13) by merging the embedding vectors generated through this process into a single embedding matrix. Specifically, the preprocessing module (200) can generate a first sub-token that represents the overall features of the embedding vectors. The first sub-token can be understood as a vector representation that summarizes the features by aggregating information about the features of the demand data. The preprocessing module (200) can generate a second sub-token by concatenating embedding vectors. The preprocessing module (200) can generate a first token (13) by combining the first sub-token and the second sub-token.
[0053] A first neural network (300) according to one embodiment of the present disclosure may receive a first token (13) as input and generate a second token (15) that reflects the relationship between the features of the demand data. The first neural network (300) may identify global relationships between embedding vectors included in the first token (13) and generate the second token (15) by reinforcing the high-dimensional and complex features of the demand data (11) based on the identified relationships. For example, the first neural network (300) may include a first sub-neural network that performs a self-attention operation and a second sub-neural network that non-linearly transforms the representation of the features included in the first token (13). The first sub-neural network may identify patterns and characteristics that appear commonly among multiple tasks required for demand forecasting through the self-attention operation, thereby emphasizing the relationship between the features included in the first token (13). The second sub-neural network can perform processing operations to impart non-linearity to the first token (13) and expand and condense information through parallel processing on features included in the first token (13) in which relationships are emphasized. The first sub-token included in the first token (13) can be transformed into the second token (15) by passing through the first sub-neural network and the second sub-neural network included in the first neural network (300). Both the first sub-token and the second sub-token are processed through the first sub-neural network and the second sub-neural network, and since the first sub-token is a vector representation that aggregates all features included in the second sub-token, the second sub-token can contribute to strengthening and deepening the information included in the first sub-token. That is, the first sub-token is processed through the first sub-neural network and the second sub-neural network as a core summary reflecting the relationships of features included in the demand data (10), and the first sub-token processed in this way can finally be output as the second token (15).That is, the first neural network (300) can generate a second token (15) by modifying a first sub-token that summarizes features in the first token (13). At this time, modification does not simply mean changing the shape, but may mean updating information richly and deepening the representation. In other words, the first neural network (300) can generate a second token (15) by receiving the first token (13) as input and updating the first sub-token constituting the first token (13) into a vector containing deeper and richer information. In this process, the second sub-token can play a role in contributing to the update of the first sub-token. When the second token (15) is generated by modifying the first sub-token in this way, the second neural network (400), which will be described later, can perform time series prediction using only the summarized information without needing to examine all features included in the first token (11), thus enabling fast and efficient prediction work.
[0054] According to one embodiment of the present disclosure, a plurality of second neural networks (400) may be configured to match the number of tasks required for demand forecasting. For example, if energy demand forecasting is performed, the plurality of second neural networks (400) may be configured as a neural network for power demand forecasting, a neural network for gas demand forecasting, a neural network for oil demand forecasting, etc. The plurality of second neural networks (400) may be configured as independent neural networks for individual demand forecasting tasks such as power, gas, and oil, and may generate time-series data that reflects the specificity of the individual tasks. Among the plurality of second neural networks (400), the neural network for power demand forecasting may selectively utilize information required for power demand forecasting from the output of the first neural network (300) to generate time-series data optimized for power demand forecasting. The plurality of second neural networks (400), each corresponding to a plurality of tasks, may operate in parallel and may operate independently according to the user's requirements. If the user requires only the time series data necessary for power demand forecasting, only the neural network for power demand forecasting among the multiple second neural networks (400) can operate to generate the time series data necessary for power demand forecasting. If the user requires all data related to power, gas, and oil, all of the multiple second neural networks (400) can operate to generate multiple time series data necessary for demand forecasting for power, gas, and oil, respectively. The configuration of the multiple second neural networks (400) by task plays a key role in maximizing the flexibility and accuracy of multi-task learning. This provides a forecast more suitable for individual tasks compared to single-task learning, while simultaneously increasing the learning efficiency of the model for demand forecasting.
[0055] Multiple second neural networks (400) can receive a second token (15) as input and generate time series data for demand forecasting. Each of the multiple second neural networks (400) can generate time series data for each task required for demand forecasting by performing operations and normalization using an activation function on the second token (15). The second token (15) is a core summary in which the relationships between features of the demand data (10) are emphasized and information is concentrated through the first neural network (300). This second token (15) can contribute to each of the multiple second neural networks (400) understanding common patterns and interactions between tasks and improving the prediction accuracy of individual tasks based on this. For example, when performing logistics demand forecasting, the multiple second neural networks (400) are configured to forecast demand by region, and can generate time series data for regional demand forecasting by reflecting regional characteristics based on common logistics patterns identified through the second token (15).
[0056] In the learning process of a first neural network (300) and a plurality of second neural networks (400) according to one embodiment of the present disclosure, if the data of some tasks is relatively large or the magnitude of the loss value is large, the learning of the neural network for demand forecasting of other tasks may be hindered. To prevent this and maintain a balance between tasks, a method may be performed in which the weights constituting the loss function for learning the first neural network (300) and the plurality of second neural networks (400) are dynamically adjusted. For example, the total loss function for learning the first neural network (300) and the plurality of second neural networks (400) may be composed of a weighted sum of a plurality of task-specific loss functions. When loss values are calculated individually through a plurality of task-specific loss functions during the learning process, the task-specific weights configured for the weighted sum in the total loss function may be automatically adjusted based on the loss value of each task. This adjustment can be understood as a process that encourages even learning across all tasks by reducing the weights of tasks with high losses and increasing the weights of tasks with low losses. In other words, the task-specific weights configured for the weighted sum within the overall loss function can be dynamically adjusted to relatively suppress tasks with high losses and relatively strengthen tasks with low losses.
[0057] As shown in FIG. 2, the demand forecasting framework of the present disclosure, composed of a preprocessing module (200), a first neural network (300), and a plurality of second neural networks (400), is a model optimized for multi-task learning on demand data containing variables related to temporal order. First, the demand forecasting framework of the present disclosure can stably process demand data in which continuous and discrete types are mixed. Second, the demand forecasting framework of the present disclosure has excellent advantages in learning relationships between tasks through the first neural network (300), and enables efficient learning of multiple tasks by emphasizing important features for each task and minimizing features of low importance through an attention mechanism. Third, the demand forecasting framework of the present disclosure enables fast learning even when processing large-scale data and multiple tasks through parallel processing via a plurality of second neural networks (400), which can maximize efficiency in computing environments where time and resources are important.
[0058] FIG. 3 is a flowchart illustrating a demand forecasting method using multi-task learning according to one embodiment of the present disclosure.
[0059] Referring to FIG. 3, a computing device (100) according to one embodiment of the present disclosure can acquire demand data including variables related to temporal order (S100). For example, the computing device (100) can collect demand data including variables related to temporal order through communication with a database for each demand forecasting field. The computing device (100) can construct a data set for each demand forecasting field by sorting the demand data according to temporal order. At this time, the demand data included in the data set for each demand forecasting field can be subdivided and distinguished according to variables related to temporal order.
[0060] A computing device (100) can generate a first token by converting the features of the demand data into an embedding vector (S200). For example, if the demand data includes numeric data, the embedding vector can be generated by performing normalization on the numeric data and applying a weight vector to the normalized numeric data. If the demand data includes categorical data, the embedding vector can be generated by converting the categorical data into a one-hot encoding vector. The computing device (100) can generate a first token based on the embedding vectors generated in this way. At this time, the first token may include a first sub-token that aggregates information about the features of the demand data and a second sub-token generated by connecting individual vectors about the features of the demand data.
[0061] A computing device (100) can generate a second token that reflects the relationship between the features of the demand data by inputting a first token into a first neural network that learns a common pattern among multiple tasks required for demand forecasting (S300). The second token can be generated by modifying the first sub-token through the first neural network. The computing device (100) can generate time series data for demand forecasting by inputting the second token into at least one of a plurality of second neural networks corresponding to multiple tasks (S400). A detailed description of S300 and S400 is replaced by the description of FIG. 2 described above.
[0062] The various embodiments of the present disclosure described above may be combined with additional embodiments and modified to the extent understandable to those skilled in the art in light of the detailed description above. The embodiments of the present disclosure are illustrative in all respects and should be understood as not restrictive. For example, each component described as a single unit may be implemented in a distributed manner, and components described as distributed may likewise be implemented in a combined form. Accordingly, all modifications or variations derived from the meaning, scope, and equivalents of the claims of the present disclosure should be interpreted as being included within the scope of the present disclosure.
Claims
Claim 1 A method for demand forecasting using multi-task learning, performed by a computing device comprising at least one processor, comprising: a step of acquiring demand data including variables related to temporal order; a step of generating a first token by converting features of the demand data into embedding vectors; a step of generating a second token reflecting the relationship between features of the demand data by inputting the first token into a first neural network that learns common patterns among a plurality of tasks required for demand forecasting; and a step of generating time series data for demand forecasting by inputting the second token into at least one of a plurality of second neural networks corresponding to the plurality of tasks. Claim 2 A method according to claim 1, wherein the variable related to the temporal order comprises at least one of date, time, seasonality, time of day, trend, or weather. Claim 3 A method according to claim 1, wherein, when the demand data includes numeric data, the embedding vector is generated by performing normalization on the numeric data and applying a weight vector to the normalized numeric data. Claim 4 A method according to claim 1, wherein, if the demand data includes categorical data, the embedding vector is generated by converting the categorical data into a one-hot encoded vector. Claim 5 A method according to claim 1, wherein the first token comprises: a first sub-token that aggregates information about the features of the demand data; and a second sub-token generated by connecting individual vectors about the features of the demand data. Claim 6 In claim 5, the method wherein the second token is generated by modifying the first sub-token through the first neural network. Claim 7 A method according to claim 1, wherein the first neural network comprises: a first sub-neural network that performs a self-attention operation to emphasize the relationship between features included in the first token; and a second sub-neural network that non-linearly transforms the representation of features included in the first token. Claim 8 A method according to claim 1, wherein the total loss function for learning the first neural network and the plurality of second neural networks is composed of a weighted sum of the plurality of task-specific loss functions, and the task-specific weights configured for the weighted sum in the total loss function are dynamically adjusted to relatively suppress tasks with large losses and relatively strengthen tasks with small losses. Claim 9 A computer program stored on a computer-readable storage medium, wherein, when executed on one or more processors, the computer program performs operations for predicting demand using multi-task learning, the operations comprising: an operation of acquiring demand data including variables related to temporal order; an operation of converting features of the demand data into embedding vectors to generate a first token; an operation of inputting the first token into a first neural network that learns common patterns among multiple tasks required for demand prediction to generate a second token reflecting the relationships between the features of the demand data; and an operation of inputting the second token into at least one of a plurality of second neural networks corresponding to the plurality of tasks to generate time series data for demand prediction. Claim 10 A computing device for predicting demand using multi-task learning, comprising: a processor including at least one core; a memory including program codes executable on the processor; and a network unit for acquiring demand data including variables related to temporal order; wherein the processor converts features of the demand data into embedding vectors to generate a first token, inputs the first token into a first neural network that learns common patterns between a plurality of tasks required for demand prediction to generate a second token reflecting the relationships between the features of the demand data, and inputs the second token into at least one of a plurality of second neural networks corresponding to the plurality of tasks to generate time series data for demand prediction.
