Patent ID: 12190620

DETAILED DESCRIPTION OF CERTAIN EMBODIMENTS

Embodiments disclosed herein can concern improved techniques to access content from documents in an automated fashion. The improved techniques permit content within documents to be retrieved and then used by computer systems operating various software programs (e.g., application programs), such as an extraction program. Documents, especially business transaction documents, often have various descriptors (or tables) and values that form key-value pairs. The improved techniques permit key-value pairs within documents to be recognized and extracted from documents. The documents being received and processed can be electronic images of documents. As an example, the documents can be business transaction documents which include one or more key-value pairs such as for date, quantity, price, part number, account number, etc. Consequently, RPA systems are able to accurately understand the content within documents so that users, application programs and/or software robots can operate on the documents with increased reliability and flexibility. The documents being received and processed can be electronic images of documents.

Embodiments disclosed herein can provide for extraction of data from documents, namely, images of documents. The extraction processing can be hierarchical, such as being performed in multiple levels (i.e., multi-leveled). At an upper level, numerous different objects within a document can be detected along with positional data for the objects and can be categorized based on a type of object. Then, at lower levels, the different objects can be processed differently depending on the type of object. As a result, data extraction from the document can be performed with greater reliability and precision.

Generally speaking, RPA systems use computer software to emulate and integrate the actions of a human interacting within digital systems. In an enterprise environment, these RPA systems are often designed to execute a business process. In some cases, the RPA systems use Artificial Intelligence (AI) and/or other machine learning capabilities to handle high-volume, repeatable tasks that previously required humans to perform. The RPA systems support a plurality of software automation processes. The RPA systems also provide for creation, configuration, management, execution, monitoring, and performance of software automation processes.

A software automation process can also be referred to as a software robot, software agent, or a bot. A software automation process can interpret and execute tasks on your behalf. Software automation processes are particularly well suited for handling a lot of the repetitive tasks that humans perform every day. Software automation processes can perform a task or workflow that they are tasked with once or many times. As one example, a software automation process can locate and read data in a document, email, file, or other data source. As another example, a software automation process can connect with one or more Enterprise Resource Planning (ERP), Customer Relations Management (CRM), core banking, or other business systems to distribute data where it needs to be in whatever format is necessary. As another example, a software automation process can perform data tasks, such as reformatting, extracting, balancing, error checking, moving, copying, etc. As another example, a software automation process can retrieve data from a webpage, application, screen, or window. As still another example, a software automation process can be trigger based on time or an event, and can serve to take files or data sets and move them to another location, whether it is to a customer, vendor, application, department or storage. These various capabilities can also be used in any combination. As an example of an integrated software automation process, the software automation process can start a task or workflow based on a trigger, such as a file being uploaded to an FTP system. The integrated software automation process can then download that file, scrape relevant data from it, upload the relevant data to a database, and then send an email to inform the recipient that the data has been successfully processed.

Embodiments of various aspects of the invention are discussed below with reference toFIGS.1-11. However, those skilled in the art will readily appreciate that the detailed description given herein with respect to these figures is for explanatory purposes as the invention extends beyond these limited embodiments.

FIG.1is a block diagram of a programmatic automation environment100according to one embodiment. The programmatic automation environment100is a computing environment that supports robotic process automation. The computing environment can include or make use of one or more computing devices. Each of the computing devices can, for example, an electronic device having computing capabilities, such as a mobile phone (e.g., smart phone), tablet computer, desktop computer, portable computer, server computer, and the like.

The programmatic automation environment100includes a robotic process automation system102that provides the robotic process automation. The robotic process automation system102supports a plurality of different robotic processes, which are denoted software automation processes104. These software automation processes104can also be referred to as “software robots,” “bots” or “software bots.” The robotic process automation system102can create, maintain, execute, and/or monitor software automation processes104. The robotic process automation system102can also report status or results of software automation processes104.

On execution of one or more of the software automation processes104, the software automation processes104, via robotic process automation system102, can interact with one or more software programs. One such software program is an extraction program106. The extraction program106, when operating, typically interacts with one or more documents108. In some cases, the extraction program106is seeking to access documents108that contain data that is to be extracted and then suitably processed. The documents108are typically digital images of documents, and such documents can include text and graphical objects, such one or more tables. The RPA system102can include sophisticated processing and structures to support the extraction of data from such document images, and in particular extraction of data from tables within the documents. Examples of documents108including tables are invoices, purchase orders, delivery receipts, bill of lading, etc.

When robotic process automation operations are being performed, the robotic process automation system102seeks to interact with the extraction program106. However, since the robotic process automation system102is not integrated with the extraction program106, the robotic process automation system102requires an ability to understand what content is contained in the document108. For example, the content being presented in the extraction window108can pertain to a document, which can include a table110within the document. In this regard, the robotic process automation system102interacts with the extraction program106by interacting with the content in the document108. By doing so, the software automation process104being carried out via the robotic process automation system102can effectively interface with the document108as would a user, even though no user is involved because the actions by the software automation process104are programmatically performed. Once the content of the document is captured and understood, the robotic process automation system102can perform an action requested by the software automation process104by inducing action with respect to the application program106.

