Database record similarity matching
In one embodiment, a method can access an expense line for a travel expense for an enterprise. The expense line is the subject of a procurement action under a relevant contract. The method can use a first machine learning model, determining a category associated with the expense line. The method can evaluate the expense line using the category associated with the expense line and a table of categories that are procurable with references to related travel contracts. The method can determine a match between a description field of the expense line and description fields of historic invoice records associated with travel contracts. In response to determining the match, the method can execute a responsive action for the expense line, wherein the responsive action includes generating a notification to a user, marking the expense line, and initiating a workflow to apply the contract to the expense line.
1 . A computer-implemented method comprising:
using a server computer executing one or more sequences of expense management instructions and expense insight instructions, the server computer comprising a database interface that is communicatively coupled to a storage device comprising a database:
accessing an expense line for a travel expense for an enterprise, wherein the expense line is a subject of a procurement action under a relevant contract;
using a first machine learning model, determining a category associated with the expense line;
evaluating the expense line using the category associated with the expense line and a table of categories that are procurable with references to related travel contracts;
using a database search query, retrieving from a contract database comprising data relating to travel contracts between travel service providers and the enterprise, historic invoice records associated with the travel contracts;
generating, using a second machine-learning model, an expense line descriptive semantic vector corresponding to the expense line and a plurality of invoice lines descriptive semantic vectors corresponding to the historic invoice records associated with the travel contracts;
evaluating, using a semantic similarity algorithm, a description field of the expense line and description fields of the historic invoice records associated with the travel contracts, wherein evaluating comprises comparing the expense line descriptive semantic vector corresponding to the expense line for the travel expense and the plurality of invoice lines descriptive semantic vectors corresponding to the historic invoice records associated with the travel contracts;
determining, based on comparison between the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors, a match between the description field of the expense line and the description fields of the historic invoice records associated with travel contracts; and
in response to determining the match, executing a responsive action for the expense line, wherein the responsive action comprises one or more of generating a notification to a first entity computing device, marking the expense line in the database, and initiating a workflow of the server computer to apply the relevant contract to the expense line,
wherein marking the expense line in the database comprises, in response to comparing the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors and determining the match between the description field of the expense line and the description fields of the historic invoice records associated with travel contracts, updating an expense line record in the database with an attribute or column value specifying that the expense line for the travel expense is an out-of-contract expense.
2 . The computer-implemented method of claim 1 , further comprising updating the expense line with the determined category when the expense line has a null value for a category.
3 . The computer-implemented method of claim 1 , further comprising applying clustering and sampling to reduce a number of historic invoice records for comparison.
4 . The computer-implemented method of claim 1 , wherein the expense line includes date, category, description, and amount.
5 . The computer-implemented method of claim 1 , wherein the workflow includes applying a contract-based discount or other price adjustment to the expense line.
6 . The computer-implemented method of claim 1 , further comprising:
retrieving a set of expense lines for a user to read column attributes of each record representing an expense line; and
causing displaying, on the first entity computing device, a notification if a particular column attribute of a record has a particular marking that is associated with the notification.
7 . The computer-implemented method of claim 1 , further comprising:
determining, based on the comparison, whether a similarity between the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors is greater than a predetermined threshold; and
in response to determining that the similarity is greater than the predetermined threshold, validating the expense line to be procurable and subject to alerting, notification, marking, or other response.
8 . The computer-implemented method of claim 1 , further comprising transmitting the notification using one of: a text message, an email message, and an in-application notification to the first entity computing device.
9 . One or more non-transitory computer-readable storage media storing one or more sequences of instructions which, when executed using one or more processors of a server computer, the server computer comprising a database interface that is communicatively coupled to a storage device comprising a database, cause the server computer to perform:
accessing an expense line for a travel expense for an enterprise, wherein the expense line is a subject of a procurement action under a relevant contract;
using a first machine learning model, determining a category associated with the expense line;
evaluating the expense line using the category associated with the expense line and a table of categories that are procurable with references to related travel contracts;
using a database search query, retrieving from a contract database comprising data relating to travel contracts between travel service providers and the enterprise, historic invoice records associated with the travel contracts;
generating, using a second machine-learning model, an expense line descriptive semantic vector corresponding to the expense line and a plurality of invoice lines descriptive semantic vectors corresponding to the historic invoice records associated with the travel contracts;
evaluating, using a semantic similarity algorithm, a description field of the expense line and description fields of the historic invoice records associated with the travel contracts, wherein evaluating comprises comparing the expense line descriptive semantic vector corresponding to the expense line for the travel expense and the plurality of invoice lines descriptive semantic vectors corresponding to the historic invoice records associated with the travel expense;
determining, based on comparison between the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors, a match between the description field of the expense line and the description fields of the historic invoice records associated with travel contracts; and
in response to determining the match, executing a responsive action for the expense line, wherein the responsive action comprises one or more of generating a notification to a first entity computing device, marking the expense line in the database, and initiating a workflow of the server computer to apply the relevant contract to the expense line,
wherein marking the expense line in the database comprises, in response to comparing the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors and determining the match between the description field of the expense line and the description fields of the historic invoice records associated with travel contracts, updating an expense line record in the database with an attribute or column value specifying that the expense line for the travel expense is an out-of-contract expense.
10 . The one or more non-transitory computer-readable storage media of claim 9 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform updating the expense line with the determined category when the expense line has a null value for a category.
11 . The one or more non-transitory computer-readable storage media of claim 9 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform applying clustering and sampling to reduce a number of historic invoice records for comparison.
12 . The one or more non-transitory computer-readable storage media of claim 9 , wherein the expense line includes date, category, description, and amount.
13 . The one or more non-transitory computer-readable storage media of claim 9 , wherein the workflow includes applying a contract-based discount or other price adjustment to the expense line.
14 . The one or more non-transitory computer-readable storage media of claim 9 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform retrieving a set of expense lines for a user to read column attributes of each record representing an expense line, and causing displaying, on the first entity computing device, a notification if a particular column attribute of a record has a particular marking that is associated with the notification.
15 . The one or more non-transitory computer-readable storage media of claim 9 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform:
determining, based on the comparison, whether a similarity between the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors is greater than a predetermined threshold; and
in response to determining that the similarity is greater than the predetermined threshold, validating the expense line to be procurable and subject to alerting, notification, marking, or other response.
16 . The one or more non-transitory computer-readable storage media of claim 9 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform transmitting the notification using one of: a text message, an email message, and an in-application notification to the first entity computing device.
17 . A computer system comprising:
one or more processors;
a database interface that is communicatively coupled to a storage device comprising a database;
one or more non-transitory computer-readable storage media coupled to the one or more processors and storing one or more sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform:
accessing an expense line for a travel expense for an enterprise, wherein the expense line is a subject of a procurement action under a relevant contract;
using a first machine learning model, determining a category associated with the expense line;
evaluating the expense line using the category associated with the expense line and a table of categories that are procurable with references to related travel contracts;
using a database search query, retrieving from a contract database comprising data relating to travel contracts between travel service providers and the enterprise, historic invoice records associated with the travel contracts;
generating, using a second machine-learning model, an expense line descriptive semantic vector corresponding to the expense line and a plurality of invoice lines descriptive semantic vectors corresponding to the historic invoice records associated with the travel contracts;
evaluating, using a semantic similarity algorithm, a description field of the expense line and description fields of the historic invoice records associated with the travel contracts, wherein evaluating comprises comparing the expense line descriptive semantic vector corresponding to the expense line for the travel expense and the plurality of invoice lines descriptive semantic vectors corresponding to the historic invoice records associated with the travel expense;
determining, based on comparison between the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors, a match between the description field of the expense line and the description fields of the historic invoice records associated with travel contracts; and
in response to determining the match, executing a responsive action for the expense line, wherein the responsive action comprises one or more of generating a notification to a first entity computing device, marking the expense line in the database, and initiating a workflow of the computer system to apply the relevant contract to the expense line,
wherein marking the expense line in the database comprises, in response to comparing the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors and determining the match between the description field of the expense line and the description fields of the historic invoice records associated with travel contracts, updating an expense line record in the database with an attribute or column value specifying that the expense line for the travel expense is an out-of-contract expense.
18 . The computer system of claim 17 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform updating the expense line with the determined category when the expense line has a null value for a category.
19 . The computer system of claim 17 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform applying clustering and sampling to reduce a number of historic invoice records for comparison.
20 . The computer system of claim 17 , wherein the expense line includes date, category, description, and amount.
21 . The computer system of claim 17 , wherein the workflow includes applying a contract-based discount or other price adjustment to the expense line.
22 . The computer system of claim 17 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform retrieving a set of expense lines for a user to read column attributes of each record representing an expense line, and causing displaying, on the first entity computing device, a notification if a particular column attribute of a record has a particular marking that is associated with the notification.
23 . The computer system of claim 17 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform:
determining, based on the comparison, whether a similarity between the expense line descriptive semantic vector and the plurality of invoice lines descriptive semantic vectors is greater than a predetermined threshold; and
in response to determining that the similarity is greater than the predetermined threshold, validating the expense line to be procurable and subject to alerting, notification, marking, or other response.
24 . The computer system of claim 17 , further comprising sequences of instructions which, when executed using the one or more processors, cause the one or more processors to perform transmitting the notification using one of: a text message, an email message, and an in-application notification to the first entity computing device.