Financial short text matching method and device
By employing a dual-process approach of character matching and deep learning semantic matching in financial short text matching, combined with a reverse selection mechanism, the problems of semantic sparsity and fuzzy expression in financial short text matching are solved, and efficient and accurate semantic similarity assessment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2025-11-24
- Publication Date
- 2026-04-21
AI Technical Summary
Existing financial short text matching methods struggle to accurately identify deep semantic relationships when dealing with highly specialized, information-dense, and semantically complex financial short texts. Furthermore, traditional character matching methods are fast but lack accuracy, while semantic matching methods are computationally complex and lack generalization ability.
A two-round matching mechanism is adopted. First, potentially similar text pairs are quickly filtered out through character matching. A character matching tool based on Levinstein distance is used for preliminary screening. Then, a deep semantic matching model based on deep learning (such as the STS model) is used for deep semantic analysis. Combined with a reverse selection mechanism, the accuracy of the matching results is ensured.
It significantly improves the efficiency and accuracy of matching short financial texts, effectively handles semantic sparsity and fuzzy expressions in short financial texts, and enhances the reliability and accuracy of matching results.
Smart Images

Figure CN121902808A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of finance and artificial intelligence, and in particular to a method and apparatus for matching short financial texts. Background Technology
[0002] Short text matching is a key task in Natural Language Processing (NLP), with the primary goal of accurately determining the similarity or relevance between two short texts. In the financial field, short text matching is particularly important, but it also faces challenges. Financial short texts are characterized by high specialization, high information density, and semantic complexity, typically not exceeding 200 characters in length, and often exhibiting semantic sparsity and discreteness. This makes existing techniques significantly inadequate for solving financial short text matching problems, resulting in poor practical application performance.
[0003] Traditional text matching methods, while computationally fast, only compare literal similarity and fail to identify the deeper semantic relationships behind financial texts. For example, they cannot effectively handle the ambiguity of financial terminology or subtle differences between pieces of information. This makes traditional character matching methods perform poorly when faced with the semantic diversity and ambiguity of the financial domain. On the other hand, semantic matching methods can capture deep semantic information from text, but their computational complexity is high. Especially in short financial texts, semantic information is often extremely sparse and ambiguous. Existing models lack generalization ability and are easily affected by the diversity of financial terminology and context, resulting in insufficient stability and accuracy of matching results. Summary of the Invention
[0004] This invention provides a method for matching short financial texts, which accurately captures and measures semantic similarity when dealing with semantic sparsity and fuzzy expressions in short financial texts, thereby improving the efficiency and accuracy of short financial text matching. The method includes: Retrieve multiple short texts to be processed; Each short text to be processed is matched character by character with an existing template account in turn to obtain a set of suspected short texts; the set of suspected short texts includes multiple short texts to be processed that are initially matched with each template account; the template account includes multiple financial account classification items; The system performs semantic matching based on deep learning on multiple short texts to be processed in the suspected short text set and each template subject to obtain the matching results of the output template subject and the short texts to be processed.
[0005] This invention also provides a financial short text matching device to accurately capture and measure semantic similarity when processing semantic sparsity and fuzzy expressions in financial short texts, thereby improving the efficiency and accuracy of financial short text matching. The device includes: The short text acquisition module is used to acquire multiple short texts to be processed; The first-stage matching module is used to perform character matching between each short text to be processed and the existing template account in sequence to obtain a set of suspected short texts; the set of suspected short texts includes multiple short texts to be processed corresponding to the initial matching of each template account; the template account includes multiple financial account classification items; The second-stage matching module is used to perform deep learning-based semantic matching between multiple short texts to be processed in the suspected short text set and each template subject to obtain the matching results of the output template subject and the short texts to be processed.
[0006] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0007] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned financial short text matching method.
[0008] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described financial short text matching method.
[0009] In this embodiment of the invention, multiple short texts to be processed are obtained; each short text to be processed is sequentially matched with an existing template subject to obtain a set of suspected short texts; the set of suspected short texts includes multiple short texts to be processed corresponding to each template subject in the preliminary matching; the template subject includes multiple financial subject classification items; the multiple short texts to be processed in the set of suspected short texts are semantically matched with each template subject based on deep learning to obtain the matching result of the output template subject and the short texts to be processed. This embodiment of the invention proposes a novel financial short text matching method suitable for financial data. The first round performs rapid initial screening through character matching, focusing on processing numbers, symbols, and professional terms in the financial short texts; the second round performs semantic matching based on deep learning, which can accurately evaluate text similarity, especially focusing on complex financial terms and contextual relationships. This dual-round matching mechanism, in the application of the financial field, can fully utilize the efficiency of character matching while compensating for its shortcomings in semantic analysis, ultimately improving the efficiency and accuracy of financial short text matching. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart illustrating the financial short text matching method in an embodiment of the present invention; Figure 2 This is a specific example diagram of the financial short text matching method in an embodiment of the present invention; Figure 3 This is a schematic diagram of the financial short text matching device in an embodiment of the present invention; Figure 4 This is a specific example diagram of the financial short text matching device in an embodiment of the present invention; Figure 5 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0012] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0013] Text matching algorithms are techniques used to calculate and evaluate the similarity between two texts, and are widely used in the field of Natural Language Processing (NLP). These algorithms identify and compare text similarity by analyzing text features such as vocabulary, grammatical structure, and semantic information. The core objective of text matching algorithms is to effectively measure the relevance between texts to support various application scenarios, such as information retrieval, text classification, semantic search, and recommendation systems.
[0014] One existing text matching method calculates the similarity between word and character sequences of source and target texts to match texts. However, this method only operates at the literal level and cannot understand deeper semantic information. Another existing text matching method inputs the text into a pre-trained semantic model to obtain corresponding word vectors to determine the similarity between texts. However, this method has high computational complexity and is time-consuming, especially when processing large-scale data, requiring even more computational resources. Furthermore, the generalization effect of current semantic similarity models in specialized fields still needs improvement, and they have certain limitations in the field of financial data processing.
[0015] To address the shortcomings of existing technologies, this invention proposes a comprehensive solution for matching short financial texts. By combining the efficiency of character matching with the high accuracy of semantic matching, a multi-level and multi-dimensional matching method is formed.
[0016] Figure 1 This is a flowchart illustrating the financial short text matching method in an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes: Step 101: Obtain multiple short texts to be processed; Step 102: Perform character matching between each short text to be processed and the existing template account in sequence to obtain a set of suspected short texts; the set of suspected short texts includes multiple short texts to be processed corresponding to each template account in the preliminary matching; the template account includes multiple financial account classification items; Step 103: Perform semantic matching based on deep learning on multiple short texts to be processed in the suspected short text set with each template subject to obtain the matching results of the output template subject and the short texts to be processed.
[0017] from Figure 1 As shown in the flowchart, this embodiment of the invention combines the advantages of character matching and semantic matching, designing a dual-round matching mechanism. In the initial stage, character matching is first used to quickly filter out potentially similar text pairs, leveraging its fast computation speed to reduce computational overhead. Then, semantic matching is performed on the filtered text pairs, using a deep learning model to capture semantic relationships within the text, further improving the accuracy and reliability of the matching. This combination of character matching and semantic matching can more effectively solve the problems of information sparsity and semantic dispersion in short financial text matching, significantly improving the efficiency and effectiveness of short financial text matching.
[0018] In step 101, multiple short texts to be processed are obtained. These short texts can be financial texts with a length of no more than 200 characters, characterized by semantic sparsity and discreteness. The short texts to be processed contain limited information, and the distribution of words and semantics is relatively sparse.
[0019] In one embodiment, obtaining multiple short texts to be processed may include: obtaining multiple short texts to be processed from corporate financial report data.
[0020] For example, multiple short texts to be processed can be extracted from financial processing scenarios such as corporate financial statements, accounting vouchers, expense reports, financial statement notes, and business system logs. These short texts can include financial account names, transaction summaries, expense descriptions, reasons for expense reimbursement, or voucher remarks, such as "Sales Revenue," "Accounts Payable," "Travel Expense Reimbursement," and "Depreciation Accrual."
[0021] In the financial processing of this invention, the purpose is to match the short text to be processed with existing template accounts one by one, selecting the appropriate short text corresponding to the existing template accounts from a large number of short texts extracted from the above-mentioned financial processing scenarios. The short texts cover descriptions of financial accounts such as assets, liabilities, revenues, costs, and financial analysis auxiliary accounts, such as "current assets," "accounts payable," "sales of goods," "administrative expenses," and "debt-to-equity ratio."
[0022] In one embodiment, before sequentially matching each short text to be processed with existing template subjects character by character, the method may further include: The short text to be processed is preprocessed to obtain the preprocessed short text; the preprocessing includes regularization and / or correction processing; the regularization is used to remove noisy data in the short text to be processed; the correction processing is used to correct erroneous and non-standard data in the short text to be processed. In practice, after inputting short text data, a comprehensive data preprocessing of the input short text set is required to ensure the accuracy and reliability of the subsequent matching process. Preprocessing includes two key steps: regularization and correction of the Chinese short text.
[0023] Regularization aims to unify the format of short Chinese texts, remove redundant spaces, punctuation marks, special characters and other noise data, reduce redundancy and variability in the text, make the short texts more consistent in semantic expression, and facilitate similarity calculation and matching analysis.
[0024] The correction process aims to correct errors and non-standard expressions in the input Chinese short text, such as typos, common spelling errors, and colloquial expressions. Natural language processing technology is used to automatically identify and correct these errors, ensuring the accuracy of the short text content.
[0025] After these preprocessing steps, the Chinese short text data is converted into input with standardized format and accurate content, laying a solid foundation for subsequent processes such as character matching, semantic matching, and similarity calculation, and significantly improving the overall efficiency and accuracy of financial short text matching.
[0026] In step 102, each short text to be processed is matched character by character with the existing template subject in turn to obtain a set of suspected short texts. This may include: matching the preprocessed short text with the existing template subject in turn to obtain a set of suspected short texts.
[0027] The character matching described in the embodiments includes matching and judging existing template subjects with a single character or a single string of the short text to be processed according to preset rules, such as the BF exact matching algorithm, regular expression single character matching method, etc.
[0028] In one embodiment, the template account includes, but is not limited to, one or any combination of the following financial account classification items: Assets, liabilities, revenues, costs, and financial analysis support.
[0029] Assets include current assets, fixed assets, and intangible assets; liabilities include short-term loans, accounts payable, notes payable, advances from customers, long-term loans, and special accounts payable; revenue includes sales of goods, provision of services, and profits from external investments; costs include operating costs, production costs, advertising expenses, administrative expenses, and interest expenses; and financial analysis support includes debt-to-equity ratio, gross profit margin, and net profit margin.
[0030] In one embodiment, each short text to be processed is sequentially matched character by character with an existing template subject to obtain a set of suspected short texts, which may include: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched character by character with existing template subjects in turn to obtain a set of suspected short texts.
[0031] In this embodiment, a character matching tool based on Levenstein distance can be built by calling the FuzzyWuzzy API. This tool measures the degree of difference between two short texts and determines similarity by calculating the minimum number of editing operations required to transform one text into another. These editing operations include character substitution, character insertion, and character deletion. In this way, character matching can quickly filter out text pairs with high similarity, providing candidate texts for the subsequent semantic matching stage. The similarity value returned by FuzzyWuzzy ranges from 0 to 100, with higher values indicating higher similarity between the texts.
[0032] To further improve matching accuracy, in one embodiment, a pre-built character matching tool based on Levenstein distance is used to sequentially match each short text to be processed with existing template subjects to obtain a set of suspected short texts, which may include: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched with existing template subjects in turn. Based on the matching degree, the matching results of multiple short texts to be processed with existing template subjects are divided into complete match, suspected match, and no match. Based on the matching results, multiple short texts to be processed are divided into a fully matched set and a suspected matched set with existing template subjects. The matching degree between the short texts to be processed and the template subjects in the fully matched set is higher than that in the suspected matched set. Both the fully matched set and the suspected matched set include multiple short texts to be processed and multiple template subjects. Both the fully matched set and the suspected matched set include matching sequence information for each short text to be processed. The matching sequence information for each short text to be processed includes multiple template subject sequences sorted from high to low according to the matching degree value with the short text to be processed. Using a pre-built character matching tool based on Levinstein distance, the reverse matching calculation is performed between each template subject in the complete matching set and the short text to be processed, resulting in a reverse matching sequence for each template subject; the reverse matching sequence contains multiple short texts to be processed, sorted from high to low according to the matching degree value. For each short text to be processed: obtain the first ranked template subject in the matching sequence of the short text to be processed, check whether the first ranked item in the reverse matching sequence of the first ranked template subject is the short text to be processed. If not, move the first ranked template subject in the matching sequence of the short text to be processed to the suspected matching set, and update all short text matching sequence information, complete matching set, and suspected matching set. Based on the updated matching sequence information of all unprocessed short texts, the complete matching set, and the suspected matching set, a suspected short text set is formed.
[0033] In practice, the short text set is first traversed, and each short text is matched against all subjects in the template to obtain a corresponding matching score. Through extensive testing and experimentation, this embodiment of the invention demonstrates that when the matching score is greater than 80, the short text is almost considered a perfect match with the template subjects; when the matching score is between 50 and 79, the short text may have a possible matching template subject; and when the score is less than 50, the short text cannot match any subject in the template. To ensure matching accuracy, in the set of perfectly matched texts, the short text needs to be reverse-matched by the matched template subject. This template subject will match all short texts and obtain a corresponding score. When the matching scores are the highest for both, the short text is considered a perfect match with the template subject; otherwise, the short text is classified as a possible matching subject. Therefore, the set of possible matching short texts consists of two parts: one part consists of short texts with matching scores between 50 and 79, and the other part consists of short texts with matching scores greater than 80 that were not selected by the matching template subjects. Based on this set of rules, the set of possible matching short texts will undergo a second round of semantic matching.
[0034] In step 103, multiple short texts to be processed in the suspected short text set are semantically matched with each template subject based on deep learning to obtain the matching results between the output template subject and the short texts to be processed.
[0035] The semantic model is pre-built and trained during implementation.
[0036] In one embodiment, multiple short texts to be processed from the suspected short text set are semantically matched with each template subject based on deep learning to obtain the matching results of the output template subject and the short texts to be processed, including: Using a pre-trained semantic model, multiple short texts to be processed in the suspected short text set are semantically matched with each template subject based on deep learning to obtain the matching results of the output template subject and the short text to be processed; the semantic model architecture includes an input layer, an embedding layer, an encoder and an output layer, each layer is used to receive short text input, extract semantic features and output similarity results in sequence.
[0037] In implementation, the Semantic Textual Similarity (STS) model can be used as the core algorithm of the semantic model. The STS model is a natural language processing model based on the ELECTRA architecture. After training and fine-tuning on 180GB of Chinese data, it possesses powerful semantic understanding and text similarity calculation capabilities. This model analyzes two short input texts using deep learning techniques, extracts their deep semantic features, and calculates their semantic similarity score. The similarity score ranges from 0 to 1, with a higher value indicating a higher semantic similarity between the texts. In this way, the STS model can effectively capture subtle semantic differences in text, providing more accurate and reliable similarity assessment results for short text matching. This matching method based on deep semantic understanding helps overcome the limitations of traditional character matching methods, especially when dealing with short texts with complex meanings or diverse expressions, significantly improving matching results.
[0038] In one embodiment, using a pre-trained semantic model, multiple short texts to be processed in the suspected short text set are semantically matched with each template subject based on deep learning to obtain the matching result between the output template subject and the short text to be processed, which may include: For any template subject: Using a pre-trained semantic model, based on a set of suspected short texts, semantic matching is performed between the short texts to be processed and template subjects to identify multiple short texts to be processed whose matching degree with any template subject is higher than a preset value. Reverse matching screening is performed on multiple short texts to be processed that have a matching degree higher than a preset value with any template subject, erroneous matching relationships are eliminated, and short texts to be processed that successfully match any template subject are obtained.
[0039] Even within the set of suspected short texts filtered through semantic matching, multiple short texts may still match the same template subject. To further improve matching accuracy and avoid redundant matching, after semantic matching of all suspected short texts, a further reverse selection is performed on the suspected short text set to eliminate inaccurate matches, ensuring that the final output of short text matching results is more reliable. Suspected short texts will be marked as "suspected," and the final output will show the matching status of the short text set.
[0040] Figure 2 This is a specific example diagram of the financial short text matching method in an embodiment of the present invention, such as... Figure 2 As shown, the preprocessed short text is matched with the template subject for character matching. The match score determines whether it's a complete match, a possible match, or a no-match. For the complete match set, a reverse match is performed. If the highest reverse match value is still the same short text, the short text is considered a successful match with the corresponding template subject. If the highest reverse match value is not the same short text, the short text is moved to the possible match set. The match score value can be reset as needed.
[0041] In the suspected matching set, the top three template subjects with the highest character matching scores for the suspected short text are selected. These three template subjects are then selected in reverse order to check if they have already been matched in the first round of matching. If they have, the template subject is removed. If all three template subjects have been matched, the suspected short text is determined to be a non-matching subject. If the template subject has already achieved a complete match with other short texts in the first round of matching, it is not reassigned and is therefore removed in this round of filtering. If all three selected template subjects have been used in the first round, the suspected short text is determined to be unable to form a valid match with any template subject in the current stage and is marked as a non-matching short text. Finally, semantic matching is performed between the remaining template subjects and the suspected short texts that have not yet been matched. Extensive testing experiments have demonstrated that when the similarity (i.e., the matching score in semantic matching) is higher than 0.985 (i.e., the preset value), the two short texts can be considered a complete match. The template subject with the highest similarity is selected, and its score is compared with 0.985. A short text with a score greater than 0.985 is considered a complete match; otherwise, it is considered a possible match. Even within the set of possible short texts filtered through semantic matching, multiple short texts may still match the same template subject. To improve matching accuracy and avoid redundant matching, after semantic matching of all possible short texts, a further reverse selection is performed on the set of possible short texts to eliminate inaccurate matches, ensuring that the final output of short text matching results is more reliable. Possible short texts are marked as "possible," and the final output shows the matching status of the short text set.
[0042] In summary, this invention addresses two core issues: first, how to improve matching accuracy while maintaining computational efficiency; and second, how to accurately capture and measure semantic similarity when dealing with semantic sparsity and fuzzy expressions in short financial texts. This invention designs a two-round matching process to improve the efficiency and accuracy of short text matching. The first round uses character matching, while the second round uses semantic matching; the two complement each other to complete the task of short text matching. By combining the advantages of both character and semantic matching, introducing key threshold settings, and implementing a reverse selection mechanism, this invention significantly improves the efficiency and accuracy of short financial text matching. Specifically: (1) This invention constructs a novel short financial text matching process that combines the rapid filtering capability of character matching with the deep semantic analysis capability of semantic matching. In the first round of matching, character matching methods (such as FuzzyWuzzy) are used to initially filter the short text, quickly identifying possible matching objects by calculating character differences. In the second round of matching, a deep learning-based semantic matching method (such as the STS model) is used to perform more in-depth semantic analysis and matching on the initially screened text. This two-level matching process effectively balances computational efficiency and matching accuracy.
[0043] (2) To further improve the reliability of the matching results, this embodiment of the invention proposes a reverse selection mechanism. This mechanism performs a secondary screening on texts with multiple matching results after all suspected short texts have undergone semantic matching. This reverse selection mechanism ensures that the final output matching results are more accurate and robust.
[0044] This invention also provides a financial short text matching device, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the financial short text matching method, the implementation of this device can refer to the implementation of the financial short text matching method, and repeated details will not be elaborated further.
[0045] Figure 3 This is a schematic diagram of a financial short text matching device in an embodiment of the present invention, such as... Figure 3 As shown, the device 300 includes: The short text acquisition module 301 is used to acquire multiple short texts to be processed. The first-stage matching module 302 is used to perform character matching between each short text to be processed and the existing template subject in sequence to obtain a set of suspected short texts; the set of suspected short texts includes multiple short texts to be processed corresponding to the initial matching of each template subject; the template subject includes multiple financial subject classification items; The second-stage matching module 303 is used to perform deep learning-based semantic matching between multiple short texts to be processed in the suspected short text set and each template subject to obtain the matching results of the output template subject and the short texts to be processed.
[0046] Figure 4 This is a specific example diagram of a financial short text matching device in an embodiment of the present invention. The device 300 further includes a preprocessing module 401, which is used for: Before the first-stage matching module 302 performs character matching between each short text to be processed and the existing template subjects in sequence, the short text to be processed is preprocessed to obtain the preprocessed short text; the preprocessing includes regularization processing and / or correction processing; the regularization processing is used to remove noisy data in the short text to be processed; the correction processing is used to correct erroneous data and non-standard data in the short text to be processed; The first-stage matching module 302 is specifically used for: The preprocessed short texts are matched character by character with the existing template subjects in turn to obtain a set of suspected short texts.
[0047] In one embodiment, the first-stage matching module 302 is specifically used for: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched character by character with existing template subjects in turn to obtain a set of suspected short texts.
[0048] In one embodiment, the first-stage matching module 302 is specifically used for: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched with existing template subjects in turn. Based on the matching degree, the matching results of multiple short texts to be processed with existing template subjects are divided into complete match, suspected match, and no match. Based on the matching results, multiple short texts to be processed are divided into a fully matched set and a suspected matched set with existing template subjects. The matching degree between the short texts to be processed and the template subjects in the fully matched set is higher than that in the suspected matched set. Both the fully matched set and the suspected matched set include multiple short texts to be processed and multiple template subjects. Both the fully matched set and the suspected matched set include matching sequence information for each short text to be processed. The matching sequence information for each short text to be processed includes multiple template subject sequences sorted from high to low according to the matching degree value with the short text to be processed. Using a pre-built character matching tool based on Levinstein distance, the reverse matching calculation is performed between each template subject in the complete matching set and the short text to be processed, resulting in a reverse matching sequence for each template subject; the reverse matching sequence contains multiple short texts to be processed, sorted from high to low according to the matching degree value. For each short text to be processed: obtain the first ranked template subject in the matching sequence of the short text to be processed, check whether the first ranked item in the reverse matching sequence of the first ranked template subject is the short text to be processed. If not, move the first ranked template subject in the matching sequence of the short text to be processed to the suspected matching set, and update all short text matching sequence information, complete matching set, and suspected matching set. Based on the updated matching sequence information of all unprocessed short texts, the complete matching set, and the suspected matching set, a suspected short text set is formed.
[0049] In one embodiment, the second-stage matching module 303 is specifically used for: Using a pre-trained semantic model, multiple short texts to be processed in the suspected short text set are semantically matched with each template subject based on deep learning to obtain the matching results of the output template subject and the short text to be processed; the semantic model architecture includes an input layer, an embedding layer, an encoder and an output layer.
[0050] In one embodiment, the second-stage matching module 303 is specifically used for: For any template subject: Using a pre-trained semantic model, based on a set of suspected short texts, semantic matching is performed between the short texts to be processed and template subjects to identify multiple short texts to be processed whose matching degree with any template subject is higher than a preset value. Reverse matching screening is performed on multiple short texts to be processed that have a matching degree higher than a preset value with any template subject, erroneous matching relationships are eliminated, and short texts to be processed that successfully match any template subject are obtained.
[0051] In one embodiment, the short text acquisition module 301 is specifically used for: Extract multiple short texts to be processed from corporate financial report data.
[0052] In one embodiment, the template account includes one or any combination of the following financial account classification items: Assets, liabilities, revenues, costs, and financial analysis support.
[0053] Figure 5 This is a schematic diagram of a computer device in an embodiment of the present invention, such as... Figure 5 As shown, this embodiment of the invention also provides a computer device 500, including a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, it implements the above-mentioned financial short text matching method.
[0054] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned financial short text matching method.
[0055] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described financial short text matching method.
[0056] This invention proposes an innovative short text matching process that combines the advantages of both character matching and semantic matching. Through this two-tiered matching process design, this invention effectively balances computational efficiency and matching accuracy. Secondly, this invention designs a threshold-based hierarchical filtering mechanism to classify the similarity scores calculated by the model. By reasonably setting different similarity thresholds, the matching process is greatly simplified, while significantly improving matching speed. Furthermore, this invention introduces a reverse selection mechanism for template subjects, further enhancing the reliability of the matching results. The reverse selection mechanism ensures that the final output short text matching results are more accurate through secondary filtering of the matching results.
[0057] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0058] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0059] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0060] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0061] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A short financial text matching method, characterized in that, include: Retrieve multiple short texts to be processed; Each short text to be processed is matched character by character with an existing template account in turn to obtain a set of suspected short texts; the set of suspected short texts includes multiple short texts to be processed that are initially matched with each template account; the template account includes multiple financial account classification items; The system performs semantic matching based on deep learning on multiple short texts to be processed in the suspected short text set and each template subject to obtain the matching results of the output template subject and the short texts to be processed.
2. The method as described in claim 1, characterized in that, Before performing character matching between each short text to be processed and the existing template subjects in sequence, the process also includes: The short text to be processed is preprocessed to obtain the preprocessed short text; the preprocessing includes regularization and / or correction processing; the regularization is used to remove noisy data in the short text to be processed; the correction processing is used to correct erroneous and non-standard data in the short text to be processed. Each short text to be processed is matched character by character with the existing template subjects in turn to obtain a set of suspected short texts, including: The preprocessed short texts are matched character by character with the existing template subjects in turn to obtain a set of suspected short texts.
3. The method as described in claim 1, characterized in that, Each short text to be processed is matched character by character with the existing template subjects in turn to obtain a set of suspected short texts, including: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched character by character with existing template subjects in turn to obtain a set of suspected short texts.
4. The method as described in claim 3, characterized in that, Using a pre-built character matching tool based on Levinstein distance, each short text to be processed is sequentially matched with existing template subjects to obtain a set of suspected short texts, including: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched with existing template subjects in turn. Based on the matching degree, the matching results of multiple short texts to be processed with existing template subjects are divided into complete match, suspected match, and no match. Based on the matching results, multiple short texts to be processed are divided into a fully matched set and a suspected matched set with existing template subjects. The matching degree between the short texts to be processed and the template subjects in the fully matched set is higher than that in the suspected matched set. Both the fully matched set and the suspected matched set include multiple short texts to be processed and multiple template subjects. Both the fully matched set and the suspected matched set include matching sequence information for each short text to be processed. The matching sequence information for each short text to be processed includes multiple template subject sequences sorted from high to low according to the matching degree value with the short text to be processed. Using a pre-built character matching tool based on Levinstein distance, the reverse matching calculation is performed between each template subject in the complete matching set and the short text to be processed, resulting in a reverse matching sequence for each template subject; the reverse matching sequence contains multiple short texts to be processed, sorted from high to low according to the matching degree value. For each short text to be processed: obtain the first ranked template subject in the matching sequence of the short text to be processed, check whether the first ranked item in the reverse matching sequence of the first ranked template subject is the short text to be processed. If not, move the first ranked template subject in the matching sequence of the short text to be processed to the suspected matching set, and update all short text matching sequence information, complete matching set, and suspected matching set. Based on the updated matching sequence information of all unprocessed short texts, the complete matching set, and the suspected matching set, a suspected short text set is formed.
5. The method as described in claim 1, characterized in that, The process involves performing deep learning-based semantic matching between multiple short texts to be processed from the suspected short text set and each template subject, yielding the matching results between the output template subject and the short texts to be processed, including: Using a pre-trained semantic model, multiple short texts to be processed in the suspected short text set are semantically matched with each template subject based on deep learning to obtain the matching results of the output template subject and the short text to be processed; the architecture of the semantic model includes an input layer, an embedding layer, an encoder and an output layer.
6. The method as described in claim 5, characterized in that, Using a pre-trained semantic model, deep learning-based semantic matching is performed between multiple short texts to be processed in the suspected short text set and each template subject to obtain the matching results between the output template subject and the short texts to be processed, including: For any template subject: Using a pre-trained semantic model, based on a set of suspected short texts, semantic matching is performed between the short texts to be processed and template subjects to identify multiple short texts to be processed whose matching degree with any template subject is higher than a preset value. Reverse matching screening is performed on multiple short texts to be processed that have a matching degree higher than a preset value with any template subject, erroneous matching relationships are eliminated, and short texts to be processed that successfully match any template subject are obtained.
7. The method as described in claim 1, characterized in that, Retrieve multiple short texts to be processed, including: Extract multiple short texts to be processed from corporate financial report data.
8. The method as described in claim 1, characterized in that, The template account includes one or any combination of the following financial account classification items: Assets, liabilities, revenues, costs, and financial analysis support.
9. A financial short text matching device, characterized in that, include: The short text acquisition module is used to acquire multiple short texts to be processed; The first-stage matching module is used to perform character matching between each short text to be processed and the existing template account in sequence to obtain a set of suspected short texts; the set of suspected short texts includes multiple short texts to be processed corresponding to the initial matching of each template account; the template account includes multiple financial account classification items; The second-stage matching module is used to perform deep learning-based semantic matching between multiple short texts to be processed in the suspected short text set and each template subject to obtain the matching results of the output template subject and the short texts to be processed.
10. The apparatus as claimed in claim 9, characterized in that, It also includes a preprocessing module, which is used for: Before the first-stage matching module performs character matching between each short text to be processed and the existing template subjects in sequence, the short text to be processed is preprocessed to obtain the preprocessed short text; the preprocessing includes regularization processing and / or correction processing; the regularization processing is used to remove noisy data in the short text to be processed; the correction processing is used to correct erroneous data and non-standard data in the short text to be processed; The first-stage matching module is specifically used for: The preprocessed short texts are matched character by character with the existing template subjects in turn to obtain a set of suspected short texts.
11. The apparatus as claimed in claim 9, characterized in that, The first-stage matching module is specifically used for: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched character by character with existing template subjects in turn to obtain a set of suspected short texts.
12. The apparatus as claimed in claim 11, characterized in that, The first-stage matching module is specifically used for: Using a pre-built character matching tool based on Levenstein distance, each short text to be processed is matched with existing template subjects in turn. Based on the matching degree, the matching results of multiple short texts to be processed with existing template subjects are divided into complete match, suspected match, and no match. Based on the matching results, multiple short texts to be processed are divided into a fully matched set and a suspected matched set with existing template subjects. The matching degree between the short texts to be processed and the template subjects in the fully matched set is higher than that in the suspected matched set. Both the fully matched set and the suspected matched set include multiple short texts to be processed and multiple template subjects. Both the fully matched set and the suspected matched set include matching sequence information for each short text to be processed. The matching sequence information for each short text to be processed includes multiple template subject sequences sorted from high to low according to the matching degree value with the short text to be processed. Using a pre-built character matching tool based on Levinstein distance, the reverse matching calculation is performed between each template subject in the complete matching set and the short text to be processed, resulting in a reverse matching sequence for each template subject; the reverse matching sequence contains multiple short texts to be processed, sorted from high to low according to the matching degree value. For each short text to be processed: obtain the first ranked template subject in the matching sequence of the short text to be processed, check whether the first ranked item in the reverse matching sequence of the first ranked template subject is the short text to be processed. If not, move the first ranked template subject in the matching sequence of the short text to be processed to the suspected matching set, and update all short text matching sequence information, complete matching set, and suspected matching set. Based on the updated matching sequence information of all unprocessed short texts, the complete matching set, and the suspected matching set, a suspected short text set is formed.
13. The apparatus as claimed in claim 9, characterized in that, The second-stage matching module is specifically used for: Using a pre-trained semantic model, multiple short texts to be processed in the suspected short text set are semantically matched with each template subject based on deep learning to obtain the matching results of the output template subject and the short text to be processed; the architecture of the semantic model includes an input layer, an embedding layer, an encoder and an output layer.
14. The apparatus as claimed in claim 13, characterized in that, The second-stage matching module is specifically used for: For any template subject: Using a pre-trained semantic model, based on a set of suspected short texts, semantic matching is performed between the short texts to be processed and template subjects to identify multiple short texts to be processed whose matching degree with any template subject is higher than a preset value. Reverse matching screening is performed on multiple short texts to be processed that have a matching degree higher than a preset value with any template subject, erroneous matching relationships are eliminated, and short texts to be processed that successfully match any template subject are obtained.
15. The apparatus as claimed in claim 9, characterized in that, The short text acquisition module is specifically used for: Extract multiple short texts to be processed from corporate financial report data.
16. The apparatus as claimed in claim 9, characterized in that, The template account includes one or any combination of the following financial account classification items: Assets, liabilities, revenues, costs, and financial analysis support.
17. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.
19. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.