Message-based fee capture and classification
By adopting message-based fee capture and classification methods in the EM system, and using microservices to process text messages received from mobile applications, the problem of inconvenience in the capture and classification of fees in the existing EM system is solved, real-time capture and automatic classification of fees are realized, and the efficiency and reliability of the system are improved.
Patent Information
- Application Number
- CN202411181115.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-28
- Filing Date
- 2024-08-27
- Publication Date
- 2025-03-04
AI Technical Summary
The lack of effective and reliable ways of capturing and classifying expenses by existing enterprise expense or expenditure management (EM) systems leads to the need for users to manually create expense entries when making digital payments, which is time-consuming and error-prone, and the system is difficult to track and monitor expenses in real time.
By using message-based fee capture and classification methods, microservices receive text messages sent from mobile applications, extract named entities, evaluate whether they represent valid expenditures, and classify them into one of multiple categories to generate expenditure entries.
Real-time capture, automatic verification and automatic classification of fees in heterogeneous digital payment platforms is realized, which improves the efficiency and reliability of the EM system, simplifies user operation processes, and reduces the demand for computing resources.
Smart Images

Figure CN119558994A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to enterprise expense or spend management (EM) systems, and more particularly, to EM systems using message-based expense capture and classification. Background Art
[0002] Enterprise expense or spend management (EM) systems typically offer a suite of software and services designed to help organizations effectively manage their travel, expense, and invoicing processes. For example, EM software can be used to track and control employee spending, ensure compliance with spending policies, and streamline the reimbursement process. However, existing enterprise EM solutions often lack an efficient and reliable way to capture and categorize expenses. Therefore, there is room for improvement in enterprise EM systems. Summary of the invention
[0003] According to an embodiment of the present disclosure, a computer-implemented method is provided, including: receiving, by a microservice, a text message sent from a mobile application; extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents valid expenditure based on the plurality of named entities; in response to discovering that the text message represents valid expenditure, classifying, by the microservice, the text message into one of a plurality of categories; and generating, by the microservice, an expenditure entry, the expenditure entry including the plurality of named entities and the category into which the text message is classified.
[0004] According to an embodiment of the present disclosure, wherein the text message is one of a plurality of text messages and the expense entry is one of a plurality of expense entries generated from the plurality of text messages, the method further comprises selecting one or more of the expense entries and generating a report including one or more of the selected expense entries.
[0005] According to an embodiment of the present disclosure, the method further includes: sending a response from the microservice to the mobile application, wherein the response includes an identifier of the expense item.
[0006] According to an embodiment of the present disclosure, the microservice switches from a sleep mode to an active mode after receiving a text message from a mobile application, and switches back to the sleep mode after sending a response to the mobile application.
[0007] According to an embodiment of the present disclosure, the extracting includes identifying words in the text message that correspond to predefined entity classes.
[0008] According to an embodiment of the present disclosure, it also includes defining a character sequence pattern and a label for at least one entity class.
[0009] According to an embodiment of the present disclosure, the character sequence pattern of at least one entity class represents a plurality of consecutive decimal numbers.
[0010] According to an embodiment of the present disclosure, the evaluating includes comparing the plurality of named entities with pre-registered entity data.
[0011] According to an embodiment of the present disclosure, the classification includes converting the text message into a numerical vector in a multi-dimensional space and measuring the similarity between the numerical vectors.
[0012] According to an embodiment of the present disclosure, it also includes training a machine learning model using text messages and the categories into which the text messages are classified.
[0013] According to an embodiment of the present disclosure, a computing system is provided, comprising: a memory; one or more hardware processors coupled to the memory; and one or more computer-readable storage media storing instructions, which, when loaded into the memory, cause the one or more hardware processors to perform operations, the operations comprising: receiving, by a microservice, a text message sent from a mobile application; extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents valid expenditure based on the plurality of named entities; in response to finding that the text message represents valid expenditure, classifying, by the microservice, the text message into one of a plurality of categories; and generating, by the microservice, an expenditure entry, the expenditure entry comprising the plurality of named entities and the category into which the text message is classified.
[0014] According to an embodiment of the present disclosure, wherein the text message is one of a plurality of text messages and the expense entry is one of a plurality of expense entries generated from the plurality of text messages, the operation further comprises selecting one or more of the expense entries and generating a report including one or more of the selected expense entries.
[0015] According to an embodiment of the present disclosure, the operation further includes: sending a response from the microservice to the mobile application, wherein the response includes an identifier of the expense item.
[0016] According to an embodiment of the present disclosure, the microservice switches from a sleep mode to an active mode after receiving a text message from a mobile application, and switches back to the sleep mode after sending a response to the mobile application.
[0017] According to an embodiment of the present disclosure, the extracting includes identifying words in the text message that correspond to predefined entity classes.
[0018] According to an embodiment of the present disclosure, the operation further includes defining a character sequence pattern and a label for at least one entity class.
[0019] According to an embodiment of the present disclosure, the evaluating includes comparing the plurality of named entities with pre-registered entity data.
[0020] According to an embodiment of the present disclosure, the classification includes converting the text message into a numerical vector in a multi-dimensional space and measuring the similarity between the numerical vectors.
[0021] According to an embodiment of the present disclosure, the operation further includes training a machine learning model using the text messages and the categories into which the text messages are classified.
[0022] According to an embodiment of the present disclosure, one or more non-transitory computer-readable media are provided, on which computer executable instructions are encoded, and the computer executable instructions enable one or more processors to execute a method, the method comprising: receiving, by a microservice, a text message sent from a mobile application; extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents valid expenditure based on the plurality of named entities; in response to discovering that the text message represents valid expenditure, classifying, by the microservice, the text message into one of a plurality of categories; generating, by the microservice, an expenditure entry, the expenditure entry comprising a plurality of named entities and the category into which the text message is classified; and sending a response from the microservice to the mobile application, wherein the response comprises an identifier of the expenditure entry, wherein the extraction comprises identifying words in the text message that correspond to predefined entity classes. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is an overall block diagram of an example computing system that supports message-based expense capture and classification.
[0024] Figure 2 is a flow chart illustrating an example overall method for performing message-based expense capture and classification.
[0025] Figure 3 is a flow chart depicting an example process for message-based expense capture and classification.
[0026] Figure 4 Depicted are example use cases for the disclosed technology.
[0027] Figure 5 is a block diagram of an example computing system in which the described embodiments may be implemented.
[0028] Figure 6 is a block diagram of an example cloud computing environment that can be used in conjunction with the techniques described herein. DETAILED DESCRIPTION
[0029] Example 1 - Expense Management Solution Overview
[0030] Enterprise EM solutions are designed to simplify and automate the process of managing business expenses, travel bookings, and invoicing. For example, enterprise EM software can include features such as travel booking, policy enforcement, approval workflows, and expense reporting. Advanced EM solutions can provide insights into spending patterns and enable organizations to make data-driven decisions for cost optimization.
[0031] However, existing EM solutions also face technical challenges. One of the technical challenges is expense capture. Today, digital payment platforms (e.g., payments using debit and / or credit cards, Unified Payments Interface (UPI), Alipay, WeChat Pay, etc.) are ubiquitous, and they are considered safe, convenient, and sustainable. Despite the growing trend of digital payments, existing EM solutions generally do not have a mechanism to capture expenditures made on these digital payment platforms in real time. Therefore, users must manually create expense entries when making digital payments. This manual expense creation process is not only time-consuming and error-prone, but also often leads to missed expense entries. In addition, users cannot track and monitor their ongoing expenditures. Organizations also face the consequences of manual expense capture. For example, the approval and reimbursement settlement process may be delayed, affecting accounting tasks and the organization's physical closing process. Similarly, organizations cannot track expenditures (e.g., for multiple employees) in real time.
[0032] Another technical challenge is scalability, which can be manifested in two aspects. On the one hand, some EM solutions provide semi-automatic expense capture functionality by integrating with existing digital payment platforms using platform-specific application programming interfaces (APIs). However, this approach lacks scalability because the platform's API may change (e.g., due to software upgrades), and the EM solution is incompatible with new or unknown digital payment platforms. On the other hand, existing EM solutions face scalability challenges in processing a large number of expense entries. Each expense entry typically includes multiple fields (e.g., digital payment provider, supplier, payment type, currency, date / time, expense type, etc.). Existing EM solutions typically involve multiple API calls to input data (e.g., by user input) into these fields. When these fields are manually entered in separate sessions, multiple authentication and communication sessions are required. Therefore, a large number of expense entries may have high demands on computing resources (e.g., memory usage and CPU consumption), and may slow down or even crash the EM system.
[0033] The technology described herein overcomes many of the above technical challenges by using message-based expense capture and classification. Specifically, the intelligent EM system described herein uses named entity recognition and natural language processing techniques to analyze messages generated by various digital payment platforms. Therefore, the intelligent EM system can achieve real-time (or substantially real-time) capture of expenses in heterogeneous digital payment platforms, automatic verification of expenses, and automatic classification of expense types, thereby improving the efficiency and reliability of the EM system. Example 2 - Example intelligent EM system supporting message-based expense capture and classification
[0034] Figure 1 A general block diagram of an example intelligent EM system 100 that supports message-based expense capture and classification is shown.
[0035] like Figure 1 As shown, the intelligent EM system 100 may include an expense processing microservice or EPMS 120. As described herein, a microservice is a small, independently deployable, and loosely coupled software application that performs a specific function within a larger enterprise application. Each microservice can be independently developed, deployed, and scaled, thereby promoting flexibility, modularity, and easier maintenance. Microservices can communicate through predefined APIs and can be written in different programming languages, allowing agile development and effective system architecture. In the depicted example, the EPMS 120 includes an API gateway 122, a named entity recognition (NER) engine 130, a plurality of predefined entity classes 132, a validator 140, a user-defined configuration 142, a natural language processing (NLP) classifier 150, an entry generator 160, and a report generator 170.
[0036] The EPMS 120 can communicate (e.g., via a wireless or wired communication channel) with one or more mobile devices 110 (e.g., smart phones, tablets, etc.). Each mobile device 110 can receive text messages 104 from various sources. For example, after a user of the mobile device 110 makes a purchase using a digital payment platform, the provider 102 of the digital payment platform can send a text message 104 to the mobile device 110 (e.g., via a short message service or SMS) with a purchase summary (e.g., with information about the vendor, payment type, payment amount, purchase date / time, etc.).
[0037] The mobile device 110 may have a mobile application 106 that is configured to relay the received text message 104 to the EPMS 120 along with the user's identification (ID) information. For example, the mobile application 106 may send the text message 104 and the user ID to the EPMS 120 via a secure messaging channel therebetween. In order to establish a secure messaging channel, a secure authentication mechanism may be used. For example, the mobile applicant 106 may first send a request with user credentials or an authentication token to the EPMS 120 (e.g., via HTTPS). The EPMS 120 may verify the credentials (e.g., using OAuth, JWT, or other authentication protocols) and grant access if valid. Once authenticated, the EPMS 120 may generate a unique session token or API key and send it back to the mobile application. Subsequent requests from the mobile application 106 include the token in the request header, allowing the EPMS 120 to verify the authenticity of the mobile device 110 and grant access to authorized resources. As Figure 1 As shown, the API gateway 122 of the EPMS 120 may be configured to handle communications with the mobile application 106 (including authentication and receiving text messages).
[0038] The text message 104 received by the API gateway 122 can be sent to the NER engine 130 for initial processing. A named entity is a specific type of entity in a natural language text that has a name and represents a real-world object or concept. Named entities are typically proper nouns and include entities such as names of people, organizations, locations, dates, times, monetary values, etc. For domain-specific applications, such as message-based expense capture and classification described herein, specific verb phrases or action words (e.g., "purchased", "loaned", etc.) can also be considered named entities. Named entity recognition is a natural language processing task involving the identification and classification of named entities in a given text. The NER engine 130 is configured to identify and extract relevant named entities from the text message 104, and assign values to predefined entity classes 132 based on the extracted named entities. In some examples, the NER engine 130 can be implemented using machine learning and NLP techniques. In one particular example, the NER engine 130 may identify named entities based on user-defined patterns, for example, by using regular expressions or a rule-based approach that matches specific sequences of words, capitalization, or context to identify entities in the text message 104, such as names, dates, or customized domain-specific terms.
[0039] In some examples described herein, the predefined entity classes 132 may include the following: "PROVIDER", "AMOUNT", "CARD_NUMBER", "DATE", "CURRENCY", "TRANS_TYPE_DEBITED", etc. An extracted named entity representing the provider of a digital payment platform may be assigned to the "PROVIDER" entity class. An extracted named entity representing the amount of a charge may be assigned to the "AMOUNT" entity class. An extracted named entity representing the last four digits of a debit or credit card may be assigned to the "CARD_NUMBER" entity class. An extracted named entity representing the date of expenditure may be assigned to the "DATE" entity class. An extracted named entity representing the currency of the charge may be assigned to the "CURRENCY" entity class. The extracted named entity indicating the expense event (e.g., if the text message 104 includes any of the words "spent," "spend," "purchased," "purchase," "debited," etc.) may be assigned to the "TRANS_TYPE_DEBITED" entity class. If a named entity corresponding to the "TRANS_TYPE_DEBITED" entity class is extracted from the text message 104, the Boolean variable "IsSpend" may be set to TRUE. Otherwise, the value of "IsSpend" may be set to FALSE (e.g., the text message 104 may indicate that a loan was granted to the user's account, or a security alert was sent from a digital payment platform, etc.). It should be understood that the labels of the above-mentioned entity classes 132 are merely exemplary. In addition, the number of predefined entity classes 132 may be more or less than the entity classes listed above.
[0040] The extracted named entities may be sent to validator 140 for evaluation. In some examples, validator 140 first determines whether text message 104 represents an expense, for example by checking an "IsSpend" variable. If so, validator 140 compares the selected named entity with pre-registered entity data stored in configuration 142 to determine whether the digital payment method is authorized. For example, validator 140 may check whether "PROVIDER" and "CARD_NUMBER" match corresponding data specified for the user and pre-registered in configuration 142. On the other hand, if text message 104 does not represent an expense or the selected named entity does not match the pre-registered entity data stored in configuration 142, text message 104 will be ignored (and no expense entry will be created).
[0041] After the extracted named entities are successfully verified by the verifier 140, the text message 104 can be further processed by the NLP classifier 150, which can classify the text message 104 into one of a plurality of categories or expense types using a machine learning (ML) model. Some categories can be predefined, such as "parking", "accommodation", "food", etc. If the text message 104 cannot be classified into any of the predefined categories, a new category or expense type (e.g., "unknown" or "miscellaneous") can be created, which can be renamed or redefined by the user.
[0042] In some examples, the NLP classifier 150 can convert the text message 104 into a numerical vector in a multidimensional space and measure the similarity between the numerical vectors. The conversion of the text message 104 to a numerical vector can be performed based on word embedding, which provides a dense vector representation of a word in a high-dimensional vector space. Word embedding captures semantic relationships and contextual information between words based on the co-occurrence pattern of words in a large text corpus, and enables text data to be represented in a more meaningful and computationally efficient manner. Example word embedding algorithms include Word2Vec, GloVe, TF-IDF, etc. The individual word embeddings in a sentence can be combined to form a fixed-length vector representation of the entire sentence, also referred to as a "sentence representation." After obtaining the sentence representation, similarity measurement techniques can be used to compare the similarity between sentences or documents. Different similarity metrics can be used, such as cosine similarity, Euclidean distance, etc. After calculating the similarity scores between sentences, they can be used as features in a text classification ML model. Example classifiers such as Support Vector Machine (SVM), Naive Bayes, or deep learning models such as Recurrent Neural Network (RNN) or Convolutional Neural Network (CNN) can be used to learn from the similarity scores and classify the text into different categories.
[0043] The item generator 160 is configured to generate an expense item, which includes a plurality of extracted named entities and the category into which the text message 104 is classified. The generated expense item may be saved to the database 180 for storage. Each expense item in the database 180 may have an identifier for quick retrieval.
[0044] When a new expense item is generated based on the incoming text message 104, the API gateway 122 can receive a notification. The API gateway 122 can then send a response to the mobile application 106. In some examples, the response can be an in-app notification sent by the mobile application 106. In other examples, the response can be in the format of a text message sent via SMS. The response can include an identifier of the expense item. Thus, after receiving the response, the user of the mobile device 110 can access or view the expense item stored in the database 180 by providing the identifier of the expense item (and other authentication information).
[0045] The data processing steps performed by EPMS 120, starting from receiving the text message from mobile application 106 to sending a response to mobile application 106, can be fully automated and in real-time or substantially real-time, with minimal processing delay (e.g., less than 1 second). In addition, each expense entry, which can contain multiple fields (e.g., digital payment provider, vendor, payment type, currency, date / time, expense type, etc.), can be created during one communication session with mobile application 106 (using a single API call).
[0046] In some examples, EPMS 120 may remain in sleep mode when no text messages are being processed. EPMS 120 may switch from sleep mode to active mode after receiving text message 104 from mobile application 106, and switch back to sleep mode after sending a response to mobile application 106. In sleep mode, EPMS 120 consumes minimal resources and remains dormant, ready to be activated on demand. In active mode, EPMS 120 may be fully operational, processing requests and performing their designated tasks. Such mode switching allows efficient resource utilization by activating only required services when needed, thereby reducing overall system overhead and enabling better scalability and responsiveness in distributed applications.
[0047] In some examples, the mobile application 106 may send multiple text messages to the EPMS 120, each of which is sent from a corresponding digital payment platform to the mobile device 110. For example, a user of the mobile device 110 may make several purchases using multiple digital payment platforms. For each purchase, the corresponding digital payment platform may send a text message (including a summary of the purchase) to the mobile device 110, which in turn may send the text message to the EPMS 120 for processing. For each received text message, if the text message is successfully verified by the verifier 140, a corresponding expense entry may be generated and stored in the database 180. The user may log in to the EPMS 120 via a secure portal to view and / or edit the expense entries stored in the database 180 (e.g., add comments, etc.). In some examples, the user may select one or more of the expense entries and generate an expense report including one or more of the selected expense entries. Unselected expense entries (e.g., representing personal expenses not related to business trips, etc.) are not included in the expense report. The selection of expense entries and the generation of the expense report may be performed by the report generator 170. The generated expense report may then be submitted for approval or other EM processes.
[0048] In some examples, expense entries stored in database 180 may be submitted for quality checking. For example, newly generated expense entries may be reviewed and / or verified offline to determine whether text message 104 is correctly classified. After confirming that text message 104 is correctly classified, text message 104 and the category into which the text message is classified may be used to train ML model 190. Trained ML model 190 may be incorporated into NLP classifier 150 or update NLP classifier 150.
[0049] Figure 1 The system components shown in can be configured in many different ways. For example, although Figure 1 Database 180 and ML model 190 are shown as being external to EPMS 120, but in other examples, database 180 and / or ML model 190 may be part(s) of EPMS 120. As another example, in some implementations, report generator 170 may be external to EPMS 120.
[0050] In practice, the systems shown herein (such as computing system 100) may vary in complexity, with additional functionality, more complex components, etc. For example, additional functionality may exist within EPMS 120. Additional components may be included to implement security, redundancy, load balancing, reporting designs, etc.
[0051] The described computing systems can be networked via wired or wireless network connections (including the Internet). Alternatively, the systems can be connected via intranet connections (e.g., in corporate environments, government environments, etc.).
[0052] System 100 and any other systems described herein may be implemented in conjunction with any hardware components described herein, such as a computing system (e.g., processing unit, memory, etc.) described below. In any examples herein, text messages, named entities, expense entries, etc. may be stored in one or more computer-readable storage media or computer-readable storage devices. The techniques described herein may be general to the specifics of the operating system or hardware and may be applied in any kind of environment to utilize the described features.
[0053] Example 3 - Example Overall Method for Implementing Message-Based Expenses Capture and Classification
[0054] Figure 2 is a flow chart illustrating an example overall method 200 for implementing message-based expense capture and classification, and may be used by, for example, Figure 1 Microservices implementation of EPMS120.
[0055] At step 210 , the microservice may receive a text message sent from a mobile application.
[0056] At step 220 , the microservice may extract a plurality of named entities from the text message (eg, by analyzing the text message using the NER engine 130 ).
[0057] At step 230 , the microservice may evaluate whether the text message represents a valid expenditure based on the plurality of named entities (eg, by evaluating the extracted named entities using validator 140 ).
[0058] At step 240 , in response to discovering that the text message represents a valid expense, the microservice may classify the text message into one of a plurality of categories (eg, using NLP classifier 150 ).
[0059] At step 250 , the microservice may generate an expense entry (eg, using entry generator 160 ) that includes the plurality of named entities and the category into which the text message was categorized.
[0060] Optionally, as described above, the microservice can then send a response to the mobile application (including an identifier of the expense item).
[0061] Method 200 and any other methods described herein may be performed by computer executable instructions (e.g., causing a computing system to perform the method) stored in one or more computer readable media (e.g., storage devices or other tangible media) or stored in one or more computer readable storage devices. Such methods may be performed in software, firmware, hardware, or a combination thereof. Such methods may be performed, at least in part, by a computing system (e.g., one or more computing devices).
[0062] The actions shown can be described from alternative perspectives while still implementing these techniques. For example, "sending" can also be described as "receiving" from a different perspective.
[0063] Example 4 - Example Process Flow for Message-Based Expenses Capture and Classification
[0064] Figure 3 A flowchart depicting an example process 300 for message-based expense capture and classification is shown and may be used by Figure 1 The computing system 100 depicted in FIG. Figure 3 The components shown in (e.g., NER engine 330, entity class 332, validator 340, configuration 342, NLP classifier 350, database 380, ML model 390, etc.) correspond to Figure 1 ) and the corresponding components shown in . (e.g., 130, 132, 140, 142, 150, 180, 190, etc.).
[0065] Process 300 begins when NER engine 330 receives text message 304 sent from mobile application 306, and NER engine 330 can extract multiple named entities 334 from text message 304 and assign values to predefined entity classes 332 based on the extracted named entities 334. As described above, the extracted named entities can be assigned to the following entity classes: "PROVIDER", "AMOUNT", "CARD_NUMBER", "DATE", "CURRENCY", "TRANS_TYPE_DEBITED", etc. A Boolean variable "IsSpend" can be derived based on whether a named entity corresponding to the "TRANS_TYPE_DEBITED" entity class is extracted from text message 304.
[0066] The extracted named entity 334 can be evaluated by a validator 340. The first stage 344 of the validator 340 determines whether the text message 304 represents an expenditure, for example by checking the value of an "IsSpend" variable. If the test message 304 does not represent an expenditure (e.g., "IsSpend" is FALSE), the process 300 will return or abort. Otherwise (e.g., "IsSpend" is TRUE), the evaluation can move to the second stage 346, where the selected named entity 334 can be compared with the pre-registered entity data stored in the configuration 342 to determine whether the digital payment method is authorized. For example, if the values of both "PROVIDER" and "CARD_NUMBER" match the corresponding pre-registered entity data in the configuration 342, the text message 304 can be considered to represent a valid expenditure. Otherwise, the process 300 will return or abort.
[0067] After successful authentication by validator 340 , text message 304 may be sent to NLP classifier 350 , which may classify text message 304 into one of a plurality of categories or expense types.
[0068] The output of NLP classifier 350 may include a newly generated expense entry 352 that includes the extracted named entity 334 and the category into which text message 304 was classified. Newly generated expense entry 352 may be saved in database 380. Additionally, response 362 may be sent to mobile application 306. Response 362 may include an identifier of the newly generated expense entry and / or a link to the newly generated expense entry.
[0069] At step 364, each expense entry stored in database 380 may be submitted for quality check to determine whether the corresponding text message is correctly classified. After confirming that the text message is correctly classified, the text message and the category into which the text message is classified may be used to train ML model 390, which may be incorporated into or update NLP classifier 350.
[0070] Example 5 - Example Use Case
[0071] Figure 4 Depicted is an example use case of extracting named entities from a text message 404 that reads: "Reminder: You spent $17 on your AMEX Corp card xx7234 at KFC on March 21, 2023 at 9:07 PM IST. If this was not done by you, please call 18004190691".
[0072] In the depicted example, the extraction of named entities is performed by using SpaCy, an open source NLP library for text processing tasks. Specifically, named entity recognition in SpaCy can be implemented using rule-based matching through its "Matcher" class. Matcher allows custom patterns to be defined using a combination of language features, regular expressions, and token attributes. These patterns can represent specific entities or phrases of interest. Matcher then effectively searches for occurrences in the text that match these defined patterns, enabling the identification and extraction of named entities based on user-defined rules.
[0073] Figure 4 A portion of software code 436 is shown that defines custom patterns for several entity classes, including "CARD_NUMBER," "TRANS_TYPE_DEBITED," "TRANS_TYPE_CREDITED," and "CURRENCY." Each custom pattern can include a label for the entity class (e.g., "CARD_NUMBER") and a character sequence pattern (e.g., [{"ORTH":"*"}, {"ORTH":"*"}, {"SHAPE":"dddd"}]). For example, the character sequence pattern {"SHAPE":"dddd"} indicates four consecutive digits or decimal numbers. In the depicted example, three custom patterns are defined to cover different variations of the last four digits of a card number (e.g., **1234, XX1234, XX1234, etc.). The default space settings can be used to extract named entities for other entity classes, such as "PROVIDER," "VENDOR," "DATE," and "AMOUNT."
[0074] The Boolean value assigned to the variable "IsSpend" may be determined based on whether there is an extracted named entity corresponding to the "TRANS_TYPE_DEBITED" entity class. If so, the value of "IsSpend" may be set to TRUE. Otherwise, the value of "IsSpend" may be set to FALSE.
[0075] Figure 4Also shown are the results of named entity recognition 434. The right column shows the labels of the entity classes (including the default entity classes and the custom entity classes), and the left column shows the extracted named entities corresponding to the corresponding entity classes. In this example, "spent" is the extracted named entity corresponding to the "TRANS_TYPE_DEBITED" entity class (thus, "IsSpend" will be assigned to TURE), "$" is the extracted named entity corresponding to the "CURRENCY" entity class, "xx7234" is the extracted named entity corresponding to the "CARD_NUMBER" entity class, and so on.
[0076] Figure 4 Classification results 450 for three example text messages are also shown (e.g., performed by NLP classifier 150 or 350). As shown, the first text message (the same message as 404) is classified into the "food" category (or expense type), the second text message is classified into the "fuel" category (or expense type), and the third text message is classified into the "transportation" category (or expense type). As described above, three expense items can be generated from the three text messages, respectively. Each expense item can include a named entity extracted from the corresponding text message and a corresponding category (or expense type). The user can select some or all of the expense items to generate an expense report.
[0077] Example 6 - Example Advantages
[0078] Many advantages can be achieved through the techniques described herein.
[0079] As mentioned above, existing EM solutions are generally unable to capture expenditures made on digital payment platforms in real time. Therefore, when users make digital payments, they must rely on users to manually create expenditure entries. The message-based expenditure capture and classification technology described herein can automatically and accurately capture expenditures made on digital payment platforms in real time (or substantially real time). Therefore, users can track and monitor their ongoing expenditures, and organizations can simplify their EM processes.
[0080] In addition, the techniques described herein improve the scalability of the EM process. In one aspect, the message-based expense capture and classification techniques described herein allow for seamless integration with heterogeneous digital payment platforms, thereby avoiding the need to integrate separately with each digital payment platform by calling platform-specific APIs. On the other hand, in contrast to conventional EM solutions that require multiple communication sessions with multiple API calls to complete an expense entry, the message-based expense capture and classification techniques described herein can automatically complete expense entries in one communication session with a single API call. Therefore, when processing a large number of expense entries, the techniques described herein can significantly reduce the demand for computing resources (e.g., memory usage and CPU consumption).
[0081] Example 7 - Example computing system
[0082] Figure 5 An example of a suitable computing system 500 is depicted in which the described innovations may be implemented. Computing system 500 is not intended to suggest any limitation as to the scope of use or functionality of the present disclosure, as the innovations may be implemented in a variety of computing systems.
[0083] refer to Figure 5 , the computing system 500 includes one or more processing units 510, 515 and memories 520, 525. Figure 5 , the basic configuration 530 is included within the dashed line. Processing units 510, 515 can execute computer executable instructions, such as for implementing the features described in the examples herein (e.g., method 200). The processing unit can be a general-purpose central processing unit (CPU), a processor in an application-specific integrated circuit (ASIC), or any other type of processor. In a multi-processing system, multiple processing units can execute computer executable instructions to increase processing power. For example, Figure 5 A central processing unit 510 and a graphics processing unit or co-processing unit 515 are shown. Tangible memory 520, 525 may be volatile memory (e.g., registers, cache, RAM), non-volatile memory (e.g., ROM, EEPROM, flash memory, etc.), or some combination of both accessible by the processing unit(s) 510, 515. The memory 520, 525 may store software 580 implementing one or more innovations described herein in the form of computer-executable instructions suitable for execution by the processing unit(s) 510, 515.
[0084] The computing system 500 may have additional features. For example, the computing system 500 may include storage 540, one or more input devices 550, one or more output devices 560, and one or more communication connections 570, including input devices, output devices, and communication connections for interacting with a user. An interconnection mechanism (not shown) such as a bus, controller, or network may interconnect the components of the computing system 500. Typically, operating system software (not shown) may provide an operating environment for other software executed in the computing system 500 and coordinate the activities of the components of the computing system 500.
[0085] Tangible storage 540 may be removable or non-removable and include disks, tapes or cassettes, CD-ROMs, DVDs, or any other medium that can be used to store information in a non-transitory manner and that can be accessed within computing system 500. Storage 540 may store instructions for software implementing one or more innovations described herein.
[0086] Input device(s) 550 may be an input device such as a keyboard, a mouse, a pen or trackball, a voice input device, a scanning device, a touch device (e.g., a touchpad, a display, etc.), or another device that provides input to the computing system 500. Output device(s) 560 may be a display, a printer, a speaker, a CD burner, or another device that provides output from the computing system 500.
[0087] Communication connection(s) 570 may enable communication with another computing entity via a communication medium. The communication medium may carry information such as computer executable instructions, audio or video input or output, or other data in a modulated data signal. A modulated data signal is a signal that has one or more of its characteristics set or changed in a manner that encodes information in the signal. By way of example and not limitation, the communication medium may use electrical, optical, RF, or other carriers.
[0088] Innovations may be described in the context of computer executable instructions, such as computer executable instructions included in program modules, which are executed in a computing system on a target real or virtual processor (e.g., which are ultimately executed on one or more hardware processors). Typically, program modules or components may include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules may be combined or split between program modules as needed. Computer executable instructions for program modules may be executed within a local or distributed computing system.
[0089] For purposes of presentation, the detailed description uses terms such as "determine" and "use" to describe computer operations in a computing system. These terms are high-level descriptions of operations performed by a computer and should not be confused with actions performed by a human. The actual computer operations corresponding to these terms vary depending on the implementation.
[0090] Example 8 - Computer Readable Medium
[0091] Any computer-readable medium herein may be non-transitory (e.g., volatile memory such as DRAM or SRAM, non-volatile memory such as magnetic storage devices, optical storage devices, etc.) and / or tangible. Any storage actions described herein may be implemented by storing in one or more computer-readable media (e.g., computer-readable storage media or other tangible media). Anything described as stored (e.g., data created and used during an implementation) may be stored in one or more computer-readable media (e.g., computer-readable storage media or other tangible media). Computer-readable media may be limited to implementations that are not composed of signals.
[0092] Any method described herein can be implemented by computer-executable instructions in (e.g., stored on, encoded on, etc.) one or more computer-readable media (e.g., computer-readable storage media or other tangible media) or one or more computer-readable storage devices (e.g., memory, magnetic storage, optical storage, etc.). Such instructions can cause a computing device to perform the method. The techniques described herein can be implemented in a variety of programming languages.
[0093] Example 9 - Example cloud computing environment
[0094] Figure 6 An example cloud computing environment 600 is depicted in which the described techniques may be implemented, including, for example, system 100 and other systems herein. Cloud computing environment 600 may include cloud computing services 610. Cloud computing services 610 may include various types of cloud computing resources, such as computer servers, data repositories, network resources, etc. Cloud computing services 610 may be centrally located (e.g., provided by a data center of an enterprise or organization) or distributed (e.g., provided by various computing resources located in different locations, such as different data centers and / or located in different cities or countries).
[0095] Cloud computing services 610 can be utilized by various types of computing devices (e.g., client computing devices), such as computing devices 620, 622, and 624. For example, computing devices (e.g., 620, 622, and 624) can be computers (e.g., desktop or laptop computers), mobile devices (e.g., tablet computers or smart phones), or other types of computing devices. For example, computing devices (e.g., 620, 622, and 624) can utilize cloud computing services 610 to perform computing operations (e.g., data processing, data storage, etc.).
[0096] In practice, cloud-based, on-premises deployment, or hybrid scenarios can be supported.
[0097] Example 10 - Example Implementation
[0098] Although the operations of some methods in the disclosed methods are described in a specific sequential order for ease of presentation, this description covers rearrangement unless the specific language set forth herein requires a specific order. For example, operations described sequentially may be rearranged or performed simultaneously in some cases.
[0099] As used in this application and in the claims, the singular forms "a," "an," and "the" include plural forms unless the context clearly dictates otherwise. Additionally, the term "includes" means "comprises." Furthermore, "and / or" means "and" or "or," as well as "and" and "or."
[0100] Example 11 - Example Implementation
[0101] Any of the following example clauses may be implemented.
[0102] Clause 1. A computer-implemented method comprising: receiving, by a microservice, a text message sent from a mobile application; extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents valid expenditure based on the plurality of named entities; in response to discovering that the text message represents valid expenditure, classifying, by the microservice, the text message into one of a plurality of categories; and generating, by the microservice, an expenditure entry including the plurality of named entities and the category into which the text message is classified.
[0103] Clause 2. A method according to clause 1, wherein the text message is one of a plurality of text messages and the expense entry is one of a plurality of expense entries generated from the plurality of text messages, wherein the method further comprises selecting one or more of the expense entries and generating a report including one or more of the selected expense entries.
[0104] Clause 3. The method of any of Clauses 1-2, further comprising: sending a response from the microservice to the mobile application, wherein the response includes an identifier of the expense item.
[0105] Clause 4. The method of clause 3, wherein the microservice switches from sleep mode to active mode after receiving a text message from the mobile application, and switches back to sleep mode after sending a response to the mobile application.
[0106] Clause 5. The method of any of clauses 1-4, wherein extracting comprises identifying words in the text message that correspond to predefined entity classes.
[0107] Clause 6. The method of clause 5, further comprising defining character sequence patterns and labels for at least one entity class.
[0108] Clause 7. A method according to clause 6, wherein the character sequence pattern of at least one entity class represents a plurality of consecutive decimal numbers.
[0109] Clause 8. A method according to any of clauses 1-7, wherein the evaluating comprises comparing the plurality of named entities to pre-registered entity data.
[0110] Clause 9. The method of any of clauses 1-8, wherein the classification comprises converting the text message into numerical vectors in a multidimensional space and measuring similarities between the numerical vectors.
[0111] Clause 10. The method according to any of clauses 1-9 also includes training a machine learning model using text messages and the categories into which the text messages are classified.
[0112] Clause 11. A computing system comprising: a memory; one or more hardware processors coupled to the memory; and one or more computer-readable storage media storing instructions that, when loaded into the memory, cause the one or more hardware processors to perform operations, the operations comprising: receiving, by a microservice, a text message sent from a mobile application; extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents valid expenditure based on the plurality of named entities; in response to discovering that the text message represents valid expenditure, classifying, by the microservice, the text message into one of a plurality of categories; and generating, by the microservice, an expense entry including the plurality of named entities and the category into which the text message is classified.
[0113] Clause 12. A system according to clause 11, wherein the text message is one of a plurality of text messages and the expense entry is one of a plurality of expense entries generated from the plurality of text messages, wherein the operation further includes selecting one or more of the expense entries and generating a report including one or more of the selected expense entries.
[0114] Clause 13. The system of any of clauses 11-12, wherein the operations further comprise: sending a response from the microservice to the mobile application, wherein the response includes an identifier of the expense item.
[0115] Clause 14. The system of clause 13, wherein the microservice switches from sleep mode to active mode after receiving a text message from the mobile application, and switches back to sleep mode after sending a response to the mobile application.
[0116] Clause 15. The system of any of Clauses 11-14, wherein extracting comprises identifying words in the text message that correspond to predefined entity classes.
[0117] Clause 16. The system of clause 15, wherein the operations further comprise defining character sequence patterns and labels for at least one entity class.
[0118] Clause 17. A system according to any of clauses 11-16, wherein the evaluating comprises comparing the plurality of named entities to pre-registered entity data.
[0119] Clause 18. The system of any of clauses 11-17, wherein the classification comprises converting the text message into numerical vectors in a multidimensional space and measuring similarities between the numerical vectors.
[0120] Clause 19. A system according to any of clauses 11-18, wherein the operation also includes training a machine learning model using text messages and the categories into which the text messages are classified.
[0121] Item 20. One or more non-transitory computer-readable media having encoded thereon computer-executable instructions that cause one or more processors to perform a method, the method comprising: receiving, by a microservice, a text message sent from a mobile application; extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents valid expenditure based on the plurality of named entities; in response to discovering that the text message represents valid expenditure, classifying, by the microservice, the text message into one of a plurality of categories; generating, by the microservice, an expenditure entry, the expenditure entry comprising the plurality of named entities and the category into which the text message is classified; and sending a response from the microservice to the mobile application, wherein the response comprises an identifier of the expenditure entry, wherein the extraction comprises identifying words in the text message that correspond to predefined entity classes.
[0122] Example 12 - Example Alternatives
[0123] The technology from any example can be combined with the technology described in any one or more other examples. In view of the many possible embodiments to which the principles of the disclosed technology can be applied, it should be recognized that the illustrated embodiments are examples of the disclosed technology and should not be considered as limiting the scope of the disclosed technology. On the contrary, the scope of the disclosed technology includes what is covered by the scope and spirit of the appended claims.
Claims
1. A computer-implemented method comprising: The text message sent from the mobile app is received by the microservice; Extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents a valid expenditure based on the plurality of named entities; In response to finding that the text message represents a valid expense, classifying, by the microservice, the text message into one of a plurality of categories; as well as An expense entry is generated by the microservice, the expense entry including the plurality of named entities and the category into which the text message is classified.
2. A method according to claim 1, wherein the text message is one of a plurality of text messages, and the expense item is one of a plurality of expense items generated from the plurality of text messages, wherein the method further comprises selecting one or more of the expense items and generating a report including the selected one or more of the expense items.
3. The method according to claim 1, further comprising: A response is sent from the microservice to the mobile application, wherein the response includes an identifier of the expense item.
4. The method according to claim 3, wherein: The microservice switches from a sleep mode to an active mode after receiving the text message from the mobile application, and switches back to the sleep mode after sending the response to the mobile application.
5. The method according to claim 1, wherein: The extracting includes identifying words in the text message that correspond to predefined entity classes.
6. The method of claim 5, further comprising defining a character sequence pattern and a label for at least one entity class.
7. The method according to claim 6, wherein: The character sequence pattern of the at least one entity class represents a plurality of consecutive decimal numbers.
8. The method of claim 1, wherein the evaluating comprises comparing the plurality of named entities to pre-registered entity data.
9. The method of claim 1, wherein the classifying comprises converting the text messages into numerical vectors in a multi-dimensional space and measuring similarities between the numerical vectors.
10. The method of claim 1 further comprising training a machine learning model using the text message and the category into which the text message is classified.
11. A computing system comprising: Memory; one or more hardware processors coupled to the memory; as well as One or more computer-readable storage media storing instructions that, when loaded into the memory, cause the one or more hardware processors to perform operations comprising: The text message sent from the mobile app is received by the microservice; Extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents a valid expenditure based on the plurality of named entities; In response to finding that the text message represents a valid expense, classifying, by the microservice, the text message into one of a plurality of categories; and An expense entry is generated by the microservice, the expense entry including the plurality of named entities and the category into which the text message is classified.
12. A system according to claim 11, wherein the text message is one of a plurality of text messages and the expense item is one of a plurality of expense items generated from the plurality of text messages, wherein the operation further comprises selecting one or more of the expense items and generating a report including the selected one or more of the expense items.
13. The system according to claim 11, wherein: The operations also include: A response is sent from the microservice to the mobile application, wherein the response includes an identifier of the expense item.
14. The system according to claim 13, wherein: The microservice switches from a sleep mode to an active mode after receiving the text message from the mobile application, and switches back to the sleep mode after sending the response to the mobile application.
15. The system according to claim 11, wherein: The extracting includes identifying words in the text message that correspond to predefined entity classes.
16. The system of claim 15, wherein: The operations also include defining character sequence patterns and labels for at least one entity class.
17. The system of claim 11, wherein the evaluating comprises comparing the plurality of named entities to pre-registered entity data.
18. The system of claim 11, wherein the classification comprises converting the text messages into numerical vectors in a multi-dimensional space and measuring similarities between the numerical vectors.
19. The system of claim 11, wherein: The operations also include training a machine learning model using the text messages and the categories into which the text messages are classified.
20. One or more non-transitory computer-readable media having computer-executable instructions encoded thereon, the computer-executable instructions causing one or more processors to perform a method comprising: The text message sent from the mobile app is received by the microservice; Extracting, by the microservice, a plurality of named entities from the text message; evaluating, by the microservice, whether the text message represents a valid expenditure based on the plurality of named entities; In response to finding that the text message represents a valid expense, classifying, by the microservice, the text message into one of a plurality of categories; generating, by the microservice, an expense entry, the expense entry including the plurality of named entities and the category into which the text message is classified; as well as sending a response from the microservice to the mobile application, wherein the response includes an identifier of the expense item, Wherein, the extracting includes identifying words in the text message corresponding to predefined entity classes.