Method, device and equipment for verifying invoice to be financed and medium

The contract information is restored and reasoned through a large language model, and the invoices to be financed are automatically matched with the contract information, solving the problems of high invoice verification costs and inaccurate results, and achieving efficient and accurate invoice verification.

CN119648443APending Publication Date: 2025-03-18SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411707085.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the invoice financing scenario, the verification cost of invoices to be financed is high and the verification results are inaccurate. It is necessary to manually review whether each item of goods is found in the contract and warehouse entry form.

Method used

The contract information is restored through the large language model, a contract data table is generated, and a target prompt word is generated based on the product information and contract data table in the invoice to be financed, and input it into the large language model for reasoning, automatically match the invoice to be financed and the contract information to be financed, and generate verification results.

Benefits of technology

It improves the matching efficiency of invoices to be financed and contract information, reduces the error rate of manual intervention, saves computing power, and improves verification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648443A_ABST
    Figure CN119648443A_ABST
Patent Text Reader

Abstract

The invention relates to an artificial intelligence technology, and provides a to-be-financed invoice verification method, apparatus and device, and a medium, which perform table restoration on contract information based on a large language model, and perform subsequent processing after the contract information is restored into a table, so that the reasoning effect of the large language model can be improved. The target cue word is generated according to each piece of commodity information in the target invoice to be financed and the contract data table, and the target cue word is input to the large language model for reasoning, so that the large language model can be utilized to perform automatic matching on the invoice to be financed and the contract information, manual intervention is not needed, the matching efficiency is improved, and the error rate is low; according to the method, the reasoning result is post-processed to remove invalid information, so that the valid information is utilized to verify the to-be-financing invoice, and the calculation power is saved, so that the verification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for verifying invoices to be financed. Background Art

[0002] In the invoice financing scenario, in order to verify the authenticity of the transaction, prevent false transactions, and ensure the legitimate rights and interests of both parties to the transaction, it is usually necessary to verify whether the product information in the invoice corresponds.

[0003] However, the prior art usually requires manual review to check whether each item of goods involved in the invoice to be financed has a corresponding item in the contract, warehouse entry and exit documents and other data. This process is time-consuming and labor-intensive, not only has high labor costs, but is also prone to errors. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment and medium for verifying invoices to be financed, aiming to solve the problems of high verification cost and inaccurate verification results of invoices to be financed in invoice financing scenarios.

[0005] In a first aspect, an embodiment of the present application provides a method for verifying an invoice to be financed, which includes:

[0006] In response to a verification instruction for a target invoice to be financed, determining a target contract corresponding to the target invoice to be financed;

[0007] Extracting contract information of the target contract;

[0008] Performing table restoration on the contract information based on the large language model to obtain a contract data table;

[0009] Loading each commodity information in the target invoice to be financed;

[0010] Generate a target prompt word according to each commodity information in the target invoice to be financed and the contract data table;

[0011] Inputting the target prompt word into the large language model for reasoning to obtain a reasoning result;

[0012] Post-processing the inference result to obtain commodity information in the target contract corresponding to each commodity information in the target invoice to be financed;

[0013] A verification result for the target invoice to be financed is generated according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0014] In a second aspect, an embodiment of the present application provides a device for verifying an invoice to be financed, which includes:

[0015] a determination unit, configured to determine a target contract corresponding to the target invoice to be financed in response to a verification instruction for the target invoice to be financed;

[0016] An extraction unit, used to extract the contract information of the target contract;

[0017] A restoration unit, used for performing table restoration on the contract information based on a large language model to obtain a contract data table;

[0018] A loading unit, used to load each commodity information in the target invoice to be financed;

[0019] A generating unit, configured to generate a target prompt word according to each commodity information in the target invoice to be financed and the contract data table;

[0020] An inference unit, used for inputting the target prompt word into the large language model for inference to obtain an inference result;

[0021] A post-processing unit, configured to post-process the inference result to obtain commodity information in the target contract corresponding to each commodity information in the target invoice to be financed;

[0022] The generating unit is further configured to generate a verification result for the target invoice to be financed according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0023] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for verifying invoices to be financed described in the first aspect above is implemented.

[0024] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the method for verifying invoices to be financed as described in the first aspect above.

