A large model-based invoice type recommendation method

By constructing a vector knowledge base and combining it with an efficient index structure, the problem of low efficiency in document type selection in the intelligent reimbursement system was solved, realizing intelligent, real-time, and accurate recommendation of document types and reducing manual intervention.

CN120561382BActive Publication Date: 2026-01-09INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511063072.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2026-01-09
Estimated Expiration
2045-07-31

AI Technical Summary

Technical Problem

Existing intelligent expense reimbursement systems are inefficient in selecting document types and are susceptible to human subjective bias, leading to a chain of errors in subsequent review processes. Traditional rule bases are incomplete and have low retrieval efficiency.

Method used

By constructing a vector knowledge base, combining a pre-trained rule mining model and historical audit data, static and dynamic processing rules are extracted, stored in a vectorized manner, and retrieved using an efficient index structure, thus achieving intelligent recommendation of document types.

Benefits of technology

It improves the speed and accuracy of document processing, reduces the cost of manual intervention, and realizes intelligent, real-time, and accurate document type recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561382B_ABST
    Figure CN120561382B_ABST
Patent Text Reader

Abstract

The application provides a large model-based document type recommendation method, belonging to the technical field of financial data processing, which comprises the following steps: extracting the text content of a document processing rule file, and splitting the text content to obtain the static processing rules of the document processing rule file; obtaining dynamic processing rules through a pre-trained rule mining model and historical audit document type recommendation results; vectorizing and storing the static processing rules and the dynamic processing rules to construct a vector knowledge base; receiving user-uploaded bill data, and determining the corresponding document recommendation type of the bill data based on the vector knowledge base. This method constructs a vector knowledge base containing implicit processing rules and dynamic processing rules, determines the corresponding document recommendation type of the bill data based on the vector knowledge base, and realizes intelligent recommendation of the document type.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of financial data processing, and particularly relates to a single type recommendation method based on a large model. BACKGROUND

[0002] With the acceleration of enterprise digital transformation, the intelligent demand of financial reimbursement process is increasingly urgent. The intelligent reimbursement system in the current market is mainly committed to the optimization of the audit process, and the technical evolution is concentrated in the enhancement of automatic audit, that is, through OCR recognition, rule engine and other technologies, the automatic level of single field extraction, amount checking and compliance checking is improved. The current intelligent reimbursement system has entered the "audit-driven" technical iteration stage, and OCR text recognition, structured rule engine and NLP field extraction technology are widely used.

[0003] However, the reimbursement scene of modern enterprises involves multiple types of single such as invoices, consumption records, application forms and loan forms, and the single processing rule file is often dynamically adjusted according to the region, department and business type. At present, when users use the reimbursement system to initiate reimbursement, they often manually select the reimbursement single type and associate the relevant bills after understanding the single processing rule file. However, this process requires users to repeatedly review the single processing rule file or historical records to determine the single type, especially when the rule processing file is frequently adjusted, the selection time is significantly increased, resulting in low efficiency, and manual selection is easily affected by subjective cognitive bias. If the single type is selected incorrectly, it will cause a chain of errors in the subsequent audit process.

[0004] Therefore, it is urgent to develop a single type recommendation method based on a large model, which integrates data processing and intelligent single type recommendation. SUMMARY

[0005] In order to solve at least one aspect of the technical problems in the background art, the application provides a single type recommendation method based on a large model, which determines the single recommendation type corresponding to the bill data based on the vector knowledge base, and realizes intelligent recommendation of the single type by constructing a vector knowledge base.

[0006] The technical scheme adopted by the application is as follows:

[0007] The first aspect of the application provides a single type recommendation method based on a large model, which comprises: extracting the text content of a single processing rule file, and cutting the text content to obtain the static processing rule of the single processing rule file;

[0008] The pre-trained rule mining model and the historical audit single type recommendation result are used to obtain the dynamic processing rule;

[0009] vectorize storage of the static processing rules and the dynamic processing rules to construct a vector knowledge base;

[0010] receive user-uploaded bill data and determine a recommended type of the bill corresponding to the bill data based on the vector knowledge base.

[0011] According to an embodiment of the present application, the splitting of the text content to obtain the static processing rules of the bill processing rule file specifically includes:

[0012] preliminarily split the text content through a character window of a preset length to obtain a first text paragraph set;

[0013] detect paragraph boundaries of the first text paragraph set through a TextTiling algorithm, and correct the paragraph boundaries of the first text paragraph set to obtain a second text paragraph set;

[0014] determine paragraph difference degrees of the text paragraphs in the second text paragraph set based on a bag-of-words model;

[0015] correct the paragraph boundaries in the second text paragraph set based on the paragraph difference degrees to obtain a third text paragraph set;

[0016] determine static processing rules based on the third text paragraph set.

[0017] According to an embodiment of the present application, the vectorize storage of the static processing rules and the dynamic processing rules to construct a vector knowledge base specifically includes:

[0018] perform word segmentation processing on the static processing rules and the dynamic processing rules through a BERT model to obtain corresponding CLS vectors,

[0019] store the CLS vectors to obtain the vector knowledge base.

[0020] According to an embodiment of the present application, the receiving of user-uploaded bill data and the determination of a recommended type of the bill corresponding to the bill data based on the vector knowledge base specifically includes:

