An invoice itinerary matching method and device, electronic equipment, storage medium and program product

CN122510031APending Publication Date: 2026-08-04BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
Filing Date
2026-05-06
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0005]本发明实施例提供了一种发票行程匹配方法、装置、电子设备、存储介质及程序产品,解决了发票行程匹配的准确率较低的问题

Benefits of technology

[0020] The technical solution of this invention, in response to an invoice trip matching instruction, determines the invoice type and obtains trip information for each trip, given the invoice to be matched and at least one trip. Then, it identifies a target agent matching the invoice type from multiple agents, and obtains the invoice information by calling the target agent. Based on the invoice information and the trip information, it determines the matching result between the invoice and each trip. This technical solution, by configuring corresponding agents for different invoice types, allows for the determination of the target agent based on the invoice type. Then, by utilizing the target agent's unique capabilities for that invoice type, it obtains invoice information that assists in matching invoices of that type with each trip. Matching is then performed based on the invoice information, thereby solving the problem of low accuracy in invoice trip matching caused by the diversity of invoice types and improving the accuracy of invoice trip matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510031A_ABST
    Figure CN122510031A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an invoice itinerary matching method and device, electronic equipment, storage medium and program product. The method comprises: in response to an invoice itinerary matching instruction, determining an invoice type of an invoice to be matched and obtaining itinerary information of at least one itinerary; determining a target agent matched with the invoice type from a plurality of agents, and obtaining invoice information of the invoice by calling the target agent; and determining a matching result between the invoice and the at least one itinerary according to the invoice information and the itinerary information. The technical solution of the embodiments of the present application can improve the accuracy of invoice itinerary matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to an invoice travel matching method, apparatus, electronic device, storage medium and program product. Background Technology

[0002] In the context of travel expense reimbursement, employees need to match multiple invoices to their corresponding itineraries, fill out a travel expense reimbursement form accordingly, and then submit the form to the company for reimbursement.

[0003] Based on this, in order to improve the efficiency of invoice travel matching, relevant personnel proposed a technical solution of developing matching rules through code and then performing invoice travel matching based on the matching rules.

[0004] In the process of realizing this invention, the inventors discovered the following technical problem in the prior art: the accuracy of invoice travel matching is low, which urgently needs to be solved. Summary of the Invention

[0005] This invention provides an invoice travel matching method, apparatus, electronic device, storage medium, and program product, which solves the problem of low accuracy in invoice travel matching.

[0006] According to one aspect of the present invention, an invoice travel matching method is provided, which may include:

[0007] In response to the invoice trip matching instruction, for the invoice to be matched and at least one trip, determine the invoice type and obtain the trip information for each trip;

[0008] Identify the target agent that matches the invoice type from multiple agents, and obtain the invoice information by calling the target agent;

[0009] Based on the invoice information and the itinerary information for each trip, determine the matching results between the invoice and each trip.

[0010] According to another aspect of the present invention, an invoice travel matching device is provided, which may include:

[0011] The trip information acquisition module is used to respond to the invoice trip matching instruction, and for the invoice to be matched and at least one trip, determine the invoice type and acquire the trip information for each trip;

[0012] The invoice information acquisition module is used to identify the target agent that matches the invoice type from multiple agents, and to obtain the invoice information by calling the target agent;

[0013] The invoice trip matching module is used to determine the matching result between the invoice and each trip based on the invoice information and the trip information of each trip.

[0014] According to another aspect of the present invention, an electronic device is provided, which may include:

[0015] At least one processor; and

[0016] A memory that is communicatively connected to at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by at least one processor to implement the invoice travel matching method provided in any embodiment of the present invention when executed by at least one processor.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon for causing a processor to execute and implement the invoice travel matching method provided in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer program product is provided, on which a computer program is stored, which, when executed by a processor, implements the invoice travel matching method provided in any embodiment of the present invention.

[0020] The technical solution of this invention, in response to an invoice trip matching instruction, determines the invoice type and obtains trip information for each trip, given the invoice to be matched and at least one trip. Then, it identifies a target agent matching the invoice type from multiple agents, and obtains the invoice information by calling the target agent. Based on the invoice information and the trip information, it determines the matching result between the invoice and each trip. This technical solution, by configuring corresponding agents for different invoice types, allows for the determination of the target agent based on the invoice type. Then, by utilizing the target agent's unique capabilities for that invoice type, it obtains invoice information that assists in matching invoices of that type with each trip. Matching is then performed based on the invoice information, thereby solving the problem of low accuracy in invoice trip matching caused by the diversity of invoice types and improving the accuracy of invoice trip matching.

[0021] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of an invoice travel matching method provided by an embodiment of the present invention;

[0024] Figure 2 This is a flowchart of another invoice travel matching method provided by an embodiment of the present invention;

[0025] Figure 3 This is a flowchart illustrating an example of automatic invoice distribution in another invoice travel matching method provided by an embodiment of the present invention;

[0026] Figure 4 This is a flowchart of another invoice travel matching method provided by an embodiment of the present invention;

[0027] Figure 5 This is a flowchart of another invoice travel matching method provided according to an embodiment of the present invention;

[0028] Figure 6a This is a first flowchart of an example of automatic filling of travel expense reports in another invoice itinerary matching method provided by an embodiment of the present invention;

[0029] Figure 6b This is a second flowchart of an example of automatic filling of travel expense reports in another invoice itinerary matching method provided by an embodiment of the present invention;

[0030] Figure 7 This is a structural block diagram of an invoice travel matching device according to an embodiment of the present invention;

[0031] Figure 8 This is a schematic diagram of the structure of an electronic device that implements the invoice travel matching method of this invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to maintain user personal information security and network security.

[0035] Before introducing the embodiments of the present invention, the specific implementation process of the currently applied invoice travel matching scheme will be described by way of example, so as to better understand the reason why the accuracy of invoice travel matching is low, and thus better understand how the embodiments of the present invention solve this problem.

[0036] For example, for an invoice and at least one trip to be matched, optical character recognition (OCR) technology can be used to identify the invoice and extract target fields such as amount, time, and region. Specifically, field information (i.e., field values) representing the target fields can be extracted. Further, matching rules developed through code (such as rules related to the target fields, such as time overlap and region consistency) can be used to match the invoice with each trip. However, as the number of invoice types increases, the extracted field information may not be able to assist in trip matching for invoices of a certain type, thus reducing the accuracy of invoice trip matching.

