Method and computer program for automatically generating communication interfaces in algorithms from the field of artificial intelligence
Patent Information
- Application Number
- EP2023719674
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-04-29
- Filing Date
- 2023-04-12
- Publication Date
- 2025-01-15
AI Technical Summary
Existing AI algorithm development tools, such as Jupyter Notebooks, are inadequate for converting algorithms into customer-ready products due to the lack of technology-agnostic interfaces and the inability to hide source code, requiring manual reworking and deep understanding of communication interfaces, typically handled by software developers.
A method and computer program that uses semantic annotations to automatically generate communication interfaces, allowing AI algorithms to be integrated into customer applications and processes without exposing the source code, by analyzing the source text, generating APIs like REST interfaces, and embedding them into a computer program product.
Simplifies the development of AI algorithms into customer-ready products, eliminating the need for manual reworking and specialized software developers, enabling direct integration into applications and processes while maintaining intellectual property security, and allowing for incremental production and reusability of AI algorithms.
Smart Images

Figure 1.1
Abstract
Description
[0001]202208051 Subsequent application version Description Method and computer program for the automated generation of communication interfaces in algorithms from the field of artificial intelligence The invention relates to a method and a computer program for producing a further computer program product starting from a source code of artificial intelligence algorithms. Specialized software tools have become known for developing algorithms and methods from the field of artificial intelligence. These software tools, such as "Jupyter Notebooks" (see also https: / / jupyter.org / ), are suitable for supporting the iterative and exploratory work of so-called data scientists during the development of artificial intelligence algorithms. However, they are not suitable for converting the developed algorithms and methods into products that can be delivered to customers, since, on the one hand, these software tools do notOffer the possibility of providing technology-agnostic interfaces with which the algorithms and methods can be directly integrated into customer applications and processes. Secondly, the source code of the algorithms and methods cannot be hidden from the customer. It has therefore been common practice to date to rework the source code of the prototype implementation in order to obtain a product that can be used by the customer. First, all source code dependencies on the aforementioned software tools are removed and communication interfaces, such as so-called "REST" interfaces, are added to the source code, with which the algorithms and methods can be accessed via networks as so-called APIs (Application Programming Interfaces). The algorithms and methods can then be made available to the customer for execution via the added communication interfaces, e.g., for accessingvia the Internet. The customer can thus initiate the execution of the algorithms and methods via these interfaces and consume the results, but has no way of viewing the underlying source code. Creating and adding the communication interfaces requires a deep understanding of the communication interfaces themselves as well as the resulting implications, such as the validation of inputs received over a network. Therefore, software developers typically undertake the described transfer of the prototype implementation by data scientists into a product usable by customers. The invention is based on the object of simplifying the development of products with algorithms and methods from the field of artificial intelligence that can be directly integrated into any customer applications and processes. This object is achieved by the subject matter of the independent patent claims.Further developments and refinements of the invention are found in the features of the dependent patent claims. A method according to the invention for producing a computer program product starting from a source code of artificial intelligence algorithms comprises the following method steps: a. Providing a library of semantic annotations, comprising: - semantic annotations for marking source code constructs of the source code of artificial intelligence algorithms; 202208051 Subsequent application version - logic sequences uniquely linked to the semantic annotations for generating communication interfaces and for embedding marked source code constructs in the computer program product to be produced; b. Providing a source code analysis component for analyzing the source code for the presence of the semantic annotations in the source code; c. Providing a communication interface generator for generating at least oneCommunication interface; d. Analyzing the source code using the source code analysis component for the presence of semantic annotations in the source code and passing the logic sequences from the library, which are uniquely linked to the existing semantic annotations in the source code, to the communication interface generator; e. Reading the transferred logic sequences, which are uniquely linked to the existing semantic annotations in the source code, by the communication interface generator, and f. Generating communication interfaces using the communication interface generator based on the read logic sequences; g. Embedding the generated communication interfaces in the computer program product to be produced. The method according to the invention is a computer-implemented method. At least one semantic annotation is present in the source code if at least one source code construct of the source codeArtificial intelligence algorithms are marked with at least one semantic annotation. During the analysis of the source code according to method step d., it is therefore analyzed whether at least one source code construct of the source code is provided with a semantic annotation from the library. If at least one semantic annotation is present in the source code, the logic flow from the library, which is uniquely linked to the at least one semantic annotation present in the source code, is transferred to the communication interface generator according to method step d. This at least one transferred logic flow is read out by the communication interface generator according to method step e., and then at least one communication interface is generated by the communication interface generator on the basis of this at least one read out logic flow according to method step f. This at least one generatedThe communication interface is then embedded in the computer program product to be produced according to method step h. The communication interfaces embedded in the produced computer program product serve to call the source code constructs marked with the semantic annotations and thus to call the artificial intelligence algorithms represented by the marked source code constructs. According to the invention, a source code provided with semantic annotations, i.e. a source code with at least one source code construct marked with at least one semantic annotation from the library of semantic annotations, is used as input and a computer program product, in particular an API product, is generated therefrom, in particular dynamically at runtime. A computer program product produced in this way comprises communication interfaces for embedding the artificial intelligence algorithms of the source code, comprising theArtificial intelligence algorithms in applications or processes. The method is used in the development of the 202208051 subsequent application version applications or processes for the automated generation of the communication interfaces and for the embedding of the artificial intelligence algorithms called by the communication interfaces in the generated computer program product. A computer program product according to the invention for producing a further computer program product comprises instructions which, when the program is executed by a suitable computer, cause the computer to execute the method according to the invention. The computer for executing the computer program product according to the invention can be a terminal device or a server. Computer program products can also be referred to simply as computer programs. In the context of the invention, "producing" can also be synonymously referred to as "creating" or "generating". The method thus effectsthe creation of a computer program product based on a source code of artificial intelligence algorithms. The corresponding computer program product according to the invention serves analogously to create a further computer program product. The “further” computer program product in this sense thus refers to the computer program product produced or created when carrying out the method according to the invention. For better differentiation, the term “computer program” is used below when the computer program product is used to produce or create the (further) computer program product to be produced or to be produced. The computer program product produced or created by means of this computer program when carrying out the method according to the invention is referred to as a computer program product. “Other” computer program products are third-party computer program products which, for example, are based on theAccess communication interfaces of the generated computer program product. The source code is read in by the computer program according to the invention to produce a computer program product and, according to one embodiment of the invention, is also executed. During the execution of the method according to the invention, the source code remains untouched. No lines of code relating in particular to the communication interfaces are added and written into the source code. Rather, the semantic annotations serve as a type of jump mark, which can be referenced with the generated communication interfaces and the marked source code constructs can be addressed. At the start of the method, no communication interfaces may yet be defined in the source code. After completion of the method, all communication interfaces to the source code constructs marked with semantic annotations in a computer program product can be made available to a user.The computer program according to the invention comprises in particular - a library of semantic annotations comprising - semantic annotations for marking source text constructs of the source text of artificial intelligence algorithms; - logic sequences uniquely linked to the semantic annotations for generating communication interfaces and for embedding the marked source text constructs in the computer program product to be produced; - a source text analysis component, suitably designed 202208051 post-application version - for analyzing the source text for the presence of the semantic annotations in the source text; - for transferring the at least one logic sequence from the library, which is uniquely linked to the at least one existing semantic annotation in the source text, to the communication interface generator - a communication interface generator, suitably designed - for reading out the at least onetransferred logic flow linked to the at least one existing semantic annotation in the source code; - for generating at least one communication interface based on the read-out logic flow. It can furthermore be suitably designed - for embedding the at least one generated communication interface into the computer program product to be produced. Preferably, according to method step f., the at least one communication interface is generated as a standardized programming interface, Application Programming Interface (API for short), for example as a "REST" interface, by means of the communication interface generator and embedded according to method step g. into the computer program product, which is optionally provided according to method step h. The communication interface generator is suitably designed accordingly. The provided library of semantic annotations comprises at least onesemantic annotation and at least one logical flow uniquely linked to the at least one semantic annotation. In particular, the provided library of semantic annotations comprises any and any number of semantic annotations and logic flows uniquely linked to each of these. Thus, each semantic annotation has a uniquely linked logic flow. For the sake of clarity, the plural is used below in connection with the at least one semantic annotation and the at least one logic flow uniquely linked to it. Semantic annotations are predefined markers with which certain parts of the source code, the so-called source code constructs, in particular certain functions and function parameters or input or output variables or results of the algorithms of artificial intelligence, are marked or, in particular, subsequentlycan be marked. Accordingly, they can also be referred to as semantic source code annotations. Each of these markings is associated with a predefined logic flow that specifies when and how the marked source code constructs are called. Each logic flow thus comprises a predefined rule for generating a communication interface and thus for further processing, in particular for executing and embedding the source code constructs of the artificial intelligence algorithms marked with the semantic annotations in the generated computer program product. The semantic annotations and the logic flows associated with them serve two different purposes: Firstly, they indicate for which parts of the source code communication interfaces, in particular APIs, should be generated. Secondly, they indicate which information should be exchanged as requests and responses via these communication interfaces. 202208051Post-registration version Semantic annotations conceal all technical details of the communication interfaces to be generated: The respective source code markers only capture the semantic meaning of the annotated source code constructs and do not allow any conclusions to be drawn about the communication interfaces to be generated. In addition to the library, the method provides a source code analysis component for analyzing the source code for the presence of semantic annotations from the library in the source code, as well as a communication interface generator for generating at least one communication interface. The source code analysis component is responsible for accessing the library. This component examines the source code passed to it for the presence of markers with the semantic annotations stored in the library. For this purpose, the source code can first be scanned for markers with semantic annotations.searched and compared with the semantic annotations stored in the library. This can also be referred to as capturing semantic annotations in the source code and recognizing the semantic annotations provided in the library. The logic sequences assigned to the recognized semantic annotations and clearly linked to them are then transferred from the library to the communication interface generator. The communication interface generator then generates all required communication interfaces based on and thus according to the specifications of these logic sequences. For this purpose, the information from the logic sequences is read and processed according to a predefined algorithm. The logic sequences each contain all sufficient specifications and parameters to be able to generate a communication interface. 202208051 Post-registration version Finally, the generated communication interfaces arethe computer program product is embedded. This is done according to a first development by means of a communication interface provision component. The generated computer program product is further provided by means of the communication interface provision component in order to be able to access the generated communication interfaces and, via these, the artificial intelligence algorithms, in particular via a network. The communication interface provision component is responsible for making the generated communication interfaces accessible via a network and thus enables access to the source code constructs marked with the semantic annotations. The method comprises, according to the mentioned development - at least the following method step in method step f. above: o Providing a communication interface provision component; - in method step f. the followingAdditional feature: o Transferring the generated communication interfaces to the communication interface provision component; - wherein method step g. comprises: g. Embedding the transferred communication interfaces into the computer program product by the communication interface provision component; - following method step g.: 202208051 Post-application version h. Providing the generated computer program product comprising the at least one generated communication interface by the communication interface provision component. A further developed computer program for producing a computer program product accordingly comprises a communication interface provision component, which is suitably designed to provide the generated computer program product by the communication interface provision component, wherein the communication interface generator is subsequently suitably designedfor transferring the generated computer program product to the communication interface provision component. All communication interfaces generated by the communication interface generator are transferred to the communication interface provision component and embedded in the computer program product, for example, a web application, so that the entirety of all communication interfaces in a computer program product is made available for access by a user. Thus, the generated communication interfaces are also made available for access by other computer program products, such as applications or processes. The communication interface provision component is designed accordingly to embed the transferred communication interfaces in the computer program product and to provide the computer program product. The generated computer program product is further developed as a web application.A web application (web application or web app for short) is an application program that is stored on a remote server and made available over the Internet via a browser interface. The communication interface provision component (202208051 post-registration version) is accordingly suitable for making the generated computer program product available via a browser interface. A further development of the method according to the invention consists in that at least method step d is preceded by: - Marking of at least one source text construct of the source text with at least one semantic annotation from the library. This method step can, of course, already precede method step a. The marking of the source text with semantic annotations according to the library can be done manually, for example by a data scientist. When creating the source text or subsequently, i.e. after creating the source text, selectedSource code constructs relating to specific artificial intelligence algorithms are annotated, i.e., marked with semantic annotations according to the library, whereby the input or output of values to or from the algorithms is determined by predefined logic sequences that are clearly linked to the semantic annotations. The developer of the algorithms, in particular the data scientist, knows best about the algorithms and how they are to be called. However, they do not have to worry about the specific design of the communication interfaces for calling the algorithms. This is done automatically by the computer program according to the invention. A further advantage of the invention is that no additional, specialized software developer is required to create and configure the communication interfaces. Process step a. can be preceded by: 202208051 Post-application version -Providing a source text with artificial intelligence algorithms comprising at least one semantic annotation of at least one source text construct of the source text; - Providing an input interface for reading the source text and for transferring the source text to the source text analysis component; - Transferring the source text read in through the input interface to the source text analysis component. The computer program for producing a computer program product can accordingly have an input interface which is designed to: - Read in the source text of artificial intelligence algorithms comprising the semantic annotations for marking source text constructs of the source text of artificial intelligence algorithms in the source text; - Transferring the read source text to the source text analysis component. According to a further development, the library ofsemantic annotations, at least one configuration template which is uniquely linked to at least one logic flow and which comprises definitions of configuration parameters for modifying at least the configuration parameters of the logic flow, wherein method step d. comprises: d. analyzing the source code using the source code analysis component for the presence of semantic annotations in the source code and transferring the logic flows from the 202208051 post-registration version library which are uniquely linked to the existing semantic annotations in the source code, and transferring the configuration templates from the library which are uniquely linked to the transferred logic flows to the communication interface generator; and wherein method step e. comprises: e. reading out the transferred logic flows which are uniquely linked to the existing semantic annotations in the source code by theCommunication interface generator and reading the transferred configuration templates, which are uniquely linked to the transferred logic sequences, by the communication interface generator; wherein method step e. follows and method step f. precedes: ee. Generation of configuration interfaces by means of the communication interface generator on the basis of the read logic sequences and on the basis of the read configuration templates, which are uniquely linked to the read logic sequences, and provision of the generated configuration interfaces for modifying at least the configuration parameters of the logic sequences. The generation and provision of at least one configuration interface for configuring the configuration parameters of the at least one transferred logic sequence by means of the communication interface generator on the basis of the at least one read logic sequence and on the basis of the at least oneThe read-out configuration template serves, in particular, to dynamically modify the configuration parameters of the read-out logic flow that is uniquely linked to the read-out 202208051 post-registration version configuration template at runtime. A modification can include a change or adaptation as well as, where appropriate, an extension, deletion or addition to the configuration parameters of the logic flows. The modification can be carried out manually by a user or automated via the configuration interface by other computer program products. For this purpose, the configuration parameters of the read-out logic flow that is uniquely linked to the read-out configuration template can be read out via the provided configuration interface and made available to the user for manual modification, for example via a web application, in particular displayed on a screen, for example in aRepresentation of a form. The modifications are determined, for example, by changing predefined values. The modifications made, for example, by the user or another computer program product, are recorded and transmitted to the communication interface generator via the configuration interface. The modifications transferred via the configuration interface are read by the communication interface generator, and the logic flow read from the library is modified by the communication interface generator based on the read modifications. The communication interface generator now contains a logic flow which, compared to the original logic flow from the library, can have modified configuration parameters. 202208051 Post-registration version Subsequently, based on the modified logic flow, the communication interfaces are configured using theCommunication interface generator. According to a further development of the invention, method step ee. therefore further comprises: ee. Receiving modifications of at least one configuration parameter of the at least one read-out logic sequence by the communication interface generator via the configuration interface and modifying the at least one configuration parameter of the at least one read-out logic sequence by the communication interface generator. And method step f. further comprises: f. Generating at least one communication interface by means of the communication interface generator on the basis of the at least one read-out and modified logic sequence. Before generating the communication interfaces, respective communication interfaces can thus be generated and provided, and the logic sequences can be modified via these. Modifications to the logic sequences can alsothe subsequently generated and provided communication interfaces are modified. A generated communication interface can no longer be modified externally. Only internal processes, such as a running counter, can adapt parameters. The computer program product generated according to the invention comprises all communication interfaces, but according to one embodiment is provided without configuration interfaces. API products can thus be made available to a user "as a service" without having to configure them themselves. Embedding the generated configuration interface in the computer program product is not necessary. The logic processes from the library can be pre-assigned with default values, so that communication interfaces can be generated and provided even without modifications. The configuration of the parameters is advantageously carried out during runtime of theinventive method or at runtime of the computer program product according to the invention. The generation of the communication interface and, if applicable, the configuration interface according to the corresponding method steps preferably takes place at runtime of the inventive method or at runtime of the inventive computer program. All other method steps, such as analyzing the source code or embedding the generated communication interfaces in the computer program product, also take place, in particular, at runtime of the inventive computer program. According to a further development of the invention, the library of, if appropriate, any desired and / or any desired number of semantic annotations can be expanded. This can also take place at runtime of the method, but in any case before method step d. Accordingly, method step d. can be preceded by: - Providing an input interface forExtension, deletion, or modification of contents of the provided library of semantic annotations; 202208051 Post-registration version - Extension, deletion, or modification of contents of the provided library of semantic annotations. Extension, deletion, or modification, in particular additions or adaptations, of the contents of the provided library of semantic annotations thus includes extension, deletion, or modification, in particular additions or adaptations, of the semantic annotations, i.e., the expressions for marking the source code constructs as such, the logic flows uniquely linked to the semantic annotations, and, if applicable, the configuration templates uniquely linked to the logic flows. For this purpose, the contents of the library of semantic annotations can be read out via the provided input interface and made available to the user for manual extension, deletion, or modification, for example, viaa web application, in particular on a screen. The extensions, deletions or changes made, for example, by the user or another computer program product are recorded and written back to the library via the input interface. With the input interface, the source code, in particular read in via the input interface, can also be extended, deleted or changed, in particular semantic annotations of source code constructs can be added, deleted or adapted. The input interface is suitably designed accordingly. A further developed computer program for producing a computer program product accordingly comprises an input interface for extending, deleting or changing, in particular adding to or adapting the contents of the provided library and / or for marking at least one source code construct of the source code withat least one semantic annotation from the library. The generated communication interfaces make it possible to transfer inputs, e.g., values, to the artificial intelligence algorithms, for example, via or from a network, or to output corresponding values from the artificial intelligence algorithms, for example, via a network. In this case, the source code constructs of the artificial intelligence algorithms of the source code marked with the semantic annotations from the library each describe at least one algorithm for regulating, controlling, or diagnosing technical devices or systems. Accordingly, the at least one generated and provided communication interface serves to embed, for example, for execution and access via a network, the at least one source code construct of the artificial intelligence algorithms marked with the at least one semantic annotation.of the source code comprising the artificial intelligence algorithms for the regulation, control, diagnosis or monitoring and / or simulation of technical devices, such as machines or systems. The provided source code of artificial intelligence algorithms comprising at least one semantic annotation of at least one source code construct is further developed and initially transferred to the source code analysis component via an input interface. A correspondingly developed computer program comprises an input interface for reading in the source code and for transferring the source code to the source code analysis component. 202208051 Post-registration version The input interface is suitably designed for reading in a source code of artificial intelligence algorithms comprising semantic annotations as expressions for marking source code constructs of the source code of artificial intelligence algorithms in the source code. In addition, theInput interface suitably designed for transferring the source code to the source code analysis component. The invention has many advantages. For example, prototype-implemented algorithms and methods from the field of artificial intelligence can be easily and cost-effectively converted into products that can be directly integrated into any customer application and process, without, however, granting the customer direct access to the intellectual property of the algorithms and methods. Various aspects of the present invention contribute to significantly increased cost efficiency in the production of algorithms and methods from the field of artificial intelligence: Self-service offering for data scientists: The relevant parts of the source code of algorithms and methods from the field of artificial intelligence remain almost completely untouched, instead of being completely reworked as has been the case up to now.Semantic annotations are a very simple concept that can also be applied directly by data scientists themselves. This eliminates the need for software developers to be involved in production, as is required with comparable approaches. This saves significant time, as no one other than the original authors needs to familiarize themselves with the source code. The coordination effort between data scientists and software developers is also eliminated. 202208051 Post-registration version Incremental production of existing source code: Semantic annotations can be added gradually to generate additional communication interfaces as needed. All parts of the source code that are not annotated are initially ignored. In this way, incremental production of existing source code is very easy. The communication interfaces can be easily modified by simply omitting or adding semantic annotations.controlled. The resulting API product can thus be ideally tailored to the user's requirements. Reusability of the generated API products in different contexts: The semantic annotations can be configured with parameters as needed. This configuration only takes place at runtime of the API product via a dedicated configuration interface. This allows the same source code to be used in different application contexts, e.g., for different users and / or projects, since it can be dynamically adapted to the respective requirements during execution. Extensibility: The library of semantic annotations used by the invention can also be supplemented with any additional annotations. This makes API products created with the present invention particularly easy to maintain, as new functions can be easily added as needed.can be added. This extension mechanism also allows the present invention to be used in other application areas outside of the productive use of algorithms and methods of artificial intelligence, if suitable semantic annotations are created for this purpose. Since the source code markers of the semantic annotations do not contain any information about the communication interfaces to be created, their 202208051 post-application version also makes it possible to map already annotated source code to other communication interfaces at a later date. This increases the future viability and flexibility of the API products created with the present invention, since any technology migrations can be carried out later without the involvement of the original authors. The generated computer program product represents the direct method product according to the method according to the invention, as well as theProduct produced using the computer program according to the invention for producing another computer program product. It can be stored on a data carrier. The invention permits numerous embodiments. It is explained in more detail with reference to the following figure, which illustrates an exemplary embodiment. The figure schematically shows an overview of the invention. A library 1 with any desired number of semantic annotations SA1…SA n (where n is a natural number greater than 1) is provided. Each of the semantic annotations SA1… SA n represents an expression for marking a source code construct of a source code with artificial intelligence algorithms. With each of the semantic annotations SA1… SA n clearly linked – shown here under the same entry in the library – are a configuration template KV1… KV n and a logic sequence LA1… LA n, into which the annotated source code construct is embedded at runtime. In addition, a source code analysis component 2, a communication interface generator 3, and a communication interface provision component 4 are provided. The arrows between the modules indicate their connections to one another. According to the arrow from library 1 to source code analysis component 2, source code analysis component 2 uses the library. Analogously, source code analysis component 2 uses communication interface provision component 4 and communication interface generator 3, which is illustrated by the corresponding arrows between the aforementioned modules. Likewise, communication interface generator 3 is used by communication interface provision component 4.The semantic annotations provided as expressions in library 1 are used to mark source code constructs of artificial intelligence algorithms. This source code is read in and analyzed for the presence of corresponding semantic annotations from the library using source code analysis component 2. If source code constructs marked with semantic annotations from the library are identified in the source code, communication interfaces are generated using communication interface generator 3 based on the logic flows uniquely linked to the identified semantic annotations and are provided using communication interface provision component 4. This will be outlined in more detail below using a highly simplified example implementation.202208051 Post-registration version First, a source code with artificial intelligence algorithms is generated, for example by a data scientist, whose algorithms are then transferred into an API product. Here is a source code with two functions in the Python programming language: def training_alorithm() step1() step2() def prediction_algorithm() step1() step2() During or after creating the algorithm, the data scientist adds two semantic annotations @Training and @InteractivePrediction to mark that the training_algorithm() function is for training an analytical model and the prediction_algorithm() function is for interactively generating predictions using the model. In this or the next step, they add declarative type definitions for the information exchange between the API and the user.These are also provided with the appropriate annotations @TrainingData, @PredictionRequest, @PredictionResponse to indicate when which information should be requested from the user and how the API product should respond. The source code now reads as follows: @Training def training_alorithm(data) step1() step2() @InteractivePrediction def prediction_algorithm(data) 202208051 Post-registration version step1() step2() @TrainingData def TrainInput: observations: List[float] @PredictionRequest class Input: parameter1: str parameter1: str @PredictionResult class Output: result: str The source code is then executed. Based on all of the inserted semantic annotations, communication interfaces for training and prediction are automatically generated when the annotated source code is executed. These interfaces allow the user to access the two annotated functions via a network.In addition, further standardized interfaces are generated with which the API product can be dynamically configured and its lifecycle monitored. For each semantic annotation, the following information is recorded in the example: i. Marker to be used in the source code; ^ Example: @InteractivePrediction, to mark a prediction function; ii. Logic flow into which the annotated source code construct is embedded at runtime; ^ Example: Logic flow into which a prediction function annotated with @InteractivePrediction is embedded: ^ Validation of the user request, 202208051 post-registration version ^ Execution of the annotated prediction function, ^ Persistent storage of the prediction result to enable later traceability, ^ Sending the prediction result as a response to the user; iii.Configuration template containing the definitions of all configuration parameters with which the logic flow can be dynamically modified at runtime depending on requirements; ^ Example: In order to adapt the API product to specific needs, for example, a prediction function annotated with @InteractivePrediction can be specified as to how often the user may call it within a certain period of time. This example implementation of the invention is written in the Python programming language. It is suitable for generating API products from Python source code that has been created with any commercially available Python library in the field of data analysis and artificial intelligence. This covers the relevant use cases in the field of data analysis and artificial intelligence. The semantic annotations are implemented using so-called Python decorators.The following types of semantic annotations are currently available: - Definition of communication interfaces: o User-defined initialization of the API product o Training of analytical models o Interactive generation of predictions o Asynchronous generation of predictions o Starting batch processing jobs o Starting data stream processing jobs 202208051 Post-registration version o Processing of customer feedback on previously made predictions - Definition of information to be exchanged: o Definition of the schema of general configuration parameters o Definition of the schema of requests for predictions o Definition of the schema of responses to requests for predictions o Definition of the schema of hyperparameters for analytical models o Definition of the schema of training data for analytical models o Definition of the schema of user feedback on previously made predictions REST, for example, is used as a communication interface.These interfaces follow the OpenAPI standard and are therefore self-describing. Using publicly available source code generators, users can integrate the resulting API products into numerous applications and processes.
Claims
202208051 Subsequent filing version of patent claims 1. Computer-implemented method for producing a computer program product starting from a source code of artificial intelligence algorithms with at least one source code construct marked with at least one semantic annotation, comprising the following method steps: a. Providing a library (1) of semantic annotations, comprising: - semantic annotations (SA1… SA n ) for marking source code constructs of the source code of artificial intelligence algorithms; - with the semantic annotations (SA1… SA n ) uniquely linked logic sequences (LA1… LA n ) for generating communication interfaces and embedding marked source code constructs; b. providing a source code analysis component (2) for analyzing the source code for the presence of the semantic annotations (SA1… SA n) in the source code; c. Providing a communication interface generator (3) for generating at least one communication interface; d. Analyzing the source code using the source code analysis component (2) for the presence of at least one semantic annotation (SA1… SA) n ) in the source code and passing the at least one logic sequence from the library (1) that corresponds to the at least one existing semantic annotation (SA1… SA n ) is uniquely linked in the source code to the communication interface generator (3); 202208051 Subsequent registration version e. Reading of the at least one transferred, with the at least one existing semantic annotation (SA1… SA n ) linked logic sequence in the source code (LA1… LA n) by the communication interface generator (3) and f. generating at least one communication interface using the communication interface generator (3) based on the at least one read-out logic sequence (LA1… LA n ); g. Embedding the at least one generated communication interface in the computer program product.
2. Method according to claim 1, characterized in that the method step a. is preceded by: - Marking at least one source code construct in the source code of the artificial intelligence algorithms with at least one semantic annotation (SA1… SA n) from the library (1) of semantic annotations.
3. Method according to one of claims 1 or 2, characterized in that it additionally comprises the following method steps, which precede method step e.: cc. Provisioning a communication interface provisioning component (4); wherein in method step f. the at least one communication interface generated by the communication interface generator (3) is transferred to the communication interface provisioning component (4), 202208051 Subsequent application, wherein process step g. is executed by the communication interface provisioning component (4), and wherein process step g. is followed by: h. Provisioning of the generated computer program product by the communication interface provisioning component (4).
4. Method according to one of claims 1 to 3, characterized in that the library (1) of semantic annotations provided according to process step a. contains at least one with at least one logic sequence (LA1… LA n ) uniquely linked configuration template (KV1… KV n ) includes the definitions of configuration parameters for modifying the logic flow (LA1… LA n ) includes, where the procedural steps d. and e. additionally include: d. Passing at least one configuration template (KV1… KV n ) from the library (1) which contains at least one passed logic sequence (LA1… LA n) is uniquely linked to the communication interface generator (3); e. Reading the at least one passed logic sequence (LA1… LA) with the at least one passed logic sequence (LA1… LA n ) uniquely linked configuration template (KV1… KV n ) by the communication interface generator (3); wherein process step e. is followed by and process step f. is preceded by: ee. Generating at least one configuration interface using the communication interface generator (3) based on the at least one read-out logic sequence (LA1… LA n ) and based on at least one read configuration template (KV1… 202208051 Late registration version KV n ) and providing the at least one generated configuration interface for modifying the at least one read logic sequence (LA1… LA n5. Method according to claim 4, characterized in that method step ee. additionally comprises: ee. Receiving at least one modification of the at least one read-out logic sequence (LA1… LA n ) via the configuration interface and modifying at least one read logic sequence (LA1… LA n ) by the communication interface generator (3); wherein process step f. comprises: f. Generating at least one communication interface using the communication interface generator (3) based on the at least one modified logic sequence (LA1… LA n6. A method according to any one of claims 1 to 5, characterized in that, according to method step f., the at least one communication interface is generated as an Application Programming Interface using the communication interface generator (3).
7. A method according to any one of claims 1 to 6, characterized in that method step d. is preceded by: - providing an input interface for receiving input for extending, deleting, or modifying contents of the provided library (1) of semantic annotations; - extending, deleting, or modifying contents of the provided library of 202208051 Subsequent registration version semantic annotations (SA1… SA n ) based on the input.
8. Method according to one of claims 1 to 7, characterized in that the at least one is annotated with a semantic annotation (SA1… SA n) Source code construct of the source code of the artificial intelligence algorithms marked from the library (1) comprises at least one algorithm for regulating, controlling, diagnosing, monitoring, or simulating technical devices or systems.
9. Computer program for producing a computer program product comprising instructions which, when the program is executed by a suitable computer, cause it to execute the method according to any one of claims 1 to 8.
10. Computer program according to claim 9, characterized in that it comprises: - a library (1) of semantic annotations comprising - semantic annotations (SA1… SA n ) for marking source code constructs of an artificial intelligence algorithm's source code; - with the semantic annotations (SA1… SA n ) uniquely linked logic sequences (LA1… LA n) for generating communication interfaces and embedding the marked source code constructs; - a source code analysis component (2), suitably designed - for analyzing the source code for the presence of semantic annotations (SA1… SA n ) from the library (1) in the source code; 202208051 Subsequent registration version - for the transfer of at least one logic sequence (LA1… LA n ) from the library (1), which has at least one existing semantic annotation (SA1… SA n ) is uniquely linked in the source code, to a communication interface generator (3) - a communication interface generator (3), suitably configured - for reading at least one passed, with at least one existing semantic annotation (SA1… SA n ) linked logic sequence in the source code (LA1… LA n ); - to generate at least one communication interface based on at least one read-out logic sequence (LA1… LAn ); - for transferring at least one generated communication interface to a communication interface provisioning component (4); - a communication interface provisioning component (4), suitably configured - for embedding the at least one generated communication interface in the computer program product.
11. Computer program according to one of claims 9 or 10, characterized in that it comprises an input interface which is suitably configured for: - reading in a source code of artificial intelligence algorithms comprising at least one semantic annotation (SA1… SA n ) to mark at least one source code construct of the source code of artificial intelligence algorithms in the source code; 202208051 Subsequent registration version - Transferring the read source code to a source code analysis component (2).
12. Computer program according to one of claims 9 to 11, comprising an input interface for receiving input for extending, deleting, or modifying the contents of the provided library (1) of semantic annotations and / or for marking at least one source code construct of the source code with at least one semantic annotation (SA1… SA n ) from the library (1).
13. Data carrier on which the computer program according to any one of claims 9 to 12 is stored.
14. Computer program product manufactured by a method according to any one of claims 1 to 8.
15. Data carrier on which the computer program product according to claim 14 is stored.