A method for executing initial instructions in natural language relating to a desired analytical processing of database data.
A natural language-based database processing system translates user instructions into object-oriented code for execution in a virtual machine, addressing the limitations of existing systems by providing accessible and scalable data analysis.
Patent Information
- Application Number
- FR2023007921
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-01-31
AI Technical Summary
Existing database management systems, such as SAS, SQL, and ERP software, are either complex and inaccessible to beginners or expensive and not scalable, making it difficult for companies to effectively handle and analyze large datasets for strategic decision-making.
A process that translates natural language instructions into abstract syntactic trees, generating object-oriented programming language instructions, which are executed in a virtual machine to perform analytical processing on databases, using a non-deterministic syntactic analyzer and a virtual machine interface to handle ambiguity and ensure valid execution.
Enables accessible and scalable database analysis through natural language processing, allowing users to perform complex data operations without prior programming knowledge, while maintaining high functionality and efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: Method for executing first instructions in natural language relating to a desired analytical processing of data in a database [0001 ] GENERAL TECHNICAL FIELD
[0002] The present invention relates to the field of database exploitation. More specifically, it relates to the execution of first instructions in natural language relating to a desired analytical processing of the data in a database.
[0003] STATE OF THE ART
[0004] Many companies today work around a massive database containing all the information useful to the company such as nomenclatures, ranges, raw materials, production capacities, quantities, orders, sales, etc.
[0005] It is necessary to have tools that allow such a database to be effectively manipulated (data integration and maintenance), and above all to implement analytical processing of the data contained in the database on which strategic decisions can be taken or feeding into subsequent processing: dashboards, machine learning, production of new data, etc.
[0006] To do this we have: - Either specific programming languages (called database operating languages) such as SAS (Statistical Analysis System), SQL or the Pandas module of Python® which are very powerful but not very accessible to beginners - Or dedicated business software called software packages (often called ERP for enterprise resource planning), which are then expensive and not always scalable.
[0007] It would be desirable to have another database operating solution that has the functionalities of languages usually reserved for data professionals and also their power, but which is more accessible and scalable. PRESENTATION OF THE INVENTION
[0008] The present invention therefore relates, according to a first aspect, to a method for executing first instructions in natural language relating to a desired analytical processing of the data of a database stored on data storage means of a first server, characterized in that it comprises the implementation by data processing means of a second server: a. Obtaining said first instructions from a client terminal; b. Translation of said first instructions into an abstract syntax tree; c. Generation, from said abstract syntax tree, of second instructions in an object-oriented programming language distinct from a language for operating said database; d. Execution of said second instructions in a virtual machine implemented by the data processing means so as to carry out said desired analytical processing, comprising triggering queries on said database in said database operating language, said virtual machine using an object kernel for interfacing with said database.
[0009] According to advantageous and non-limiting characteristics:
[0010] Said second instructions are a transcription of the first instructions in said object-oriented programming language.
[0011] Step (b) is implemented by a non-deterministic parser.
[0012] Said non-deterministic parser uses the Earley algorithm, the CYK algorithm or the GLR algorithm.
[0013] Step (b) comprises, if the parser raises an ambiguity of the first instructions, the generation of a plurality of abstract syntax trees, each being a possible translation of said first instructions, step (c) comprises the generation, from each abstract syntax tree, of a set of second instructions in said object-oriented programming language; and step (d) comprises a verification of the validity of each set of second instructions, and the execution of the only valid set of second instructions in said virtual machine.
[0014] The first instructions are translated in step (b) into a first abstract syntax tree, step (c) comprising the transformation of the first abstract syntax tree into a second abstract syntax tree, said second abstract syntax tree being an object tree of said object-oriented programming language, expressing said second instructions.
[0015] Said object-oriented programming language is derived from Python® or C++, and said database operating language is chosen from Python®, Lisp, SQL or PowerQuery.
[0016] Step (d) comprises the prior resolution of the identifiers and / or types of the data of said database concerned by the second instructions, to generate said queries on the database.
[0017] Step (d) comprises providing said client terminal with output data relating to the result of said desired analytical processing.
[0018] The method further comprises a prior step (aO) of configuring the virtual machine and / or a syntactic analyzer for the implementation of step (b) by an external integration module.
[0019] According to a second aspect, the invention relates to a server, called a second server, characterized in that it comprises data processing means configured to: - Obtain from a client terminal first instructions in natural language relating to a desired analytical processing of the data of a database stored on data storage means of a first server; - Translate the said first instructions into an abstract syntax tree; - Generate, from said abstract syntax tree, second instructions in an object-oriented programming language distinct from a language for operating said database; - Execute said second instructions in a virtual machine implemented by the data processing means so as to carry out said desired analytical processing, comprising the triggering of queries in said operating language of said database, said virtual machine using an object kernel for interface with said database.
[0020] According to a third aspect, the invention relates to a system comprising the second server according to the second aspect, said first server and the terminal connected.
[0021] According to a fourth and a fifth aspect, the invention relates to a computer program product comprising code instructions for executing a method according to the first aspect of executing first natural language instructions relating to a desired analytical processing of the data of a database stored on data storage means of a first server; and a storage means readable by computer equipment on which is recorded a computer program product comprising code instructions for executing a method according to the first aspect of executing first natural language instructions relating to a desired analytical processing of the data of a database stored on data storage means of a first server. PRESENTATION OF THE FIGURES
[0022] Other characteristics and advantages of the present invention will appear on reading the following description of a preferred embodiment. This description will be given with reference to the appended drawings in which:
[0023] [Fig. 1] [Fig. 1] is a diagram of a system for implementing the method according to the invention;
[0024] [Fig. 2] [Fig. 2] schematically represents the general architecture of the blocks in an embodiment of the method according to the invention;
[0025] [Fig. 3] [Fig. 3] is a flowchart illustrating the steps of an embodiment of the method according to the invention;
[0026] [Fig. 4a] [Fig. 4a] represents an example of a first AST;
[0027] [Fig. 4b] [Fig. 4b] represents an example of a second AST obtained from the first AST of [Fig. 4a];
[0028] [Fig. 5a] [Fig. 5a] schematically represents a KNIL translator block in an embodiment of the method according to the invention;
[0029] [Fig. 5b] [Fig. 5b] schematically represents a KINL retro-translator block in an embodiment of the method according to the invention;
[0030] [Fig. 6] [Fig. 6] schematically represents a KVM machine block in an embodiment of the method according to the invention;
[0031] [Fig. 7] [Fig. 7] schematically represents a KOK core block in an embodiment of the method according to the invention;
[0032] [Fig. 8] [Fig. 8] schematically represents a KEMI integrator block in an embodiment of the method according to the invention; DETAILED DESCRIPTION
[0033] Architecture
[0034] The present invention relates to a method for executing first instructions in natural language relating to processing of data in a database, implemented in an environment such as represented by [Fig. 1].
[0035] Said database may be any structured database stored on data storage means 12 of a first server 1, typically a business database stored on a server 1 of a company. It may consist of character strings, numbers, dates, durations, booleans, tables, lists, dictionaries, etc.
[0036] Analytical processing of the database data means any operation on the information from the database for analysis purposes, typically joins and / or calculations, which can be potentially complex. For example, one may want the total number of orders from a particular customer, the processing then consisting of identifying all the orders from said customer in the database, extracting the corresponding amounts, and summing them. In the remainder of this description, the following more complex example will be taken: "Selecting the 10% of order lines with the largest quantity, among those with a price greater than 100." Said analytical processing will be distinguished from simple database management (reading / writing), although analytical processing of the data obviously involves access to this data. To rephrase, this analytical processing relates to the data itself, not to the database.
[0037] It is assumed that there is an operating language for said database, i.e. a language executable by data processing means 11 of said first server. 1 to natively implement data processing of said database, for example Python® in the remainder of this description, or SQL, Lisp, PowerQuery, etc.
[0038] The present method is specific in that the first instructions relating to a desired analytical processing of the data in a database (i.e. describing this desired processing), are in natural language, noted KNL, that is to say the “normal” language spoken by a human being and not a structured programming language, a fortiori not said database operating language. Natural language is written with almost no prior learning, unlike all computer languages, and is “self-documenting”. As will be explained later, for the present method to work it is sufficient that the first instructions: - use common words or expressions that have a clear and unique meaning for the user: 1. A verb for an action 2. An adjective for a modified value 3. A noun for a new value obtained by transformation of an existing value 4. The behavior of verbs is specified by complements, in accordance with standard grammar. - Conversely, a user concept corresponds to a single word or expression (with synonyms) to avoid any ambiguity, but the syntax is as flexible as possible (the circumstantial complements can appear in any order) - No need for business rules, we can simply use "if...then...else", possibly in a nested manner - No type declarations, types are determined and checked automatically.
[0039] We will see later how this is accomplished.
[0040] As shown in [Fig. 1], there is also a second server 2 for executing said method, and a client terminal 10 such as a workstation or a smartphone, having an interface and via which the user will be able to interact. It is understood that the second server 2 is connected to the client terminal 10 and to the first server 1, for example via a network 20 such as the internet network.
[0041] The second server 2 also comprises data processing means 21 such as a processor of any kind, and data storage means 22, i.e. a memory.
[0042] Note that the second server 2 can be confused with the client terminal 10 or with the first server 1.
[0043] Principle
[0044] With reference to [Fig. 2], the present method cleverly uses the passage through an “internal” object-oriented programming language, distinct from the operating language of said database, and executed by a virtual machine implementing a kernel making the link with said operating language of said database.
[0045] It is said to be internal since it is not visible to the user or the database and operates in an agnostic manner, and the user therefore does not need to know its syntax.
[0046] This object-oriented language, denoted KIL, is an executable and syntactically verified mirror of natural language. Like any language, it implements if-then-else rules, addressing systems, explicit or implicit loops, etc. As explained, it does not need to be understood by the user.
[0047] This is preferably a fully object-oriented language, which means that everything is an object, both data and functions. Each object can contain objects, and all these objects inherit from fundamental classes. It is this aspect that will easily and guaranteedly allow obtaining second instructions for all first instructions that are semantically correct (i.e., having meaning and unambiguous), while interfacing with an existing (and therefore predefined) database operating language. This object-oriented language is high-level, and can be derived from existing object-oriented languages such as Python® or C++ (i.e., presenting the same style of expression), the person skilled in the art will be able to define such a language starting from said fundamental classes and using existing libraries.
[0048] The fundamental classes designate the elementary concepts of data processing, a small number is sufficient, and the person skilled in the art will be able to define a set of fundamental cases allowing the expression of all instructions representative of an analytical processing of data from a database. For example, a main fundamental class "expression" designates all the objects which consist of mathematical expressions in the broad sense, and we can have the subclasses "constant" (predefined operand), "binary operator" (operation with 2 operands), "unary operator" (operation with 1 operand), "function" (any applicable function), with "constant" having the subclasses "boolean", "string", "Number", "missing" (if the type is missing), etc.
[0049] In a schematic manner, we can have for example the following inheritance tree of the fundamental class “expression”, the subclasses being intuitively understood: • Expression • Constant • Booléen • Chaine Number Manquant OperatorBinary OpAddition OpSoustraction OpMultiplication OpSuperieurA OpEgalA OperatorUnaire OpMoins OpNon OpAucun Fn _FnListee • AppelFnSansArg (*1) • AppelArgFn • AppelFnArg(*3) _FnComposeeListee • AppelFnComposeeSansArg (*2) • AppelArgFnComposee • AppelFnComposeeArg (*4) _FnSansArg • AppelFnSansArg (*1) • AppelFnComposeeSansArg (*2) _FnArg • AppelFnArg (*3) • AppelFnComposeeArg (*4)
[0050]
[0051]
[0052] (*1): CallFnWithoutArg is at the same time a subclass of _FnListee and _ FnWithoutArg. It benefits from a multiple inheritance mechanism. (*2) (*3) and (*4) follow the same logic. Similarly, in a schematic way, we can have for example the following inheritance tree of the fundamental class "sentence" (which designates all the objects which constitute textual parts of the query which are not expressions), the subclasses being intuitively understood: • _Sentence • DefinitionFn • Ruler • Assignment • AssignmentDToG • AssignmentGversD • Loop • _DryProcedureCall • TStop • TChrono • TReset • CallProcedureCods
[0053] Method
[0054] A number of blocks of said method, or components, are seen in [Fig. 2], which will be described in more detail.
[0055] With reference to [Fig. 3], the present method begins with a step (a) of obtaining said first instructions (in natural language) from the client terminal 10.
[0056] Said first instructions can be directly entered by the user on an interface of the terminal 10, the user having in mind the processing that he wishes to accomplish and content to write it (natural language makes the prototype = the specification, so that the first instructions are "executable in production"), or it will be possible to reuse first instructions already written for the same desired analytical processing, the user content to reuse them (for example for a processing that would be requested each month). In the example mentioned previously, it is sufficient to enter "Select the 10% of order lines whose quantity is the largest, among those whose price is greater than 100", i.e. to literally describe the desired processing. We see that such first instructions are semantically correct, i.e. they have a meaning and are not ambiguous.
[0057] The method then comprises a step of translating said instructions into an abstract syntax tree. By abstract syntax tree, or AST, is meant a tree (directed acyclic graph) whose internal nodes are marked by operators and whose leaves (or external nodes) represent the operands of these operators. In other words, generally, a leaf is a variable or a constant.
[0058] An AST constitutes the internal intermediate representation of the first instructions.
[0059] Then, in a step (c), the method comprises the generation, from said abstract syntax tree, of second instructions in said object-oriented programming language distinct from the operating language of said database. In particular, this involves the transformation of the tree structure of the AST into KIL expressions, the whole constituting said second instructions. To reformulate, the second instructions correspond to the first instructions transcribed in said object-oriented programming language (i.e. the second instructions relate to the same processing of the database as the first instructions).
[0060] In practice, there are advantageously two successive ASTs: the first AST (called AST KNL), obtained at the end of step (b), by syntactic analysis, then a second AST (called AST KIL), corresponding to the transformation of the first AST into a tree of objects of said object-oriented programming language (i.e. the leaves and nodes of the second AST are objects of said object-oriented programming language), constituting in practice said second instructions. This is made possible by the entirely object-oriented nature of the language. In other words, the second instructions can be expressed in the form of a second AST specific to said object-oriented programming language.
[0061] Both ASTs have the same overall structure, it is just a translation according to simple rules. It is considered that the second AST can constitute the second instructions, because the KIL AST is a direct representation of the object calls of said object-oriented programming language. We thus clearly understand the interest of going through said programming language even in a completely internal manner.
[0062] In the example of the first instructions "Select the 10% of order lines whose quantity is the largest, among those whose price is greater than 100.", we obtain a first AST as represented by [Fig. 4a]. We note that the leaves designate the semantic units of the first instructions, and therefore the operands (10, %, orders, quantity, price, 100). We then transform this first AST into the second AST visible in [Fig. 4b], and thus: - SelectNtac_l is an object of class SelectNtac - SelectNtac_l contains other objects (Number_l, Id_l, WithPlus_l, OpSuperieurA_l) whose classes are obtained by removing the rightmost order number. Similarly, WithPlus_l contains ID_2 and OpSu-perieurA_l contains Id_3 and Number_2
[0063] As explained, the obtained KIL AST is the exact representation of the KIL object calls, and can therefore be executed, see below.
[0064] Steps (b) and (c) are implemented within the “KNIL Translator” block (for Natural to Internai) visible in [Fig. 2].
[0065] It is understood that ASTs and automatic code generation from ASTs are known to those skilled in the art. On the other hand, the translation of natural language into ASTs is much more unusual.
[0066] In this respect, and with reference to [Fig. 5a] (which represents the KNIL Translator block in more detail), step (b) is advantageously implemented by a non-deterministic syntactic analyzer. The AST is then a tree-like description of the syntax elements recognized by the syntactic analyzer.
[0067] Indeed, in the context of first instructions in natural language, the role of certain words can only be determined by reading the following words and not statically by a state machine, hence the non-deterministic nature of the syntactic analyzer.
[0068] As a non-deterministic analysis method (in the analyzer) the Earley algorithm, the CYK (Cocke-Younger-Kasami) algorithm or the GLR (Generalized Left-to-right Rightmost derivation) algorithm can be used, which can analyze any non-contextual grammar in a reasonable (polynomial) time rather than, for example, LALR (Look-Ahead Left-to-right Rightmost derivation) usually used in known analyzers because it is sufficient for computer languages less complex than natural language and faster.
[0069] An example of a grammar not recognized by an LALR(l) algorithm and recognized by Earley is the following grammar: • S->bAclbda • A->d
[0070] This grammar is not understandable by LALR because there is a reduction / shift conflict when reading the sentence "bda". Indeed, once the beginning of the sentence "b" is read, it must read "d".
[0071] LALR is in a state where it does not know whether to reduce "A -> d" or whether it is in the middle of "s -> bda". In contrast, Earley's algorithm can handle this conflict by exploring all possibilities. It will realize that only "S -> bda" is possible by looking further into the sentence.
[0072] The non-deterministic analyzer can be pre-built, learned using artificial intelligence algorithms, and / or using language-specific grammar / vocabulary libraries (in order to take into account agreements, tenses, idioms, etc.), but also grammar common to all or part of the languages (a certain number of syntactic descriptions are factored: addressing tables, writing of integers, character strings, punctuation elements, etc.)
[0073] If syntactic analysis (and construction of the AST) is impossible because the first instructions do not have grammatical meaning ("syntax error") an error message is returned to the user.
[0074] Furthermore, there may be several (first) ASTs, i.e. a “forest” of ASTs, in the case of ambiguous first instructions. To reformulate, in the case where an ambiguity of the first instructions cannot be resolved statically, we advantageously generate the set of possible ASTs (forest), and for each AST we implement step (c) so as to generate for each AST a “set” of second instructions, and we will see later how the execution of such a forest of ASTs takes place. In the preferred case of second instructions in the form of KIL ASTs, each first AST is translated into a second AST.
[0075] Preferably, we have a symmetrical block of the KNIL translator called "KINL back-translator" (for Internai to Natural) which optionally allows to regenerate third instructions in natural language from the second instructions in the object-oriented language. To reformulate, the third instructions correspond to the second instructions transcribed in natural language (i.e. the third instructions are related to the same database processing as the second instructions). We understand that the third instructions are a reformulation of the first instructions. The advantage is that the third instructions are generally optimized (simpler) compared to the first instructions, and potentially in another language, which allows to share the first instructions, for the repeated implementation of the same processing including in an international environment.
[0076] More specifically, with reference to [Fig. 5b] (which shows the KINL Back-Translator block in more detail), the instructions of a KIL program are typically objects that inherit methods from a back-translation object module. These methods produce the natural language text from the properties of the KIL instructions and syntactic descriptions, either language-specific (note the vocabulary block may be common with the KNIL Translator), or common to all languages.
[0077] Final formatting (pretty-printer) allows you to obtain easily readable text (indentations, spaces, punctuation, articles, etc.).
[0078] In a main step (d), said second instructions are executed in a virtual machine implemented by the data processing means 21, denoted KVM Machine.
[0079] The virtual machine makes it possible to interpret the KIL language of the second instructions in a manner that is completely transparent to the user, independently of the hardware. Indeed, since this language is internal, it is not natively executable by the operating system of the second server 1. Communication with the hardware (including the first server 1 and its components) is simply carried out by an object kernel for interface with said database, or Kernel, noted KOK Kernel. More precisely Specifically, the said kernel provides the link between the virtual machine and the operating language, and in practice allows the processing of the database.
[0080] With reference to [Fig. 6], which represents the virtual machine, step (d) advantageously comprises a verification of the validity of the second instructions, in particular in the case of an AST forest (and therefore the verification of the validity of each set of second instructions). Step (d) comprises the execution of the only valid instruction set in said virtual machine. More precisely, there is execution if and only if a single set of second instructions is valid: If none are valid, there is nothing to execute and an error message is returned; If there are several valid games, it means that there are several correct ASTs and therefore an insurmountable problem of ambiguity, and an error message is returned. On the contrary, if there is only one valid set of second instructions, it means that the ambiguity has been resolved, and the second instructions of the only valid set are executed.
[0081] In this respect, step (d) preferably comprises the prior resolution of the identifiers and / or types of the data of said database concerned by the second instructions, i.e. the data of said database involved in the processing to which the first instructions relate. If this is achieved, then the set of second instructions is valid, and if not, it is invalid.
[0082] Identifiers are either variable names, column names, or function names. Identifiers also allow indirection: a variable name that contains an identifier.
[0083] This resolution is called dynamic since it is on the fly: the identifiers do not need to be declared. For this, we can use a block for managing the lexical scopes of variables which allows the dynamic definition of functions (including recursive functions).
[0084] Data types are also determined dynamically, in a known manner. Note that the consistency of the determined identifiers / types can be dynamically checked: If everything is consistent (validity confirmed) we move on to the execution itself (if there is indeed only one set of second valid instructions) If not, either we try to resolve again, or we return an error message (especially if there are no other possible identifiers / types), aimed at guiding the user.
[0085] The execution of the second instructions comprises the triggering of queries in said operating language of said database in accordance with said second instructions, and generally operations on the data obtained using to said queries, so as to accomplish said desired processing. It is understood that such queries are known since said operating language of said database is known. Moreover, these queries are “low level” as opposed to the second instructions which are “high level”.
[0086] Said execution advantageously uses on the one hand external function interfaces (dynamic or static) in particular for a collaborative purpose, and on the other hand a control block defining in practice an order of triggering of said requests, possibly on the basis of management rules (itself for example triggered for each line of a table) and / or an inference engine (in particular in forward chaining) makes it possible to dynamically decide on the order of triggering.
[0087] In a particularly preferred manner, in the case of a second AST expressing the second instructions, the execution of the second instructions is in practice the call of the “eval” method of the root object (SelectNtax_l in [Fig. 4b]), and recursively, the call of the eval method of an object: 1. calls (if necessary) the eval methods of the contained objects. 2. checks the type of the contained objects and possibly sends a message of error. 3. checks the consistency of the request (for example the existence of a column in a table. Here: price in the orders table) and possibly sends a warning or error message. 4. performs the desired processing (here: a selection whose parameters are the results of the evaluations of the contained objects or the contained objects themselves depending on the case). 5. returns the result.
[0088] In the case of a forest of ASTs, the eval method is called for each AST but only executes steps 1 to 3 (dynamic verification of the validity of the AST).
[0089] If no AST is valid, an error is returned.
[0090] If only one AST is valid, we continue the execution of the eval method on this AST (steps 4 and 5).
[0091] If more than one AST is valid, an error is returned.
[0092] The result of the execution of the second instructions in step (d), i.e. the data returned as output, what is called the execution trace, is provided in response, for example displayed by the terminal 10.
[0093] It is understood that said output data relates to the result of said processing of the database. Thus, this makes it possible to formalize the result of the processing of a desired database, for example in the form of a report.
[0094] It is noted that the execution may further comprise the emission of informative messages representative of possible anomalies in the database.
[0095] In addition, [Fig. 7] represents the KOK Kernel. Like any kernel, it provides hardware abstraction mechanisms and facilitates communication between processes. Starting from standardized architectural elements (Definition of the object architecture of the entire code: base classes and common behaviors), the kernel defines: - The data structures of the said database, as well as the elementary manipulations; - Connectors with the said database + the different file formats as well as the character string encodings for reading and writing data files; - Printing routines (terminal, text file, etc. in particular to HTML manager to produce said reports); - A translation utility - All the basic features that are useful from time to time: sending emails, web scraping, accessing the internal clock, etc. - in the upper layer of said kernel, the fundamental classes of evaluable objects: all objects used in the code implementing said method, including the instructions of the virtual machine, are objects whose class inherits from fundamental classes defined in this component.
[0096] According to a preferred embodiment, the method comprises a prior step (aO) of configuring the virtual machine and / or the syntactic analyzer by an external integration module, called KEMI Integrator. The idea is to be able to enrich said method very easily, without modifying the central code. The module is typically connected to other terminals.
[0097] With reference to [Fig. 8], said KEMI Integrator is capable of integrating the functions of external modules by modifying / adding respectively the syntactic description / vocabulary blocks specific to the language of the KNIL translator and the static interface of the virtual machine (The functions are integrated into the virtual machine thanks to dynamic typing and a standardized interface for calling and passing parameters). Note that one can start from prototypes of external modules, allowing the rapid and homogeneous integration of isolated functions or entire modules of functions
[0098] Server
[0099] According to a second aspect, the invention relates to the second server 2 for implementing the method according to the first aspect.
[0100] It comprises data processing means 21, data storage means 22 and is connected to the first server 1 and to the terminal 10.
[0101] The data processing means 21 are configured to: Obtaining from the client terminal 10 first instructions in natural language relating to a desired analytical processing of the data from a database stored on data storage means 12 of the first server 1; Translate said first instructions into an abstract syntax tree; Generate, from said abstract syntax tree, second instructions in an object-oriented programming language distinct from an operating language of said database; Execute said second instructions in a virtual machine implemented in implemented by the data processing means 21 so as to carry out said desired analytical processing, comprising the triggering of queries in said operating language of said database, said virtual machine using an object kernel for interface with said database.
[0102] The means 21 can further be configured to - generate natural language output data relating to the result of said desired analytical processing; and / or - configure the virtual machine and / or a parser for the implementation of step (b) via an external integration module (potentially connected to other terminals).
[0103] According to a third aspect, the invention proposes a system comprising the second server 2, the first server 1, and the terminal 10, connected (in particular via a network 20 such as the Internet, the different equipment being able to be combined).
[0104] Computer program product
[0105] According to a fourth and a fifth aspect, the invention relates to a computer program product comprising code instructions for the execution (on the data processing means 21 of the second server 2) of a method according to the first aspect of execution of first instructions in natural language relating to a desired analytical processing of the data of a database stored on data storage means 12 of a first server (1, as well as storage means readable by computer equipment (for example the data storage means 22 of the second server 2) on which this computer program product is found.
Claims
Claims
1. Method for executing first instructions in natural language relating to a desired analytical processing of data from a database stored on data storage means (12) of a first server (1), characterized in that it comprises the implementation by data processing means (21) of a second server (2): a. Obtaining said first instructions from a client terminal (10); b. Translating said first instructions into an abstract syntax tree; c. Generating, from said abstract syntax tree, second instructions in an object-oriented programming language distinct from an operating language of said database; d.Execution of said second instructions in a virtual machine implemented by the data processing means (21) so as to carry out said desired analytical processing, comprising the triggering of queries on said database in said database operating language, said virtual machine using an object kernel for interface with said database.
2. The method of claim 1, wherein said second instructions are a transcription of the first instructions in said object-oriented programming language.
3. Method according to one of claims 1 and 2, in which step (b) is implemented by a non-deterministic syntactic analyzer.
4. The method of claim 3, wherein said non-deterministic parser uses the Earley algorithm, the CYK algorithm or the GLR algorithm.
5. Method according to one of claims 3 and 4, in which step (b) comprises, if the syntactic analyzer raises an ambiguity of the first instructions, the generation of a plurality of abstract syntactic trees, each being a possible translation of said first instructions, step (c) comprises the generation, from each abstract syntax tree, of a set of second instructions in said object-oriented programming language; and step (d) comprises checking the validity of each set of second instructions, and executing the only valid set of second instructions in said virtual machine.
6. Method according to one of claims 1 to 5, wherein the first instructions are translated in step (b) into a first abstract syntax tree, step (c) comprising the transformation of the first abstract syntax tree into a second abstract syntax tree, said second abstract syntax tree being an object tree of said object-oriented programming language, expressing said second instructions.
7. A method according to one of claims 1 to 6, wherein said object-oriented programming language is derived from Python® or C++, and said database operating language is chosen from Python®, Lisp, SQL or PowerQuery.
8. Method according to one of claims 1 to 7, in which step (d) comprises the prior resolution of the identifiers and / or types of the data of said database concerned by the second instructions, to generate said queries on the database.
9. A method according to one of claims 1 to 8, wherein step (d) comprises providing said client terminal (10) with output data relating to the result of said desired analytical processing.
10. Method according to one of claims 1 to 9, further comprising a prior step (aO) of configuring the virtual machine and / or a syntactic analyzer for the implementation of step (b) by an external integration module.
11. Server (2), called second server, characterized in that it comprises data processing means (21) configured to: - Obtain from a client terminal (10) first instructions in natural language relating to a desired analytical processing of the data of a database stored on data storage means (12) of a first server (1); - Translate said first instructions into an abstract syntax tree; - Generate, from said abstract syntax tree, second instructions in an object-oriented programming language distinct from an operating language of said database; - Executing said second instructions in a virtual machine implemented by the data processing means (21) so as to carry out said desired analytical processing, comprising the triggering of queries in said operating language of said database, said virtual machine using an object kernel for interface with said database.
12. System comprising the second server (2) according to claim 11, said first server (1) and the terminal (10) connected.
13. Computer program product comprising code instructions for executing a method according to one of claims 1 to 10 for executing first natural language instructions relating to a desired analytical processing of data from a database stored on data storage means (12) of a first server (1), when said program is executed on a computer.
14. Storage means readable by computer equipment on which is recorded a computer program product comprising code instructions for the execution of a method according to one of claims 1 to 10 of execution of first instructions in natural language relating to a desired analytical processing of the data of a database stored on data storage means (12) of a first server (1).