[0037] Based on this, embodiments of the present invention improve the accuracy of invoice travel matching by combining invoice type and intelligent agent for invoice travel matching. This will be explained in detail below.

[0038] Figure 1This is a flowchart of an invoice travel matching method provided by an embodiment of the present invention. This embodiment is applicable to situations involving invoice travel matching, and is particularly suitable for situations where invoice travel matching is performed first, and then reimbursement single-click filling is performed based on the matching results. This method can be executed by the invoice travel matching device provided by this embodiment of the present invention. This device can be implemented by software and / or hardware, and can be integrated into an electronic device, which can be various user terminals or servers.

[0039] See Figure 1 The method of this invention specifically includes the following steps:

[0040] S110. In response to an invoice trip matching instruction, for the invoice to be matched and at least one trip, determine the invoice type of the invoice and obtain the trip information for each trip.

[0041] The invoice trip matching instruction can be understood as an instruction to match one or more invoices with one or more trips, thereby matching each invoice to the corresponding trip. Based on this, and considering the application scenarios that may be involved in the embodiments of the present invention, optionally, this instruction can be manually triggered by the user (such as an employee) through the system interface when submitting an invoice, or it can be automatically triggered by the system when it detects a newly uploaded invoice, etc., which depends on the actual situation and is not specifically limited here.

[0042] In response to the invoice-trip matching instruction, one or more invoices and one or more trips to be matched are obtained. The invoice can be understood as various receipts that need to be associated with the corresponding trip for reimbursement. The invoice can be an electronic invoice or a scanned or photographed copy of a paper invoice, etc., which is related to the actual situation and is not specifically limited here. The trip can be understood as a travel event. In this embodiment of the invention, it can be understood in particular as a travel event in a business plan or travel record, such as a meeting held in a certain place on a certain day.

[0043] Furthermore, for each trip, the trip information is obtained, which can characterize the main content of the trip, such as at least one of time, location, and events.

[0044] For each invoice, its invoice type is determined. This invoice type can be considered a category based on the nature of the consumption and the service content, such as flight invoice, hotel invoice, train invoice, or VAT invoice, depending on the actual situation, and is not specifically limited here. In this embodiment of the invention, optionally, a lightweight classification model can be invoked to determine the invoice type; the invoice type can be determined based on the layout features corresponding to different invoice types; or OCR technology can be used to extract field information from the invoice and then determine the invoice type based on the field information; etc., these can be set according to actual needs, and are not specifically limited here. It should be noted that in this embodiment of the invention, since the processing process for each invoice is the same, the following steps are described using any one invoice as an example, and all invoices are processed in parallel.

[0045] In this step, by determining the invoice type, a basis is provided for subsequently selecting a dedicated tool to process the invoice (i.e., the target agent in S120), thereby avoiding the use of the same tool to process all invoices. This is the key to improving the accuracy of invoice travel matching.

[0046] S120. Determine the target agent that matches the invoice type from multiple agents, and obtain the invoice information by calling the target agent.

[0047] In this context, multiple agents can be understood as a set of pre-trained modules specifically designed for processing invoices. Each agent is designed to process invoices of a specific type and possesses superior information extraction and understanding capabilities for that type of invoice.

[0048] The target agent can be understood as the agent selected from all agents based on the invoice type determined in S110, specifically designed to process invoices of that type. The target agent is determined from multiple agents. For example, a mapping table of invoice types and agent identifiers can be maintained. This table can be queried based on the invoice type to find the corresponding agent identifier, and the agent represented by that identifier can then be used as the target agent. Another example is that all agents register the invoice types they can process with a central authority upon startup. When a target agent needs to be determined, the central authority can be consulted to find an agent capable of processing that invoice type, and that agent can be used as the target agent. These configurations can be tailored to specific needs and are not specifically limited here.

[0049] Furthermore, by invoicing the target intelligent agent, the invoice information of the corresponding invoice can be obtained. For example, the target intelligent agent can be invoked using the invoice and / or field information extracted from the invoice using OCR technology to obtain the invoice information. In this embodiment of the invention, optionally, the invoice information can be structured information directly extracted from the invoice for matching with trip information, structured information obtained after semantic understanding of unstructured information extracted from the invoice, or information related to the invoice but not recorded on it, etc. This depends on the actual situation and is not specifically limited here.

[0050] In this step, by configuring dedicated intelligent agents for different invoice types, specialized division of processing capabilities is achieved. For example, the flight intelligent agent processing flight invoices can deeply understand flight numbers and cross-date logic, while the hotel intelligent agent processing hotel invoices can parse check-in and check-out times, and can also understand application scenarios where the hotel is in the same city but the meeting location has changed. This specialized design improves the accuracy of invoice information extraction and the depth of semantic understanding, which is key to improving the accuracy of invoice itinerary matching.

[0051] S130. Based on the invoice information and the itinerary information of each trip, determine the matching result between the invoice and each trip.

[0052] The matching result indicates whether the invoice belongs to a specific trip or not, and the matching result is determined based on the invoice information and the trip information of each trip.

[0053] For example, invoice information and trip information are input together and fed into a pre-trained matching model. This model can comprehensively consider multiple features such as time, region, amount, service type, and service provider, and directly output a matching confidence score. After iterating through all trips, the trip with the highest matching confidence score can be selected as the matching result. Of course, if all matching confidence scores are below a threshold, the invoice is determined to be a mismatch between the invoice and all trips. In this example, optionally, this matching model can be implemented using a reinforcement learning (RL) model.

[0054] For another example, the target agent is invoked. This agent not only extracts invoice information but also provides matching logic for the corresponding invoice type, enabling invoice-trip matching based on this logic. For instance, for hotel invoices, the hotel agent's matching logic can handle scenarios where the hotel is in the same city but the meeting location changes; for red-eye train tickets, the train agent's matching logic can understand the relationship between the departure time (late night of the previous day) and the arrival time (early morning of the next day) and the travel time. Moreover, compared to matching rules, the train agent can autonomously learn the relationship between station information and cities in the train invoice, requiring no manual maintenance and offering convenient dynamic expansion.

[0055] As another example, a vector library is built based on historically successful matching cases (i.e., invoice information and travel information), and then the Retrieval-Augmented Generation (RAG) technology is used to search the knowledge base to obtain matching results.

[0056] Of course, in addition to the three examples above, the matching result can also be determined based on S330-S350 in the following embodiments. This can be selected according to actual needs and is not specifically limited here.