When robotic process automation operations are being performed, the robotic process automation system102seeks to interact with the application program112. However, since the robotic process automation system102is not integrated with the application program112, the robotic process automation system102requires an ability to understand what content is being presented in the application window114. For example, the content being presented in the application window114can pertain to a document, which can include a table110within the document108. In this regard, the robotic process automation system102interacts with the application program112by interacting with the content in the application window114corresponding to the application program112. The content can pertain to a document being displayed in the application window. By doing so, the software automation process104being carried out via the robotic process automation system102can effectively interface with the document being displayed in the application window114as would a user, even though no user is involved because the actions by the software automation process104are programmatically performed.

In one embodiment, the application program112can host the extraction program106. In such case, the robotics process automation system102can interact with the application program112to carry out the software automation process104, and the application program112can interact with the extraction program106as needed.

FIG.2is a block diagram of data extraction system200according to one embodiment. The data extraction system200receives a document to be processed. The document to be processed is an electronic document, such as an image (PNG, JPEG, etc.) or Portable Document Format (PDF). The document can then be processed to recognize the text within the document such as through use of Optical Character Recognition (OCR)202. Next, the document can undergo object detection204. The object detection204serves to identify various objects within the document as well as identifying the different classes or types of those objects that have been identified within the document. An object localizer and classifier206can then be used to further process the identified objects depending upon their classification (or type).

In this particular embodiment illustrated inFIG.2, the object localizer and classifier206serves to classify the detected objects into three distinct classes, that is, class A, class B and class C. The detected objects that are classified as class A objects are directed by the object localizer and classifier206to class A data extraction208where data can be extracted from the class A objects. The detected objects that are classified as class B objects can be directed by the object localizer and classifier206to class B data extraction210where data can be extracted from the class B objects. The detected objects that are classified as class C objects can be directed by the object localizer and classifier206to class C data extraction212where data can be extracted from the class C objects. In this regard, different data extraction processing can be provided for different types of objects. As a result, more robust and efficient data extraction is able to be provided separately for different type of objects.

Additionally, the data extraction system200includes an aggregator214. The aggregator214is coupled to the class A data extraction208, the class B data extraction210and the class C data extraction212such that the extracted data from the various objects (or blocks) of the document can be aggregated together to form a document data file that is produced by the data extraction system200and contains all the extracted data for the document.

The classes used by the object localizer and classifier206can vary with implementation. These classes are also referred to as blocks or object blocks. Some exemplary classes for documents include the following: key-value block, key info block, table block, graphic block, etc.

FIGS.3A and3Bare flow diagrams of a data extraction process300according to one embodiment. The data extraction process300can, for example, be performed by an extraction program, such as the extraction program106.

The data extraction process300can begin with a decision302that determines whether a document has been received. When the decision302determines that a document has not yet been received, the data extraction process300can await receipt of such a document. Once the decision302determines that a document has been received, a decision304can determine whether text is available from the document. For example, if the document is provided as an image, then the text would not be directly available. On the other hand, if the document is a vector-based PDF document, the text would normally be available. When the decision304determines that text is available from the document, then the text is extracted308from the document. Alternatively, when the decision304determines that text is not available from the document, the text within the document can be recognized306using OCR. When the decision304determines that text is not available from the document, the text within the document can be recognized306using OCR. Alternatively, when the decision304determines that text is available from the document, then the text is extracted308from the document.

Following block308or block306after the text within the document has been obtained, object detection can be performed310. The object detection seeks to detect these one or more objects within the document. In this embodiment, the objects that can be detected include an information block, a key-value block, and a table block. However, the invention is not limited to detection of these particular types of objects.

After the object detection has been performed, a decision312can determine whether an information block has been detected within the document. When the decision312determines that an information block has been detected, then information block processing can be performed314. After the information block processing has been performed314, or directly after the decision312when no information block has been detected, a decision316can determine whether a key-value block has been detected. When the decision316determines that a key-value block has been detected, key-value block processing can be performed318. After the key-value block processing has been performed318, or directly following the decision316when a key-value block is not been detected, a decision320can determine whether a table block/object has been detected. When the decision320determines that a table block/object has been detected, table block/object processing can be performed322. Here, when the document includes a table, there is a table block and associated table objects. The table block/object processing can process these components of the table. After the table block/object processing has been performed322, or directly following the decision320when the table block/object is not been detected, the data extraction process can aggregate324processing results. Here, to the extent that the object detection has detected one or more information blocks, key-value blocks and/or table blocks/objects, the results from the processing thereof can be aggregated324. The result of the aggregation324can be provided in a document data file. Following the aggregation324, the data within the table provided in the document has been extracted and thus the data extraction and process300can end.

FIGS.4A and4Bare flow diagrams of a table data extraction process400according to another embodiment. The table data extraction process400can, for example, be performed by an extraction program, such as the extraction program106illustrated inFIG.1.

The table data extraction process400receives402into a document image for a document that includes a table. Next, the document image can be processed to detect404objects within the document image. After the objects have been detected404, a table, a table header and table header elements can be identified406from the detected objects. Next, columns for the table can be identified408using at least one or more of the objects that have been detected404.