[0025] The embodiments of the present application provide a method, device, equipment and medium for verifying invoices to be financed. The contract information is restored to a table based on a large language model, and subsequent processing is performed after the restoration to the table, which can improve the reasoning effect of the large language model; a target prompt word is generated according to each commodity information and contract data table in the target invoice to be financed, and the target prompt word is input into the large language model for reasoning, which can use the large language model to automatically match the invoice to be financed with the contract information without human intervention, which not only improves the matching efficiency but also reduces the error rate; the reasoning result is post-processed to remove invalid information, so that the invoice to be financed is verified using valid information, which saves computing power and thus improves the verification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 A schematic diagram of an application scenario of the method for verifying invoices to be financed provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of a flow chart of a method for verifying an invoice to be financed provided in an embodiment of the present application;

[0029] Figure 3 A schematic block diagram of a device for verifying invoices to be financed provided in an embodiment of the present application;

[0030] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0032] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0033] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0034] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of the method for verifying invoices to be financed provided in an embodiment of the present application; Figure 2 A flow chart of a method for verifying invoices to be financed provided in an embodiment of the present application. The method for verifying invoices to be financed is applied in a server, and the method is executed by application software installed in the server.

[0036] like Figure 2 As shown, the method includes steps S101 to S108.

[0037] S101. In response to a verification instruction for a target invoice to be financed, determine a target contract corresponding to the target invoice to be financed.

[0038] In this embodiment, the technical solution is described with the server as the execution subject. The user terminal (such as a smart phone, tablet computer and other smart terminals) used by the user can exchange data with the server. Specifically, the server provides an invoice verification platform, and the user can log in to the invoice verification platform using the user terminal. The user interaction interface of the invoice verification platform is displayed on the terminal interface of the user terminal, and there is at least one image upload interface in the user interaction interface. When the user selects an image as the image to be identified and uploads it to the server through the image upload interface, the subsequent invoice verification can be performed in the server.

[0039] The images to be identified may include invoices and contracts to be financed.

[0040] In this embodiment, the verification instruction may be triggered by a reviewer according to review requirements, or may be automatically triggered when it is detected that an image to be identified is uploaded to the server.

[0041] In this embodiment, determining the target contract corresponding to the target invoice to be financed includes:

[0042] Determine the invoice format of the target invoice to be financed;

[0043] Locating the target position of the contract number in the target invoice to be financed according to the invoice format;

[0044] Perform text recognition on the target location to obtain the target contract number of the target invoice to be financed;

[0045] The target contract is determined according to the target contract number.

[0046] Through the above embodiment, the target contract matching the target invoice to be financed can be automatically retrieved without manual intervention.

[0047] Furthermore, after the target contract is determined, the target contract can be directly retrieved from the storage location of the target contract.

[0048] For example, the target contract can be stored in a local database for quick retrieval, or it can be stored in a cloud database to reduce the occupancy of local storage space.

[0049] S102: Extract the contract information of the target contract.

[0050] In this embodiment, extracting the contract information of the target contract includes:

[0051] identifying a table of goods in said target contract;

[0052] Using TableOCR to identify the table structure of the product table;

[0053] Traversing each cell in the commodity table according to the table structure of the commodity table to extract text information of each cell;

[0054] All the extracted text information is combined to obtain the contract information.

[0055] Through the above embodiments, the contract information of the target contract can be preliminarily extracted based on the OCR (Optical Character Recognition) technology.

[0056] In this embodiment, the contract information may include, but is not limited to, a combination of one or more of the following information:

[0057] Product name, product quantity, product type, product unit price, product total price, etc.

[0058] S103: Perform table restoration on the contract information based on the large language model to obtain a contract data table.

[0059] It is understandable that since the content extracted by TableOCR is not in the simplest and most direct format, directly processing the data extracted by TableOCR often does not achieve the best results. Therefore, this embodiment further refines the contract information extracted by TableOCR into a table to improve the subsequent data processing effect.

[0060] Specifically, the contract information is restored to a table based on the large language model to obtain a contract data table, including:

[0061] Obtaining a maximum information input length of the large language model;

[0062] In each round of reasoning, each contract line in the contract information is input to the large language model in turn, until the complete contract line cannot be input according to the maximum information input length, the input of the current round is stopped, the output of the current round of the large language model is obtained, and the next round of input of the remaining contract lines in the contract information is continued according to the maximum information input length;

[0063] When it is detected that each contract line in the contract information has completed input, obtaining each round output of the large language model;

[0064] The outputs of each round are combined into a table to obtain the contract data table.