[0057] In this step, by comparing the information of each itinerary and the invoice information specifically obtained for each invoice type, accurate matching between invoices of this invoice type and each itinerary is achieved.

[0058] The technical solution of this invention, in response to an invoice trip matching instruction, determines the invoice type and obtains trip information for each trip, given the invoice to be matched and at least one trip. Then, it identifies a target agent matching the invoice type from multiple agents, and obtains the invoice information by calling the target agent. Based on the invoice information and the trip information, it determines the matching result between the invoice and each trip. This technical solution, by configuring corresponding agents for different invoice types, allows for the determination of the target agent based on the invoice type. Then, by utilizing the target agent's unique capabilities for that invoice type, it obtains invoice information that assists in matching invoices of that type with each trip. Matching is then performed based on the invoice information, thereby solving the problem of low accuracy in invoice trip matching caused by the diversity of invoice types and improving the accuracy of invoice trip matching.

[0059] Based on this, an optional technical solution is that the intelligent agent is obtained by encapsulating the tools, memories and prompts applied by the intelligent agent through the model context protocol. All intelligent agents are registered in the model context protocol center, and the target intelligent agent is determined from the model context protocol center according to the invoice type.

[0060] The above-mentioned invoice travel matching method also includes:

[0061] In response to the instruction to add an invoice type, obtain the new agent encapsulated for the new invoice type and register the new agent in the model context protocol center.

[0062] The Model-Context-Protocol (MCP) is a protocol that encapsulates the tools, memories, and prompts needed by an agent to complete a task into standardized services. Tools can be understood as external functions or application programming interfaces (APIs) that the agent can call to complete the task; memories can be understood as structured knowledge and historical experience data related to the task domain that the agent stores or can access; prompts can be instruction templates and context frameworks that guide and configure the underlying large language model for reasoning and decision-making, including constraints and logical guidance for extracting and understanding invoice information for the corresponding invoice type. In other words, combined with the above embodiments, tools, memories, and prompts can be encapsulated into independent, pluggable agents through MCP, allowing a single agent to complete only one task (i.e., a task specific to the corresponding invoice type), thus reducing the length of prompt words.

[0063] The Model Context Protocol Center (MCP Center) can be understood as a centralized registration, discovery, and management platform. All agents encapsulated according to the MCP standard can register their capabilities (such as the types of invoices they can process) in this center, enabling them to be dynamically searched for and invoked. Thus, after obtaining the invoice type, the target agent can be searched for and invoked from within the MCP Center to obtain the invoice information.

[0064] Based on this, in response to the instruction to add an invoice type, for the newly added invoice type, a new intelligent agent can be obtained (that is, an intelligent agent obtained by encapsulating the tools, memories and prompts required when processing the new invoice type through MCP). Then, the new intelligent agent is registered in the MCP center. In this way, when it is necessary to perform trip matching for invoices under the new invoice type, the new intelligent agent can be found and called from the MCP center. The new intelligent agent at this time is the target intelligent agent described above.

[0065] The above technical solution, when a new invoice type appears, can encapsulate the tools, memories, and prompts required to process the new invoice type into a new intelligent agent, and then register the new intelligent agent in the MCP center. In this way, the new intelligent agent can be found and called from the MCP center to obtain the invoice information of the invoice under the new invoice type. This is a hot-swappable extension method that does not require changing the core process, thereby achieving the effect of zero-code extension of the new invoice type.

[0066] Figure 2 This is a flowchart of another invoice travel matching method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, obtaining invoice information by calling a target intelligent agent includes: calling the target intelligent agent to cause the target intelligent agent to perform the following two steps: obtaining first information extracted from the invoice, and obtaining second information based on the first information, wherein the second information is information not recorded on the invoice but associated with the invoice; obtaining and outputting the invoice information based on the first information and the second information; and obtaining the invoice information based on the output result of the target intelligent agent. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0067] See Figure 2 The method in this embodiment may specifically include the following steps:

[0068] S210. In response to an invoice trip matching instruction, for the invoice to be matched and at least one trip, determine the invoice type of the invoice and obtain the trip information for each trip.

[0069] S220. Determine the target agent that matches the invoice type from among multiple agents, and invoke the target agent to make the target agent execute S230-S240 as follows.

[0070] S230. Obtain first information extracted from the invoice, and obtain second information based on the first information, wherein the second information is information not recorded on the invoice but associated with the invoice.

[0071] The first piece of information can be understood as information directly extracted from the invoice.

[0072] For example, OCR technology can be used to recognize invoices to extract the first information representing the target field (i.e., the field value described above). Specifically, OCR can first recognize the target field on the invoice, then recognize its value, and thus invoke the target agent based on this first information to obtain it. The target field here can be understood as a field that needs to be considered for matching, such as at least one of the fields on the invoice, including time, amount, tax rate, service name, and merchant name. This example uses OCR as a preliminary step, enabling the target agent to work based on the structured first information, thereby improving the agent's efficiency.

[0073] For another example, after invoking the target agent, the agent can be used to extract remarks from the invoice, and then semantic understanding can be performed on the remarks to obtain the first information. It should be noted that OCR has difficulty recognizing unstructured information, and the remarks on the invoice containing important information such as time and / or region are precisely unstructured information. Therefore, to better utilize this remarks, this example extracts the remarks through the target agent and performs semantic understanding to obtain the structured first information. This example no longer relies on pre-processed OCR to extract field values ​​under the target field, greatly enhancing the ability to obtain invoice information from complex, non-standard invoices, and further improving the accuracy of invoice travel matching.

[0074] The second information can be understood as supplementary information that is not directly recorded on the invoice, but is related to the economic activity represented by the invoice, and can be obtained through logical reasoning and / or external queries based on the first information. The second information is derived from the first information.

[0075] For example, for an application programming interface (API) matching the invoice type, the API is invoked based on the first information to complete the information and obtain the second information. Here, the API can be understood as a standardized data interface provided by an external service or system that can be invoked by the target intelligent agent (e.g., a flight query API, a train timetable API, or a hotel property management system interface), used to query or verify information of invoices under the corresponding invoice type, thereby completing the travel time and space information. This example fully utilizes external tools (i.e., the corresponding API) for information completion, thereby obtaining second information that can assist in invoice travel matching based on the first information, further improving the accuracy of invoice travel matching.

[0076] Optionally, the target agent can call the API through the tool. If the tool malfunctions, it can fall back to the local rule base and use the information recorded in the local rule base to complete the information, thereby ensuring the Service Level Agreement (SLA).