Thereafter, one or more of the identified columns can be selected410based on the table header elements. Next, row anchor objects can be determined412. Row anchor objects are typically text, such as words or labels, or values that can be used to signal location of rows of the table. Then, a decision414can determine whether row anchor objects have been detected with confidence. When the decision414determines that row anchor objects have been detected with confidence, rows for the table can be identified416based on positions of the row anchor objects. Then, content can be extracted418from each resulting cell within the table. The cells are defined by the intersection of columns and rows. Following the block418, since the columns and rows of the table were detected and content from its resulting cells has been extracted, the table data extraction process400can end. Alternatively, if the decision414determines that the row anchor objects have not been detected with confidence, the user feedback can be obtained420to assist with extraction of content from the table within the document.

FIG.5A-5Dare flow diagrams of a table data extraction process500according to still another embodiment. The table data extraction process500can, for example, be performed by an extraction program, such as the extraction program106illustrated inFIG.1.

The table data extraction process500receives502into a document image for a document that includes a table. Next, the document image can be processed to detect504objects within the document image. After the objects have been detected504, a table, a table header and table header elements can be identified506from the detected objects. Next, columns for the table can be identified508using at least one or more of the objects that have been detected504.

Thereafter, one or more of the identified columns can be selected510based on the table header elements. Next, a decision512determines whether the selected table header element is approximately pertaining to a quantity. Here, the selected table header element can be “quantity” or an alias therefor, such as “amount.” When the decision512determines that the selected table header element is corresponding to a quantity, then word blocks in the column associated with the quantity column can be identified514. Next, rows for the table can be identified516based on positions of the identified word blocks. After the rows for the table have been identified516, the table data extraction process500can proceed to extract518content from each resulting cell within the table. The cells of the table are defined by the intersection of columns and rows.

On the other hand, when the decision512determines that the table header element does not correspond to quantity, then the table data extraction process500can perform other processing, such as shown inFIG.5C. The other processing can proceed with a decision520that determines whether the table header element corresponds to a price or amount. Here, the table header element can be “price” or amount” or an alias therefor, such as “total.” When the decision520determines that the table header element does approximately correspond to a price or amount, then word blocks in the column associated with the price/amount column can be identified522. Then, rows for the table can be identified524based on positions of the identified word blocks. After the rows for the table have been identified524, the table data extraction process500can proceed to extract526content from each resulting cell within the table.

On the other hand, when the decision520determines that the selected table header element does not correspond to price or amount, then the table data extraction process500can perform other processing, such as shown inFIG.5D. The other processing can proceed by selection528of a left-most column from the columns identified within the table. Then, the table data extraction process500can recognize530text within the left-most column. Thereafter, bounding word blocks can be formed532around each word from the recognized text. Rows for the table can then be identified534based on positions of the bounding word blocks. Finally, content from each resulting cell within the table can be extracted536. Following the block518, the table data extraction process500can end.FIG.6Ais a flow diagram of a key-value block process600according to one embodiment. The key-value block process600can, for example, be performed by a document extraction program, such as the extraction program106illustrated inFIG.1or the performance318of key-value block processing illustrated inFIG.3A.

The key-value block process600can begin with a decision602that determines whether a key-value block has been detected. When the decision602determines that a key-value block is not been detected, then the key-value block process600can await receipt of an incoming key-value block to be processed.

On the other hand, when the decision602determines that a key-value block has been detected, document text within the key-value block can be retrieved604. Here, the key-value block is typically associated with a document that has been previously been processed to recognize its characters. The document is typically an image of a document, and its processing is typically referred to as Optical Character Recognition (OCR). In one implementation, the key-value block identifies a bounding box for a key-value pair. The text of interest is typically the text within the bounding box for the key-value block that has been retrieved604.

Next, the key-value block process600can attempt606to determine a key type of the key-value pair within the key-value block based on the text within the key-value block using a Natural Language Processing (NLP) model. A NLP model is one implementation of machine learning. Natural Language Processing (NLP) is a field of Artificial Intelligence (AI) that quantifies human language to make it intelligible to machines.

A decision608can then determine whether a key type has been recognized. When the decision608determines that a key type has not been recognized for the key-value block, then the key type can be determined610based on the text within the key-value block using an alternative technique. For example, the alternative technique could use pattern matching with respect to text or characters as well as other heuristic approaches. Following the determination610, or directly following the decision608when the key type has been recognized, then a value for the key-value block can be determined612based on the determined key type. As an example, in a case in which the document involved is an invoice, the key-value pair provided within the key-value block can pertain to a key type of “Invoice No.” and a value of “123456”.

Additionally, a native key type can be retrieved614from the key-value block. The native key type is the particular key type utilized in the key-value block. As compared to the determined key type, the native key type is derived from the document itself, whereas the determined key type is a uniform key type that is used as a primary classification. For example, a plurality of different aliases that refer to an invoice number can all utilize the same determined key type, such as “invoice_number”. Thereafter, the determined key type, the determined value and the native key type for the key-value block can all be stored616. Following the block616, the key-value block process600has completed with the recognition on the key type and value pertaining to the key-value block.

FIG.6Bis a key-value extraction system650according to one embodiment. The key-value extraction system650can support or perform the key-value block process600, the extraction program106, or performance318of key-value block processing illustrated inFIG.3A. The key-value extraction system650can also implement one or more of the blocks208-218illustrated inFIG.2