[0021] perform standardization processing on the bill data to obtain standardized data;

[0022] extract feature fields of the standardized data;

[0023] perform hierarchical retrieval in the vector knowledge base based on the feature fields to determine the recommended type of the bill corresponding to the bill data;

[0024] The feature field includes at least any one of a bill number, a date, an amount, and a consumption type.

[0025] According to an embodiment of the present application, the hierarchical retrieval is performed in the vector knowledge base based on the feature field to determine the bill recommendation type corresponding to the bill data, specifically including:

[0026] A multi-layer graph structure of the vector knowledge base is constructed based on the HNSW algorithm, each layer of the multi-layer graph structure includes a plurality of CLS vectors, and the node degree of each layer of the graph structure decays exponentially, the node degree being the number of adjacent vectors of each CLS vector;

[0027] Based on the feature field, a nearest neighbor search is performed on each layer of the graph structure to obtain the most similar CLS vector;

[0028] Based on the most similar CLS vector, the static processing rule and / or the dynamic processing rule corresponding to the bill data is determined;

[0029] Based on the static processing rule and / or the dynamic processing rule, the bill recommendation type corresponding to the bill data is determined.

[0030] According to an embodiment of the present application, the multi-layer graph structure of the vector knowledge base constructed based on the HNSW algorithm specifically further includes:

[0031] The CLS vectors are clustered to obtain a plurality of cluster centers, each of the cluster centers corresponding to an inverted list, and the plurality of cluster centers form a similarity search library;

[0032] The newly added CLS vectors are dynamically partitioned by a Faiss retrieval algorithm, and the similarity search library is updated;

[0033] Hierarchical retrieval is performed based on the similarity search library.

[0034] According to an embodiment of the present application, the hierarchical retrieval is performed in the vector knowledge base based on the feature field to determine the bill recommendation type corresponding to the bill data, specifically including:

[0035] A query vector is generated based on the feature field, and the similarity between the query vector and a plurality of cluster centers is calculated by an IVF algorithm;

[0036] Based on the similarity ranking, a plurality of cluster centers with higher similarity are selected to obtain a candidate set;

[0037] A multi-layer graph structure is constructed for the plurality of cluster centers in the candidate set by an HNSW algorithm;

[0038] perform a nearest neighbor search on the each layer graph structure based on the query vector to obtain the most similar CLS vector;

[0039] determine the static processing rule and / or the dynamic processing rule corresponding to the bill data based on the most similar CLS vector;

[0040] determine the bill recommendation type corresponding to the bill data based on the static processing rule and / or the dynamic processing rule.

[0041] According to an embodiment of the present application, the method further comprises:

[0042] pre-constructing a plurality of preset type large model service interfaces;

[0043] configuring the bill data uploaded by the user and the standardization processing process of the bill data as a data acquisition interface;

[0044] mapping the data acquisition interface and the plurality of preset type large model service interfaces into the interactive interface of the intelligent agent.

[0045] The second aspect embodiment of the present application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the large model based bill type recommendation method in any embodiment of the first aspect when executing the computer program.

[0046] The third aspect embodiment of the present application provides a non-volatile computer storage medium having computer executable instructions stored thereon, and the computer executable instructions are executed by a processor to implement the large model based bill type recommendation method in any embodiment of the first aspect.

[0047] Advantages:

[0048] The large model based bill type recommendation method disclosed in the present application obtains implicit processing rules by cutting the bill processing rule file, and mines and analyzes dynamic processing rules. By uniformly vectorizing and storing the static processing rules and the dynamic processing rules, the problem of incomplete coverage of traditional rule libraries is solved. By hierarchical vectorization, data standardization, and rule engine cooperation, the vector knowledge base storing the bill processing rule file and the implicit associated information involved in bill filling is deeply fused with real-time unreported data (invoice, application form, loan form, etc.) of the user. The recommended bill type is generated through semantic reasoning, and the "recommendation-filling" one-key jump interaction is realized. The pain points of traditional reimbursement systems relying on manual decision-making are solved. The intelligence, real-time, and accuracy of bill type recommendation are realized, and the processing speed of bills is improved. BRIEF DESCRIPTION OF DRAWINGS

[0049] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0050] Figure 1 A flowchart of a large model-based document type recommendation method provided by an embodiment of the application is shown in the figure.

[0051] Figure 2 A structural schematic diagram of an electronic device provided by an embodiment of the application is shown in the figure.

[0052] Reference signs:

[0053] 810, processor; 820, communication interface; 830, memory; 840, communication bus. DETAILED DESCRIPTION

[0054] In order to more clearly illustrate the overall concept of the application, the following will be described in detail with reference to the accompanying drawings.

[0055] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the application, but the application can also be implemented in other ways different from those described herein, and therefore the scope of protection of the application is not limited by the specific embodiments disclosed below. It should be noted that the embodiments of the application and the features in each embodiment can be combined with each other without conflict.

[0056] In the present application, unless otherwise explicitly specified and limited, the first feature is "on" or "under" the second feature, which can be direct contact between the first and second features, or indirect contact between the first and second features through an intermediate medium. In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0057] As Figure 1 shown, the first aspect embodiment of the present application provides a large model-based document type recommendation method, comprising:

