Method and system for performing automated database updates
To perform automated database updates, a text document is processed by a natural language processing engine, by way of tagging, by a pre-trained general named entity recognition annotation model and/or at least one domain-specific named entity recognition component, tokens in the text document with named entity recognition annotations. A neural network model processing the tokens and the named entity recognition annotations extracts a database update action from the text document and stores the database update action as structured data in a machine-readable form, which is then sent to a robotic process automation interface and executed by updating a database. This provides an extensible neural architecture for extracting and executing operational actions from text documents. Combining the use of annotated data with a neural network model is more flexible because it allows variations in the exact formulation which is used in the text document to express the database update action.
1 . A computer implemented method for performing automated database updates, wherein the following operations are performed by components, and wherein the components are hardware components and/or software components executed by one or more processors:
receiving, by a network interface, a text document, wherein the text document describes at least one database update action in natural language, and wherein the text document contains at least one anchor, wherein the anchor is a token denoting an entity in the database that the database update action is related to;
processing, by a natural language processing engine, the text document, by way of: tagging, by a pre-trained general named entity recognition annotation model and/or at least one domain-specific named entity recognition component, tokens in the text document with named entity recognition annotations, wherein the named entity recognition annotations include at least one anchor annotation tagging the anchor and at least one action type annotation specifying a type of the database update action;
extracting, by a neural network model processing the tokens and the named entity recognition annotations, the database update action from the text document, wherein the neural network model receives as input for each token in the text document: a word embedding encoding a meaning of the token, a tag embedding encoding an entity which the token denotes, wherein the tag embedding is based on the named entity recognition annotations, and a spatial encoding representing how far the token is from the anchor in the text document, measured in a number of tokens, and wherein the neural network model comprises: a first prediction head trained for performing an action type prediction predicting an action type for the anchor by performing a multilabel prediction task with a set number of labels, and a second prediction head trained for predicting a location of a phrase relating to the anchor, wherein the first and second prediction heads make predictions from a shared document representation generated by a single-layer long short-term memory network;
storing the database update action as structured data in a machine-readable form; wherein the predicted action type and the anchor are included in the structured data in order to define the database update action;
sending the structured data to a robotic process automation interface; and
executing the database update action, by the robotic process automation interface, wherein the robotic process automation interface receives the structured data containing the database update action in machine-readable form and executes the database update action in the database to automatically update a database.
2 . The method according to claim 1 ,
wherein the at least one domain-specific named entity recognition component recognizes and tags tokens in the text document using regular expressions or pre-trained statistical NER models.
3 . The method according to claim 1 ,
wherein the neural network model computes a confidence value for the database update action; and
wherein the structured data is sent to the robotic process automation interface only if the confidence value exceeds a given threshold.
4 . The method according to claim 1 ,
wherein the neural network model has a third prediction head, trained for predicting a third information relating to the anchor; and
wherein the third information is included in the structured data to further define the database update action.
5 . The method according to claim 1 ,
wherein the text document contains several anchors; and
wherein a database update action is extracted and executed for each anchor.
6 . A non-transitory computer program product, comprising a computer readable hardware storage device having computer readable program code stored therein, said program code executable by a processor of a computer system to implement a method according to claim 1 .
7 . A provisioning device for the computer program product according to claim 6 , wherein the provisioning device is a computer-readable storage medium that stores the computer program product and is configured for a direct connection to a computer system to enable loading and execution of the computer program product.
8 . A system for performing automated database updates, comprising: a network interface, configured for receiving a text document, wherein the text document describes at least one database update action in natural language, and wherein the text document contains at least one anchor, wherein the anchor is a token denoting an entity in the database that the database update action is related to;
a natural language processing engine, configured for processing the text document with:
a pre-trained general named entity recognition annotation model and/or at least one domain-specific named entity recognition component, configured for tagging tokens in the text document with named entity recognition annotations, wherein the named entity recognition annotations include at least one anchor annotation tagging the anchor and at least one action type annotation specifying a type of the database update action,
a neural network model, trained for extracting the database update action from the text document, by processing the tokens and the named entity recognition annotations, wherein the neural network model is configured to receive as input for each token in the text document: a word embedding encoding a meaning of the token, a tag embedding encoding an entity which the token denotes, wherein the tag embedding is based on the named entity recognition annotations, and a spatial encoding representing how far the token is from the anchor in the text document, measured in a number of tokens, and wherein the neural network model comprises: a first prediction head trained for performing an action type prediction predicting an action type for the anchor by performing a multilabel prediction task with a set number of labels, and a second prediction head trained for predicting a location of a phrase relating to the anchor, wherein the first and second prediction heads are configured to make predictions from a shared document representation generated by a single-layer long short-term memory network, and
a memory, accessible for storing the database update action as structured data in a machine-readable form; wherein the predicted action type and the anchor are included in the structured data in order to define the database update action; and
a robotic process automation interface, configured for receiving the structured data and executing the database update action by automatically updating a database through the robotic process automation interface, wherein the robotic process automation interface receives the structured data containing the database update action in machine-readable form and executes the database update action in a database.