The key-value extraction system650receives a key-value block to be processed. The key-value block is associated with a document that is being processed. The key-value extraction system650can also receive, request or provide OCR data for the document. Included with the OCR data would be the particular OCR data that is associated with the position of the key-value block within the document. Still further, depending upon implementation, the key-value extraction system650can also include or make use of a user input. For example, a user input can be a request for an extraction application to extract certain data or fields from the document. The data or fields from the document pertain to certain key-value pairs that are desired by the user.

The key-value extraction system650includes a character level neural network model652that serves to predict a key type and value for the key-value block. A decision654can be used to determine whether the character level neural network model652has been able to successfully predict the key type and value for the key-value block. When the decision654determines that the character level neural network model652has been successful, the key type and value can be recorded656. After the key type and value have been recorded656, the key-value extraction system650is complete with the key type and value having been determined and recorded.

On the other hand, when the decision654determines that the character level neural network model652has not been able to successfully predict the key type and value, a pattern matching model658can be used to predict key type and value for the key-value block. A decision660can then determine whether the pattern matching model has been successful in predicting the key type and value for the key-value block. When the decision660determines that the pattern matching model has been successful, then the key type and value can be recorded656. Alternatively, when the decision660determines that the pattern matching model has not been able to successfully predict the key type and value, then the key-value extraction system650can seek user feedback662in a further effort to determine key type and value for the key-value block.

Optionally, the key-value extraction system650can receive and utilize a user input. The user input can be supplied to one or both of the neural network model652and the pattern matching model658. These models652,658can potentially benefit from an understanding of the user's desire to extract particular key-value information from the underlying document. The understanding of the user's desire can be utilized to ensure that the key-value extraction system650provides a prediction for the key type and value that are of interest to the user even in situations where the prediction may have a reduced confidence level.

In one embodiment, the character level neural network model652is implemented using a Character-level Convolutional Network (CharCNN) and Bidirectional Gated Recurrent Units (GRUs) Network, which is able to perform well even with misspelled words and strings lacking semantic context. Here, the character level neural network model652can be a Keras-based model.

As illustrated inFIG.6B, in one embodiment, the key-value extraction system650can first attempt to extract key-value data from a key-value block using the neural network model652. Then, if that is not successful, then a second attempt to extract key-value data from the key-value block can be done using the pattern matching model658. In another embodiment, an alternative machine learning model can be attempted after the neural network model652is unsuccessful and before using the pattern matching model658.

Additional details on detecting objects can be found in DETECTION OF USER INTERFACE CONTROLS VIA INVARIANCE GUIDED SUB-CONTROL LEARNING, U.S. application Ser. No. 16/876,530, filed May 18, 2020, which is hereby incorporated by reference herein.

The various aspects disclosed herein can be utilized with or by robotic process automation systems. Exemplary robotic process automation systems and operations thereof are detailed below.

FIG.7is a block diagram of a robotic process automation (RPA) system700according to one embodiment. The RPA system700includes data storage702. The data storage702can store a plurality of software robots704, also referred to as bots (e.g., Bot 1, Bot 2, . . . , Bot n, where n is an integer). The software robots704can be operable to interact at a user level with one or more user level application programs (not shown). As used herein, the term “bot” is generally synonymous with the term software robot. In certain contexts, as will be apparent to those skilled in the art in view of the present disclosure, the term “bot runner” refers to a device (virtual or physical), having the necessary software capability (such as bot player726), on which a bot will execute or is executing. The data storage702can also stores a plurality of work items706. Each work item706can pertain to processing executed by one or more of the software robots704.

The RPA system700can also include a control room708. The control room708is operatively coupled to the data storage702and is configured to execute instructions that, when executed, cause the RPA system700to respond to a request from a client device710that is issued by a user712.1. The control room708can act as a server to provide to the client device710the capability to perform an automation task to process a work item from the plurality of work items706. The RPA system700is able to support multiple client devices710concurrently, each of which will have one or more corresponding user session(s)718(e.g.,718.1,718.2,718.3,718.4), which provides a context for respective users712(e.g.,712.1,712.2,712.3,712.4). The context can, for example, include security, permissions, audit trails, etc. to define the permissions and roles for bots operating under the user session718. For example, a bot executing under a user session, cannot access any files or use any applications that the user, under whose credentials the bot is operating, does not have permission to do so. This prevents any inadvertent or malicious acts from a bot under which bot704executes.

The control room708can provide, to the client device710, software code to implement a node manager714. The node manager714executes on the client device710and provides a user712a visual interface via browser713to view progress of and to control execution of automation tasks. The node manager714can, for example, include a discovery service732, an autologin734, and a logging736. It should be noted that the node manager714can be provided to the client device710on demand, when required by the client device710, to execute a desired automation task. In one embodiment, the node manager714may remain on the client device710after completion of the requested automation task to avoid the need to download it again. In another embodiment, the node manager714may be deleted from the client device710after completion of the requested automation task. The node manager714can also maintain a connection to the control room708to inform the control room708that device710is available for service by the control room708, irrespective of whether a live user session718exists. When executing a bot704, the node manager714can impersonate the user712by employing credentials associated with the user712.