[0077] For another example, the fee type matching the invoice is determined based on the first information, and the second information is obtained based on the fee type. Here, the fee type can be understood as the type of fee represented by the invoice, such as transportation fees, catering fees, or toll fees, which depends on the actual situation and is not specifically limited here. In this example, optionally, the fee type matching the invoice can be determined using built-in mapping rules based on the first information recorded on the invoice (e.g., at least one of commodity code, tax rate, and merchant name), and then the fee type can be directly used as the second information or further processed to obtain the second information. This example is particularly suitable for handling invoices under the VAT invoice type (e.g., catering invoices with many categories and unclear remarks). By determining the fee type, it can help the target intelligent agent understand the business substance behind the invoice, thus providing a semantic basis for subsequent invoice journey matching and further improving the accuracy of invoice journey matching.

[0078] S240. Based on the first information and the second information, obtain and output the invoice information.

[0079] In this process, invoice information is obtained based on the first and second information. For example, these two types of information can be used directly as invoice information; alternatively, these two types of information can be merged to obtain more complete, structured, and semantically clear invoice information. For instance, after mapping the fee type (the second information) based on the tax rate and merchant name, the structured invoice information of the fee object (the first information of amount, tax rate, and merchant name, and the fee type) can be obtained based on the fee type. The fee object contains {amount, tax rate, fee type, and merchant name}. And so on, without specific limitations.

[0080] S250. Obtain invoice information based on the output of the target intelligent agent.

[0081] S260. Based on the invoice information and the itinerary information for each trip, determine the matching result between the invoice and each trip.

[0082] Based on this, in order to better understand the invoice travel matching method described in the embodiments of the present invention, the following will be combined with Figure 3 The example shown illustrates the automatic invoice distribution process.

[0083] For example, see Figure 3In response to an employee's uploaded invoice, the system retrieves multiple trips to be matched with that invoice. It then uses an invoice type distributor (i.e., the classification model illustrated above) to determine the invoice type. Next, it identifies a target agent from the integrated pool of agents that matches the invoice type. This target agent completes the second information, such as using a train agent to complete the train number and time, a flight agent to complete the actual takeoff and landing times, a hotel agent to complete the region, or a VAT agent to map the expense type. Based on this, the system obtains the invoice information. Finally, it matches the invoice with multiple trips based on the trip information and invoice information. If a match fails, it can be performed based on subsequent rules, which will be detailed in later embodiments.

[0084] The technical solution of this invention achieves deep enhancement of invoice information by having the target intelligent agent execute a process of obtaining first information, supplementing second information, and obtaining invoice information. This results in the final invoice information used for matching not only being the first information recorded on the invoice, but also including related information (i.e., second information) not recorded on the invoice. This greatly improves the accuracy and reliability of subsequent matching with itinerary information, which is crucial for itinerary matching that relies on precise spatiotemporal information.

[0085] Figure 4 This is a flowchart of another invoice travel matching method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above-mentioned technical solutions. In this embodiment, optionally, the number of invoices is at least one. Given the invoice information of each invoice, the matching result between the invoice and each travel is determined based on the invoice information and the travel information of each travel. This includes: constructing a bipartite graph of invoices and travels, and pruning the bipartite graph based on the invoice information of each invoice and the travel information of each travel to obtain a pruned graph; generating a natural language description based on the invoice information of invoices with connections in the pruned graph and the travel information of travels; calling a large language model based on the natural language description, and obtaining the matching result between each invoice and each travel based on the output of the large language model. Explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0086] See Figure 4 The method in this embodiment may specifically include the following steps:

[0087] S310. In response to the invoice trip matching instruction, obtain trip information of at least one trip to be matched and at least one invoice, and execute S320 for each invoice.

[0088] In this embodiment of the invention, one or more invoices are involved, and S320 is used to process each invoice separately to obtain the corresponding invoice information.

[0089] S320. Determine the invoice type, identify the target agent that matches the invoice type from multiple agents, and obtain the invoice information by calling the target agent.

[0090] S330. Construct a bipartite graph relating invoices and trips, and prune the bipartite graph based on the invoice information of each invoice and the trip information of each trip to obtain a pruned graph.

[0091] A bipartite graph can be understood as a graph data structure used to model the relationships between two different sets of things. In this embodiment of the invention, a bipartite graph of invoices and trips can be constructed, where one side of the bipartite graph is an invoice node and the other side is a trip node, and the potential edges indicate that a certain invoice may match a certain trip. Optionally, since invoices can represent costs and trips can represent time and space, this bipartite graph can also be called a time-space-cost bipartite graph.

[0092] Furthermore, before the matching calculation, the bipartite graph can be pruned based on the invoice information of each invoice and the trip information of each trip to remove obviously unreasonable edges in advance and retain the more reasonable invoice-trip candidate matching pairs under the initial judgment, thereby greatly reducing the subsequent computational complexity and improving the matching efficiency.

[0093] For example, for each invoice and each trip, the weight of the edge between the invoice and the trip in the bipartite graph is determined based on the invoice information and the trip information. This weight is then used to prune the bipartite graph. The edge weight is a quantitative indicator calculated based on the invoice information and trip information connected by the edge, comprehensively assessing the likelihood of a match between the invoice and the trip. A weight is calculated for each edge in the bipartite graph. Based on this, and considering the application scenarios that may be involved in this example, the weight can optionally be calculated by weighting at least two of the following four factors: time overlap, regional matching, cost type consistency, and merchant confidence. Furthermore, the bipartite graph is pruned based on the weights corresponding to each edge. For example, edges with weights below a preset weight threshold can be removed from the bipartite graph, resulting in a pruned graph. This example provides a refined and quantitative pre-screening mechanism that evaluates the likelihood of a match through a multi-dimensional comprehensive scoring system. This allows it to retain candidate matches that are slightly flawed in a single dimension but are still reasonable overall, providing higher-quality and more diverse candidate matches for subsequent screening.