[0065] For example: when resources are limited, the maximum input and output length of the large language model is often limited. Therefore, the maximum information input length can be set to 3,000 characters according to the actual application scenario to ensure that the input information model can be read, and by controlling the input information length, the model's predicted content length can be within a controllable range, ensuring the stability of the output formatting. Specifically, add contract lines in sequence until the round of input is terminated when no complete line can be added. At this time, the length of block1 (that is, the data block composed of all contract lines input in the first round) is ≤3,000. If there are still unentered contract lines, they are block2, block3, etc. Then merge these blocks to obtain a complete table as the contract data table.

[0066] In the above embodiment, the model processing effect can be effectively improved by performing table restoration through a large language model and then performing subsequent model reasoning.

[0067] S104: Load each commodity information in the target invoice to be financed.

[0068] For example, each piece of product information may include product name, product quantity, product unit price, product total price, etc.

[0069] S105: Generate a target prompt word according to each commodity information in the target invoice to be financed and the contract data table.

[0070] In this embodiment, the generating of target prompt words according to each commodity information in the target invoice to be financed and the contract data table includes:

[0071] Determine a matching rule between each item of commodity information in the target invoice to be financed and the contract data table;

[0072] Obtaining an initial prompt word of the large language model;

[0073] The matching rule is added to the initial prompt word to obtain the target prompt word.

[0074] Through the above embodiments, matching rules can be established in a targeted manner to assist the large language model in performing more accurate reasoning.

[0075] S106: Input the target prompt word into the large language model for reasoning to obtain a reasoning result.

[0076] In this embodiment, the inference result can be output in json format to facilitate downstream work.

[0077] S107: Post-process the inference result to obtain commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0078] In this embodiment, the post-processing of the inference result to obtain the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed includes:

[0079] Acquire pre-configured invalid information; wherein the invalid information includes explanatory information and symbol information;

[0080] When the invalid information is detected in the inference result, adding the detected invalid information to an invalid list;

[0081] The information in the inference result except the invalid list is determined as the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0082] For example: In addition to outputting the required information, the large language model may also output interference information in different formats such as explanatory information, symbolic information (such as "python", "[", "output should be: ["), etc. Therefore, in post-processing, by constructing a list and adding various potential interference information to the list (such as two brackets), the interference of invalid information can be reduced, so that subsequent processing is based only on valid information, which not only saves computing power but also improves computing efficiency.

[0083] S108. Generate a verification result for the target invoice to be financed according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0084] In this embodiment, the step of generating a verification result of the target invoice to be financed according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed includes:

[0085] When the commodity information in the target contract is identical to each commodity information in the target invoice to be financed, it is determined that the verification result is that the target invoice to be financed does not have a commodity mismatch risk; or

[0086] When the commodity information in the target contract is different from each commodity information in the target invoice to be financed, it is determined that the verification result is that there is a commodity non-correspondence risk in the target invoice to be financed.

[0087] Through the above embodiment, it is possible to verify whether the quantity of goods, the total price of goods, etc. in the target invoice to be financed are consistent with those in the contract, thereby avoiding transaction anomalies.

[0088] In this embodiment, when it is determined that the verification result shows that the target invoice to be financed has a risk of non-corresponding goods, an early warning reminder is promptly issued to relevant staff based on the verification result to avoid losses to both parties to the transaction due to bill anomalies.

[0089] It can be seen from the above technical solutions that this application performs tabular restoration of contract information based on a large language model, and performs subsequent processing after restoration to a table, which can improve the reasoning effect of the large language model; generates target prompt words according to each commodity information and contract data table in the target invoice to be financed, and inputs the target prompt words into the large language model for reasoning, which can use the large language model to automatically match the invoice to be financed with the contract information without human intervention, which not only improves the matching efficiency but also reduces the error rate; post-processes the reasoning results to remove invalid information, so as to use valid information to verify the invoice to be financed, and saves computing power, thereby improving the verification efficiency.

[0090] The present application also provides a device for verifying an invoice to be financed, which is used to execute any of the above-mentioned embodiments of the method for verifying an invoice to be financed. Figure 3 , Figure 3 It is a schematic block diagram of the invoice verification device 100 for financing provided in an embodiment of the present application.

[0091] Among them, Figure 3 As shown, the invoice verification device 100 for financing includes a determination unit 101 , an extraction unit 102 , a restoration unit 103 , a loading unit 104 , a generation unit 105 , an inference unit 106 , and a post-processing unit 107 .