The control room708initiates, on the client device710, a user session718(seen as a specific instantiation718.1) to perform the automation task. The control room708retrieves the set of task processing instructions704that correspond to the work item706. The task processing instructions704that correspond to the work item706can execute under control of the user session718.1, on the client device710. The node manager714can provide update data indicative of status of processing of the work item to the control room708. The control room708can terminate the user session718.1upon completion of processing of the work item706. The user session718.1is shown in further detail at719, where an instance724.1of user session manager724is seen along with a bot player726, proxy service728, and one or more virtual machine(s)730, such as a virtual machine that runs Java® or Python®. The user session manager724provides a generic user session context within which a bot704executes.

The bots704execute on a bot player, via a computing device, to perform the functions encoded by the bot. Some or all of the bots704may, in certain embodiments, be located remotely from the control room708. Moreover, the devices710and711, which may be conventional computing devices, such as for example, personal computers, server computers, laptops, tablets and other portable computing devices, may also be located remotely from the control room708. The devices710and711may also take the form of virtual computing devices. The bots704and the work items706are shown in separate containers for purposes of illustration but they may be stored in separate or the same device(s), or across multiple devices. The control room708can perform user management functions, source control of the bots704, along with providing a dashboard that provides analytics and results of the bots704, performs license management of software required by the bots704and manages overall execution and management of scripts, clients, roles, credentials, security, etc. The major functions performed by the control room708can include: (i) a dashboard that provides a summary of registered/active users, tasks status, repository details, number of clients connected, number of scripts passed or failed recently, tasks that are scheduled to be executed and those that are in progress, and any other desired information; (ii) user/role management—permits creation of different roles, such as bot creator, bot runner, admin, and custom roles, and activation, deactivation and modification of roles; (iii) repository management—to manage all scripts, tasks, workflows and reports etc.; (iv) operations management—permits checking status of tasks in progress and history of all tasks, and permits the administrator to stop/start execution of bots currently executing; (v) audit trail—logs creation of all actions performed in the control room; (vi) task scheduler—permits scheduling tasks which need to be executed on different clients at any particular time; (vii) credential management—permits password management; and (viii) security: management—permits rights management for all user roles. The control room708is shown generally for simplicity of explanation. Multiple instances of the control room708may be employed where large numbers of bots are deployed to provide for scalability of the RPA system700.

In the event that a device, such as device711(e.g., operated by user712.2) does not satisfy the minimum processing capability to run a node manager714, the control room708can make use of another device, such as device715, that has the requisite capability. In such case, a node manager714within a Virtual Machine (VM), seen as VM716, can be resident on the device715. The node manager714operating on the device715can communicate with browser713on device711. This approach permits RPA system700to operate with devices that may have lower processing capability, such as older laptops, desktops, and portable/mobile devices such as tablets and mobile phones. In certain embodiments the browser713may take the form of a mobile application stored on the device711. The control room708can establish a user session718.2for the user712.2while interacting with the control room708and the corresponding user session718.2(operating as described above for user session718.1) with user session manager724.2(operating as described above for user session manager724.1) operating on device710as discussed above.

In certain embodiments, the user session manager724provides five functions. First is a health service738that maintains and provides a detailed logging of bot execution including monitoring memory and CPU usage by the bot and other parameters such as number of file handles employed. The bots704can employ the health service738as a resource to pass logging information to the control room708. Execution of the bot is separately monitored by the user session manager724to track memory, CPU, and other system information. The second function provided by the user session manager724is a message queue740for exchange of data between bots executed within the same user session718. The third function is a deployment service (also referred to as a deployment module)742that connects to the control room708to request execution of a requested bot704. The deployment service742can also ensure that the environment is ready for bot execution, such as by making available dependent libraries. The fourth function is a bot launcher744which can read metadata associated with a requested bot704and launch an appropriate container and begin execution of the requested bot. The fifth function is a debugger service746that can be used to debug bot code.

The bot player726can execute, or play back, a sequence of instructions encoded in a bot. The sequence of instructions can, for example, be captured by way of a recorder when a human performs those actions, or alternatively the instructions are explicitly coded into the bot. These instructions enable the bot player726, to perform the same actions as a human would do in their absence. In one implementation, the instructions can compose of a command (or action) followed by set of parameters. For example, Open Browser is a command and a URL would be the parameter for it to launch a web resource. Proxy service728can enable integration of external software or applications with the bot to provide specialized services. For example, an externally hosted artificial intelligence system can enable the bot to understand the meaning of a “sentence.”

The user712.1can interact with node manager714via a conventional browser713which employs the node manager714to communicate with the control room708. When the user712.1logs in from the client device710to the control room708for the first time, the user712.1can be prompted to download and install the node manager714on the device710, if one is not already present. The node manager714can establish a web socket connection to the user session manager724, deployed by the control room708that lets the user712.1subsequently create, edit, and deploy the bots704.

