Financial allocation detail query recommendation method and device based on natural language and medium
Through the natural language-based financial sharing detailed query recommendation method, the problem of inefficiency of traditional query methods is solved, efficient and accurate query of financial data is achieved, and the accuracy and efficiency of query are improved.
Patent Information
- Application Number
- CN202510216038.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-27
AI Technical Summary
The traditional financial allocation detailed query method is inefficient and difficult to meet the enterprise's needs for efficient and accurate financial data query.
The financial allocation detailed query recommendation method based on natural language is adopted, and the entity labeling process is obtained by obtaining extended document data, the SQL query statement is determined, and the query condition similarity analysis is carried out to provide visual financial allocation recommendation content.
It improves the accuracy and efficiency of financial allocation detailed query, realizes accurate data push, and enhances the efficiency and scalability of query.
Smart Images

Figure CN120045580A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of natural language processing, and in particular, to a method, device, and medium for querying and recommending financial sharing details based on natural language. Background Art
[0002] In modern enterprises, with the expansion of scale and the increase in business scope, the complexity of financial management has also been increasing. The sources of financial sharing detail data are extensive, including the applications and reimbursements of various types of documents, such as general reimbursements, travel reimbursements, loans, repayments, general applications, travel applications, conference expenses, and corporate documents. Almost every business activity involves financial sharing matters, and these data reflect various expenditures and costs in the daily operation of the enterprise. Therefore, it is necessary to strictly approve these data, reasonably allocate costs, and accurately account for them.
[0003] However, traditional methods for querying financial sharing details face many challenges. With the continuous growth of data volume and the increasing number of data dimensions, traditional precise query functions have become more and more complex. When users use traditional query methods, they need to enter specific data in the conditional query box, support the splicing of multiple query conditions, and be able to dynamically add and delete query conditions according to changes in data dimensions. This method is not only inefficient but also error-prone, and it is difficult to meet the enterprise's needs for efficient and accurate query of financial data. Summary of the Invention
[0004] The embodiments of this application provide a method, device, and medium for querying and recommending financial sharing details based on natural language, which solve the technical problems of insufficient accuracy and low efficiency in querying financial sharing details.
[0005] In a first aspect, the embodiments of this application provide a method for querying and recommending financial sharing details based on natural language, which is characterized in that the method includes: obtaining extended document data, and performing entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; based on the structured document data, determining an SQL query statement through query intention recognition and analysis; obtaining user query behavior data, and performing query condition similarity analysis on the user query behavior data to determine the similarity between the query conditions corresponding to the user query behavior data and the sharing details; and obtaining visual financial sharing recommendation content through sharing detail visualization according to the similarity between the query conditions and the sharing details.
[0006] In one implementation of the present application, entity annotation processing is performed on the extended document data to obtain structured document data corresponding to the extended document data, which specifically includes: performing text cleaning on the extended document data to obtain a pure extended document; wherein, the text cleaning includes: special character removal, punctuation determination, and noise cleaning; decomposing the pure extended document into word texts to determine extended document word segmentation data; wherein, the extended document word segmentation data includes: extended document words, extended document phrases; performing entity recognition analysis on the extended document word segmentation data to obtain key entity annotation categories; based on the key entity annotation categories, determining the structured document data through the construction of a dependency tree.
[0007] In one implementation of the present application, based on the structured document data, a SQL query statement is determined through query intent recognition analysis, which specifically includes: performing structured data definition on the structured document data to obtain structured data in tabular form; performing query condition mapping analysis on the structured data in tabular form to determine statement mapping relationships; wherein, the statement mapping relationships include: date conditions, amount conditions, department conditions, document conditions; based on the statement mapping relationships, converting the structured data in tabular form into a SQL statement to determine the SQL query statement.
[0008] In one implementation of the present application, query condition similarity analysis is performed on the user query behavior data to determine the similarity between the query conditions corresponding to the user query behavior data and the allocation details, which specifically includes: based on the user query behavior data, obtaining the query conditions and the allocation details; constructing a cosine similarity calculation formula according to the query conditions and the allocation details; based on the cosine similarity calculation formula, constructing an allocation detail score formula to determine the allocation detail score; performing frequency serialization analysis on the allocation detail score to determine the similarity between the query conditions and the allocation details.
[0009] In one implementation of the present application, constructing a cosine similarity calculation formula according to the query conditions and the allocation details specifically includes: vectorizing the query conditions and the allocation details to obtain a cosine similarity vector; wherein, the calculation formula of the cosine similarity vector is: Q =
[0010] [q
[0011] [q 1 ,q 2 ,…,q m D = [d 1 ,d 2 ,…,d m q i and d iis the value of the query condition and the allocation details on the i-th condition; based on the cosine similarity vector, construct the cosine similarity formula; where the calculation formula of the cosine similarity formula is: The value is the cosine similarity.
[0012] In an implementation manner of the present application, based on the cosine similarity calculation formula, construct an allocation details score formula to determine the allocation details score, specifically including: based on the cosine similarity calculation formula, obtain historical data and user behavior data; according to the historical data and user behavior data, through recommendation feature analysis, construct the allocation details score formula; where the calculation formula of the allocation details score formula is: is the score of the allocation details, query i represents the i-th query condition of the user, sim(query i , detail) is the similarity between the i-th query condition and the allocation details, f(query) is the prediction result of the machine learning model based on the user's query conditions, and feedback(detail) is the user's feedback information on the allocation details; based on the allocation details score formula, determine the allocation details score.
[0013] In an implementation manner of the present application, according to the similarity between the query conditions and the allocation details, through allocation details visualization, obtain the visualized financial allocation recommendation content, specifically including: perform allocation details sorting adjustment on the similarity between the query conditions and the allocation details to obtain the allocation details to be displayed; upload the allocation details to be displayed to a preset visualization platform to obtain the visualized financial allocation recommendation content.
[0014] In an implementation manner of the present application, after obtaining the visualized financial allocation recommendation content through allocation details visualization according to the similarity between the query conditions and the allocation details, the method further includes: obtaining user feedback data, and based on the user feedback data, through recommendation content update, determining an allocation details order adjustment strategy; according to the allocation details order adjustment strategy, through periodic model update training, determining user preferences.
[0015] Second aspect, an embodiment of the present application further provides a device for querying and recommending financial sharing details based on natural language, characterized in that the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to: obtain extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; based on the structured document data, determine an SQL query statement through query intent recognition and analysis; obtain user query behavior data, and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query conditions corresponding to the user query behavior data and the sharing details; according to the similarity between the query conditions and the sharing details, obtain visualized financial sharing recommendation content through visualization of the sharing details.
[0016] Third aspect, an embodiment of the present application further provides a non-volatile computer storage medium for querying and recommending financial sharing details based on natural language, storing computer-executable instructions, characterized in that the computer-executable instructions are set to: obtain extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; based on the structured document data, determine an SQL query statement through query intent recognition and analysis; obtain user query behavior data, and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query conditions corresponding to the user query behavior data and the sharing details; according to the similarity between the query conditions and the sharing details, obtain visualized financial sharing recommendation content through visualization of the sharing details.
[0017] An embodiment of the present application provides a method, device and medium for querying and recommending financial sharing details based on natural language. By processing financial sharing data, recognizing query intent and making intelligent recommendations based on user preferences, it solves the technical problems of insufficient accuracy and low efficiency in querying financial sharing details, realizes accurate data push in the process of querying financial sharing details, and improves the efficiency and scalability of querying financial sharing details. Description of the Drawings
[0018] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0019] Figure 1 It is a flowchart of a method for querying and recommending financial sharing details based on natural language provided by an embodiment of the present application;
[0020] Figure 2 Schematic diagram of the internal structure of a device for querying and recommending financial allocation details based on natural language provided by an embodiment of the present application. Specific implementation manners
[0021] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part rather than all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0022] The embodiments of the present application provide a method, device and medium for querying and recommending financial allocation details based on natural language. By processing financial allocation data, identifying query intentions, and making intelligent recommendations based on user preferences, the technical problems of insufficient accuracy and low efficiency in querying financial allocation details are solved, accurate data push during the process of querying financial allocation details is realized, and the efficiency and scalability of querying financial allocation details are improved.
[0023] The technical solutions proposed in the embodiments of the present application will be described in detail below with reference to the drawings.
[0024] Figure 1 Flowchart of a method for querying and recommending financial allocation details based on natural language provided by an embodiment of the present application. As Figure 1 shown, a method for querying and recommending financial allocation details based on natural language provided by an embodiment of the present application specifically includes the following steps:
[0025] Step 101: Obtain extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data.
[0026] The design of the user interface layer in the intelligent financial allocation query process aims to enhance the user experience and improve data processing efficiency. The main functions include a natural language input box, a date selector, an exact search condition function, a dynamic addition of query conditions function, a detailed data list display, data export, and visualization analysis functions. The date selector enables users to intuitively select time conditions. The exact search condition function allows users to select multiple conditions such as expense categories, units, departments, etc., and supports combined queries of conditions. The dynamic addition of query conditions function enhances the flexibility of the system. The detailed data list display supports paging, sorting, and advanced filtering, and can be exported in formats such as Excel and CSV. At the same time, it provides data visualization analysis in the form of charts; it supports multi-dimensional queries and personal setting functions to meet the needs of different users. After summarizing multiple types of document data through the interface, entity annotation processing needs to be performed on the obtained extended document data to achieve data fusion and formatting processing and improve the efficiency of financial data management and analysis support.
[0027] Exemplarily, for the processing of extended document data, it mainly includes extracting allocation data from various data tables, solving data format and structure differences, and performing data fusion and formatting processing.
[0028] Specifically, text cleaning is performed on the extended document data to obtain pure extended documents; wherein, the text cleaning includes: special character removal, punctuation determination, and noise cleaning; the pure extended documents are decomposed into word texts to determine the extended document word segmentation data; wherein, the extended document word segmentation data includes: extended document words, extended document phrases; entity recognition analysis is performed on the extended document word segmentation data to obtain key entity annotation categories; based on the key entity annotation categories, through the construction of a dependency tree, the structured document data is determined.
[0029] In one embodiment, the entity annotation processing specifically includes steps such as text cleaning, word segmentation, entity recognition, and dependency relationship construction.
[0030] Among them, text cleaning is used to remove irrelevant symbols and noise in the text to ensure the purity of the data, including the removal of special characters, punctuation marks, and other non-key information in the text.
[0031] Word segmentation is used to decompose the cleaned text into words or phrases, and a suitable word segmentation algorithm is adopted to ensure the accuracy and integrity of the word segmentation results.
[0032] Entity recognition uses a trained model to identify key entities in the text, identifies key information such as document numbers, expense categories, amounts, expense items, etc., and annotates them as specific entity categories.
[0033] Dependency relationship construction analyzes the syntactic dependencies between words through the dependency tree algorithm, establishes a dependency relationship tree between words, extracts the syntactic structure and logical relationship from the sentence, and assists in generating structured data.
[0034] Step 102: Based on the structured document data, determine the SQL query statement through query intent recognition analysis.
[0035] The structured data model can not only accurately represent the user's query intent, but also ensure the accurate application of query conditions and the correct sorting of results, so as to meet the diverse query needs of users and complex business logics.
[0036] Exemplarily, first, convert the processed text data and context information into structured data in tabular form, including various fields such as document number, expense category, amount, etc., to ensure the unity and standardization of the data. Then generate an SQL query statement based on the structured data, and retrieve the database through the generated SQL statement to extract the required financial allocation detail data. Finally, analyze the query conditions input by the user, identify the user's query intent, such as distinguishing document numbers, expense categories, etc., and make a comprehensive judgment in combination with similar query conditions to generate an accurate SQL query statement to meet the requirements.
[0037] Specifically, in an implementation manner of the present application, based on the structured document data, determine the SQL query statement through query intent recognition analysis, which specifically includes: performing structured data definition on the structured document data to obtain structured data in tabular form; performing query condition mapping analysis on the structured data in tabular form to determine the statement mapping relationship; wherein, the statement mapping relationship includes: date condition, amount condition, department condition, document condition; based on the statement mapping relationship, convert the structured data in tabular form into an SQL statement to determine the SQL query statement.
[0038] In one embodiment, the selected data needs to cover various relevant information for financial allocation. The collection scope includes expense items, units, departments, document status, time, date, currency, numbers, document types, current processes, expense types, and other relevant terms. Data is accurately retrieved from the ERP financial management system for field categories involving list content values and custom help dictionaries, internal financial documents, public financial reports, industry standard guides, etc. The labeled field categories involve retrieval conditions for multi-column field dimensions and custom help dictionaries. Data annotation and preprocessing; for the labeled dataset, each sentence is used as a unit, and each entity is labeled with its entity type and boundary, ensuring that the model can accurately understand and process user queries. The BIO or BILUO annotation method is used to annotate entities. These include: allocation units, allocation departments, document numbers, document types, allocation amounts, audit dates, expense items, document status, document preparation dates, currency, abstracts, reimbursement units, reimbursement departments, tax-exclusive allocation amounts, current processes, voucher dates, etc. Clean the data, remove missing values, duplicate values, and useless information, and convert the text and annotations into the datasets format that the model can receive. Divide the labeled dataset into a training set and a validation set.
[0039] Install the Transformers library, select a pre-trained NER model from the Transformers library and load it, and use the TokenClassification task or a similar class to define the NER task. Convert the preprocessed data into the DataLoader of PyTorch or other appropriate formats, set parameters such as the learning rate, batch size, and number of training epochs, and use the training loop in the Transformers library or a custom training loop to train the model. After training, evaluate the performance of the model, and optimize the model according to the evaluation results. Hyperparameters can be adjusted, a larger dataset can be used, data augmentation can be performed, etc. Save the trained model and tokenizer to the specified directory.
[0040] The main operations of the model running include key steps such as text cleaning, tokenization, entity recognition, context processing, and structured data conversion. By performing multi-level processing and normalization on the text data, the system can automatically extract and organize financial allocation data, including document numbers, expense categories, amounts, etc. Finally, convert the processed data into a structured form for subsequent analysis and report generation. This system is particularly suitable for processing a large number of financial documents, and through normalization and structured steps, it improves the accuracy and consistency of the data.
[0041] Preferably, the definition of structured data is achieved through the following methods:
[0042] {"person":"John Doe","date_conditions":[{"field":"Review Date","operator":">=","value":"2024-06-01"}
[0043] {"field":"Review Date","operator":"<=","value":"2024-06-30"},
[0044] {"field":"Document Date","operator":">=","value":"2024-05-01"}]
[0045] "amount_conditions":[{"field":"Total Amount","operator":">=","value":5000}
[0046] {"field":"Allocated Amount","operator":"<=","value":10000}]
[0047] "department_conditions":[{"type":"Allocation Department","name":"IT Department"}
[0048] {"type":"Reimbursement Department","name":"Finance Department"}]
[0049] "document_conditions":{"Document Number":"INV12345","Document Status":"Approved","Document Type":"Reimbursement Form"}
[0050] "currency_condition":"RMB","current_step":"Under Review"
[0051] "sort":[{"field":"Review Date","order":"DESC"},{"field":"Total Amount","order":"ASC"}]}。
[0052] Converting the structured data model into an SQL query statement is a crucial step in transforming the user's query requirements into database operations.
[0053] First, a detailed analysis of the structured data model is required, including identifying and extracting the various components of the query conditions, such as date conditions, amount conditions, department conditions, document conditions, etc. Each condition type needs to be mapped to the appropriate part of the SQL statement.
[0054] For basic conditions such as dates and amounts, corresponding comparison operators (such as >=, <=) are usually used in the WHERE clause of SQL for filtering. If the date range condition in the structured data model is from "2024-06-01" to "2024-06-30", the BETWEEN operator should be used in the SQL query to construct the date range condition. The amount condition also needs to be processed in a similar way in the WHERE clause to ensure the accuracy of data filtering.
[0055] When dealing with complex query conditions, such as combinations of multiple date conditions or amount conditions, these conditions must be combined into a composite logical condition. In SQL, this is usually achieved through AND and OR logical operators. For example, if an amount condition is defined in the structured data model as "greater than or equal to 5000 yuan" and "allocated amount less than or equal to 10000 yuan", the AND operator needs to be used in the SQL query to combine these two conditions. At the same time, for the sorting condition, the sorting field and sorting method need to be specified in the ORDER BY clause of SQL. ORDER BY review date DESC, total amount ASC. Through this detailed conversion process, a complete and feature-rich SQL query statement can be generated to accurately meet the user's query requirements and ensure the correct sorting of the results.
[0056] Step 103: Obtain user query behavior data and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query conditions corresponding to the user query behavior data and the allocation details.
[0057] This application calculates the similarity between the query conditions and the allocation details through cosine similarity, then combines weights, machine learning predictions, and user feedback to calculate the comprehensive score of each allocation detail, and provides intelligent screening results according to the scores, achieving the effective processing of multiple queries and being able to adapt to the query habits and preferences of different users.
[0058] Exemplarily, methods such as cosine similarity are used to calculate the similarity between the user query conditions and the allocation details, and a reasonable score formula is designed to calculate the scores of the allocation details in combination with the similarity, machine learning prediction results, and user feedback information.
[0059] Specifically, based on the user query behavior data, the query conditions and the allocation details are obtained; according to the query conditions and the allocation details, a cosine similarity calculation formula is constructed; based on the cosine similarity calculation formula, an allocation detail score formula is constructed to determine the allocation detail score; frequency serialization analysis is performed on the allocation detail score to determine the similarity between the query conditions and the allocation details.
[0060] Construct a cosine similarity calculation formula according to the query conditions and the sharing details, specifically including: vectorize the query conditions and the sharing details to obtain a cosine similarity vector;
[0061] Among them, the calculation formula of the cosine similarity vector is:
[0062] Q = [q 1 , q 2 , …, q m D = [d 1 , d 2 , …, d m
[0063] q i and d i are the values of the query conditions and the sharing details on the i-th condition; based on the cosine similarity vector, construct the cosine similarity formula; among them, the calculation formula of the cosine similarity formula is:
[0064]
[0065] The value of cosθ is the cosine similarity.
[0066] Based on the cosine similarity calculation formula, construct a sharing detail score formula and determine the sharing detail score, specifically including: based on the cosine similarity calculation formula, obtain historical data and user behavior data; according to the historical data and user behavior data, through recommendation feature analysis, construct the sharing detail score formula; among them, the calculation formula of the sharing detail score formula is:
[0067]
[0068] Score(detail) is the score of the sharing detail, represents the i-th query condition of the user, sim(query i , detail) is the similarity between the i-th query condition and the sharing detail, f(query) is the prediction result of the machine learning model based on the user's query conditions, and feedback(detail) is the feedback information of the user on the sharing detail; based on the sharing detail score formula, determine the sharing detail score.
[0069] In one embodiment, training a machine learning model based on historical query records and user behavior data is a key step in achieving personalized recommendations. Common machine learning algorithms such as logistic regression and random forest can be used to predict the degree of a user's interest in specific sharing details. By using the user's historical behavior data as features input into the model, the model learns the user's preference patterns and predicts the sharing details that the user may be interested in. Specific user behavior data includes behavior data such as search history, click-through rate, browsing time, and favorite records.
[0070] By using the above feedback data to identify the user's query habits and preferences, strong data support is provided for recommendations. According to the user's feedback information, the system continuously optimizes the recommendation results and adjusts the sorting order of the sharing details. By real-time counting the number of operations and behavior frequencies of the user for each sharing detail, the system can update the recommended content in a timely manner to ensure that the sharing details presented to the user best match their interests, making the recommendation system more intelligent and adaptable to the changing needs of users.
[0071] Step 104: Obtain visual financial sharing recommendation content through sharing detail visualization according to the similarity between the query condition and the sharing details.
[0072] Specifically, adjust the sorting of the sharing details according to the similarity between the query condition and the sharing details to obtain the sharing details to be displayed; upload the sharing details to be displayed to a preset visualization platform to obtain the visual financial sharing recommendation content.
[0073] After obtaining the visual financial sharing recommendation content through sharing detail visualization according to the similarity between the query condition and the sharing details, the method further includes: obtaining user feedback data, and based on the user feedback data, determining a sharing detail order adjustment strategy through recommended content update; determining user preferences through periodic model update training according to the sharing detail order adjustment strategy.
[0074] In one embodiment, based on behavior data such as the user's search history, click-through rate, browsing time, and favorite records, by using the above feedback data to identify the user's query habits and preferences, strong data support is provided for recommendations.
[0075] According to the user's feedback information, continuously optimize the recommendation results and adjust the sorting order of the sharing details. By real-time counting the number of operations and behavior frequencies of the user for each sharing detail, update the recommended content in a timely manner to ensure that the sharing details presented to the user best match their interests, making the recommendation system more intelligent and adaptable to the changing needs of users.
[0076] The above is the method embodiment proposed in this application. Based on the same inventive concept, the embodiments of this application also provide a natural language-based financial allocation details query and recommendation device, whose structure is as shown in Figure 2 as follows.
[0077] Figure 2 FIG. is a schematic internal structure diagram of a natural language-based financial allocation details query and recommendation device provided by an embodiment of this application. As shown in Figure 2 the figure, the device includes:
[0078] at least one processor 201;
[0079] and a memory 202 communicatively connected to the at least one processor;
[0080] wherein, the memory 202 stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor 201, so that the at least one processor 201 can:
[0081] Obtain extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; based on the structured document data, determine an SQL query statement through query intention recognition and analysis; obtain user query behavior data, and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query conditions corresponding to the user query behavior data and the allocation details; according to the similarity between the query conditions and the allocation details, obtain visual financial allocation recommendation content through allocation details visualization.
[0082] Some embodiments of this application provide a Figure 1 corresponding non-volatile computer storage medium for natural language-based financial allocation details query and recommendation, storing computer-executable instructions, and the computer-executable instructions are set as:
[0083] Obtain extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; based on the structured document data, determine an SQL query statement through query intention recognition and analysis; obtain user query behavior data, and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query conditions corresponding to the user query behavior data and the allocation details; according to the similarity between the query conditions and the allocation details, obtain visual financial allocation recommendation content through allocation details visualization.
[0084] Each embodiment in this application is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key points of each embodiment are the differences from other embodiments. In particular, for the embodiments of Internet of Things devices and media, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference can be made to the corresponding descriptions in the method embodiments.
[0085] The systems and media provided in the embodiments of this application correspond one by one to the methods. Therefore, the systems and media also have beneficial technical effects similar to those of their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the systems and media will not be elaborated here.
[0086] Those skilled in the art should understand that the embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0087] This application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this application. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0088] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.
[0090] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0091] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
[0092] Computer-readable media includes permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0093] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, commodity or device comprising the element.
[0094] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various modifications and variations can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A natural language-based financial allocation detail query recommendation method, characterized in that: The method comprises: Acquire extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; Based on the structured document data, determine the SQL query statement through query intent recognition and analysis; Acquire user query behavior data, and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query condition corresponding to the user query behavior data and the allocation details; According to the similarity between the query condition and the allocation details, the allocation details are visualized to obtain visualized financial allocation recommendation content.
2. A natural language-based financial allocation detail query recommendation method according to claim 1, characterized in that: Performing entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data specifically includes: Performing text cleaning on the extended document data to obtain a pure extended document; wherein the text cleaning includes: removing special characters, determining punctuation marks, and cleaning noise; Decomposing the clean extended document into word texts to determine extended document word segmentation data; wherein the extended document word segmentation data includes: extended document words and extended document phrases; Performing entity recognition analysis on the extended document segmentation data to obtain key entity annotation categories; Based on the key entity labeling categories, the structured document data is determined by constructing a dependency tree.
3. The method for recommending financial allocation details based on natural language according to claim 1, characterized in that: Based on the structured document data, the SQL query statement is determined through query intent recognition and analysis, specifically including: Performing structured data definition on the structured document data to obtain structured data in a tabular form; Perform query condition mapping analysis on the table-form structured data to determine statement mapping relationships; wherein the statement mapping relationships include: date conditions, amount conditions, department conditions, and document conditions; Based on the statement mapping relationship, the table-form structured data is converted into an SQL statement to determine the SQL query statement.
4. The method for recommending financial allocation details based on natural language according to claim 1, characterized in that: Performing a query condition similarity analysis on the user query behavior data to determine the similarity between the query condition corresponding to the user query behavior data and the allocation details, specifically including: Based on the user query behavior data, obtaining the query condition and the allocation details; Constructing a cosine similarity calculation formula according to the query condition and the allocation details; Based on the cosine similarity calculation formula, a detailed allocation score formula is constructed to determine the detailed allocation score; A frequency serialization analysis is performed on the allocation detail scores to determine the similarity between the query conditions and the allocation details.
5. A natural language-based financial allocation detail query recommendation method according to claim 4, characterized in that: According to the query condition and the allocation details, a cosine similarity calculation formula is constructed, which specifically includes: The query condition and the allocation details are vectorized to obtain a cosine similarity vector; wherein the calculation formula of the cosine similarity vector is: Q=[q1,q2,…,q m ]D=[d1,d2,…,d m ] q i and d i is the value of the query condition and the allocation details under the i-th condition; Based on the cosine similarity vector, the cosine similarity formula is constructed; wherein the calculation formula of the cosine similarity formula is: The value of cosθ is the cosine similarity.
6. A natural language-based financial allocation detail query recommendation method according to claim 5, characterized in that: Based on the cosine similarity calculation formula, a detailed apportionment score formula is constructed to determine the detailed apportionment score, specifically including: Based on the cosine similarity calculation formula, historical data and user behavior data are obtained; According to the historical data and user behavior data, the apportionment detail score formula is constructed through recommendation feature analysis; wherein the calculation formula of the apportionment detail score formula is: Score(detail) is the score of the allocation details, query i Indicates the user's i-th query condition, sim(query i ,detail) is the similarity between the i-th query condition and the allocation details, f(query) is the prediction result of the machine learning model based on the user query condition, and feedback(detail) is the user's feedback information on the allocation details; Based on the apportionment detail score formula, the apportionment detail score is determined.
7. The method for recommending financial allocation details based on natural language according to claim 1, characterized in that: According to the similarity between the query condition and the allocation details, the allocation details are visualized to obtain the visualized financial allocation recommendation content, which specifically includes: The apportionment details are sorted and adjusted according to the similarity between the query condition and the apportionment details, so as to obtain the apportionment details to be displayed; The allocation details to be displayed are uploaded to a preset visualization platform to obtain the visualized financial allocation recommendation content.
8. The method for recommending financial allocation details based on natural language according to claim 1, characterized in that: After obtaining visualized financial allocation recommendation content by visualizing the allocation details according to the similarity between the query condition and the allocation details, the method further includes: Obtain user feedback data, and based on the user feedback data, determine a strategy for adjusting the order of apportionment details by updating recommended content; According to the allocation details sequence adjustment strategy, user preferences are determined through periodic model update training.
9. A financial allocation detail query recommendation device based on natural language, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: Acquire extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; Based on the structured document data, determine the SQL query statement through query intent recognition and analysis; Acquire user query behavior data, and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query condition corresponding to the user query behavior data and the allocation details; According to the similarity between the query condition and the allocation details, the allocation details are visualized to obtain visualized financial allocation recommendation content.
10. A non-volatile computer storage medium for natural language-based financial allocation detail query recommendation, storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Acquire extended document data, and perform entity annotation processing on the extended document data to obtain structured document data corresponding to the extended document data; Based on the structured document data, determine the SQL query statement through query intent recognition and analysis; Acquire user query behavior data, and perform query condition similarity analysis on the user query behavior data to determine the similarity between the query condition corresponding to the user query behavior data and the allocation details; According to the similarity between the query condition and the allocation details, the allocation details are visualized to obtain visualized financial allocation recommendation content.
Citation Information
Cited By
NLP semantic extraction unstructured text generation logic axis and computing power optimization method
CN120218084A