[0094] For another example, a pruned graph is obtained by pruning the bipartite graph based on preset rules. For instance, for each invoice's information and each trip's information, the time overlap and regional consistency between the invoice and the trip can be determined. If, based on the time overlap and / or regional consistency, it is determined that the edge between the invoice and the trip in the bipartite graph needs to be pruned, then that edge is pruned. Here, time overlap represents the degree of intersection between the time interval represented by the invoice and the time interval represented by the trip, and regional consistency represents whether the region represented by the invoice and the region represented by the trip are the same or strongly related (e.g., different districts within the same city). Based on the time overlap and / or regional consistency, it is determined whether to prune the edge. For example, if the time overlap is below a preset overlap threshold and / or the regional consistency is false (e.g., completely different cities), then the match represented by the edge is determined to be extremely unreasonable and needs to be pruned. This example combines spatiotemporal information—the most crucial and rigid constraint in invoice travel matching—for pruning. This allows for the rapid elimination of a large number of obviously unreasonable candidate matching pairs with extremely low computational cost, thereby ensuring the efficiency of subsequent matching calculations.

[0095] In this step, to address the complex matching scenario of multiple invoices and multiple trips, a bipartite graph of invoices and trips is constructed, formalizing the matching problem into a graph association mining problem. Based on this, pre-pruning is used to efficiently and on a large scale eliminate obviously erroneous candidate matching pairs, thereby ensuring performance and feasibility when processing batch invoices and batch trips.

[0096] S340. Generate a natural language description based on the invoice information of invoices with connections in the pruning diagram and the itinerary information of the trip.

[0097] Specifically, for invoices and trips with connections (i.e., edges still exist) in the pruned graph, a natural language description is generated based on the invoice information and the trip information. This natural language description can be understood as a text segment or multiple segments of the aforementioned invoice and trip information organized in a way that is easy for humans to understand, thereby providing a clear context for the Large Language Model (LLM) that includes all key decision elements.

[0098] For example, suppose the invoice information is "Amount 500 yuan, for 'dining expenses', merchant 'XX Restaurant', consumption date October 1st, consumption location Beijing" and the travel information is "October 1st to October 3rd, business trip location Beijing, purpose of technical exchange", then the generated natural language description could be "There is a dining invoice, the invoice date is October 1st, the merchant is XX Restaurant in Beijing, the amount is 500 yuan. At the same time, there is a business trip, the time is October 1st to October 3rd, the location is Beijing."

[0099] In this step, structured invoice and trip information are transformed into natural language descriptions, providing ample and intuitive context for large language models that excel at understanding and reasoning about text. Combined with the following steps, the powerful semantic understanding and contextual reasoning capabilities of large language models are leveraged to handle ambiguous, complex, or conflicting matching scenarios that cannot be resolved during pruning. The matching results between each invoice and each trip are reordered, further improving the accuracy of invoice-trip matching.

[0100] S350. Based on the natural language description, call the large language model, and based on the output of the large language model, obtain the matching results between each invoice and each trip.

[0101] The technical solution of this invention constructs a bipartite graph of invoices and itineraries, then prunes the bipartite graph to obtain a pruned graph. Natural language descriptions are then generated based on the invoice information and itinerary information of connected invoices and itineraries within the pruned graph. This allows for the invocation of a large language model for matching and reasoning. The two-layer matching approach of pruning and reordering using a large language model effectively suppresses the illusions that may arise from a single large language model, thereby further improving the accuracy of invoice-to-itin matching.

[0102] Based on this, an optional technical solution involves, for each invoice, if the invoice does not match any of the trips, the large language model also outputs the reason for the invoice matching failure. The aforementioned invoice trip matching method further includes:

[0103] Based on the reason, generate a prompt message for display;

[0104] In response to the prompts displayed, supplementary information is entered, and the invoice is matched again based on the supplementary information.

[0105] In cases where an invoice does not match any of the itineraries, the large language model outputs the matching result and the reason for the invoice's mismatch. Further, a prompt message can be generated based on the reason and displayed on the front-end interface to guide employees in supplementing their information, thus obtaining supplementary information to assist in the invoice matching process. For example, if the reason is represented using structured reason coding, a prompt message described in natural language can be generated based on the structured reason coding and displayed on the front-end interface. Simultaneously, a corresponding supplementary information component can be displayed on the front-end interface, allowing employees to input supplementary information. Then, the invoice information is modified based on the supplementary information, and the matching is performed again based on the modified invoice information.

[0106] Compared to solutions that simply prompt "Please handle manually" when a match fails, the above technical solution provides an interpretable reason for the refusal to match through a large language model. Based on this, a prompt message is generated and displayed, which guides employees to input supplementary information to trigger the matching process again. This not only improves the accuracy of invoice travel matching but also enhances the employee's user experience.

[0107] Figure 5 This is a flowchart of another invoice travel matching method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, the number of invoices is at least one. After determining the matching results corresponding to each invoice, the invoice travel matching method further includes: for each travel in each travel, determining the target invoice matched to the travel in each invoice according to the matching results, and performing a reimbursement form filling operation according to the invoice information of the target invoice and the travel information of the travel; obtaining the target reimbursement form according to the reimbursement form filling results corresponding to each travel. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0108] See Figure 5 The method in this embodiment may specifically include the following steps:

[0109] S410. In response to the invoice trip matching instruction, obtain trip information of at least one trip to be matched and at least one invoice, and perform S420-S430 for each invoice.

[0110] S420. Determine the invoice type, identify the target agent that matches the invoice type from multiple agents, and obtain the invoice information by calling the target agent.

[0111] S430. Based on the invoice information and the itinerary information for each trip, determine the matching result between the invoice and each trip.

[0112] Thus, the matching results for each invoice can be obtained.

[0113] S440. For each trip within each trip, determine the target invoice that matches the trip from all matching results, and fill out the expense report based on the invoice information of the target invoice and the trip information of the trip.

[0114] In actual invoice-trip matching scenarios, one invoice can correspond to one trip, and one trip can correspond to one or more invoices. Therefore, reimbursement forms can be filled out on a trip-by-trip basis.

[0115] Specifically, taking any given trip as an example, the invoice matching that trip from all invoices is called the target invoice. The expense report can then be filled out based on the invoice information of the target invoice and the trip information. For instance, a dedicated data entry agent can be invoked based on this invoice and trip information. This agent can then fill out the expense report on the template according to preset corporate financial rules, generating a structured data block. This data block represents the expense report completion result corresponding to that trip.

[0116] S450. Based on the results of the expense reports for each itinerary, the target expense report is obtained.

[0117] The process involves integrating the completed expense reports from each itinerary to obtain the target expense report, which is the finalized expense report. Optionally, the Enterprise Resource Planning (ERP) interface can be invoked based on the target expense report to perform the expense reimbursement operation.