FIG.8is a block diagram of a generalized runtime environment for bots704in accordance with another embodiment of the RPA system700illustrated inFIG.7. This flexible runtime environment advantageously permits extensibility of the platform to enable use of various languages in encoding bots. In the embodiment ofFIG.8, RPA system700generally operates in the manner described in connection withFIG.7, except that in the embodiment ofFIG.8, some or all of the user sessions718execute within a virtual machine716. This permits the bots704to operate on an RPA system700that runs on an operating system different from an operating system on which a bot704may have been developed. For example, if a bot704is developed on the Windows® operating system, the platform agnostic embodiment shown inFIG.8permits the bot704to be executed on a device852or854executing an operating system853or855different than Windows®, such as, for example, Linux. In one embodiment, the VM716takes the form of a Java Virtual Machine (JVM) as provided by Oracle Corporation. As will be understood by those skilled in the art in view of the present disclosure, a JVM enables a computer to run Java® programs as well as programs written in other languages that are also compiled to Java® bytecode.

In the embodiment shown inFIG.8, multiple devices852can execute operating system1,853, which may, for example, be a Windows® operating system. Multiple devices854can execute operating system2,855, which may, for example, be a Linux® operating system. For simplicity of explanation, two different operating systems are shown, by way of example and additional operating systems such as the macOS®, or other operating systems may also be employed on devices852,854or other devices. Each device852,854has installed therein one or more VM's716, each of which can execute its own operating system (not shown), which may be the same or different than the host operating system853/855. Each VM716has installed, either in advance, or on demand from control room708, a node manager714. The embodiment illustrated inFIG.8differs from the embodiment shown inFIG.7in that the devices852and854have installed thereon one or more VMs716as described above, with each VM716having an operating system installed that may or may not be compatible with an operating system required by an automation task. Moreover, each VM has installed thereon a runtime environment856, each of which has installed thereon one or more interpreters (shown as interpreter 1, interpreter 2, interpreter 3). Three interpreters are shown by way of example but any run time environment856may, at any given time, have installed thereupon less than or more than three different interpreters. Each interpreter856is specifically encoded to interpret instructions encoded in a particular programming language. For example, interpreter 1 may be encoded to interpret software programs encoded in the Java® programming language, seen inFIG.8as language 1 in Bot 1 and Bot 2. Interpreter 2 may be encoded to interpret software programs encoded in the Python® programming language, seen inFIG.8as language 2 in Bot 1 and Bot 2, and interpreter 3 may be encoded to interpret software programs encoded in the R programming language, seen inFIG.8as language 3 in Bot 1 and Bot 2.

Turning to the bots Bot 1 and Bot 2, each bot may contain instructions encoded in one or more programming languages. In the example shown inFIG.8, each bot can contain instructions in three different programming languages, for example, Java®, Python® and R. This is for purposes of explanation and the embodiment ofFIG.8may be able to create and execute bots encoded in more or less than three programming languages. The VMs716and the runtime environments856permit execution of bots encoded in multiple languages, thereby permitting greater flexibility in encoding bots. Moreover, the VMs716permit greater flexibility in bot execution. For example, a bot that is encoded with commands that are specific to an operating system, for example, open a file, or that requires an application that runs on a particular operating system, for example, Excel® on Windows®, can be deployed with much greater flexibility. In such a situation, the control room708will select a device with a VM716that has the Windows® operating system and the Excel® application installed thereon. Licensing fees can also be reduced by serially using a particular device with the required licensed operating system and application(s), instead of having multiple devices with such an operating system and applications, which may be unused for large periods of time.

FIG.9illustrates a block diagram of yet another embodiment of the RPA system700ofFIG.7configured to provide platform independent sets of task processing instructions for bots704. Two bots704, bot 1 and bot 2 are shown inFIG.9. Each of bots 1 and 2 are formed from one or more commands901, each of which specifies a user level operation with a specified application program, or a user level operation provided by an operating system. Sets of commands906.1and906.2may be generated by bot editor902and bot recorder904, respectively, to define sequences of application level operations that are normally performed by a human user. The bot editor902may be configured to combine sequences of commands901via an editor. The bot recorder904may be configured to record application level operations performed by a user and to convert the operations performed by the user to commands901. The sets of commands906.1and906.2generated by the editor902and the recorder904can include command(s) and schema for the command(s), where the schema defines the format of the command(s). The format of a command can, such as, includes the input(s) expected by the command and their format. For example, a command to open a URL might include the URL, a user login, and a password to login to an application resident at the designated URL.

The control room708operates to compile, via compiler908, the sets of commands generated by the editor902or the recorder904into platform independent executables, each of which is also referred to herein as a bot JAR (Java ARchive) that perform application level operations captured by the bot editor902and the bot recorder904. In the embodiment illustrated inFIG.9, the set of commands906, representing a bot file, can be captured in a JSON (JavaScript Object Notation) format which is a lightweight data-interchange text-based format. JSON is based on a subset of the JavaScript Programming Language Standard ECMA-262 3rd Edition—December 1999. JSON is built on two structures: (i) a collection of name/value pairs; in various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array, (ii) an ordered list of values which, in most languages, is realized as an array, vector, list, or sequence. Bots 1 and 2 may be executed on devices710and/or715to perform the encoded application level operations that are normally performed by a human user.

