Intelligent data analysis system and method
Patent Information
- Application Number
- PCT/KR2025/019397
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-11-20
- Filing Date
- 2025-11-21
- Publication Date
- 2026-05-28
AI Technical Summary
Existing data analysis systems struggle with interpreting ambiguous user requests, generating code that doesn't consider data attributes, leading to errors and requiring users to perform complex post-processing tasks, and are unreliable with low-quality data.
An intelligent data analysis system that interprets user intent from natural language queries, generates specialized data analysis code considering data attributes, executes it securely, and provides results in text and graphs, with error correction and data validation.
Enables users with limited data analysis skills to obtain accurate insights quickly, reducing execution errors and improving reliability through intelligent code generation and validation.
Smart Images

Figure KR2025019397_28052026_PF_FP_ABST
Abstract
Description
Intelligent Data Analysis System and Method
[0001] The present invention relates to data analysis processing technology, and more specifically, to an automated intelligent data analysis system and method in which, when a user without specialized knowledge of data analysis requests data analysis through a natural language query, the system identifies the user's intent from the query, establishes an analysis plan, and automatically generates executable program code considering the attributes of the data to derive data insights and refined analysis results.
[0002] In the current corporate environment, the importance of data-driven decision-making is growing day by day. Many field personnel have a strong need to derive data-driven insights and build predictive models.
[0003] However, data analysis and machine learning are specialized fields that require a combination of statistical knowledge, programming skills, and domain knowledge. As a result, while practitioners keenly recognize the need for data analysis, they face significant difficulties in directly performing the actual analysis tasks.
[0004] To address this problem, there have been various attempts to have the system perform analysis when a user requests it in natural language.
[0005] However, existing general code generation models had limitations, such as failing to specify ambiguous user requests or generating code that did not consider the actual attributes of the data under analysis (e.g., data types, presence of missing values), leading to frequent errors during execution. Furthermore, existing models have clear limitations: they are designed to generate various languages and algorithms and are not specialized for data analysis (lack of expertise); they have high error rates during code execution (failure to consider data information); and they place a heavy burden on the user, requiring them to perform all subsequent tasks such as code execution, error correction, and result refinement.
[0006] In addition, if the quality of the data uploaded by the user is low, the reliability of the analysis results may be compromised or errors may occur, even if the analysis code is generated successfully.
[0007] Therefore, there is an urgent need for an intelligent data analysis system capable of clearly interpreting the intent of even ambiguous natural language requests from users, generating error-free executable code by considering the characteristics of the data to be analyzed, and further enhancing the reliability of the analysis by pre-checking the quality of the input data. (Korean Patent Publication No. 10-2025-0089907 (Publication Date: June 19, 2025))
[0008] The present invention aims to provide an automated intelligent data analysis system and a method thereof, which enable even users with limited data analysis capabilities to easily obtain desired analysis results through natural language queries.
[0009] The present invention aims to provide an automated intelligent data analysis system capable of receiving a user's natural language request and a data file, clearly analyzing the intent of the request and generating pseudocode which is a plan of key execution steps, generating code specialized for data analysis based on the pseudocode, executing the generated code in a secure environment, and returning the results in the form of text and graphs.
[0010] A system executed by a computer according to one embodiment of the present invention comprises: at least one memory for storing instructions; and at least one processor for executing said instructions to perform an operation. The operation performed by the at least one processor by executing said instructions may include: an operation of obtaining data to be analyzed and a user query in the form of natural language; an operation of interpreting said user query to derive an analysis objective and establishing an analysis plan that defines a logical procedure to be performed to achieve said analysis objective; an operation of generating program code that is machine-executable in a computing environment based on said established analysis plan and structural attribute information of said data to be analyzed; and an operation of running said program code in an execution environment to produce and output an analysis result corresponding to said user query.
[0011] Here, the operation to be acquired can extract structural attribute information including at least one of the data type, statistical value, and missing value (Null) information of the data to be analyzed.
[0012] Additionally, the operation of establishing the analysis plan may include: an operation of classifying the user query into one of a plurality of predefined query types; and an operation of deriving the analysis objective based on the classified query type.
[0013] In addition, if the above-mentioned query type does not satisfy a predefined clarity criterion, the operation of establishing the above-mentioned analysis plan may include the operation of generating one or more recommendation analysis objectives or recommendation detailed procedures based on the above-mentioned structural attribute information and a pre-stored analysis methodology knowledge base.
[0014] In addition, the above analysis plan may be in the form of pseudocode that describes the above logical procedure step by step.
[0015] Additionally, the operation of establishing the analysis plan may include a database storing a plurality of previously stored analysis plan templates; and retrieving an analysis plan template corresponding to the derived analysis objective from the database to generate the pseudocode.
[0016] In addition, the operation of generating the above program code may include data validation logic or exception handling logic that validates specific attributes of the data to be analyzed by referring to the structural attribute information in the program code.
[0017] In addition, the operation of generating the above program code may generate the program code by including a statement that calls a function of a predefined data analysis library.
[0018] In addition, the operation of running the program code in the execution environment may obtain error information indicating the cause of the error when an error occurs during the execution of the program code, and the operation of generating the program code may regenerate the program code by modifying it based on the obtained error information.
[0019] In addition, the analysis result may include at least one of text containing an interpretation of the execution result of the program code or a graph visualizing the execution result.
[0020] According to an embodiment of the present invention, even if a user's natural language query is ambiguous, the system can interpret the analysis intent and classify it into four types, thereby providing an intelligent data analysis system that can induce the user to start data analysis even if the user lacks analysis capabilities by presenting possible analysis objectives or suggesting detailed steps.
[0021] In addition, by first establishing an analysis plan (pseudocode) and generating program code that reflects the actual structural attribute information of the data, execution errors caused by logical errors or data inconsistencies can be reduced.
[0022] In addition, even if an error occurs during program code execution, system stability can be improved through a Self-Correction loop that feeds the error back to the code generation unit to modify and re-execute the code.
[0023] In addition, the final analysis results are provided in the form of refined text and graphs that users can immediately understand, rather than as raw numerical output, enabling users to instantly gain insights and utilize them in their work without any separate processing.
[0024] In addition, it can provide high scalability by storing analysis logic frequently used in specific domains (e.g., specific tasks) in the form of pseudocode in a database and generating code to perform customized analysis by utilizing it as input when necessary.
[0025] FIG. 1 is a schematic diagram of an electronic device according to one embodiment of the present invention.
[0026] FIG. 2 is a schematic diagram of an intelligent data analysis system of one embodiment of the present invention.
[0027] FIG. 3 is a flowchart of an intelligent data analysis method of one embodiment of the present invention.
[0028] Figure 4 is a detailed flowchart of the analysis plan formulation stage of Figure 3.
[0029] Figure 5 is a detailed flowchart of the query interpretation and response steps of Figure 4.
[0030] To clarify the technical concept of the present disclosure, embodiments of the present invention will be described in detail with reference to the attached drawings. In describing the present disclosure, detailed descriptions of related known functions or components will be omitted if it is determined that such detailed descriptions would unnecessarily obscure the essence of the present disclosure. Components having substantially the same functional configuration in the drawings have been assigned the same reference numerals and symbols as much as possible, even if they are shown in different drawings. For convenience of explanation, devices and methods are described together where necessary. Each operation of the present disclosure does not necessarily need to be performed in the order described and may be performed in parallel, selectively, or individually.
[0031] The terms used in the embodiments of this disclosure have been selected to be as widely used as possible, taking into account the functions of this disclosure; however, these terms may vary depending on the intent of those skilled in the art, case law, the emergence of new technologies, etc. Additionally, in specific cases, terms have been selected at the applicant's discretion, and in such cases, their meanings will be described in detail in the description of the relevant embodiments. Therefore, terms used in this specification should be defined not merely by their names, but based on their meanings and the overall content of this disclosure.
[0032] Throughout this disclosure, singular expressions may include plural expressions unless the context clearly indicates otherwise. Terms such as “comprising” or “having” are intended to specify the presence of features, numbers, steps, actions, components, parts, or combinations thereof, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof. That is, throughout this disclosure, when a part is described as “comprising” a certain component, it means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0033] Expressions such as "at least one" modify the entire list of components and do not modify the components of the list individually. For example, "at least one of A, B, and C" and "at least one of A, B, or C" refer to only A, only B, only C, both A and B, both B and C, both A and C, all of A, B, and C, or any combination thereof.
[0034] Additionally, terms such as “...part,” “...module,” etc., as described in this disclosure refer to a unit that processes at least one function or operation, and may be implemented in hardware or software, or a combination of hardware and software.
[0035] Throughout the entire disclosure, when a part is described as being “connected” to another part, this includes not only cases where they are “directly connected” but also cases where they are “electrically connected” with other elements interposed between them. Furthermore, when a part is described as “comprising” a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0036] As used throughout this disclosure, the expression “configured to” may be replaced, depending on the context, with, for example, “suitable for,” “having the capacity to,” “designed to,” “adapted to,” “made to,” or “capable of.” The term “configured to” may not necessarily mean only “specifically designed to” in hardware. Instead, in some situations, the expression “system configured to” may mean that the system is “capable of” together with other devices or components. For example, the phrase “a processor configured (or set) to perform A, B, and C” may mean a dedicated processor for performing said operations (e.g., an embedded processor), or a generic-purpose processor (e.g., a CPU or an application processor) capable of performing said operations by executing one or more software programs stored in memory.
[0037] Artificial intelligence (AI) is a field of computer science and information technology that studies methods to enable computers to perform thinking, learning, and self-development—tasks achievable by human intelligence—and refers to the ability of computers to mimic intelligent human behavior. Furthermore, AI does not exist in isolation but is closely related, directly or indirectly, to many other fields of computer science. Particularly in the modern era, there are very active attempts to introduce AI elements into various sectors of information technology and utilize them to solve problems within those fields.
[0038] Machine learning is a field of artificial intelligence that enables computers to learn without explicit programming. Specifically, machine learning can be defined as a technology that studies and builds systems and algorithms capable of learning, making predictions, and improving their own performance based on empirical data. Rather than executing strictly defined static program commands, machine learning algorithms adopt an approach of constructing specific models to derive predictions or decisions based on input data.
[0039] Many machine learning algorithms have been developed to address how to classify data in machine learning. Representative examples include Decision Trees, Bayesian Networks, Support Vector Machines (SVMs), and Artificial Neural Networks (ANNs). A Decision Tree is an analytical method that performs classification and prediction by plotting decision rules in a tree structure. A Bayesian Network is a model that represents the probabilistic relationships (conditional independence) between multiple variables in a graph structure. Bayesian Networks are suitable for data mining through unsupervised learning. Support Vector Machines are supervised learning models for pattern recognition and data analysis, primarily used for classification and regression analysis. Artificial Neural Networks model the operating principles of biological neurons and the relationships between them; they are information processing systems in which multiple neurons, referred to as nodes or processing elements, are connected in a layered structure.
[0040] Artificial neural networks are models used in machine learning, serving as statistical learning algorithms in machine learning and cognitive science that draw inspiration from biological neural networks (particularly the brain within the animal central nervous system). Specifically, an artificial neural network can refer to a model in which artificial neurons (nodes), forming a network through the connection of synapses, change the strength of these connections through learning to possess problem-solving capabilities.
[0041] An artificial neural network may include multiple layers, and each layer may include multiple neurons. Additionally, an artificial neural network may include synapses connecting neurons. An artificial neural network can generally be defined by the following three factors: ㉠ connection patterns between neurons of different layers, ㉡ a learning process that updates the weights of the connections, and ㉢ an activation function that generates an output value from a weighted sum of inputs received from the previous layer.
[0042] Artificial neural networks may include, but are not limited to, network models such as Deep Neural Networks (DNN), Recurrent Neural Networks (RNN), Bidirectional Recurrent Deep Neural Networks (BRDNN), Multilayer Perceptrons (MLP), and Convolutional Neural Networks (CNN).
[0043] Artificial neural networks are classified into single-layer neural networks and multi-layer neural networks depending on the number of layers. A typical single-layer neural network consists of an input layer and an output layer. Additionally, a typical multi-layer neural network consists of an input layer, one or more hidden layers, and an output layer.
[0044] The input layer is a layer that receives external data, and the number of neurons in the input layer is equal to the number of input variables. The hidden layer is located between the input layer and the output layer, receives signals from the input layer, extracts features, and transmits them to the output layer. The output layer receives signals from the hidden layer and outputs an output value based on the received signals. Input signals between neurons are multiplied by their respective connection strengths (weights) and then summed; if this sum is greater than the neuron's threshold, the neuron is activated and outputs the value obtained through the activation function.
[0045] Meanwhile, a deep neural network that includes multiple hidden layers between the input layer and the output layer can be a representative artificial neural network that implements deep learning, a type of machine learning technology.
[0046] The machine learning workflow consists of a series of processes involving collecting data for learning and validation, modeling, and training the model, and may include the processes of collecting training data, checking and exploring data, data preprocessing and cleaning, modeling, and training.
[0047] 1. Collect Training Data
[0048] Training data applied to the training of the learning model of this specification may be generated using data collected from a plurality of samples. In this specification, at least one different type of training data set may be used to train the learning model, and each training data may further include one or more experimental results used as feature labels. At least a portion of the training data set may be used to train the learning model, and another portion may be used to validate the learned learning model.
[0049] 2. Data Inspection and Exploration
[0050] Once training data for training a learning model is collected, the collected training data can be examined and explored regarding its structure, noise data, and data cleaning methods for machine learning applications.
[0051] This stage of data inspection and exploration is referred to as the Exploratory Data Analysis (EDA) phase, which can be described as the process of observing and understanding collected data from various angles. Before training the data, independent variables, dependent variables, variable types, and data types are examined using visualizations such as graphs and statistical tests, allowing the characteristics of the data and inherent structural relationships to be identified in advance. Through this EDA, examining the distribution and values of the data enables a better understanding of the phenomena represented by the data and the discovery of potential issues. Furthermore, by examining the data from various angles, diverse patterns that might have been overlooked during the problem definition stage can be discovered, allowing for the modification of existing hypotheses or the formulation of new ones. Exploratory data analysis can broadly encompass the process of searching for data outliers and analyzing the relationships between data attributes.
[0052] The process of detecting outliers involves verifying whether the data contains them and can include sampling, statistical, and visualization methods. Sampling methods involve drawing random samples from the data to identify overall trends and anomalies in the data values. Statistical methods may utilize summary statistics, such as the mean, median, and mode to identify the center of the data, or range and variance to check the dispersion. Visualization methods utilize probability density functions, histograms, dot plots, word clouds, time series charts, and maps to determine which statistical indicators are appropriate for the individual attributes of the collected data. However, when using statistical indicators, caution should be exercised regarding the use of statistical indicators: while the mean reflects all data values within a set and is therefore affected by outliers, the median uses only the single value in the middle, allowing for representative results even in the presence of outliers.
[0053] The process of analyzing relationships between data attributes involves identifying combinations of attributes within the data that possess meaningful correlations. Relationship analysis can be conducted differently depending on the combination of attributes between qualitative attributes (Categorical Variables; Qualitative), which cannot be expressed numerically but can be arbitrarily quantified, and quantitative attributes (Numeric Variables; Quantitative), which can be quantified. Categorical-categorical relationships can display the number of values corresponding to each pair of attribute values using cross-tabulation tables or mosaic plots; Numeric-categorical relationships can be visually represented through box plots or by observing statistical values by category (mean, median, etc.); and Numeric-numeric relationships can analyze the association between two attributes using correlation coefficients. It can be confirmed that a correlation coefficient of -1 indicates a negative correlation where the two attributes change in opposite directions, 0 indicates no correlation, and 1 indicates a positive correlation where the two attributes always change in the same direction. The relationship between two attributes with a correlation coefficient can also exhibit various aspects, which can be visually represented using a scatter plot.
[0054] 3. Data Preprocessing and Cleansing
[0055] Data that has completed inspection and exploration undergoes data preprocessing to transform it into a format suitable for machine learning training models. Data preprocessing involves cleaning the data and converting it into a form that the model can understand; it generally includes handling missing data, outlier removal, data scaling, categorical data encoding, feature selection and extraction, and data transformation. The detailed processes of data preprocessing may be performed in whole or in part selectively, and a separate machine learning model may be used for this purpose.
[0056] Handling Missing Data is the process of handling missing values when they exist in the data; these values can be displayed as NaN (Not a Number) or empty, or deleted. Filling in or deleting missing values improves data completeness, and values such as the mean, median, or mode may be used when filling in missing values.
[0057] Outlier removal is the process of eliminating outliers, which are values that deviate from typical data patterns. Since outliers can degrade model performance, they must be removed or replaced; this involves identifying outliers and deleting the corresponding rows or columns or replacing them with other values.
[0058] Data scaling is the process of adjusting the size of data; through data scaling, the range of the data is adjusted, which can improve model performance or accelerate convergence. Data scaling allows data characteristics to be aligned within a similar range, and generally, standardization and normalization can be applied. Standardization is a method of transforming data into a distribution with a mean of 0 and a standard deviation of 1; it is primarily performed using the mean and standard deviation, and the standardized value z is It can be denoted as (where x is the original value, μ is the mean, and σ is the standard deviation). Normalization is a method of transforming the range of data to [0,1] or [-1,1], primarily using minimum and maximum values to transform the data, and the normalized value x norm silver It can be expressed as (x is the original value, x min is the minimum value, x max is the maximum value).
[0059] Categorical Data Encoding is the process of converting categorical variables, which are represented as string or integer values and cannot be directly input into a model, into a numeric type that can be input. Generally, one-hot encoding or label encoding can be used to convert categorical variables into numeric types.
[0060] Feature selection and extraction is intended to improve the performance of a model by selecting the most useful features for model training or extracting new features. Through this process, the complexity of the model can be reduced and overfitting can be prevented.
[0061] Data transformation involves converting data to extract new information or enable a model to understand it better, and may include the tokenization of text data or the preprocessing of image data. Through data transformation, model performance can be improved by extracting useful features from original data or converting data into an appropriate format.
[0062] Through data preprocessing as described above, it is possible to achieve the effects of improving the performance and ensuring the stability of machine learning models.
[0063] Meanwhile, when training a learning model according to one embodiment of the present invention, a process of preprocessing information written in natural language and a process of training a large-scale language model based on the preprocessed data may be performed.
[0064] 3-1. Text Preprocessing for Large-Scale Language Models
[0065] If the collected data has not been preprocessed according to the requirements, tokenization, cleaning, and normalization can be performed to suit the intended use of the data.
[0066] Tokenization refers to the process of dividing given data into units called tokens, and these token units can generally be defined as meaningful units. Tokenization can broadly include word tokenization and sentence tokenization.
[0067] Tokenization refers to the process of dividing given data into units called tokens, and these token units can generally be defined as meaningful units. Tokenization can broadly include word tokenization and sentence tokenization.
[0068] Word tokenization refers to the case where the standard for tokens is a word; here, a word can include not only individual words but also phrases or meaningful strings. Word tokenization means separating words based on spaces or punctuation marks, such as periods, commas, question marks, semicolons, and exclamation marks. However, since removing all punctuation or special characters during the tokenization process can cause tokens to lose their meaning, precise algorithms may be required. For instance, if a word itself contains punctuation or uses special characters with meaning, simply removing them may not be sufficient. Therefore, tokenization rules such as Penn Treebank Tokenization rules may be applied during the process.
[0069] Sentence tokenization refers to the process of dividing text into sentence units. Typically, if data is unrefined, the corpus is not organized into sentences, so sentence tokenization may be necessary to suit the intended use. Various rules for this sentence tokenization can be defined depending on the language used and how special characters are utilized within the corpus.
[0070] The process of classifying tokens according to their purpose is called tokenization, and before and after tokenization, text data undergoes cleaning and normalization tailored to its intended use. Cleaning involves removing noise data, while normalization involves consolidating words with different representations into a single word.
[0071] Cleansing is sometimes performed prior to tokenization to exclude elements that interfere with the process, but it can also be repeatedly carried out after tokenization to remove noise that remains. The noise data removed during cleansing consists of meaningless characters; methods for eliminating unnecessary words include stopword removal, as well as removing infrequent and short words.
[0072] Normalization tasks include the consolidation of words with different spellings and case consolidation based on rules. Case consolidation is a normalization method that can reduce the number of words in English-speaking languages; since uppercase letters are used only in specific situations, such as at the beginning of a sentence, and most text is written in lowercase, case consolidation can mostly be accomplished through the conversion of uppercase letters to lowercase.
[0073] To process natural language in computing systems, a preprocessing step of converting text into numerical values is required; for this purpose, each word in the text is mapped to a unique integer. This mapping process can utilize techniques such as integer encoding, padding, and one-hot encoding.
[0074] Integer encoding is a method of assigning integers to words. It involves creating a vocabulary sorted by frequency and assigning integers sequentially from lowest to highest frequency. Integer encoding performs sentence tokenization on text data containing multiple sentences, and simultaneously conducts word tokenization through cleaning and normalization processes. During this process, words are converted to lowercase to standardize the word count, and words can be removed based on stop words or word length. Through this, words can be recorded as keys and their frequencies as values. Integer encoding is performed by sorting words within the text in order of frequency and assigning integers to the words with the highest frequencies.
[0075] Padding is a process used to arbitrarily equalize the lengths of sentences of different lengths within a text. Computing systems can perform parallel operations by grouping sentences of equal length into a single matrix. In other words, to perform parallel operations, the lengths of sentences can be equalized by arbitrarily filling the integer encoding results of sentences of different lengths within the text with '0's. That is, the longest sentence is identified from the set of integer-encoded words, and "0"s can be added to the integer matrix corresponding to the length of that longest sentence. The computing system can proceed with parallel processing by recognizing sentences of equal length as a single matrix, and in this process, the "0" words, which are perceived as meaningless, can be ignored. Adjusting the size (shape) of data by filling it with specific values in this manner is called padding, and when the number "0" is used to adjust length, it is referred to as zero padding.
[0076] One-hot encoding is a vector representation method in which the size of the word set is used as the dimension of the vector, and a value of 1 is assigned to the index of the word to be represented and 0 to other indices; the vector represented in this way is called a one-hot vector. One-hot encoding consists of integer encoding and index assignment processes. After integer encoding is performed to assign a unique integer to each word, the unique integer of the word to be represented is considered as the index, and a "1" is assigned to that position, while a "0" is assigned to the index positions of other words. However, one-hot encoding has the disadvantage that the space required to store the vector increases (increase in vector dimension) as the number of words increases, and it is also impossible to verify similarity between words. To address these drawbacks, techniques that vectorize in a multi-dimensional space by reflecting the latent meaning of words are available. These include count-based vectorization methods such as LSA (Latent Semantic Analysis); prediction-based vectorization methods such as NNLM, RNNLM, Word2Vec, and FastText; and the GloVe method, which uses both count-based and prediction-based approaches.
[0077] Meanwhile, in order for a computer to understand and process text, it must be appropriately converted into numbers. Since the performance of natural language processing varies significantly depending on how words are represented, many techniques have been proposed to quantify words. Currently, word embedding, which vectorizes each word through artificial neural network learning, is the most widely used method.
[0078] Word embedding is a method of representing words as vectors, converting words into dense representations. The result derived through the word embedding process is called a dense vector or embedding vector. Word embedding methodologies include LSA, Word2Vec, FastText, and Glove.
[0079] 4. Modeling and Training
[0080] Artificial neural networks can be trained using training data. Here, training refers to the process of determining the parameters of an artificial neural network using training data to achieve objectives such as classifying, regressing, or clustering input data. Typical examples of artificial neural network parameters include weights assigned to synapses or biases applied to neurons.
[0081] An artificial neural network trained on training data can classify or cluster input data according to the patterns of the input data. Meanwhile, an artificial neural network trained using training data may be referred to as a trained model in this specification.
[0082] The following explains the learning methods of artificial neural networks. The learning methods of artificial neural networks can be broadly classified into supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning.
[0083] Supervised learning is a method of machine learning designed to infer a function from training data. Among the functions inferred in this way, outputting a continuous value is called regression, and predicting and outputting the class of an input vector is called classification.
[0084] In supervised learning, an artificial neural network is trained with labels for the training data. Here, a label refers to the correct answer (or result value) that the artificial neural network must infer when training data is input into the artificial neural network. In this specification, the correct answer (or result value) that the artificial neural network must infer when training data is input is referred to as a label or labeling data. Furthermore, in this specification, setting labels for the training data to train the artificial neural network is referred to as labeling the training data. In this case, the training data and the corresponding labels constitute a single training set, and can be input to the artificial neural network in the form of a training set.
[0085] Meanwhile, training data represents multiple features, and labeling the training data implies that labels are attached to the features represented by the training data. In this case, the training data can represent the features of the input object in the form of a vector. An artificial neural network can infer a function regarding the association between the training data and the labeled data by utilizing the training data and the labeled data. Furthermore, the parameters of the artificial neural network can be determined (optimized) through the evaluation of the function inferred by the network.
[0086] Unsupervised learning is a type of machine learning in which no labels are provided for the training data. Specifically, unsupervised learning can be a learning method that trains an artificial neural network to find and classify patterns within the training data itself, rather than focusing on the relationship between the training data and its corresponding labels. Examples of unsupervised learning include clustering and Independent Component Analysis.
[0087] Examples of artificial neural networks that utilize unsupervised learning include Generative Adversarial Networks (GANs) and Autoencoders (AEs).
[0088] Generative Adversarial Networks (GANs) are machine learning methods in which two distinct artificial intelligence models—a generator and a discriminator—compete to improve performance. In this context, the generator is a model that creates new data, capable of generating new data based on original data. The discriminator, on the other hand, is a model that recognizes data patterns, performing the role of distinguishing whether input data is original data or new data generated by the generator. Furthermore, the generator learns by receiving input data that failed to deceive the discriminator, while the discriminator learns by receiving input data that was deceived by the generator. Consequently, the generator can evolve to deceive the discriminator as effectively as possible, and the discriminator can evolve to better distinguish between original data and data generated by the generator.
[0089] An autoencoder is a neural network that aims to reproduce the input itself as the output. An autoencoder includes an input layer, at least one hidden layer, and an output layer. In this case, since the number of nodes in the hidden layer is less than the number of nodes in the input layer, the dimensionality of the data is reduced, and accordingly, compression or encoding is performed. Additionally, the data output from the hidden layer enters the output layer. In this case, since the number of nodes in the output layer is greater than the number of nodes in the hidden layer, the dimensionality of the data is increased, and accordingly, decompression or decoding is performed.
[0090] Meanwhile, an autoencoder represents input data as hidden layer data by adjusting the connection strengths of neurons through learning. In the hidden layer, information is represented with fewer neurons than in the input layer, and the fact that input data can be reproduced as output implies that the hidden layer has discovered and represented hidden patterns from the input data.
[0091] Semi-supervised learning is a type of machine learning that refers to a learning method utilizing both labeled and unlabeled training data. One technique within semi-supervised learning involves inferring labels from unlabeled training data and then performing learning using those inferred labels; this method can be particularly useful when the cost of labeling is high.
[0092] Reinforcement learning is a theory that states that if an agent is provided with an environment where it can determine the best action to take at every moment, it can find the optimal path through experience alone, without relying on data. Reinforcement learning is primarily executed via a Markov Decision Process (MDP). To explain the MDP, first, an environment is provided containing the information necessary for the agent to take its next action; second, the agent's behavior within that environment is defined; third, rewards are determined for success and penalties for failure; and fourth, the optimal policy is derived through repeated experience until future rewards reach their peak.
[0093] The structure of an artificial neural network is determined by the configuration of the model, activation function, loss function or cost function, learning algorithm, optimization algorithm, etc., and hyperparameters are set in advance before learning, and model parameters are set through learning thereafter, so the content can be determined.
[0094] For example, factors determining the structure of an artificial neural network may include the number of hidden layers, the number of hidden nodes included in each hidden layer, the input feature vector, the target feature vector, etc.
[0095] Hyperparameters include various parameters that must be initially set for training, such as the initial values of model parameters. Model parameters, on the other hand, include various parameters intended to be determined through training. For example, hyperparameters may include initial values for inter-node weights, initial values for inter-node bias, mini-batch size, number of training iterations, and learning rate. Additionally, model parameters may include inter-node weights and inter-node bias.
[0096] A loss function can be used as an indicator (criterion) to determine optimal model parameters during the learning process of an artificial neural network. In an artificial neural network, learning refers to the process of manipulating model parameters to reduce the loss function, and the objective of learning can be viewed as determining model parameters that minimize the loss function. The loss function can primarily be the Mean Squared Error (MSE) or the Cross Entropy Error (CEE), but the present invention is not limited thereto. The Cross Entropy Error can be used when the correct label is one-hot encoded. One-hot encoding is an encoding method in which the correct label value is set to 1 only for neurons corresponding to the correct answer, and the correct label value is set to 0 for neurons that are not the correct answer.
[0097] In machine learning or deep learning, learning optimization algorithms can be used to minimize the loss function, and learning optimization algorithms include Gradient Descent (GD), Stochastic Gradient Descent (SGD), Momentum, Nesterov Accelerate Gradient (NAG), Adagrad, AdaDelta, RMSProp, Adam, Nadam, etc.
[0098] Gradient Descent is a technique that adjusts model parameters in a direction that reduces the loss function value by considering the gradient of the loss function from the current state. The direction in which model parameters are adjusted is called the step direction, and the magnitude of the adjustment is called the step size. In this context, the step size can refer to the learning rate. Gradient Descent obtains the gradient by taking the partial derivative of the loss function with respect to each model parameter, and updates the model parameters by changing them in the direction of the obtained gradient by the learning rate.
[0099] Stochastic Gradient Descent is a technique that divides training data into mini-batches and performs gradient descent on each mini-batch to increase the frequency of gradient descent.
[0100] Adagrad, AdaDelta, and RMSProp are techniques that improve optimization accuracy in SGD by adjusting the step size. In SGD, Momentum and NAG are techniques that improve optimization accuracy by adjusting the step direction. Adam is a technique that improves optimization accuracy by combining Momentum and RMSProp to adjust both the step size and the step direction. Nadam is a technique that improves optimization accuracy by combining NAG and RMSProp to adjust both the step size and the step direction.
[0101] The learning speed and accuracy of artificial neural networks are characterized by being heavily dependent on hyperparameters, as well as the network structure and the type of learning optimization algorithm. Therefore, to obtain a good learning model, it is important to set appropriate hyperparameters in addition to determining a suitable network structure and learning algorithm.
[0102] Typically, hyperparameters are experimentally set to various values while training the artificial neural network, and then set to the optimal value that provides stable training speed and accuracy based on the training results.
[0103] FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention, FIG. 2 is a schematic diagram of an intelligent data analysis system according to an embodiment of the present invention, FIG. 3 is a flowchart of an intelligent data analysis method according to an embodiment of the present invention, FIG. 4 is a detailed flowchart of the analysis plan establishment step of FIG. 3, and FIG. 5 is a detailed flowchart of the query interpretation and response step of FIG. 4.
[0104] As illustrated in FIG. 1, an electronic device (100) according to embodiments of the present invention may include a processor (110), memory (120), a communication unit (130), and an input / output unit (140). The electronic device (100) is a basic configuration for performing a computing environment, and the electronic device (100) may be implemented with some other components additionally or substantially in other embodiments, implemented as a single or multiple entity, or implemented as only some of the disclosed configurations. Internal or external components of the electronic device (100), or at least some of the components, may transmit or receive data or signals by being connected to each other through a BUS, GPIO (General Purpose Input / Output), SPI (Serial Peripheral Interface), or MIPI (Mobile Industry Processor Interface), etc.
[0105] The processor (110) may mean a set of one or more processors unless the context clearly indicates otherwise, and can control components of the processor (110) and the electronic device (100) by running software (e.g., instructions, programs, etc.) stored in memory (120). Additionally, the processor (110) can perform various operations such as computation, processing, data generation or processing, and can read data from memory (120) or store it in memory (120). The processor (110) may be composed of at least one core and may include a processor for data analysis, machine learning (ML), or deep learning (DL), such as a Central Processing Unit (CPU), a General Purpose Graphics Processing Unit (GPGPU), or a Tensor Processing Unit (TPU). The processor (110) can read software stored in memory (120) and perform data processing for machine learning (or deep learning) according to the present invention. According to one embodiment of the present disclosure, the processor (110) can perform operations for training a neural network. The processor (110) can perform operations for training a neural network, such as processing input data for training in deep learning, extracting features from input data, calculating errors, and updating the weights of the neural network using backpropagation. At least one of the CPU, GPGPU, and TPU of the processor (110) can process the training of the neural network model. For example, the CPU and GPGPU can together process the training of the neural network model and data classification using the neural network model. In addition, in one embodiment of the present disclosure, at least one processor (110) of the electronic device (100) can be used together to process the training of the neural network model and data classification using the neural network model.
[0106] Memory (120) is intended to store various data, and the data may include software (e.g., instructions, programs, etc.) which is acquired, processed, or used by at least one component of the electronic device (100). Unless otherwise clearly expressed in the context, memory (120) may mean a set of one or more memories and may include at least one type of storage medium among flash memory type, hard disk type, multimedia card micro type, card type memory (e.g., SD or XD memory, etc.), RAM, SRAM (Static Random Access Memory), ROM, EEPROM (Electrically Erasable Programmable Read-Only Memory), PROM (Programmable Read-Only Memory), magnetic memory, magnetic disk, optical disk, and web storage that performs storage functions on the internet. The instruction, program, or software stored in the memory (120) may be used to refer to an operating system, an application, or middleware that provides various functions to an application to enable the application to utilize the components of the electronic device (100) for controlling the components of the electronic device (100). In one embodiment, when the processor (110) performs a specific operation, the memory (120) may store instructions that are performed by the processor (110) and correspond to the specific operation.
[0107] The communication unit (130) performs wireless or wired communication between the electronic device (100) and another device (e.g., a user terminal or another server), and the communication unit (130) may use wireless communication systems according to methods such as eMBB, URLLC, MMTC, LTE, LTE-A, NR, UMTS, GSM, CDMA, WCDMA, TDMA, FDMA, OFDMA, SCFDMA, WiBro, WiFi, Bluetooth, NFC, GPS, or GNSS. In addition, the communication unit (130) can use various wired communication systems such as USB, HDMI, RS-232 (Recommended Standard-232), POTS (Plain Old Telephone Service), Public Switched Telephone Network (PSTN), xDSL (x Digital Subscriber Line), RADSL (Rate Adaptive DSL), MDSL (Multi Rate DSL), VDSL (Very High Speed DSL), UADSL (Universal Asymmetric DSL), HDSL (High Bit Rate DSL), and Local Area Network (LAN). In one embodiment of the present invention, the communication unit (130) can be configured regardless of the mode of communication, such as wired or wireless, and can be configured with various communication networks such as a Personal Area Network (PAN) and a Wide Area Network (WAN). In addition, the above communication network may be the known World Wide Web (WWW), and may also utilize wireless transmission technologies used for short-range communication, such as Infrared Data Association (IrDA) or Bluetooth.
[0108] An electronic device (100) of one embodiment of the present invention may further include an input / output unit (140). The input / output unit (140) may be configured to be divided into an input unit and an output unit, but alternatively, the input / output unit (140) may have an integrated configuration. The input unit may be configured in various ways as a means of data input. For example, the input unit may be configured to receive user input. The input unit may be configured to receive user input from a user terminal. Here, "receiving input" may mean receiving an input signal (or selection signal) corresponding to the user's input based on input made by the user through the input unit configuration provided in the user terminal. The input unit may also be named a user interface module. The input unit may include a touch screen, a computer mouse, a keyboard, a keypad, a touchpad, a trackball, a joystick, a voice recognition module, or other similar devices. However, the present invention does not limit the type of input unit. Furthermore, in the present invention, the input unit does not necessarily refer to a hardware means, but can be understood as a channel (AI chatbot, prompt) for receiving input from a user. Here, user input may include documents, text, images (or videos), etc. Next, the output unit may output information through an output unit configuration (e.g., a display unit, a touch screen, etc.) provided in a user terminal or computing device. The output unit does not necessarily refer to a hardware means, but can be understood as a channel for outputting results to the user.
[0109] An electronic device (100) according to an embodiment of the present invention can execute software that configures an intelligent data analysis system or implements an intelligent data analysis method.
[0110] As illustrated in FIG. 2, an intelligent data analysis system (200) according to one embodiment of the present invention performs advanced data analysis based on a natural language query and may be configured to include an input acquisition unit (210), a plan establishment unit (230), a code generation unit (250), and an execution output unit (270). Meanwhile, as illustrated in FIG. 3, an intelligent data analysis method according to one embodiment of the present invention may include the steps of: acquiring data to be analyzed and a user query in the form of natural language (S100); interpreting the user query to derive an analysis objective and establishing an analysis plan that defines a logical procedure to be performed to achieve the analysis objective (S200); generating program code capable of mechanical execution in a computing environment based on the established analysis plan and structural attribute information of the data to be analyzed (S300); and running the program code in an execution environment to produce and output an analysis result corresponding to the user query (S400).
[0111] According to the analysis method described above, an intelligent data analysis system (200) according to an embodiment of the present invention receives an analysis request (User Query) and a data file (Tabular Data) from a user. The acquired input is transmitted to a planning unit (230) referred to as Model 1, and a pseudocode, which is an analysis plan, can be generated. The analysis plan (pseudocode) thus generated is transmitted to a code generation unit (250) referred to as Model 2, and program code, such as Python Code, can be generated. The generated code is executed in an execution output unit (270), which is an Exec Sandbox, and any errors occurring during this process are fed back to the code generation unit (250), allowing the system to modify the code. Meanwhile, if the code execution is successful, an analysis result in the form of text or a graph can be output to the user as Results.
[0112] In the step (S100) of obtaining the data to be analyzed and the user query in natural language form, the input acquisition unit (210) can obtain the data to be analyzed and the user command requesting analysis, i.e., the natural language user query. In this embodiment, the input acquisition unit (210) can be implemented through the system's user interface or API (Application Programming Interface).
[0113] The data to be analyzed obtained through the input acquisition unit (210) is the raw data that the user intends to analyze, and in one embodiment, the data to be analyzed may be single table data such as a CSV (Comma Separated Values) file or an Excel file. However, the data to be analyzed is not limited to this and may include various forms of data such as JSON (JavaScript Object Notation), unstructured text, and image data. The user query obtained through the input acquisition unit (210) may be a command statement describing the content of the analysis that the user intends to perform in natural language. Natural language queries can be very vague requests, such as "I don't know what to analyze with this data," requests with only an analysis purpose, such as "I want to analyze in relation to book genres," requests where the subject or method of analysis is not explicitly revealed (implicit detailed requests), such as "Statistically test whether there is an association between the language and genre of books," or very specific requests where the subject and method of analysis are explicitly requested, such as "Perform a chi-square test using 'Original language' and 'Genre'."
[0114] The input acquisition unit (210) of the present embodiment can extract metadata essential for subsequent operations (plan formulation and code generation) from the received data to be analyzed. Here, the metadata can be structural attribute information (Key Info. of Data) of the data to be analyzed, and such metadata can improve the accuracy of the plan to be formulated or the code to be generated in subsequent analysis plan formulation and program code generation.
[0115] Specifically, when the data to be analyzed is uploaded, the input acquisition unit (210) can scan the data and extract the following structural attribute information. The structural attribute information may include the name of the data, the total number of rows and columns, the names of each column, the data type of each column (numerical, categorical, object, datetime, etc.), the number of null values (missing values) in each column, the number of unique values in each column and the values themselves, and major statistics in numeric columns (mean, median, standard deviation, minimum / maximum value, etc.).
[0116] As described above, the input acquisition unit (210) of the present embodiment can transmit the acquired natural language user query, the data to be analyzed, and structural attribute information extracted from the data to be analyzed to the next step, the planning unit (230) (Model 1). By transmitting this information together, the planning unit (230) can concretize the user's ambiguous request by corresponding it to the actual attributes of the data (e.g., 'Genre' is categorical, 'Sales' is numerical).
[0117] In the step (S200) of establishing an analysis plan that derives an analysis objective by interpreting a user query and defines a logical procedure to be performed to achieve the analysis objective, the planning unit (230) can convert the user's intent into an executable plan. In this embodiment, the planning unit (230) may be an artificial intelligence model fine-tuned to plan a specific objective, e.g., an intent, based on a large-scale language model (LLM).
[0118] With reference to FIG. 4, the planning unit (230) of the present embodiment can perform a knowledge base construction and query interpretation step (S210), a data-based objective establishment step (S220), and a query interpretation and response step (S230).
[0119] In the knowledge base construction and query interpretation step (S210), the planning unit (230) may contain vast analytical knowledge and sophisticated query interpretation logic to respond to various queries from the user.
[0120] The planning unit (230) of the present embodiment may first define the range of methodologies that can be analyzed for the data to be analyzed. The methodologies may include a total of 84 core analysis methods, such as statistical testing, analysis of variance and distribution, detection of variability and outliers, feature extraction, regression and classification analysis, clustering analysis, and time series analysis, which can be stored in the system's knowledge base. Here, the knowledge base may further include detailed descriptions and major usage examples for each analysis method. Based on the descriptions and usage examples in this knowledge base, detailed metadata for each analysis method is constructed. For example, specific descriptions and usage examples may be defined, such as, "'Chi-square test' is a statistical method that analyzes categorical data to evaluate the relationship between two variables or to test how well observed frequencies match expected frequencies. It is mainly used to test the independence between categorical data using contingency tables or to check whether the data fits a specific distribution well."
[0121] Additionally, in the data-based objective establishment step (S220), the planning unit (230) can analyze the context of the data based on the data to be analyzed and the structural attribute information of the data to be analyzed, and generate an explanation of what the data contains from the data information. For example, the planning unit (230) can inject the ability to generate the potential analytical value of the data into a large-scale language model, which is at least one artificial intelligence model, such as “The given data ‘data name’ contains information about 22 books, and each book has attributes such as title, author, original language, first publication year, approximate sales volume, and genre. This data may be useful for analyzing the relationship between the publication year, genre, and sales volume of the books.” Based on this, the planning unit (230) determines whether it is possible to establish an analysis objective based on the given data, analysis method, data explanation, etc., and if it is determined to be possible, it can generate an analysis objective. That is, the planning unit (230) can combine structural attribute information of the data to be analyzed (e.g., 'original language' and 'genre' are categorical) and an analysis method (e.g., 'chi-square test' is an analysis of relationships between categorical variables) to generate a specific analysis objective such as "testing the independence between the original language and the genre to evaluate whether books published in a specific language belong more to a specific genre."
[0122] Additionally, in the query interpretation and response step (S230), the planning unit (230) can intensively learn the process of converting a user's ambiguous query into a clear analysis goal. Here, the planning unit (230) can generate user request statements of four predetermined types to achieve the aforementioned analysis goal. The four types of user request statements may be user natural language queries such as "analysis direction unknown," "analysis purpose only," "implicit detailed request," and "explicit detailed request" converted into specific and explicit detailed requests. For example, for cases where the direction of analysis is unknown (very vague queries, "I don't know what to analyze with this data"), examples of analysis goals related to the given data are presented; for requests with only an analysis objective ("I want to analyze in relation to book genres"), detailed analysis steps are established to achieve that objective, and examples of possible explicit detailed requests are presented for each detailed step; for implicit detailed requests ("Statistically test whether there is an association between the language and genre of books"), the analysis target and method are specified in the given request to modify it into an example of an explicit detailed request; and for explicit detailed requests ("Perform a chi-square test using 'Original language' and 'Genre'"), the user request can be passed to a code generation model for analysis. That is, the planning unit (230) can inversely generate various forms of user query examples, such as “Implicit detailed request: Please perform a statistical test to determine if there is an association between the original language and the genre of the book,” for an analysis goal, such as “Analysis goal: Test the independence between the original language and the genre to evaluate whether books published in a specific language belong more to a specific genre,” generated in the data-based goal-establishing step (S220) described above. Afterward, the planning unit (230) can generate answers for each request by specifying response methods for each of the four request types.That is, the planning unit (230) can convert ambiguous requests, such as “Implicit detailed request: Please perform a statistical test to see if there is a correlation between the original language and genre of the book,” into clear requests, such as “Please perform a chi-square test to evaluate the relationship between the original language and the genre.” In other words, the LLM of the planning unit (230) can be trained to convert ambiguous queries entered by the user into explicit and clear requests that the model can understand. Meanwhile, the planning unit (230) can verify whether the generated example includes explicit analysis targets and analysis methods to solve the analysis purpose.
[0123] Specifically, with reference to FIG. 5, the query interpretation and response step (S230) of the present embodiment may perform a query interpretation-based analysis purpose derivation step (S231) and an analysis plan establishment step (S232). In the query interpretation-based analysis purpose derivation step (S231), according to the defined classification system as described above, the plan establishment unit (230) may classify user queries entered in real time into four types and present differentiated response methods. For example, a request regarding the unknown direction of analysis (e.g., "I don't know what to analyze with this data") is interpreted as "a case where the user needs to be presented with an analysis direction," and in response to this, the system may present examples of analysis purposes that can be performed on the data based on structural attribute information. In addition, a request with only a goal (e.g., "I want to analyze book genres. What should I do first?") is interpreted as a case where "a major analysis objective exists but the detailed steps are unknown." In response to this, the system establishes detailed analysis steps to achieve the objective and can present examples of explicit detailed requests that the user can select at each step (e.g., "Comparison of book quantities by genre," "Analysis of sales volume of a specific genre"). Additionally, a request with an implicit detailed request (e.g., "Statistically test whether there is an association between the language and genre of books") is interpreted as a case where "the subjects of analysis (language, genre) exist, but a specific analysis method (e.g., chi-square test) is not specified." In response to this, the system can refer to structural attribute information to confirm that the two variables are categorical and identify and present the most appropriate statistical technique (chi-square test). Subsequently, these implicit detailed requests can be modified and proposed as explicit requests (e.g., "Please perform a chi-square test to evaluate the relationship between the original language and the genre.") through the specification of the request and the presentation of input examples.In addition, an explicit detailed request (e.g., "Perform a chi-square test with 'Original language' and 'Genre'") is interpreted as "when the analysis target and method are explicitly requested," and the system determines the request to be in a "code generation possible" state and can immediately proceed to the next step, which is establishing an "analysis plan" for code generation.
[0124] In the analysis plan establishment step (S232), the planning unit (230) of this embodiment can derive an analysis plan as a result after defining specific logical procedures to achieve the purpose once the purpose of analysis is clearly derived through the process described above. In this embodiment, such an analysis plan can be generated in the form of pseudocode, which is an intermediate language that is easy for a computer to understand. This pseudocode as an analysis plan can serve as a guideline or blueprint that the code generation unit (250) (Model 2), which will be described later, must follow when generating actual program code. That is, the pseudocode can contribute to increasing the logical accuracy and structuring rate of the final code by inducing a chain of thought function that encourages the Large Language Model (LLM) to think step-by-step rather than processing complex tasks all at once.
[0125] For example, when the objective of ‘analysis of variance’ is derived, the planning unit (230) can generate logical procedures (analysis plans) such as “1. Library Import”, “2. Dataset Loading”, “3. Column Selection”, “4. Existence Check”, “5. Data Type Conversion”, “6. Variance Calculation”, and “7. Result Presentation” as shown in the pseudocode example of [Table 1].
[0126] 분석 계획의사 코드Library Import:Imports pandas for data handling.import pandas as pdDataset Loading:Loads data from a CSV file at a specified path.#Read the data from the CSV filedata_path = ' / workspace / hank_kim / ada / make_data / fake_datasets / 0702 / csv / diabetes_3.csv'df = pd.read_csv(data_path)Column Selection:Selects a target column for variance analysis.# Perform variance analysis on the 'bp' columntarget_column= 'bp'Existence Check:Verifies if the target column exists in the dataset and raises an exception if it does not.# Check if the column existsif target_column not in df.columns:raise Exception (f"Caution: Further progress is not appropriate - " f"The required column '{target_column}' is missing from the dataset.")Data Type Conversion:Attempts to convert the target column data type to numeric if necessary and raises an exception if the conversion is unsuccessful.# Convert the data type to numeric if necessaryif df [target_column].dtype == 'object':try:df [target_column] = pd.to_numeric(df[target_column], errors='coerce')except ValueError as e:raise Exception (f"Caution: Further progress is not appropriate - " f"Error converting column '{target_column}' to numeric type. Error: {e}")Variance Calculation:Computes the variance of the target column.# Calculate the variance of the target columnvariance df [target_column].var()Result Presentation:Prints the variance value as the output.# Print the resultprint("The variance of the 'bp' column is:")print(variance).
[0127] That is, the planning unit (230) receives user queries and structural attribute information from the input acquisition unit (210), processes them to generate an analysis plan (pseudocode), and the generated pseudocode (analysis plan) can be transmitted to the next step, the code generation unit (250), along with structural attribute information (Key Info. of Data). By transmitting these two pieces of information together, the code generation unit (250) can clearly recognize what (Plan) and how (Data Info) to code.
[0128] The step (S300) of generating program code capable of machine execution in a computing environment based on the established analysis plan and the structural attribute information of the data to be analyzed may be an implementation step of converting the analysis plan (pseudocode) configured as described above into actual executable program code.
[0129] The code generation unit (250) is at least one artificial intelligence model (Model 2) for generating data analysis code, and the code generation unit (250) of this embodiment may be based on a large-scale language model (LLM) specialized for generating program code. The code generation unit (250) may receive an analysis plan (pseudocode) and structural attribute information (Key Info. of Data) of the data to be analyzed from the planning unit (230). The core function of the code generation unit (250) may be to generate a high-quality program code that is executable based on these two inputs.
[0130] The code generation unit (250) of the present embodiment differs from conventional general code generation models in that it actively utilizes data attribute information. That is, while conventional general code generation models cause execution errors because the program code does not consider the actual state of the data (e.g., missing column, type mismatch), the code generation unit (250) of the present embodiment can generate code with defensive programming applied by using a function that considers attribute information such as the type of data. (Actively referencing structural attribute information) Specifically, in response to the "Existence Check" step of [Table 1], the code generation unit (250) checks the column list in the structural attribute information, such as "if target_column not in df.columns:", and if a column is missing, it can insert code that raises a clear exception, such as "raise Exception (f"Caution: Further progress is not appropriate-" f"The required column '{target_column}' is missing from the dataset.")". Additionally, corresponding to the "Data Type Conversion" step, you can insert code that checks the data type of structural attribute information using "if df[target_column].dtype == 'object':"; if the type is 'object' which is unsuitable for numerical analysis, attempt to convert it to a numeric type using "try: df [target_column] = pd.to_numeric(df[target_column], errors='coerce') except ValueError:"; and handle exceptions in case of failure. (Data validation and exception handling)
[0131] In addition, the code generation unit (250) of the present embodiment differs from conventional general code generation models in that it uses libraries specialized for data analysis, such as pandas, statsmodels, and scipy in the case of Python. That is, since the code generation unit (250) of the present embodiment has a clear purpose of data analysis, it can improve efficiency and accuracy by generating code that utilizes verified specialized libraries such as pandas (data handling), statsmodels (statistical analysis), and scipy (scientific computing).
[0132] The code generation unit (250) of this embodiment may use training data specially prepared to generate high-quality code. Such training data can be prepared through the following steps. First, a template code that can be actually executed is written and stored in a database by specifying the necessary preprocessing, exception handling, analysis, visualization, and output items for each data analysis method. Then, a large-scale language model (LLM) is utilized to generate possible analysis methods and request statements (rule-based explicit request statements) considering the data types for each data, and the template code is retrieved to generate response code (python code) for the request statement. (Data augmentation using LLM) Optionally, based on the data generated by the LLM, a human expert can directly create or modify the request statement and response code for cases where the request statement is more complex (complex analysis requests involving two or more types). (Data creation by human workers) Finally, key execution steps are extracted from the completed response code to generate an analysis plan (pseudocode), and this can be combined into pairs (pseudocode, program code) to train the model. (Pseudocode generation using LLM)
[0133] Due to the structural and training data differentiation of the code generation unit (250) of this embodiment, the code generation unit (250) of this embodiment can have the effect of dramatically improving the Direct Success Rate, which is the ratio of code executed at once without error, from 43% to 86% compared to existing general code generation models.
[0134] As described above, the code generation unit (250) of the present embodiment receives an analysis plan (pseudocode) and structural attribute information from the plan establishment unit (230), generates executable program code based thereon, and can transmit it to the execution output unit (270) (Exec Sandbox).
[0135] The step (S400) of executing the above program code in an execution environment to produce and output an analysis result corresponding to the above user query is a step of actually executing the generated program code, providing the result to the user in a valuable form, and managing feedback of the execution process. The execution output unit (270) of the present embodiment includes an execution sandbox (271) and an output unit (272), and can execute the program code and analysis target data received from the code generation unit (250) to output an analysis result.
[0136] The execution sandbox (271) can execute program code received from the code generation unit (250) in an isolated environment. Meanwhile, the execution sandbox (271) of the present embodiment may operate as part of a feedback loop (Self-Correction Loop) rather than as a simple runner. That is, the execution sandbox (271) of the present embodiment is connected to the code generation unit (250) and can transmit and receive errors and program code that occur during program code execution in both directions. Through this bidirectional communication between the execution sandbox (271) and the code generation unit (250), error correction and re-execution of the program code can be repeatedly performed. For example, the code generation unit (250) can generate code and transmit it to the execution sandbox (271), and the execution sandbox (271) can execute the code. If an error occurs during execution (e.g., a runtime error caused by an unexpected value of data), the execution sandbox (271) can transmit this error message back to the code generation unit (250). The code generation unit (250) that receives feedback on the error message can regenerate (modify) the code in a way that corrects the error, and the modified code can be transferred to the re-execution sandbox (271) and re-executed. This self-correction loop can be effective in improving the execution success rate of the present embodiment.
[0137] The output unit (272) can output the result (analysis result) to the user when the program code is finally successfully executed through a modification and execution retry loop. The result output through the output unit (272) can be provided in a processed form so that the user can immediately understand and utilize the analysis result. That is, the output form of the output result may include standardized text interpretation according to the analysis method (e.g., "Since the p-value is lower than 0.05, the two variables have a statistically significant relationship.") or visualized graphs (e.g., bar chart, scatter plot, histogram). Compared to existing code generation models, the output unit (272) of this embodiment provides a refined code execution result output, thereby providing an execution result that is easy for the user to understand.
[0138] That is, the execution output unit (270) of the present embodiment as described above receives and executes program code from the code generation unit (250) and can produce an execution result (analysis result upon success, error message upon failure) in the execution environment. The analysis result can be output to a user terminal (UI), etc., and the error message can be fed back to the code generation unit (250).
[0139] The intelligent data analysis system (300) of another embodiment of the present invention may operate as an inference system that performs real-time input data analysis based on an artificial intelligence model that has completed learning. Here, each component of this embodiment has a configuration substantially similar to that of the component of the embodiment described above, but for convenience of explanation, different reference numbers will be used to describe them.
[0140] The intelligent data analysis system (300) of the present embodiment includes an input acquisition unit (310), a plan establishment unit (330), a code generation unit (350), and an execution output unit (370), and performs the following inference process.
[0141] First, the input acquisition unit (310) performs the role of an input unit that receives inputs for inference, namely the data to be analyzed and user queries that are the targets for inference. The input acquisition unit (310) acquires the new data to be analyzed (New Data) and specific natural language queries to be solved that the user actually intends to analyze. The input acquisition unit (310) performs the role of a preprocessing unit for the acquired data. Specifically, the input acquisition unit (310) scans the data to be analyzed and extracts structural attribute information (metadata) so that the inference model (the artificial intelligence model of the planning unit (330) and the code generation unit (350)) can understand the input data. In this process, a data abstraction process including normalization and scaling information such as checking the data type, counting missing values (Null), and calculating statistics is performed, and the data is prepared to be input into the model. For example, the input acquisition unit (310) can receive new diabetes patient data (diabetes_new.csv) and a natural language query from the user, such as "tell me the variance value of the blood pressure (bp) variable." At this time, the input acquisition unit (310) can input structural attribute information into the system by extracting through a preprocessing process that a column named 'bp' exists within the data file and that its data type is in the form of an 'object (string)'.
[0142] Next, the planning unit (330) and the code generation unit (350) can perform actual inference on the input data based on the learned model. The planning unit (330) and the code generation unit (350) can function as an inference model with optimized parameters through the aforementioned learning process (S200, S300). In the inference stage, the inference model can generate an analysis plan and executable code corresponding to the input natural language query using fixed weights without updating parameters. That is, the planning unit (330), which is the first model, is trained in advance with vast analysis knowledge and query interpretation logic, receives preprocessed structural attribute information and user queries, and infers an analysis plan (pseudocode), which is the optimal analysis procedure for them. Subsequently, the code generation unit (350), which is the second model, is trained to be specialized in program code generation and predicts and generates program code capable of machine execution based on the inferred analysis plan. At this time, the models of the planning unit (330) and the code generation unit (350) do not update their parameters during the user query processing (inference process) and maintain a pre-trained or fine-tuned state, producing results based on fixed weights. For example, the trained model of the planning unit (330) can generate an analysis plan (pseudocode) containing a logical procedure [data loading → checking for the existence of 'bp' column → type conversion → variance calculation] by performing inference based on the input query and structural attribute information without changing parameters. Subsequently, the code generation unit (350) receives this analysis plan and can generate specific Python code that converts data types and calculates variance using the 'pandas' library, such as pd.to_numeric(df['bp'], errors='coerce').
[0143] Finally, the execution output unit (370) performs the role of an output unit that delivers the inference results to a user or an external system. The execution output unit (370) executes the program code generated by the inference unit in an execution environment (execution sandbox) and visualizes the resulting analysis results in the form of text or graphs to a user interface or transmits them to an external system. That is, the execution output unit (370) outputs an analysis result that is a direct answer to a user query, and the output result includes text interpretation or a visualized graph form, which can be a problem-solving result that provides actual value to the user rather than a verification of the correct answer to the training data. For example, the execution output unit (370) can execute the aforementioned Python code in an execution sandbox and immediately output a final analysis result to the user, such as "The variance of the bp column is 150.2".
[0144] Meanwhile, one embodiment of the present invention may be implemented as an Application Specific Integrated Circuit (ASIC) manufactured to suit specific application fields and special functions of devices.
[0145] Custom integrated circuits are also referred to as custom semiconductors. Unlike standard semiconductors, which have fixed specifications and can be applied to any electronic product or application as long as certain requirements are met, custom semiconductors are used for specific products or functions and are integrated circuits manufactured by semiconductor companies to meet specific orders. In other words, custom semiconductors are designed and manufactured to perform only the functions necessary for a specific device or feature. Custom semiconductors are broadly classified according to their design method into Full Custom ICs, which design and manufacture circuits from scratch to meet user requirements, and Semi-Custom ICs, which design and manufacture circuits using parts of a standardized design.
[0146] Application-specific semiconductors are primarily used in communication systems, high-performance computing systems, consumer electronics, automobiles, industrial automation, medical devices, the military, and the aerospace industry; recently, they are being applied to AI semiconductors that execute the large-scale computations required for AI implementation with high performance and power efficiency.
[0147] Application-specific semiconductors (ASICs) are used as core components in communication systems, such as network routers, switches, and modems, performing data packet processing, protocol conversion, and signal processing to provide high throughput and low latency. In high-performance computing systems, ASICs serve as key components for high-speed and parallel processing, while in consumer electronics—including digital cameras, smartphones, tablets, and game consoles—ASICs provide high-performance and low-power solutions required to perform specific functions. In the automotive industry, ASICs are used to control various electronic systems within vehicles, and in industrial automation systems, they provide solutions for high-precision control and high-performance processing.
[0148] An application-specific integrated circuit to which an embodiment of the present invention is applied includes a memory in which an individual memory interface (I / F) is implemented, and may include a plurality of function blocks that request memory access. Each function block may be a Direct Memory Access (DMA) function block, a processor, a video processor, a cache controller, a decompression block, or a data path block. The basic configuration of the application-specific integrated circuit may include a transistor that amplifies or switches an electrical signal, a logic gate which is a circuit that performs a logical function by combining transistors, a memory cell that stores data, an analog circuit which is a circuit that processes continuous voltage or current by combining transistors, and an Intellectual Property Core (IP Core) such as a microprocessor, DSP, or graphics core that is pre-designed to perform a specific function.
[0149] The ASIC may include an individual memory I / F that interfaces with individual memory and an embedded memory I / F that interfaces with embedded memory. The individual memory I / F is connected to each function block to receive memory access signals (e.g., control signals, address signals, and data signals) and, based on these input signals, can generate signals to control the individual memory. The embedded memory I / F is connected to each function block to receive memory access signals (e.g., control signals, address signals, and data signals) and, based on these input signals, can generate modified memory access signals to control the embedded memory. The individual memory I / F and the embedded memory I / F are designed within the memory control block of the ASIC to provide a memory control structure that can be flexibly applied to both the individual memory and the embedded memory.
[0150] Additionally, an application-specific integrated circuit (ASIC) for an artificial neural network (ANN) is composed of multiple neurons arranged in an array and multiple synapse circuits, each neuron being composed of a register, a microprocessor, and at least one input, and each synapse circuit being configured to include memory for storing synapse weights. Here, each neuron of the ASIC may be connected to at least one other neuron through one of the multiple synapse circuits.
[0151] Although the present disclosure has been described as generally being implementable by a computing device, a person skilled in the art will be well aware that the present disclosure may be implemented in combination with computer-executable instructions and / or other program modules that can be executed on one or more computers and / or as a combination of hardware and software.
[0152] Those skilled in the art of the present disclosure will understand that information and signals may be represented using any various different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced in the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
[0153] Those skilled in the art will understand that the various exemplary logic blocks, modules, processors, means, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented by electronic hardware, various forms of programs or design code (referred to herein as software for convenience), or a combination of all such. To clearly illustrate this interoperability between hardware and software, various exemplary components, blocks, modules, circuits, and steps have been generally described above in relation to their functions. Whether such functions are implemented as hardware or software depends on the design constraints imposed on the specific application and the overall system. Those skilled in the art may implement the functions described in various ways for each specific application, but such implementation decisions should not be interpreted as being outside the scope of this disclosure.
[0154] The various embodiments presented herein may be implemented as methods, devices, or articles manufactured using standard programming and / or engineering techniques. The term "article manufactured" includes a computer program, a carrier, or a medium accessible from any computer-readable storage device. For example, computer-readable storage media include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, magnetic strips, etc.), optical discs (e.g., CDs, DVDs, etc.), smart cards, and flash memory devices (e.g., EEPROMs, cards, sticks, key drives, etc.). Additionally, the various storage media presented herein include one or more devices and / or other machine-readable media for storing information.
[0155] It should be understood that the specific order or hierarchy of steps in the presented processes is an example of exemplary approaches. It should be understood that the specific order or hierarchy of steps in the processes may be rearranged within the scope of this disclosure based on design priorities. The appended method claims provide elements of various steps in a sample order, but do not imply being limited to the specific order or hierarchy presented.
[0156] Description of the presented embodiments is provided so that a person skilled in the art may use or practice the present disclosure. Various modifications to these embodiments will be apparent to a person skilled in the art, and the general principles defined herein may be applied to other embodiments without departing from the scope of the present disclosure. Thus, the present disclosure is not limited to the embodiments presented herein, but should be interpreted in the broadest possible scope consistent with the principles and novel features presented herein.
Claims
1. In a system performed by a computer, At least one memory for storing instructions; and It includes at least one processor that executes the above instructions to perform an operation, The operation performed by executing the instruction by the above at least one processor is, An operation to obtain data to be analyzed and user queries in natural language form; An action of interpreting the above user query to derive an analysis objective and establishing an analysis plan that defines a logical procedure to be performed to achieve the above analysis objective; An operation to generate program code capable of machine execution in a computing environment based on the above-established analysis plan and the structural attribute information of the data to be analyzed; and The operation of executing the above program code in an execution environment to produce and output an analysis result corresponding to the above user query; System.
2. In Claim 1, The above-mentioned acquisition operation extracts the structural attribute information including at least one of the data type, statistical value, and missing value (Null) information of the data to be analyzed. System.
3. In Claim 1, The operation of establishing the above analysis plan includes: an operation of classifying the above user query into one of a plurality of predefined query types; and an operation of deriving the above analysis purpose based on the classified query type. System.
4. In Claim 3, If the above query type does not satisfy a predefined clarity criterion, the operation of establishing the above analysis plan includes the operation of generating one or more recommendation analysis objectives or recommendation detailed procedures based on the above structural attribute information and a pre-stored analysis methodology knowledge base. System.
5. In Claim 1, The above analysis plan is in the form of pseudocode that describes the above logical procedure step by step, System.
6. In Claim 5, The operation of establishing the above analysis plan comprises: a database storing a plurality of previously stored analysis plan templates; and retrieving an analysis plan template corresponding to the derived analysis purpose from the database to generate the pseudocode. System.
7. In Claim 1, The operation of generating the above program code is, Generating by including data validation logic or exception handling logic that validates specific attributes of the data to be analyzed in the program code by referring to the structural attribute information above. System.
8. In Claim 1, The operation of generating the above program code is, Generating the above program code including syntax that calls a function of a predefined data analysis library, System.
9. In Claim 1, The operation of running the above program code in an execution environment involves, when an error occurs during the execution of the above program code, obtaining error information indicating the cause of the error, and the operation of generating the above program code involves modifying and regenerating the above program code based on the obtained error information. System.
10. In Claim 1, The above analysis result includes at least one of text containing an interpretation of the execution result of the above program code or a graph visualizing the execution result. System.
Citation Information
Patent Citations
Automatic code generation system capable of simplifying development
CN112799657A
Method and device for processing original code file
CN117850911A
Database query statement generation method, system and equipment and medium
CN118467682A
Many-core algorithms for in-memory column store databases
US20160357816A1
Automated code generation based on pseudo-code
US20230041718A1