[0118] Compared to the previous method of employees manually filling out expense reports, the technical solution of this invention automatically fills out expense reports based on the trip information and the invoice information of each target invoice matched to the trip, thereby achieving the effect of filling out expense reports with a single click.

[0119] Based on this, an optional technical solution involves filling out a reimbursement form based on the invoice information and the itinerary information of the target invoice, including:

[0120] For each target invoice, the expense type is determined based on the invoice information. Invoices with the same expense type are merged, and then a reimbursement form is filled out based on the merged result and the itinerary information.

[0121] The process for determining the expense type has been explained above and will not be repeated here. The invoice expenses (i.e., the amounts illustrated in the example above) of all target invoices with the same expense type can be merged. This involves summarizing the invoice expenses of invoices belonging to the same itinerary and of the same expense type, specifically merging the obvious items containing expense expenses from these invoices into a single detailed item. The reimbursement form can then be filled out based on the merged result and the itinerary information. For an example, see [link to example]. Figure 6a For each trip, after determining the target invoice that matches the trip from all invoices based on the matching results, the details of each target invoice can be completed separately (such as completing the mode of transportation and remarks). Then, the expense type corresponding to each target invoice is determined accordingly. The details of target invoices with the same expense type are then merged into one detail item. Finally, the expense form template is filled out on this basis and the front-end format is converted to obtain the expense form filling result.

[0122] The above technical solution eliminates the need to list the invoice costs for each invoice when filling out the expense report. Instead, it only requires filling in the combined results of the invoice costs for each invoice belonging to the same itinerary and having the same cost type. This helps generate a clear and concise target expense report, which in turn facilitates quick review by auditors.

[0123] Another optional technical solution involves invoice information including departure and arrival times, itinerary information including region, and a minimum of one target invoice. Based on the invoice information and itinerary information, a reimbursement form is completed, including:

[0124] For all target invoices, calculate the subsidy based on the earliest departure time, the latest arrival time, and the region of each transportation invoice, and then fill out the reimbursement form based on the calculated subsidy.

[0125] In this context, transportation invoices can be understood as target invoices generated due to transportation among all target invoices. Based on this, and considering the application scenarios that this technical solution may involve, optional invoices could be flight invoices, train invoices, or bus invoices, etc. This is related to the actual situation and is not specifically limited here.

[0126] In this technical solution, the invoice information for transportation invoices includes departure and arrival times, and the itinerary information includes the region (i.e., the destination of the corresponding itinerary). Typically, different regions have their own corresponding subsidy standards. Based on this, for transportation invoices belonging to the same itinerary, the earliest departure time and the latest arrival time among the departure times can be determined. The earliest departure time represents the actual start time of the corresponding itinerary, and the latest arrival time represents the actual end time of the itinerary. Subsidies are then calculated based on this, combined with the region (e.g., calculating subsidies for meals and / or transportation), thereby enabling automatic filling of subsidy information in the reimbursement form template.

[0127] For example, such as Figure 6b As shown, the system retrieves the earliest departure and latest arrival times from the employee's and company's transportation invoices, then compares these two times to determine the actual start and end times of the trip. If the actual start time is unavailable, the default start time can be used. The processing logic for the actual end time is the same. Further, considering the actual start and end times, the region of the trip, and the employee's job level, the reimbursement is calculated, and the reimbursement form is then completed based on this calculation.

[0128] The above technical solution intelligently derives the earliest departure time and latest arrival time from the matched transportation invoices, thereby objectively and accurately determining the trip duration. Combined with the automatic calculation of subsidies by region, it ensures the accuracy and fairness of subsidy calculation, completely eliminates human estimation, and frees employees from complex subsidy calculation rules, thus achieving high-precision and automated subsidy calculation.

[0129] Building upon this foundation, to better understand the various technical solutions described above, the following example illustrates a single-click application for travel expense reimbursement using AI-powered intelligent invoice matching. The specific implementation process is as follows:

[0130] Step 1: Batch upload of invoices

[0131] It supports batch transmission of invoices in various formats, and then the unified gateway calls the OCR service to return structured field information (i.e., the first information described above), which may include at least one of the following: amount, tax rate, merchant name, service name, and various times.

[0132] Step 2: Parallel processing by multiple agents

[0133] By encapsulating "tool + memory + prompt" into an independent agent through MCP, a single agent only needs to complete the task corresponding to the invoice type, thereby reducing the length of the prompt words. For example,

[0134] Flight Agent: Based on the first information, call the flight API to complete the International Air Transport Association (IATA) airport code, flight number, and actual take-off and landing time of the "departure-arrival" airport, thereby outputting a spatiotemporal trajectory object A. This spatiotemporal trajectory object A may include the actual take-off and landing time, the origin IATA code, the destination IATA code, and the type of transportation.

[0135] Hotel Agent: Based on the first information, it calls the hotel API or parses the notes to obtain the check-in time, check-out time, and the region where the hotel is located, and then outputs the spatiotemporal trajectory object B.

[0136] Train Agent: Based on the initial information, it calls the train API (such as the train timetable API) to complete the departure / arrival station code, train number, and time; and outputs the spatiotemporal trajectory object C.

[0137] Value Added Tax Agent: Based on the commodity code, tax rate, and merchant name in the first information, it maps the fee type; it outputs a fee object D, which includes the amount, tax rate, fee type, and merchant name.

[0138] Step 3: Distribute the decision engine

[0139] Construct a spatiotemporal-cost bipartite graph: the left side is the invoice node and the right side is the trip node. The weight of the edge can be obtained by weighting four factors: time overlap, regional matching, cost type consistency and merchant confidence.

[0140] A two-layer matching strategy is adopted: rule pre-pruning + LLM reordering.

[0141] Rule layer: Prune according to at least one of the following: weight of each edge, time overlap, and regional matching degree;

[0142] LLM layer: Generates natural language descriptions based on the pruned bipartite graph (i.e., the pruned graph described above), inputs them into the LLM, and outputs the trip identifier of the uniquely matching trip or the reason for the refusal to match.

[0143] Step 4: Explanatory Rejections

[0144] For invoices that fail to match (i.e., invoices that fail to match), a structured reason code can be returned. Based on this, the front-end interface can display the corresponding supplementary entry component. Employees can enter supplementary information through the supplementary entry component, and after one-click confirmation, the supplementary information is written to a temporary cache, triggering step 3 again until all matches are completed.

[0145] Step 5: One-click form filling

[0146] The Agent will consolidate similar items according to the matching results and the company's financial rules. Of course, some special invoice expenses can be split into separate lines.