[0058] Step 100, extracting the text content of the document processing rule file, and cutting the text content to obtain the static processing rule of the document processing rule file.

[0059] Step 200, mining the pre-trained rule model and the historical audit document type recommendation result to obtain a dynamic processing rule.

[0060] Step 300, vectorizing and storing the static processing rule and the dynamic processing rule to construct a vector knowledge base.

[0061] Step 400, receiving user-uploaded bill data and determining the corresponding document recommendation type of the bill data based on the vector knowledge base.

[0062] The document type recommendation method based on a large model of the present application can be applied to type recommendation during filling of various documents. Specifically, the document type recommendation method of the present application can be applied to reimbursement document type recommendation. The following content is based on the scheme of recommending the filling type of a reimbursement document and is described in detail. When constructing a rule vector knowledge base for document type recommendation, the traditional rule base method usually directly performs full-text matching on the reimbursement rule document. However, this method has several significant problems: the document processing rule file is usually long and contains complex clauses and details, and direct full-text matching may cause semantic fragmentation or loss of key information; in addition, since the context of the document processing rule file has integrity, if the document is not properly segmented, the context relationship of some paragraphs may be destroyed, affecting the accuracy of subsequent semantic understanding and retrieval.

[0063] In step 100, the system first extracts the rule text related to document rule filling and processing in the document processing rule file, and structures and divides the extracted related rule text content to obtain the static processing rule of the document processing rule file. The static processing rule obtained after the block division is more convenient for vectorization processing, thereby improving the subsequent retrieval accuracy and solving the problem of semantic fragmentation caused by text fragmentation when processing the document processing rule file.

[0064] In step 200, in the reimbursement system, the static processing rule (such as “the travel expenses need to be associated with the application form”) is usually explicitly formulated by the enterprise and recorded in the related document processing rule file. However, there are still many implicit association information in the actual filling process. These rules cannot be directly obtained through the explicit document processing rule file, but can be mined through historical audit data, for example, “dining invoice + transportation invoice” means “travel expenses”. In order to automatically identify these implicit association information, the system needs a mechanism to learn and extract useful information from a large amount of historical data, and then obtain a dynamic processing rule based on the implicit association information.

[0065] First, a lightweight machine learning model (such as random forest) is trained based on historical audit data to identify implicit association information (such as the combination of catering invoices and transportation invoices resulting in travel expenses), and the rule path output by the model is then converted into a text description to ensure readability and operability. Specifically, first, historical audit data is collected and organized, including but not limited to invoices, consumption records, application forms, and historical reporting documents, and the original data is cleaned, standardized, and useful features (such as amount, date, location, invoice type, etc.) are extracted. The original data is learned through a machine learning model to obtain dynamic processing rules such as "catering invoices and transportation invoices" often corresponding to "travel expenses".

[0066] By pre-training a rule mining model to identify implicit association information from historical audit data and converting these rules into easy-to-understand and operate text descriptions, dynamic processing rules are obtained, significantly improving the recommendation accuracy and automation level of the intelligent reimbursement system. This method not only reduces the cost of manual intervention, but also quickly adapts to business changes, providing more flexible and efficient reimbursement solutions for enterprises.

[0067] In step 300, the obtained static processing rules and dynamic processing rules are uniformly vectorized and stored to construct a vector knowledge base, and combined with an efficient indexing structure, millisecond-level retrieval of billions of vectors is achieved. The core of this step is to integrate different types of rules into a unified knowledge representation framework for subsequent rapid retrieval and application. Static processing rules are usually based on fixed business logic or document processing rule files, such as "catering invoices are classified as entertainment expenses by default." Dynamic processing rules are implicit association information mined from historical data through machine learning, such as "catering invoices + transportation invoices → travel expenses" mentioned earlier. By vectorizing storage, these rules are converted into mathematical vector representations, which not only preserve the core information of the rules, but also facilitate efficient computer processing.

[0068] The construction of the vector knowledge base not only improves the storage efficiency of the rules, but also makes the similarity calculation and matching between rules more intuitive and fast. Combined with efficient indexing structures such as inverted indexes or approximate nearest neighbor search algorithms, the system can retrieve the most matching processing rules from massive rules in milliseconds, greatly improving the real-time performance and accuracy of document type recommendation, effectively solving the technical problems of traditional rule bases relying on linear search, unable to handle massive document processing rules, and low retrieval efficiency.

[0069] In step 400, the system will match the user ticket data based on the vector knowledge base, realize intelligent recommendation of the single type, and reduce the cost of manual intervention. Specifically, the ERP system constructs a real-time and unified un-reimbursed data pool to support subsequent intelligent recommendation. Through SQL dynamic query and Java backend service call, real-time extraction of user's to-be-reimbursed invoices, application forms, loan forms, consumption records and other multi-source data is realized. Then, Java code is used for type identification, field alignment (such as timestamp conversion to ISO8601 format) and null value filtering of the data, to ensure uniform format and output standardized JSON data. Further, structured fields (such as amount and date) and unstructured fields (such as consumption location keywords) are extracted from the standardized JSON data. High-efficiency static processing rules (such as enterprise single processing rule files) are preferentially matched, and if they fail, dynamic processing rules (such as historical implicit rules) are retrieved. Then, the rule engine is checked to determine whether the matching result meets the explicit rules (such as "travel expenses need to be associated with application forms"), and the explicit rules are used as the criterion in case of conflict.