[0092] The determining unit 101 is used to determine the target contract corresponding to the target invoice to be financed in response to the verification instruction of the target invoice to be financed.

[0093] In this embodiment, the technical solution is described with the server as the execution subject. The user terminal (such as a smart phone, tablet computer and other smart terminals) used by the user can exchange data with the server. Specifically, the server provides an invoice verification platform, and the user can log in to the invoice verification platform using the user terminal. The user interaction interface of the invoice verification platform is displayed on the terminal interface of the user terminal, and there is at least one image upload interface in the user interaction interface. When the user selects an image as the image to be identified and uploads it to the server through the image upload interface, the subsequent invoice verification can be performed in the server.

[0094] The images to be identified may include invoices and contracts to be financed.

[0095] In this embodiment, the verification instruction may be triggered by a reviewer according to review requirements, or may be automatically triggered when it is detected that an image to be identified is uploaded to the server.

[0096] In this embodiment, the determining unit 101 determines the target contract corresponding to the target invoice to be financed, including:

[0097] Determine the invoice format of the target invoice to be financed;

[0098] Locating the target position of the contract number in the target invoice to be financed according to the invoice format;

[0099] Perform text recognition on the target location to obtain the target contract number of the target invoice to be financed;

[0100] The target contract is determined according to the target contract number.

[0101] Through the above embodiment, the target contract matching the target invoice to be financed can be automatically retrieved without manual intervention.

[0102] Furthermore, after the target contract is determined, the target contract can be directly retrieved from the storage location of the target contract.

[0103] For example, the target contract can be stored in a local database for quick retrieval, or it can be stored in a cloud database to reduce the occupancy of local storage space.

[0104] The extraction unit 102 is used to extract the contract information of the target contract.

[0105] In this embodiment, the extracting unit 102 extracts the contract information of the target contract, including:

[0106] identifying a table of goods in said target contract;

[0107] Using TableOCR to identify the table structure of the product table;

[0108] Traversing each cell in the commodity table according to the table structure of the commodity table to extract text information of each cell;

[0109] All the extracted text information is combined to obtain the contract information.

[0110] Through the above embodiments, the contract information of the target contract can be preliminarily extracted based on the OCR (Optical Character Recognition) technology.

[0111] In this embodiment, the contract information may include, but is not limited to, a combination of one or more of the following information:

[0112] Product name, product quantity, product type, product unit price, product total price, etc.

[0113] The restoring unit 103 is used to perform table restoration on the contract information based on the large language model to obtain a contract data table.

[0114] It is understandable that since the content extracted by TableOCR is not in the simplest and most direct format, directly processing the data extracted by TableOCR often does not achieve the best results. Therefore, this embodiment further refines the contract information extracted by TableOCR into a table to improve the subsequent data processing effect.

[0115] Specifically, the restoration unit 103 performs table restoration on the contract information based on the large language model to obtain a contract data table, including:

[0116] Obtaining a maximum information input length of the large language model;

[0117] In each round of reasoning, each contract line in the contract information is input to the large language model in turn, until the complete contract line cannot be input according to the maximum information input length, the input of the current round is stopped, the output of the current round of the large language model is obtained, and the next round of input of the remaining contract lines in the contract information is continued according to the maximum information input length;

[0118] When it is detected that each contract line in the contract information has completed input, obtaining each round output of the large language model;

[0119] The outputs of each round are combined into a table to obtain the contract data table.

[0120] For example: when resources are limited, the maximum input and output length of the large language model is often limited. Therefore, the maximum information input length can be set to 3,000 characters according to the actual application scenario to ensure that the input information model can be read, and by controlling the input information length, the model's predicted content length can be within a controllable range, ensuring the stability of the output formatting. Specifically, add contract lines in sequence until the round of input is terminated when no complete line can be added. At this time, the length of block1 (that is, the data block composed of all contract lines input in the first round) is ≤3,000. If there are still unentered contract lines, they are block2, block3, etc. Then merge these blocks to obtain a complete table as the contract data table.

[0121] In the above embodiment, the model processing effect can be effectively improved by performing table restoration through a large language model and then performing subsequent model reasoning.

[0122] The loading unit 104 is used to load each commodity information in the target invoice to be financed.

[0123] For example, each piece of product information may include product name, product quantity, product unit price, product total price, etc.

[0124] The generating unit 105 is used to generate a target prompt word according to each commodity information in the target invoice to be financed and the contract data table.