[0147] The allowance is automatically calculated based on job level x travel duration x region coefficient;

[0148] Generate a JSON message and call the ERP interface to complete the creation of the expense report.

[0149] Step 6: Dynamic Hot-Swapping

[0150] When adding a new invoice type, you only need to write the new Agent and register it with the MCP; there is no need to modify the core process.

[0151] When the tool API malfunctions, MCP automatically triggers circuit breakers and falls back to the local rule base to ensure SLA.

[0152] The above example has at least the following advantages:

[0153] 1) It achieves one-to-one automatic matching of travel itineraries and invoices by "uploading all invoices without manual matching", and then automatically fills out the entire travel expense reimbursement form based on the matching results, invoice information and itinerary information, thus realizing one-click form filling;

[0154] 2) Explanatory reasons can be provided for unmatched invoices, and employees can be guided to supplement the information.

[0155] 3) When invoice types are expanded, they can be hot-swapped with zero codes;

[0156] 4) Verified, the overall matching accuracy rate is ≥95%, and the processing time for a single invoice is ≤300ms.

[0157] Figure 7 This is a structural block diagram of an invoice travel matching device provided in an embodiment of the present invention. This device is used to execute the invoice travel matching method provided in any of the above embodiments. This device and the invoice travel matching methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the invoice travel matching device can be found in the embodiments of the invoice travel matching methods described above. See also... Figure 7 The device may specifically include: a trip information acquisition module 510, an invoice information acquisition module 520, and an invoice trip matching module 530.

[0158] Among them, the trip information acquisition module 510 is used to respond to the invoice trip matching instruction, and for the invoice to be matched and at least one trip, determine the invoice type of the invoice and acquire the trip information of each trip;

[0159] The invoice information acquisition module 520 is used to determine the target intelligent agent that matches the invoice type from multiple intelligent agents, and to obtain the invoice information by calling the target intelligent agent;

[0160] The invoice trip matching module 530 is used to determine the matching result between the invoice and each trip based on the invoice information and the trip information of each trip.

[0161] Optionally, the invoice information retrieval module 520 may include:

[0162] The agent invocation submodule is used to invoke the target agent so that the target agent executes the following two units:

[0163] The second information obtaining unit is used to obtain the first information extracted from the invoice and obtain the second information based on the first information, wherein the second information is information not recorded on the invoice but associated with the invoice;

[0164] The invoice information output unit can be used to obtain and output invoice information based on the first information and the second information;

[0165] The invoice information retrieval submodule is used to obtain invoice information based on the output of the target intelligent agent.

[0166] Based on this, an optional second information obtaining unit may include at least one of the following sub-units:

[0167] The first sub-unit is used to call the application programming interface (API) that matches the invoice type to complete the information based on the first information and obtain the second information.

[0168] The second sub-unit is used to determine the expense type that matches the invoice based on the first information, and to obtain the second information based on the expense type.

[0169] Alternatively, the first information may be extracted from at least one of the following sub-units:

[0170] The first extraction subunit is used to identify invoices using optical character recognition technology in order to extract first information representing target fields from the invoices, wherein the target intelligent agent is invoked based on the first information;

[0171] The second extraction subunit is used to extract the remarks information from the invoice through the target intelligent agent, and to perform semantic understanding on the remarks information to obtain the first information.

[0172] Optionally, the number of invoices can be at least one. Given the invoice information for each invoice, the invoice travel matching module 530 may include:

[0173] The pruned graph yields a submodule used to construct a bipartite graph about invoices and trips. Based on the invoice information of each invoice and the trip information of each trip, the bipartite graph is pruned to obtain the pruned graph.

[0174] The Natural Language Description Generation Submodule is used to generate natural language descriptions based on invoice information and trip information of invoices with connections in the pruning graph.

[0175] The invoice trip matching submodule is used to call the large language model based on natural language descriptions, and obtain the matching results between each invoice and each trip based on the output of the large language model.

[0176] Based on this, an optional pruning diagram yields submodules, including at least one of the following units:

[0177] The first pruning unit can be used to determine the weight of the edge between the invoice and the trip in the bipartite graph based on the invoice information of each invoice and the trip information of each trip, so as to prune the bipartite graph according to the weight of each edge in the bipartite graph.

[0178] The second pruning unit can be used to obtain the time overlap and regional consistency between invoices and trips based on the invoice information and trip information for each invoice and trip, and prune the edges if it is determined that the edges between invoices and trips in the bipartite graph need to be pruned based on the time overlap and / or regional consistency.

[0179] Alternatively, for each invoice, if the invoice does not match any of the trips, the large language model also outputs the reason for the invoice matching failure. The aforementioned invoice trip matching device further includes:

[0180] The prompt message generation module is used to generate prompt messages for display based on the reason.

[0181] The invoice itinerary rematching module is used to respond to the supplementary information entered in response to the displayed prompts, and to rematch the itinerary for the invoice based on the supplementary information.

[0182] Optionally, the number of invoices is at least one, and the aforementioned invoice travel matching device further includes:

[0183] The expense report filling module is used to determine the target invoice for each trip after the matching results of each invoice are determined. Then, the expense report filling operation is performed based on the invoice information of the target invoice and the trip information.

[0184] The target expense report generation module is used to generate the target expense report based on the expense report filling results corresponding to each itinerary.

[0185] Based on this, optionally, the number of target invoices is at least one, and the expense report filling module may include at least one of the following units:

[0186] The first filling unit can be used to determine the expense type for each target invoice based on the invoice information, to merge the invoice expenses of target invoices with the same expense type, and to fill out the reimbursement form based on the merging result and the itinerary information.

[0187] The second filling unit can be used to fill in invoice information including departure and arrival times, and travel information including region. For all target invoices, the subsidy is calculated based on the earliest departure time, the latest arrival time, and the region of each transportation invoice, and the reimbursement form is filled in based on the calculated subsidy.

[0188] Optionally, the agent is obtained by encapsulating the tools, memories and prompts applied by the agent through the model context protocol. All agents are registered in the model context protocol center, and the target agent is determined from the model context protocol center according to the invoice type.

[0189] The aforementioned invoice travel matching device also includes:

[0190] The agent registration module is used to respond to the instruction to add an invoice type, obtain the new agent encapsulated for the new invoice type, and register the new agent to the model context protocol center.