FIG.10is a block diagram illustrating details of one embodiment of the bot compiler908illustrated inFIG.9. The bot compiler908accesses one or more of the bots704from the data storage702, which can serve as bot repository, along with commands901that are contained in a command repository1032. The bot compiler708can also access compiler dependency repository1034. The bot compiler708can operate to convert each command901via code generator module910to an operating system independent format, such as a Java command. The bot compiler708then compiles each operating system independent format command into byte code, such as Java byte code, to create a bot JAR. The convert command to Java module910is shown in further detail in inFIG.10by JAR generator1028of a build manager1026. The compiling to generate Java byte code module912can be provided by the JAR generator1028. In one embodiment, a conventional Java compiler, such as javac from Oracle Corporation, may be employed to generate the bot JAR (artifacts). As will be appreciated by those skilled in the art, an artifact in a Java environment includes compiled code along with other dependencies and resources required by the compiled code. Such dependencies can include libraries specified in the code and other artifacts. Resources can include web pages, images, descriptor files, other files, directories and archives.

As noted in connection withFIG.9, deployment service742can be responsible to trigger the process of bot compilation and then once a bot has compiled successfully, to execute the resulting bot JAR on selected devices710and/or715. The bot compiler908can comprises a number of functional modules that, when combined, generate a bot704in a JAR format. A bot reader1002loads a bot file into memory with class representation. The bot reader1002takes as input a bot file and generates an in-memory bot structure. A bot dependency generator1004identifies and creates a dependency graph for a given bot. It includes any child bot, resource file like script, and document or image used while creating a bot. The bot dependency generator1004takes, as input, the output of the bot reader1002and provides, as output, a list of direct and transitive bot dependencies. A script handler1006handles script execution by injecting a contract into a user script file. The script handler1006registers an external script in manifest and bundles the script as a resource in an output JAR. The script handler1006takes, as input, the output of the bot reader1002and provides, as output, a list of function pointers to execute different types of identified scripts like Python, Java, VB scripts.

An entry class generator1008can create a Java class with an entry method, to permit bot execution to be started from that point. For example, the entry class generator1008takes, as an input, a parent bot name, such “Invoice-processing.bot” and generates a Java class having a contract method with a predefined signature. A bot class generator1010can generate a bot class and orders command code in sequence of execution. The bot class generator1010can take, as input, an in-memory bot structure and generates, as output, a Java class in a predefined structure. A Command/Iterator/Conditional Code Generator1012wires up a command class with singleton object creation, manages nested command linking, iterator (loop) generation, and conditional (If/Else If/Else) construct generation. The Command/Iterator/Conditional Code Generator1012can take, as input, an in-memory bot structure in JSON format and generates Java code within the bot class. A variable code generator1014generates code for user defined variables in the bot, maps bot level data types to Java language compatible types, and assigns initial values provided by user. The variable code generator1014takes, as input, an in-memory bot structure and generates Java code within the bot class. A schema validator1016can validate user inputs based on command schema and includes syntax and semantic checks on user provided values. The schema validator1016can take, as input, an in-memory bot structure and generates validation errors that it detects. The attribute code generator1018can generate attribute code, handles the nested nature of attributes, and transforms bot value types to Java language compatible types. The attribute code generator1018takes, as input, an in-memory bot structure and generates Java code within the bot class. A utility classes generator1020can generate utility classes which are used by an entry class or bot class methods. The utility classes generator1020can generate, as output, Java classes. A data type generator1022can generate value types useful at runtime. The data type generator1022can generate, as output, Java classes. An expression generator1024can evaluate user inputs and generates compatible Java code, identifies complex variable mixed user inputs, inject variable values, and transform mathematical expressions. The expression generator1024can take, as input, user defined values and generates, as output, Java compatible expressions.

The JAR generator1028can compile Java source files, produces byte code and packs everything in a single JAR, including other child bots and file dependencies. The JAR generator1028can take, as input, generated Java files, resource files used during the bot creation, bot compiler dependencies, and command packages, and then can generate a JAR artifact as an output. The JAR cache manager1030can put a bot JAR in cache repository so that recompilation can be avoided if the bot has not been modified since the last cache entry. The JAR cache manager1030can take, as input, a bot JAR.

In one or more embodiment described herein command action logic can be implemented by commands901available at the control room708. This permits the execution environment on a device710and/or715, such as exists in a user session718, to be agnostic to changes in the command action logic implemented by a bot704. In other words, the manner in which a command implemented by a bot704operates need not be visible to the execution environment in which a bot704operates. The execution environment is able to be independent of the command action logic of any commands implemented by bots704. The result is that changes in any commands901supported by the RPA system700, or addition of new commands901to the RPA system700, do not require an update of the execution environment on devices710,715. This avoids what can be a time and resource intensive process in which addition of a new command901or change to any command901requires an update to the execution environment to each device710,715employed in a RPA system. Take, for example, a bot that employs a command901that logs into an on-online service. The command901upon execution takes a Uniform Resource Locator (URL), opens (or selects) a browser, retrieves credentials corresponding to a user on behalf of whom the bot is logging in as, and enters the user credentials (e.g. username and password) as specified. If the command901is changed, for example, to perform two-factor authentication, then it will require an additional resource (the second factor for authentication) and will perform additional actions beyond those performed by the original command (for example, logging into an email account to retrieve the second factor and entering the second factor). The command action logic will have changed as the bot is required to perform the additional changes. Any bot(s) that employ the changed command will need to be recompiled to generate a new bot JAR for each changed bot and the new bot JAR will need to be provided to a bot runner upon request by the bot runner. The execution environment on the device that is requesting the updated bot will not need to be updated as the command action logic of the changed command is reflected in the new bot JAR containing the byte code to be executed by the execution environment.