[0125] In this embodiment, the generating unit 105 generates target prompt words according to each commodity information in the target invoice to be financed and the contract data table, including:

[0126] Determine a matching rule between each item of commodity information in the target invoice to be financed and the contract data table;

[0127] Obtaining an initial prompt word of the large language model;

[0128] The matching rule is added to the initial prompt word to obtain the target prompt word.

[0129] Through the above embodiments, matching rules can be established in a targeted manner to assist the large language model in performing more accurate reasoning.

[0130] The inference unit 106 is used to input the target prompt word into the large language model for inference to obtain an inference result.

[0131] In this embodiment, the inference result can be output in json format to facilitate downstream work.

[0132] The post-processing unit 107 is used to post-process the inference result to obtain the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0133] In this embodiment, the post-processing unit 107 performs post-processing on the inference result to obtain commodity information in the target contract corresponding to each commodity information in the target invoice to be financed, including:

[0134] Acquire pre-configured invalid information; wherein the invalid information includes explanatory information and symbol information;

[0135] When the invalid information is detected in the inference result, adding the detected invalid information to an invalid list;

[0136] The information in the inference result except the invalid list is determined as the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0137] For example: In addition to outputting the required information, the large language model may also output interference information in different formats such as explanatory information, symbolic information (such as "python", "[", "output should be: ["), etc. Therefore, in post-processing, by constructing a list and adding various potential interference information to the list (such as two brackets), the interference of invalid information can be reduced, so that subsequent processing is based only on valid information, which not only saves computing power but also improves computing efficiency.

[0138] The generating unit 105 is further configured to generate a verification result for the target invoice to be financed according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

[0139] In this embodiment, the generating unit 105 generates a verification result of the target invoice to be financed according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed, including:

[0140] When the commodity information in the target contract is identical to each commodity information in the target invoice to be financed, it is determined that the verification result is that the target invoice to be financed does not have a commodity mismatch risk; or

[0141] When the commodity information in the target contract is different from each commodity information in the target invoice to be financed, it is determined that the verification result is that there is a commodity non-correspondence risk in the target invoice to be financed.

[0142] Through the above embodiment, it is possible to verify whether the quantity of goods, the total price of goods, etc. in the target invoice to be financed are consistent with those in the contract, thereby avoiding transaction anomalies.

[0143] In this embodiment, when it is determined that the verification result shows that the target invoice to be financed has a risk of non-corresponding goods, an early warning reminder is promptly issued to relevant staff based on the verification result to avoid losses to both parties to the transaction due to bill anomalies.

[0144] It can be seen from the above technical solutions that this application performs tabular restoration of contract information based on a large language model, and performs subsequent processing after restoration to a table, which can improve the reasoning effect of the large language model; generates target prompt words according to each commodity information and contract data table in the target invoice to be financed, and inputs the target prompt words into the large language model for reasoning, which can use the large language model to automatically match the invoice to be financed with the contract information without human intervention, which not only improves the matching efficiency but also reduces the error rate; post-processes the reasoning results to remove invalid information, so as to use valid information to verify the invoice to be financed, and saves computing power, thereby improving the verification efficiency.

[0145] The above-mentioned invoice verification device for financing can be implemented in the form of a computer program, and the computer program can be used in Figure 4 Runs on the computer device shown.

[0146] See also Figure 4 , Figure 4 4 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 400 is a server, or a server cluster. The server can be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0147] See also Figure 4The computer device 400 includes a processor 402 , a memory and a network interface 405 connected via a device bus 401 , wherein the memory may include a storage medium 403 and an internal memory 404 .

[0148] The storage medium 403 can store an operating system 4031 and a computer program 4032. When the computer program 4032 is executed, the processor 402 can execute a method for verifying an invoice to be financed.

[0149] The processor 402 is used to provide computing and control capabilities to support the operation of the entire computer device 400 .

[0150] The internal memory 404 provides an environment for the operation of the computer program 4032 in the storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can execute the method for verifying the invoice to be financed.

[0151] The network interface 405 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 400 to which the solution of the present application is applied. The specific computer device 400 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0152] The processor 402 is used to run the computer program 4032 stored in the memory to implement the method for verifying invoices to be financed disclosed in the embodiment of the present application.

[0153] Those skilled in the art will understand that Figure 4 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 4 The embodiments shown are consistent and will not be described again here.