[0070] The single type recommendation method based on a large model disclosed in the application solves the problem of incomplete coverage of traditional rule libraries by obtaining implicit processing rules by cutting the single processing rule file, and mining and analyzing dynamic processing rules, and solving the problem of incomplete coverage of traditional rule libraries by uniformly vectorizing the static processing rules and the dynamic processing rules. Through hierarchical vectorization of rule files, data standardization and rule engine cooperation, the vector knowledge base storing single processing rule files and implicit association information related to ticket filing is deeply integrated with real-time un-reimbursed data (invoices, application forms, loan forms, etc.) of users. The single type recommendation method based on a large model generates reimbursement single type recommendation through semantic reasoning, and realizes "recommendation-filling" one-key jump interaction. The single type recommendation method based on a large model solves the pain points of traditional reimbursement systems relying on manual decision-making, realizes the intelligent, real-time and accurate of single type recommendation, and improves the processing speed of single.

[0071] According to an embodiment of the application, the text content is cut to obtain the static processing rules of the single processing rule file, specifically including:

[0072] The text content is preliminarily cut through a character window of a preset length to obtain a first text paragraph set;

[0073] The paragraph boundaries of the first text paragraph set are detected and corrected through a TextTiling algorithm to obtain a second text paragraph set;

[0074] Based on a bag-of-words model, the paragraph difference degrees of each text paragraph in the second text paragraph set are determined;

[0075] Based on the inter-paragraph differences, the paragraph boundaries in the second text paragraph set are corrected to obtain the third text paragraph set;

[0076] Based on the third set of text paragraphs, static processing rules are determined.

[0077] By performing reasonable text segmentation on the document processing rule file, we ensure that each paragraph contains complete semantic information and avoid truncating key information or breaking the context. This ultimately generates high-quality static processing rules, providing accurate foundational data for subsequent document type recommendations.

[0078] Specifically, the long text content is initially segmented into multiple smaller paragraphs for subsequent finer boundary adjustments and semantic analysis. The text content is cut using a pre-set window step size to generate a first set of text paragraphs, ensuring some overlap between adjacent paragraphs and preserving contextual coherence. Next, the TextTiling algorithm is used to detect and refine the paragraph boundaries of the first set of text paragraphs, resulting in a second set of text paragraphs. The difference between adjacent second set text paragraphs is calculated based on the bag-of-words model; the formula for determining the segmentation point is as follows:

[0079] .