[0191] The invoice travel matching device provided in this embodiment of the invention, through a travel information acquisition module, responds to an invoice travel matching instruction by determining the invoice type and acquiring travel information for each travel, for the invoice to be matched and at least one travel; through an invoice information acquisition module, it determines a target intelligent agent matching the invoice type from multiple intelligent agents, and then obtains the invoice information by calling the target intelligent agent; through an invoice travel matching module, it determines the matching result between the invoice and each travel based on the invoice information and the travel information of each travel. This device, by configuring corresponding intelligent agents for different invoice types, can determine the target intelligent agent based on the invoice type, and then utilize the specific capabilities of the target intelligent agent for that invoice type to obtain invoice information that can assist in matching invoices of that invoice type with each travel, thereby solving the problem of low accuracy in invoice travel matching caused by the diversity of invoice types and improving the accuracy of invoice travel matching.

[0192] The invoice travel matching device provided in this embodiment of the invention can execute the invoice travel matching method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0193] It is worth noting that in the embodiments of the above-mentioned invoice travel matching device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0194] Figure 8 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0195] like Figure 8As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0196] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0197] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the invoice travel matching method.

[0198] In some embodiments, the invoice travel matching method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the invoice travel matching method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the invoice travel matching method by any other suitable means (e.g., by means of firmware).

[0199] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips or system-on-a-chips (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0200] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0201] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0202] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0203] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0204] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0205] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0206] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0207] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for matching invoice travel itineraries, characterized in that, include: In response to an invoice trip matching instruction, for the invoice to be matched and at least one trip, the invoice type of the invoice is determined and the trip information of each trip is obtained; The target agent matching the invoice type is determined from multiple agents, and the invoice information is obtained by calling the target agent. Based on the invoice information and the itinerary information of each itinerary, the matching result between the invoice and each itinerary is determined.

2. The method according to claim 1, characterized in that, The step of obtaining the invoice information by invoicing the target intelligent agent includes: The target agent is invoked to perform the following two steps: Obtain first information extracted from the invoice, and obtain second information based on the first information, wherein the second information is information not recorded on the invoice but associated with the invoice; Based on the first information and the second information, the invoice information is obtained and output; The invoice information is obtained based on the output of the target intelligent agent.

3. The method according to claim 2, characterized in that, The step of obtaining the second information based on the first information includes at least one of the following steps: For the application programming interface that matches the invoice type, based on the first information, the application programming interface is called to complete the information and obtain the second information; Based on the first information, determine the fee type that matches the invoice, and obtain the second information based on the fee type.

4. The method according to claim 2, characterized in that, The first information is extracted through at least one of the following steps: The invoice is identified using optical character recognition technology to extract the first information representing the target field from the invoice, wherein the target intelligent agent is invoked based on the first information; The target intelligent agent extracts the remarks information from the invoice and performs semantic understanding on the remarks information to obtain the first information.

5. The method according to claim 1, characterized in that, The number of invoices is at least one. Given the invoice information for each invoice, determining the matching result between the invoice and each trip based on the invoice information and the trip information for each trip includes: Construct a bipartite graph relating the invoices and the trips, and prune the bipartite graph based on the invoice information of each invoice and the trip information of each trip to obtain a pruned graph; A natural language description is generated based on the invoice information of the invoices with connections in the pruning diagram and the itinerary information of the trip. Based on the natural language description, a large language model is invoked, and the matching results between each invoice and each itinerary are obtained according to the output of the large language model.

6. The method according to claim 5, characterized in that, The step of pruning the bipartite graph based on the invoice information of each invoice and the itinerary information of each itinerary includes at least one of the following steps: For each invoice and each trip, the weights of the edges between the invoices and trips in the bipartite graph are determined based on the invoice information and the trip information, so as to prune the bipartite graph according to the weights of each edge in the bipartite graph. For each invoice and each trip, the time overlap and regional consistency between the invoice and the trip are obtained based on the invoice information and the trip information. If it is determined that the edge between the invoice and the trip in the bipartite graph needs to be pruned based on the time overlap and / or the regional consistency, the edge is pruned.

7. The method according to claim 5, characterized in that, For each invoice, if the invoice does not match any of the trips, the large language model also outputs the reason for the invoice matching failure. The method further includes: Based on the stated reason, a prompt message is generated and displayed. In response to the supplementary information entered in response to the displayed prompt, the itinerary is matched again for the invoice based on the supplementary information.

8. The method according to claim 1, characterized in that, The number of invoices is at least one. After determining the matching results corresponding to each of the invoices, the method further includes: For each of the aforementioned trips, the target invoice matching the trip is determined based on the matching results, and the expense report is filled out based on the invoice information of the target invoice and the trip information. Based on the completion results of the expense reports corresponding to each of the described itineraries, the target expense report is obtained.

9. The method according to claim 8, characterized in that, The number of target invoices is at least one. The process of filling out the expense report based on the invoice information of the target invoice and the itinerary information includes at least one of the following steps: For each target invoice, the expense type is determined based on the invoice information of the target invoice. The invoice expenses of the target invoices with the same expense type are merged, and the reimbursement form is filled out based on the merging result and the itinerary information of the trip. The invoice information includes departure and arrival times, and the trip information includes regions. For all the target invoices, the subsidy is calculated based on the earliest departure time, the latest arrival time, and the regions of each transportation invoice, and a reimbursement form is filled out based on the calculated subsidy.

10. The method according to claim 1, characterized in that, The intelligent agent is obtained by encapsulating the tools, memories, and prompts applied by the intelligent agent through a Model Context Protocol (MTP). All intelligent agents are registered in the MTP center. The target intelligent agent is determined from the MTP center based on the invoice type. The method further includes: In response to the instruction to add an invoice type, a new agent encapsulated for the new invoice type is obtained, and the new agent is registered in the model context protocol center.

11. An invoice travel matching device, characterized in that, include: The trip information acquisition module is used to respond to the invoice trip matching instruction, and for the invoice to be matched and at least one trip, determine the invoice type of the invoice and acquire the trip information of each trip; The invoice information acquisition module is used to determine the target intelligent agent that matches the invoice type from multiple intelligent agents, and to obtain the invoice information by calling the target intelligent agent; The invoice trip matching module is used to determine the matching result between the invoice and each trip based on the invoice information and the trip information of each trip.

12. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to cause the at least one processor to perform the invoice trip matching method as described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the invoice travel matching method as described in any one of claims 1-10.

14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the invoice travel matching method as described in any one of claims 1-10.