[0154] It should be understood that in the embodiment of the present application, the processor 402 may be a central processing unit (CPU), and the processor 402 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0155] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the method for verifying an invoice to be financed disclosed in the embodiment of the present application is implemented.

[0156] It should be noted that the data involved in this case were all obtained legally.

[0157] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0158] In the several embodiments provided in the present application, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, and units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.

[0159] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0160] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0161] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a background server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a disk or an optical disk.

[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for verifying invoices to be financed, characterized in that: include: In response to a verification instruction for a target invoice to be financed, determining a target contract corresponding to the target invoice to be financed; Extracting contract information of the target contract; Performing table restoration on the contract information based on the large language model to obtain a contract data table; Loading each commodity information in the target invoice to be financed; Generate a target prompt word according to each commodity information in the target invoice to be financed and the contract data table; Inputting the target prompt word into the large language model for reasoning to obtain a reasoning result; Post-processing the inference result to obtain commodity information in the target contract corresponding to each commodity information in the target invoice to be financed; A verification result for the target invoice to be financed is generated according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

2. The method for verifying invoices to be financed according to claim 1, characterized in that: The determining of the target contract corresponding to the target invoice to be financed includes: Determine the invoice format of the target invoice to be financed; Locating the target position of the contract number in the target invoice to be financed according to the invoice format; Perform text recognition on the target location to obtain the target contract number of the target invoice to be financed; The target contract is determined according to the target contract number.

3. The method for verifying invoices to be financed according to claim 1, characterized in that: The extracting the contract information of the target contract includes: identifying a table of goods in the target contract; Using TableOCR to identify the table structure of the product table; Traversing each cell in the commodity table according to the table structure of the commodity table to extract text information of each cell; All the extracted text information is combined to obtain the contract information.

4. The method for verifying invoices to be financed according to claim 1, characterized in that: The contract information is restored to a table based on the large language model to obtain a contract data table, including: Obtaining a maximum information input length of the large language model; In each round of reasoning, each contract line in the contract information is input to the large language model in turn, until the complete contract line cannot be input according to the maximum information input length, the input of the current round is stopped, the output of the current round of the large language model is obtained, and the next round of input of the remaining contract lines in the contract information is continued according to the maximum information input length; When it is detected that each contract line in the contract information has completed input, obtaining each round output of the large language model; The outputs of each round are combined into a table to obtain the contract data table.

5. The method for verifying invoices to be financed according to claim 1, characterized in that: The generating of target prompt words according to each commodity information in the target invoice to be financed and the contract data table includes: Determine a matching rule between each item of commodity information in the target invoice to be financed and the contract data table; Obtaining an initial prompt word of the large language model; The matching rule is added to the initial prompt word to obtain the target prompt word.

6. The method for verifying invoices to be financed according to claim 1, characterized in that: The post-processing of the inference result to obtain the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed includes: Acquire pre-configured invalid information; wherein the invalid information includes explanatory information and symbol information; When the invalid information is detected in the inference result, adding the detected invalid information to an invalid list; The information in the inference result except the invalid list is determined as the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

7. The method for verifying invoices to be financed according to claim 1, characterized in that: The generating of the verification result of the target invoice to be financed according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed includes: When the commodity information in the target contract is identical to each commodity information in the target invoice to be financed, it is determined that the verification result is that the target invoice to be financed does not have a commodity mismatch risk; or When the commodity information in the target contract is different from each commodity information in the target invoice to be financed, it is determined that the verification result is that there is a commodity non-correspondence risk in the target invoice to be financed.

8. A device for verifying invoices to be financed, characterized in that: include: a determination unit, configured to determine a target contract corresponding to the target invoice to be financed in response to a verification instruction for the target invoice to be financed; An extraction unit, used to extract the contract information of the target contract; A restoration unit, used for performing table restoration on the contract information based on a large language model to obtain a contract data table; A loading unit, used to load each commodity information in the target invoice to be financed; A generating unit, configured to generate a target prompt word according to each commodity information in the target invoice to be financed and the contract data table; An inference unit, used for inputting the target prompt word into the large language model for inference to obtain an inference result; A post-processing unit, configured to post-process the inference result to obtain commodity information in the target contract corresponding to each commodity information in the target invoice to be financed; The generating unit is further configured to generate a verification result for the target invoice to be financed according to the commodity information in the target contract corresponding to each commodity information in the target invoice to be financed.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for verifying an invoice to be financed according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the method for verifying an invoice to be financed according to any one of claims 1 to 7.