[0080] in, For the degree of difference, This represents a set containing all possible words (i.e., the vocabulary in the bag-of-words model). The word frequency of word w in the preceding text. for Word frequency in the following text. When the degree of difference... When, it is judged as a paragraph boundary ( For the threshold, the empirical value of the threshold (Can be set to 1.2), perform paragraph segmentation to obtain a third text paragraph set. Extract explicit static processing rules from the final determined third text paragraph set for subsequent document type recommendation. Transform the extracted rules into a structured form (such as JSON format) for easy storage and retrieval.

[0081] By employing steps such as initial segmentation using a pre-set length character window, boundary correction using the TextTiling algorithm, calculation of paragraph differences using the bag-of-words model, and final paragraph boundary correction, long text content can be effectively segmented into semantically complete and coherent paragraphs. This approach better captures complex semantic patterns, extracts high-quality static processing rules, and improves the accuracy of subsequent vectorization processing and retrieval. This method not only solves the problem of traditional rule bases struggling to handle the characteristics of long text, easily leading to semantic breaks or loss of key information, but also significantly improves the recommendation accuracy and automation level of intelligent reimbursement systems.

[0082] According to an embodiment of the present application, the static processing rules and the dynamic processing rules are stored in a vector form to construct a vector knowledge base, specifically including:

[0083] The static processing rules and the dynamic processing rules are segmented by a BERT model to obtain corresponding CLS vectors,

[0084] The CLS vectors are stored to obtain the vector knowledge base.

[0085] By using a pre-trained language model (such as BERT) to convert static processing rules and dynamic processing rules into vector representations, a vector knowledge base with efficient retrieval is constructed. This enables the system to quickly and accurately recommend the corresponding invoice type based on the user uploaded ticket data, thereby reducing manual intervention and improving work efficiency. Specifically: collect all static processing rules and dynamic processing rules, and format them according to the requirements of the BERT model (such as adding special markers CLS, SEP). Use the BERT built-in tokenizer to segment each rule, cutting the original text into individual word units. Pass the segmented input into the pre-trained BERT model to obtain the hidden state output of each layer. Select the vector at the CLS marker position among all hidden states as the semantic representation of the entire sentence. Extract the CLS marker vector corresponding to each sentence from the last layer output of the BERT model as the semantic representation of the sentence, which is used for subsequent similarity calculation and matching operations. Store all extracted CLS vectors of static processing rules and dynamic processing rules in a specially designed vector database to form a knowledge base that supports efficient query.

[0086] By segmenting static and dynamic processing rules using the BERT model and extracting CLS vectors to construct a vector knowledge base, deeper semantic information can be captured, and vector-based similarity search can achieve faster response speed on large-scale data sets. Since the CLS vector contains the semantic information of the entire sentence, similarity calculation based on this vector can more accurately find the most matching rules for the user's ticket, reducing the misjudgment rate, improving matching accuracy, and meeting the needs of real-time recommendation. In addition, as enterprise reimbursement rules change, new invoice processing rule files are constantly generated, and the vector knowledge base can flexibly store and update these rules, maintaining the timeliness and adaptability of the system.

[0087] According to an embodiment of the present application, the user uploaded ticket data is received, and the vector knowledge base is used to determine the corresponding invoice recommendation type of the ticket data, specifically including:

[0088] The ticket data is standardized to obtain standardized data;

[0089] extracting a feature field from the standardized data;

[0090] performing hierarchical retrieval in the vector knowledge base based on the feature field to determine a recommended type of the invoice data corresponding to the invoice data;

[0091] The feature field at least includes any one of an invoice number, a date, an amount, and a consumption type.

[0092] By standardizing and extracting features from user-uploaded invoice data, and using a constructed vector knowledge base, the intelligent identification of the recommended type of the invoice data corresponding to the invoice data is achieved. This process aims to reduce manual intervention and improve the automation and accuracy of the reimbursement process. Specifically, invoice data from different sources (such as ERP systems or user uploads) is cleaned to remove noise data, correct errors or incomplete fields; then all data fields are unified into a predefined standard format, such as converting date fields to ISO 8601 format, and keeping two decimal places for amount fields; ensure that each invoice data contains necessary information and is output in JSON or other easy-to-parse format. Extract key information from the standardized invoice data as a feature field, which is used for retrieval and matching in the vector knowledge base, including selecting appropriate feature fields according to business needs, and the feature field at least includes but is not limited to invoice number, date, amount, and consumption type. Convert the extracted feature field into a numerical or categorical vector representation, use the feature field to perform efficient similarity search in the pre-constructed vector knowledge base, sort the search results according to the similarity score, and find the most matching recommended type of the invoice.

[0093] Through standardization of invoice data, all data can be processed and analyzed under the same framework, and through feature field extraction and vector similarity search, the most matching invoice type can be found more accurately. In addition, through the feedback mechanism of the user, the system can continuously learn and improve the vector knowledge base, thereby better serving the actual business needs. Automated invoice processing and type recommendation greatly reduces the time cost of manual review, and through intelligent matching algorithms, reduces the errors caused by human judgment, improves the accuracy and consistency of the recommended results, and improves the overall efficiency of the reimbursement process.

[0094] According to an embodiment of the present application, the hierarchical retrieval in the vector knowledge base based on the feature field to determine the recommended type of the invoice data corresponding to the invoice data specifically includes:

[0095] construct a multi-layer graph structure of a vector knowledge base based on the HNSW algorithm, each layer of the multi-layer graph structure comprising a plurality of CLS vectors, the node degree of each layer of the graph structure being exponentially attenuated, the node degree being the number of adjacent vectors of each CLS vector;

[0096] perform a nearest neighbor search on each layer of the graph structure based on the feature field to obtain the most similar CLS vector;

[0097] based on the most similar CLS vector, determine the static processing rule and / or the dynamic processing rule corresponding to the bill data;

[0098] based on the static processing rule and / or the dynamic processing rule, determine the bill recommendation type corresponding to the bill data.

[0099] The system performs efficient and accurate similarity search on bill data uploaded by users through the multi-layer graph structure vector knowledge base constructed by using the HNSW algorithm, thereby determining the most matching static processing rule and / or dynamic processing rule, and recommending the most suitable bill type accordingly. Specifically, the vector knowledge base is created as a multi-layer graph structure, each layer containing different number of nodes, i.e. CLS vectors. The node degree of each layer is set to be exponentially attenuated, i.e. the number of adjacent nodes of each node gradually increases from the top layer to the bottom layer, so that the top layer graph has fewer but more extensive connections, and the bottom layer graph is more intensive. The adjacency relationship between nodes of each layer is calculated and established according to the similarity between vectors.

[0100] wherein: the node degree of the i-th layer of the graph, the base node degree (e.g. 16), the attenuation factor (e.g. 1.2), the maximum number of layers of the graph, the current layer number. Convert the key feature fields in the bill data into numerical or categorical vector representations, start the initial search from the top layer graph, find the nearest neighbor nodes of the query vector, gradually proceed to the next layer graph, select the node closest to the query vector in the current layer as the starting point each time, continue to search downward, until reaching the bottom layer graph, aggregate all the nearest neighbor nodes found at all levels, sort them by similarity, and select the Top-K CLS vectors as the final candidate set.

[0101]

[0102] ​The CLS vector is mapped back to its original text form, the static processing rules and / or the dynamic processing rules corresponding to the bill data are determined, the contents of these rules and their applicable conditions are analyzed, it is judged which rules are applicable to the current bill data, and the static processing rules and the dynamic processing rules are comprehensively considered to form a complete reimbursement guidance suggestion. In addition, after determining the best matching document type, the recommended document type and related information are displayed through the front-end component, allowing the user to one-click jump to the corresponding reimbursement form filling page, and a feedback mechanism is set to allow the user to object to or suggest the recommended result, helping the system to continuously learn and improve.

[0103] The vector knowledge base of the multi-layer graph structure is constructed by the HNSW algorithm. The hierarchical graph structure can significantly shorten the search time while ensuring high recall rate, significantly improve the search efficiency, and is especially suitable for large-scale data set application scenarios. At the same time, through feature field extraction and vector similarity search, the corresponding reimbursement rules of the bill data can be more accurately identified, reducing the possibility of misjudgment and improving the reliability of the overall system.

[0104] According to an embodiment of the present application, the multi-layer graph structure of the vector knowledge base constructed based on the HNSW algorithm specifically includes:

[0105] The CLS vectors are clustered to obtain a plurality of cluster centers, each of which corresponds to an inverted list, and the plurality of cluster centers form a similarity search library;

[0106] The newly added CLS vectors are dynamically partitioned by the Faiss retrieval algorithm, and the similarity search library is updated;

[0107] Layered retrieval is performed based on the similarity search library.

[0108] By dividing all CLS vectors into a plurality of clusters, each cluster is represented by a cluster center, forming a basic structure for efficient query. Specifically, a clustering algorithm such as K-means is used to cluster all CLS vectors; the appropriate number of clusters is determined according to business requirements and data size to balance query efficiency and recall rate, the mean of all vectors in each cluster is calculated as the cluster center of the cluster, and an inverted list is established for each cluster center to record all CLS vector IDs and related information belonging to the cluster.

[0109] When a new CLS vector is added, first calculate the similarity between it and the existing cluster centers, assign the new vector to the cluster corresponding to the cluster center closest to it according to the similarity result, and update the inverted list of the cluster. If the data volume of a cluster exceeds a certain threshold, a re-partitioning operation is triggered to re-adjust the division of the cluster, and if necessary, re-clustering is performed. The IVF mechanism provided by Faiss is used to dynamically maintain and optimize the index structure, ensuring that the query efficiency is not affected.

[0110] According to another embodiment of the present application, based on the feature field, hierarchical retrieval is performed in the vector knowledge base to determine the recommended type of the invoice data, and specifically further comprising:

[0111] Generating a query vector based on the feature field, and calculating the similarity between the query vector and multiple cluster centers through an IVF algorithm;

[0112] Based on the similarity ranking, selecting multiple cluster centers with higher similarity to obtain a candidate set;

[0113] Constructing a multi-layer graph structure for multiple cluster centers in the candidate set through an HNSW algorithm;

[0114] Based on the query vector, performing a nearest neighbor search on each layer of graph structure to obtain the most similar CLS vector;

[0115] Based on the most similar CLS vector, determining the static processing rule and / or the dynamic processing rule corresponding to the invoice data;

[0116] Based on the static processing rule and / or the dynamic processing rule, determining the recommended type of the invoice data.

[0117] By combining the IVF and HNSW algorithms, efficient and accurate similarity search is performed on the invoice data to be recommended, so as to determine the most matching static processing rule and / or dynamic processing rule, and accordingly recommend the most suitable type of invoice. This process aims to improve the automation level of the reimbursement process, reduce manual intervention, and at the same time improve the working efficiency and accuracy of the system.

[0118] Specifically, key information is extracted from the standardized invoice data to form a feature field, and a pre-trained model is used to convert these feature fields into fixed-length vector representations to form a query vector. Further, the IVF algorithm is used to calculate the similarity between the query vector and all cluster centers, and all cluster centers are sorted according to the similarity score, and the top N cluster centers with higher similarity are selected as the candidate set. Further, a multi-level graph structure is created for the cluster centers in each candidate set, and efficient similarity search is performed on the constructed multi-layer graph structure to find the CLS vector closest to the query vector, and the Top-K CLS vectors are selected as the final candidate set. According to the most similar CLS vector obtained by retrieval, the reimbursement rules (static processing rule and / or dynamic processing rule) associated therewith are identified. According to the reimbursement rules determined in the above steps, the most suitable type of invoice for the current invoice data is recommended, and feedback is provided to the front-end interface for user confirmation or further operation.

[0119] According to one embodiment of the present application, the method further comprises:

[0120] pre-constructing a plurality of preset type large model service interfaces;

[0121] configuring the obtained user uploaded bill data and the standardization processing process of the bill data as a data acquisition interface;

[0122] arranging the data acquisition interface and the plurality of preset type large model service interfaces into the interaction interface of the intelligent agent.

[0123] By pre-constructing a plurality of preset type large model service interfaces, configuring the obtained user uploaded bill data and its standardization processing process as a data acquisition interface, and finally arranging these interfaces into the interaction interface of the intelligent agent, efficient data processing and intelligent recommendation are realized. This setting aims to improve the flexibility, scalability and user experience of the system, ensuring that the system can adapt to different types of data processing needs and simplify the user's operation process. Specifically, according to the business requirements, determine the different types of service interfaces that need to be supported, according to the requirements of each service, select the appropriate large model, and develop the corresponding API interface for it, encapsulate each selected large model to make it conform to the unified service specification, including input and output formats, calling methods, etc.; clean, format conversion, structuring, etc. to the obtained data to generate standard data formats that meet the system requirements, and dynamically configure the API path to the intelligent agent tool library, so that the large model can call the interface to obtain real-time business data as needed. In addition, create an intuitive and easy-to-use front-end interface that allows users to easily upload bill data and view processing results, and embed the calling logic of the data acquisition interface in the front-end interface to ensure that the user uploaded bill data can be automatically acquired and standardized. Integrate various preset type large model service interfaces into the interaction interface, allowing users to select different services for processing as needed. By creating a front-end interface, the user's operation process is simplified, and the user experience is improved.

[0124] In addition, in order to ensure the reliability of the RPC interface, real-time acquisition of user non-reimbursable data is realized, and interface data standardization is realized, that is, according to the JSON Schema definition constraint condition, an exponential backoff retry strategy is adopted, .

[0125] wherein: is the retry interval, is the initial retry delay time, is the current number of retries.

[0126] The bill type recommendation method of the application encapsulates multi-source heterogeneous business data (invoicing, loan, etc.) into a standardized API service, and realizes on-demand calling of a large model through dynamic configuration, builds a unified data service middle layer, supports interface-level permission control and data real-time guarantee, and meanwhile, the user can define the "identity" and answer rules of the model in the use process, constrain the behavior (such as requiring formal expression, relying on context, etc.), and the system prompt will be used as an implicit input to guide the large model to generate answers meeting the expectations. The problems of difficulty of large model to directly process multi-source heterogeneous data and low efficiency of traditional artificial rule mapping are solved, and automatic alignment of different source data and strategy linkage are realized. Based on the large model technology, an intelligent agent for bill type prediction is constructed, the user is dynamically recommended reasonable bill types by combining the bill processing rule file of the company and the real-time un-reimbursed data of the user, and through the front-end design, the bill type recommended is directly jumped to the card page for filling and reporting by clicking, realizing the front-end "recommendation-filling" one-key jump interaction.

[0127] The bill type recommendation method based on a large model provided by the application first combines a bill processing rule file with vector storage to construct a hierarchical vector knowledge base; in addition, a dynamic updating mechanism supports real-time synchronization of new bill processing rule files, solves the problem of lagging of traditional rule base dynamic updating, realizes real-time linkage of multi-source bill data and dynamic rule base through a standardized interface, realizes coupling of bill data and rule files, promotes the transformation of bill filling from "post-audit" to "pre-recommendation", realizes the paradigm upgrade from "manual decision" to "intelligent recommendation", and fills the gap of intelligent bill filling system in the initiation stage. The technical scheme of the application solves the pain points of traditional reimbursement systems relying on manual decision and the problems of low efficiency of bill type recommendation and high cost of manual intervention caused by data isolation and strategy lagging through hierarchical vectorization of bill processing rule files, data standardization and rule engine cooperation, realizes the intelligence, real-time and precision of bill type recommendation.

[0128] The second aspect embodiment of the application provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the bill type recommendation method based on a large model in any embodiment of the first aspect when executing the computer program.

[0129] Figure 2 An example of an entity structure diagram of an electronic device is shown in Figure 2As shown, the electronic device can include a processor 810, a communications interface 820, a memory 830, and a communications bus 840, wherein the processor 810, the communications interface 820, and the memory 830 complete mutual communication through the communications bus 840. The processor 810 can invoke the logic instructions in the memory 830 to execute the large model-based document type recommendation method in any embodiment of the first aspect described above, which method comprises:

[0130] Step 100, extracting the text content of the document processing rule file, and segmenting the text content to obtain the static processing rule of the document processing rule file.

[0131] Step 200, obtaining the dynamic processing rule by a pre-trained rule mining model and historical audit document type recommendation results.

[0132] Step 300, vectorizing and storing the static processing rule and the dynamic processing rule to construct a vector knowledge base.

[0133] Step 400, receiving user-uploaded bill data, and determining the document recommendation type corresponding to the bill data based on the vector knowledge base.

[0134] In addition, the logic instructions in the memory 830 described above can be implemented in the form of a software functional unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0135] On the other hand, the present application also provides a computer program product, which comprises a computer program, and the computer program can be stored on a non-transitory computer readable storage medium. When the computer readable storage medium is executed by a processor, the computer can execute the large model-based document type recommendation method provided by the above-mentioned method, which method comprises:

[0136] Step 100, extracting the text content of the document processing rule file, and cutting the text content to obtain the static processing rule of the document processing rule file.

[0137] Step 200, obtaining the dynamic processing rule by a pre-trained rule mining model and a historical audit document type recommendation result.

[0138] Step 300, vectorizing and storing the static processing rule and the dynamic processing rule to construct a vector knowledge base.

[0139] Step 400, receiving the bill data uploaded by the user, and determining the document recommendation type corresponding to the bill data based on the vector knowledge base.

[0140] Finally, the application also provides a non-volatile computer storage medium having computer executable instructions stored thereon, the computer executable instructions being executed by a processor to implement the single document type recommendation method based on a large model provided by the above method, the method comprising:

[0141] Step 100, extracting the text content of the document processing rule file, and cutting the text content to obtain the static processing rule of the document processing rule file.

[0142] Step 200, obtaining the dynamic processing rule by a pre-trained rule mining model and a historical audit document type recommendation result.

[0143] Step 300, vectorizing and storing the static processing rule and the dynamic processing rule to construct a vector knowledge base.

[0144] Step 400, receiving the bill data uploaded by the user, and determining the document recommendation type corresponding to the bill data based on the vector knowledge base.

[0145] Each embodiment in the specification is described in a progressive manner, and the same and similar parts between each embodiment can be referred to each other, and each embodiment mainly describes the difference from other embodiments.