The embodiments herein can be implemented in the general context of computer-executable instructions, such as those included in program modules, being executed in a computing system on a target, real or virtual, processor. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The program modules may be obtained from another computer system, such as via the Internet, by downloading the program modules from the other computer system for execution on one or more different computer systems. The functionality of the program modules may be combined or split between program modules as desired in various embodiments. Computer-executable instructions for program modules may be executed within a local or distributed computing system. The computer-executable instructions, which may include data, instructions, and configuration parameters, may be provided via an article of manufacture including a computer readable medium, which provides content that represents instructions that can be executed. A computer readable medium may also include a storage or database from which content can be downloaded. A computer readable medium may further include a device or product having content stored thereon at a time of sale or delivery. Thus, delivering a device with stored content, or offering content for download over a communication medium, may be understood as providing an article of manufacture with such content described herein.

FIG.11illustrates a block diagram of an exemplary computing environment1100for an implementation of an RPA system, such as the RPA systems disclosed herein. The embodiments described herein may be implemented using the exemplary computing environment1100. The exemplary computing environment1100includes one or more processing units1102,1104and memory1106,1108. The processing units1102,1106execute computer-executable instructions. Each of the processing units1102,1106can be a general-purpose central processing unit (CPU), processor in an application-specific integrated circuit (ASIC) or any other type of processor. For example, as shown inFIG.11, the processing unit1102can be a CPU, and the processing unit can be a graphics/co-processing unit (GPU). The tangible memory1106,1108may be volatile memory (e.g., registers, cache, RAM), non-volatile memory (e.g., ROM, EEPROM, flash memory, etc.), or some combination of the two, accessible by the processing unit(s). The hardware components may be standard hardware components, or alternatively, some embodiments may employ specialized hardware components to further increase the operating efficiency and speed with which the RPA system operates. The various components of exemplary computing environment1100may be rearranged in various embodiments, and some embodiments may not require nor include all of the above components, while other embodiments may include additional components, such as specialized processors and additional memory.

The exemplary computing environment1100may have additional features such as, for example, tangible storage1110, one or more input devices1114, one or more output devices1112, and one or more communication connections1116. An interconnection mechanism (not shown) such as a bus, controller, or network can interconnect the various components of the exemplary computing environment1100. Typically, operating system software (not shown) provides an operating system for other software executing in the exemplary computing environment1100, and coordinates activities of the various components of the exemplary computing environment1100.

The tangible storage1110may be removable or non-removable, and includes magnetic disks, magnetic tapes or cassettes, CD-ROMs, DVDs, or any other medium which can be used to store information in a non-transitory way, and which can be accessed within the computing system1100. The tangible storage1110can store instructions for the software implementing one or more features of a PRA system as described herein.

The input device(s) or image capture device(s)1114may include, for example, one or more of a touch input device such as a keyboard, mouse, pen, or trackball, a voice input device, a scanning device, an imaging sensor, touch surface, or any other device capable of providing input to the exemplary computing environment1100. For multimedia embodiment, the input device(s)1114can, for example, include a camera, a video card, a TV tuner card, or similar device that accepts video input in analog or digital form, a microphone, an audio card, or a CD-ROM or CD-RW that reads audio/video samples into the exemplary computing environment1100. The output device(s)1112can, for example, include a display, a printer, a speaker, a CD-writer, or any another device that provides output from the exemplary computing environment1100.

The one or more communication connections1116can enable communication over a communication medium to another computing entity. The communication medium conveys information such as computer-executable instructions, audio or video input or output, or other data. The communication medium can include a wireless medium, a wired medium, or a combination thereof.

The various aspects, features, embodiments or implementations of the invention described above can be used alone or in various combinations.

Embodiments of the invention can, for example, be implemented by software, hardware, or a combination of hardware and software. Embodiments of the invention can also be embodied as computer readable code on a computer readable medium. In one embodiment, the computer readable medium is non-transitory. The computer readable medium is any data storage device that can store data which can thereafter be read by a computer system. Examples of the computer readable medium generally include read-only memory and random-access memory. More specific examples of computer readable medium are tangible and include Flash memory, EEPROM memory, memory card, CD-ROM, DVD, hard drive, magnetic tape, and optical data storage device. The computer readable medium can also be distributed over network-coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

Numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will become obvious to those skilled in the art that the invention may be practiced without these specific details. The description and representation herein are the common meanings used by those experienced or skilled in the art to most effectively convey the substance of their work to others skilled in the art. In other instances, well-known methods, procedures, components, and circuitry have not been described in detail to avoid unnecessarily obscuring aspects of the present invention.

In the foregoing description, reference to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Further, the order of blocks in process flowcharts or diagrams representing one or more embodiments of the invention do not inherently indicate any particular order nor imply any limitations in the invention.

The many features and advantages of the present invention are apparent from the written description. Further, since numerous modifications and changes will readily occur to those skilled in the art, the invention should not be limited to the exact construction and operation as illustrated and described. Hence, all suitable modifications and equivalents may be resorted to as falling within the scope of the invention.