[0146] The above only describes the embodiments of the application and is not used to limit the application. The application can have various changes and modifications for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the application shall be included in the protection scope of the application.

Claims

1. A large model-based invoice type recommendation method, characterized by, The method comprises the following steps: extracting the text content of the single document processing rule file, and segmenting the text content to obtain the static processing rule of the single document processing rule file; obtaining dynamic processing rules through a pre-trained rule mining model and historical audit single document type recommendation results; vectorizing and storing the static processing rules and the dynamic processing rules to construct a vector knowledge base; receiving user-uploaded bill data, and determining the single document recommended type corresponding to the bill data based on the vector knowledge base; the segmenting of the text content to obtain the static processing rule of the single document processing rule file specifically comprises: preliminarily segmenting the text content through a preset length character window to obtain a first text paragraph set; detecting the paragraph boundaries of the first text paragraph set through a TextTiling algorithm, and correcting the paragraph boundaries of the first text paragraph set to obtain a second text paragraph set; determining the inter-paragraph difference degree of each text paragraph in the second text paragraph set based on a bag-of-words model; correcting the paragraph boundaries in the second text paragraph set based on the inter-paragraph difference degree to obtain a third text paragraph set; determining the static processing rule based on the third text paragraph set. 2.The large model-based document type recommendation method of claim 1, wherein, the vectorizing and storing of the static processing rules and the dynamic processing rules to construct a vector knowledge base specifically comprises: performing word segmentation processing on the static processing rules and the dynamic processing rules through a BERT model to obtain corresponding CLS vectors; storing the CLS vectors to obtain the vector knowledge base. 3.The large model-based document type recommendation method of claim 1, wherein, the receiving of user-uploaded bill data and the determining of the single document recommended type corresponding to the bill data based on the vector knowledge base specifically comprises: performing standardization processing on the bill data to obtain standardized data; extracting the feature fields of the standardized data; performing hierarchical retrieval in the vector knowledge base based on the feature fields to determine the single document recommended type corresponding to the bill data; the feature fields at least include any one of a single document number, a date, an amount, and a consumption type. 4.The large model-based document type recommendation method of claim 3, wherein, the hierarchical retrieval in the vector knowledge base based on the feature fields to determine the single document recommended type corresponding to the bill data specifically comprises: constructing a multi-layer graph structure of the vector knowledge base based on an HNSW algorithm, each layer of the multi-layer graph structure contains a plurality of CLS vectors, the node degree of each layer of the graph structure decays exponentially, and the node degree is the number of adjacent vectors of each CLS vector; performing neighbor search on each layer of the graph structure based on the feature fields to obtain the most similar CLS vector; determining the static processing rule and / or the dynamic processing rule corresponding to the bill data based on the most similar CLS vector; determining the single document recommended type corresponding to the bill data based on the static processing rule and / or the dynamic processing rule. 5.The large model-based document type recommendation method according to claim 4, characterized in that, the construction of the multi-layer graph structure of the vector knowledge base based on the HNSW algorithm specifically further comprises: The CLS vectors are clustered to obtain a plurality of cluster centers, each of which corresponds to an inverted list, and the plurality of cluster centers form a similarity search library; The newly added CLS vectors are dynamically partitioned by a Faiss retrieval algorithm to update the similarity search library; The hierarchical retrieval is performed based on the similarity search library. 6.The large model-based document type recommendation method according to claim 5, characterized in that, The hierarchical retrieval is performed in the vector knowledge base based on the feature field to determine the recommended type of the invoice data, and specifically includes: A query vector is generated based on the feature field, and the similarity between the query vector and a plurality of cluster centers is calculated by an IVF algorithm; Based on the similarity ranking, a plurality of cluster centers with higher similarity are selected to obtain a candidate set; A multi-layer graph structure is constructed for the plurality of cluster centers in the candidate set by an HNSW algorithm; Based on the query vector, a nearest neighbor search is performed on each layer of graph structure to obtain the most similar CLS vector; Based on the most similar CLS vector, the static processing rule and / or the dynamic processing rule corresponding to the invoice data are determined; Based on the static processing rule and / or the dynamic processing rule, the recommended type of the invoice data is determined. 7.The large model-based document type recommendation method according to claim 1, wherein, The method further includes: A plurality of pre-set type large model service interfaces are pre-constructed; The invoice data uploaded by the user is obtained, and a standardization processing process of the invoice data is configured as a data acquisition interface; The data acquisition interface and a plurality of pre-set type large model service interfaces are arranged in the interaction interface of the intelligent agent.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the large model-based invoice type recommendation method according to any one of claims 1-7.

9. A non-transitory computer storage medium having stored thereon computer- executable instructions which, when executed by a computer, cause the computer to perform: The computer executable instructions are executed by the processor to implement the large model-based invoice type recommendation method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Intelligent order checking method, system and device based on artificial intelligence and medium

    CN119850354A

  • Artificial intelligence-based compliance management system dynamic evaluation system and method

    CN120338556A