A financial document detection method and system combined with a large model
The method and system enhance financial document detection by using a large model to analyze and correct semantic anomalies in professional terms across documents, improving the consistency of financial term descriptions.
Patent Information
- Application Number
- CN202411415748.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-11
AI Technical Summary
Financial document detection systems face challenges in achieving semantic anomaly recognition of professional terms across documents, leading to inconsistencies in financial term descriptions due to variations in document context and purpose.
A method and system utilizing a large model to extract semantic representations, construct element association graphs, determine semantic coherence and change, and perform anomaly detection on financial terms to improve consistency.
The system enhances the consistency of financial term descriptions by identifying and correcting semantic anomalies across documents, ensuring accurate and consistent interpretation of professional terms.
Smart Images

Figure CN118917323B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of financial document detection, and more specifically, to a financial document detection method and system combined with a large model. Background Art
[0002] Document detection mainly uses natural language processing algorithms to automatically analyze and process text data. Its core steps include text area recognition, character recognition and information extraction. Text area recognition detects text areas in documents through deep learning models, such as convolutional neural networks. Character recognition converts characters in text areas into editable text formats through optical character recognition technology. Information extraction further analyzes and processes the recognized text through natural language processing technology to extract useful information, such as tabular data, keywords and semantic relationships. In recent years, with the advancement of deep learning technology, especially the application of Transformer models based on attention mechanisms in text recognition and understanding, the accuracy and efficiency of document detection have been significantly improved. In addition, multimodal learning methods combine text information to improve the accuracy and richness of information extraction. Document detection technology has been widely used in many fields such as finance, law, and medicine, providing strong support for automated processing and information management.
[0003] Financial document detection combined with large models uses advanced language models to automatically parse financial documents. These models can understand the content of documents and extract important financial data and professional terms. Through deep learning technology, the model can not only classify and extract financial information, but also process complex financial terms and generate documents that meet specifications. However, financial documents written at different times, in different scenarios and for different purposes will cause semantic differences when describing the professional terms of the same financial event, which in turn leads to inconsistency in the semantics of financial terms. Therefore, how to achieve semantic anomaly recognition of professional terms across documents and thus improve the consistency of financial term descriptions has become a difficult problem faced by the industry. Summary of the invention
[0004] The present application provides a financial document detection method and system combined with a large model, which can realize semantic anomaly recognition of professional terms across documents, thereby improving the consistency of financial term descriptions.
[0005] In a first aspect, the present application provides a financial document detection method combined with a large model, comprising the following steps:
[0006] Collect different types of financial documents to obtain financial document data;
[0007] Based on the pre-trained large model, semantic representations of different types of financial documents are extracted to obtain the semantic representation vector space of each financial document;
[0008] Constructing an element association graph of each financial document according to the association features between the financial terms in each financial document, and determining the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs;
[0009] Perform keyword extraction on the financial document data to obtain a plurality of financial keywords, and determine the semantic change amount of the financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword;
[0010] The semantic outlier value of each financial term is determined by the semantic coherence and all semantic changes of each financial term, and anomaly detection is performed on the financial terms in the financial document according to all the semantic outlier values.
[0011] In some embodiments, semantic representation extraction is performed on different types of financial documents based on a pre-trained large model to obtain a semantic representation vector space of each financial document, specifically including:
[0012] Convert different types of financial documents into financial statement vector sets;
[0013] Extracting multiple semantic representation vectors of each financial document from the financial sentence vector set based on the pre-trained large model;
[0014] Then, a set of multiple semantic representation vectors of each financial document is used as the semantic representation vector space of the corresponding financial document.
[0015] In some embodiments, constructing the element association graph of each financial document according to the association features between the financial terms in each financial document specifically includes:
[0016] Dependency extraction is performed on financial sensitive words in each financial document to obtain the dependency tree of each financial document;
[0017] Determine the element correlation of all financial terms in each financial document according to all dependency trees and correlation features between financial terms in each financial document;
[0018] Determine the global dependencies of each financial document through all dependency trees;
[0019] A factor association graph of each financial document is constructed according to all global dependencies and the factor associations of all financial terms in each financial document.
[0020] In some embodiments, determining the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs specifically includes:
[0021] Determine the semantic sensitivity of all financial terms in each financial document according to each semantic representation vector space;
[0022] The semantic coherence of all financial terms in each financial document is determined through all element association graphs and all semantic sensitivities.
[0023] In some embodiments, the keyword extraction is performed on the financial document data to obtain a plurality of financial keywords, specifically including:
[0024] Preprocessing the financial document data to obtain financial document processing data;
[0025] The key features of the financial document data are extracted based on the occurrence frequency of each financial term in the financial document processing data to obtain a plurality of financial keywords.
[0026] In some embodiments, determining the semantic change amount of each financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword specifically includes:
[0027] Determine the part-of-speech characteristics of each financial keyword;
[0028] Obtain the element relevance of all financial terms in each financial document;
[0029] Determine the semantic loss degree of each financial keyword based on the element relevance of all financial terms and the part-of-speech characteristics of each financial keyword;
[0030] The semantic change amount of each financial keyword in the document detection process is determined by the preset co-occurrence window and the semantic loss degree of each financial keyword.
[0031] In some embodiments, determining the semantic outlier value of each financial term through the semantic coherence and all semantic variations of each financial term specifically includes:
[0032] Determine the amount of abnormal fluctuation in the document detection process based on all semantic changes;
[0033] The semantic abnormal value of each financial term is determined according to the abnormal fluctuation amount and the semantic coherence of each financial term.
[0034] In a second aspect, the present application provides a financial document detection system combined with a large model, comprising:
[0035] A collection module is used to collect different types of financial documents and obtain financial document data;
[0036] A processing module is used to extract semantic representations of different types of financial documents based on a pre-trained large model to obtain a semantic representation vector space of each financial document;
[0037] The processing module is further used to construct an element association graph of each financial document according to the association features between the financial terms in each financial document, and determine the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs;
[0038] The processing module is further used to extract keywords from the financial document data to obtain multiple financial keywords, and determine the semantic change amount of the financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword;
[0039] The execution module is used to determine the semantic anomaly value of each financial term through the semantic coherence and all semantic changes of each financial term, and perform anomaly detection on the financial terms in the financial document according to all the semantic anomaly values.
[0040] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores codes, and the processor is configured to obtain the codes and execute the above-mentioned financial document detection method combined with a large model.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned financial document detection method combined with a large model is implemented.
[0042] The technical solution provided by the embodiments disclosed in this application has the following beneficial effects:
[0043] In the financial document detection method and system combined with a big model provided in the present application, different types of financial documents are first collected to obtain financial document data; semantic representations of different types of financial documents are extracted based on the pre-trained big model to obtain semantic representation vector spaces of each financial document; element association graphs of each financial document are constructed according to the association features between the financial terms in each financial document, and the semantic coherence of all financial terms in each financial document is determined through all semantic representation vector spaces and all element association graphs; keyword extraction is performed on the financial document data to obtain multiple financial keywords, and the semantic change amount of the financial keyword during the document detection process is determined according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword; the semantic outlier value of each financial term is determined according to the semantic coherence of each financial term and all semantic changes, and anomaly detection is performed on the financial terms in the financial document according to all semantic outlier values.
[0044] It can be seen that in this application, the semantic outlier value of each financial term can be determined by the semantic coherence and all semantic changes of each financial term; wherein, firstly, the global dependency relationship describing the overall association between each financial document in the financial document data and the element association degree measuring the degree of association between the financial term in the financial document and other financial terms in the financial document are used to construct the element association graph of each financial document, wherein the element association graph can identify the semantic consistency of the financial term in various financial documents, thereby reducing the ambiguity in the interpretation of the financial term, and then help identify and understand the deep semantic connection between the financial terms, and then obtain the semantic coherence describing the consistency and logical continuity of the semantic expression of each financial term in the financial document through the semantic representation vector space and the element association graph of each financial document. The semantic coherence can help discover semantic anomalies across documents or within documents. When a financial term is used in different documents, if the semantic coherence is low, it means that there is inconsistency or ambiguity in the use of the financial term in these documents; secondly, multiple financial keywords are extracted from the financial document data, and then extracted according to the part-of-speech features of each financial keyword. The semantic loss degree of the semantic consistency of financial keywords in different contexts or documents is obtained. The semantic loss degree reflects the degree of deviation of the semantic representation of financial keywords across documents or in different contexts. Then, the semantic change amount describing the degree of semantic change of financial keywords in the document context is determined through the preset co-occurrence window and the semantic loss degree of each financial keyword. The semantic change amount can help detect whether the professional terms across documents are consistent in different contexts. When the semantic change amount is high, it indicates that the financial keywords have semantic anomalies or ambiguities in different semantic environments. Then, all the semantic changes and all the semantic coherences are quantified to obtain the semantic anomaly values of the semantic anomaly degree of each financial term in the document. The semantic anomaly value can reveal whether there is semantic inconsistency in the financial term in the document. If the semantic anomaly value of a financial term is high, it means that its semantic performance in the document is unstable or does not meet expectations. Finally, the financial terms in the financial document are detected for anomalies based on all the semantic anomaly values. In summary, the scheme of the present application can realize the semantic anomaly recognition of professional terms across documents, thereby improving the consistency of financial term descriptions. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is an exemplary flow chart of a financial document detection method combined with a large model according to some embodiments of the present application;
[0046] Figure 2 is a schematic diagram of a process for determining a semantic representation vector space in some embodiments of the present application;
[0047] Figure 3 is a schematic diagram of a process for determining an element association diagram in some embodiments of the present application;
[0048] Figure 4 is a schematic diagram of the structure of a dependency tree of a financial document in some embodiments of the present application;
[0049] Figure 5 is a structural block diagram of a financial document detection system combined with a large model in some embodiments of the present application;
[0050] Figure 6 It is a structural diagram of a computer device for implementing a financial document detection method combined with a large model according to some embodiments of the present application. DETAILED DESCRIPTION
[0051] The core of this application is to first collect different types of financial documents, and then obtain financial document data; extract semantic representations of different types of financial documents based on a pre-trained large model to obtain the semantic representation vector space of each financial document; construct the element association graph of each financial document according to the association features between the financial terms in each financial document, and determine the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs; extract keywords from the financial document data to obtain multiple financial keywords, and determine the semantic change of the financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss of each financial keyword; determine the semantic anomaly value of each financial term through the semantic coherence of each financial term and all semantic changes, and perform anomaly detection on the financial terms in the financial document according to all semantic anomaly values. The solution of this application can realize the semantic anomaly recognition of professional terms across documents, thereby improving the consistency of financial term descriptions.
[0052] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods. Figure 1 , which is an exemplary flow chart of a financial document detection method combined with a large model according to some embodiments of the present application. The financial document detection method 100 combined with a large model mainly includes the following steps:
[0053] In step 101, different types of financial documents are collected to obtain financial document data.
[0054] In specific implementation, for example, web crawler technology is used to collect different types of financial documents in various scenarios such as financial information platforms, financial news websites, and stock exchanges, and the collection of all financial documents is used as financial document data.
[0055] It should be noted that the different types in this application refer to financial statements, annual reports, market analysis reports, investment research reports, press releases, contracts, etc. In addition, it should be noted that each financial document in this application may contain multiple professional financial terms, such as leverage, liquidity premium, implied volatility, etc.
[0056] In step 102, semantic representations of different types of financial documents are extracted based on the pre-trained large model to obtain a semantic representation vector space of each financial document.
[0057] In some embodiments, reference Figure 2 As shown, this figure is a schematic diagram of the process of determining the semantic representation vector space in some embodiments of the present application. In this embodiment, semantic representation extraction is performed on different types of financial documents based on a pre-trained large model, and the semantic representation vector space of each financial document can be obtained by the following steps:
[0058] First, in step 1021, each different type of financial document is converted into a financial statement vector set;
[0059] Secondly, in step 1022, multiple semantic representation vectors of each financial document are extracted from the financial sentence vector set based on the pre-trained large model;
[0060] Then, in step 1023, a set consisting of multiple semantic representation vectors of each financial document is further used as the semantic representation vector space of the corresponding financial document.
[0061] In specific implementation, the conversion of different types of financial documents into financial sentence vector sets can be achieved in the following manner, namely: using a natural language processing library (such as NLTK, spaCy, etc., not limited here) to perform sentence segmentation on different types of financial documents, thereby obtaining multiple financial sentences corresponding to the financial documents, wherein each financial document has multiple financial sentences, and then using the Word2Vec model to convert all financial sentences into vectors, and all vectors are used as financial sentence vectors, and then the set of all financial sentence vectors is used as a financial sentence vector set. In other embodiments, other methods can also be used for implementation, which will not be repeated here.
[0062] It should be noted that each financial document described in this application corresponds to multiple financial sentence vectors.
[0063] In addition, it should be noted that the large model described in this application refers to the BERT model. The BERT model provides deep contextual understanding through its bidirectional Transformer architecture. It uses a masked language model and a pre-training task for next sentence prediction to capture the nuances of financial terms and the relationship between sentences. When processing complex financial texts, BERT can accurately understand the context of polysemous words, identify domain-specific terms, and generate high-quality semantic representations.
[0064] In specific implementation, extracting multiple semantic representation vectors of each financial document from the financial statement vector set based on the pre-trained large model can be achieved in the following manner, namely: inputting each financial statement vector in the financial statement vector set into the pre-trained large model, thereby using the output vectors as the semantic representation vectors of each financial statement vector, and then dividing the semantic representation vectors of the financial statement vectors belonging to the same financial document into the same category, thereby obtaining multiple semantic representation vectors for each financial document. Other methods can also be used in other embodiments, which are not limited here.
[0065] In addition, it should be noted that the semantic representation vector described in the present application is a real number vector representation of the financial statement in the financial document, and the semantic representation vector captures the semantic information in the financial statement.
[0066] In step 103, an element association graph of each financial document is constructed according to the association features between the financial terms in each financial document, and the semantic coherence of all financial terms in each financial document is determined through all semantic representation vector spaces and all element association graphs.
[0067] In some embodiments, reference Figure 3 As shown, this figure is a schematic diagram of the process of determining the element association graph in some embodiments of the present application. In this embodiment, the element association graph of each financial document is constructed according to the association characteristics between the financial terms in each financial document, which can be implemented by the following steps:
[0068] First, in step 1031, dependency relationships of financial sensitive words in each financial document are extracted to obtain a dependency tree of each financial document;
[0069] Next, in step 1032, the element correlation of all financial terms in each financial document is determined based on all dependency trees and correlation features between financial terms in each financial document;
[0070] Then, in step 1033, the global dependency relationship of each financial document is determined through all dependency trees;
[0071] Finally, in step 1034, a factor association graph of each financial document is constructed according to all global dependencies and the factor associations of all financial terms in each financial document.
[0072] In the specific implementation, the dependency relationship of the financial sensitive words in each financial document is extracted, and the dependency tree of each financial document can be obtained in the following way, that is, a financial document is selected as the selected financial document, and a plurality of financial sensitive words are extracted from the selected financial document using the BERT model, wherein the financial sensitive words represent words that are usually related to risks, illegal behaviors, and market fluctuations in the financial field, such as fraud, tax evasion, default, bankruptcy, antitrust, subprime loans, etc. Further, all the financial sensitive words in the selected financial document are converted into vectors using the Word2Vec model, and the obtained vectors are used as financial sensitive word vectors, so as to calculate the vector of each financial sensitive word and its The absolute value of the cosine similarity between the financial sensitive word vectors is taken, and each financial sensitive word is taken as a financial sensitive word node. The absolute value of the cosine similarity between the financial sensitive word vector and other financial sensitive word vectors is taken as the weight. A minimum spanning tree is constructed using the minimum spanning tree algorithm, and the obtained minimum spanning tree is taken as the dependency tree of the selected financial document. Among them, the edge lengths of the financial sensitive word nodes in the dependency tree of the selected financial document are all the absolute values of the cosine similarities between the financial sensitive word vector and other financial sensitive word vectors. The shortest distances between the financial sensitive word nodes and other financial sensitive word nodes are taken as the dependency relationship of the financial sensitive word nodes, and the dependency trees of the remaining financial documents are continued to be determined.
[0073] It should be noted that the dependency relationship described in this application represents the semantic connection between the financial sensitive words corresponding to the financial sensitive word nodes, and the dependency tree represents the tree structure formed by the dependency relationship between different financial sensitive word nodes. The dependency tree is used to analyze the hierarchical relationship between financial sensitive words, which helps to accurately understand the semantics of different financial sensitive words in financial documents. At the same time, each financial document corresponds to a dependency tree. In addition, the structural diagram of the dependency tree of the financial document is as follows: Figure 4 As shown, Figure 4 The circles A, B, C, D, E, and F represent financial sensitive word nodes, and the values on the edge lengths represent the dependency relationships between financial sensitive word nodes.
[0074] In addition, it should be noted that the correlation features described in the present application are used to represent the degree of correlation of the maximum difference between the frequencies of occurrence of financial terms, and the relative importance of financial terms in financial documents can be measured through the correlation features.
[0075] In specific implementation, determining the element correlation of all financial terms in each financial document according to the correlation features between all dependency trees and financial terms in each financial document can be implemented in the following manner, namely: selecting a financial document as the selected financial document, calculating the frequency of occurrence of each financial term in the selected financial document, and using the obtained frequency as the frequency of occurrence of the corresponding financial term, and then calculating the absolute value of the difference between the frequency of occurrence of each financial term in the selected financial document and the frequency of occurrence of other financial terms, and using the absolute value of the largest difference as the correlation feature between the corresponding financial term and other financial terms, and continuing to determine the correlation features between the financial terms in the remaining financial documents; selecting a financial document as the selected financial document, and then selecting a financial term from the selected financial document as the selected financial term, if the dependency tree corresponding to the selected financial document contains the same financial sensitive term as the selected financial term, The financial sensitive word node is used as a co-occurring financial sensitive word node, and the farthest distance between the co-occurring financial sensitive word node and the financial sensitive word node in the dependency tree corresponding to the selected financial document is used as the farthest dependency distance. The farthest dependency distance is further multiplied by the association feature between the selected financial term and other financial terms, and the multiplied value is used as the element association degree of the selected financial term in the selected financial document. If there is no financial sensitive word node identical to the selected financial term in the dependency tree corresponding to the selected financial document, the average value of the association features between the financial terms in the selected financial document is used as the element association degree of the selected financial term in the selected financial document, and the element association degrees of the remaining financial terms in the selected financial document are continuously determined. Then, the above steps are repeated to obtain the element association degrees of all financial terms in the remaining financial documents. In other embodiments, other methods may also be used for implementation, which is not limited here.
[0076] It should be noted that the element correlation described in the present application represents the correlation between a financial term and other financial terms in a financial document. By calculating the element correlation, the mutual influence between the financial terms can be quantified.
[0077] In specific implementation, the global dependency relationship of each financial document can be determined through all dependency trees in the following manner, namely: summing up all the paths in each dependency tree respectively, and using the summed value as the global dependency distance of the corresponding dependency tree, selecting a dependency tree as the selected dependency tree, subtracting the global dependency distance of the selected dependency tree from the maximum global dependency distance, and then calculating the negative exponential function with the natural logarithm e as the base for the subtracted value, and using the value obtained after calculating the negative exponential function with the natural logarithm e as the base as the global dependency relationship of the financial document corresponding to the selected dependency tree, and continuing to determine the global dependency relationship of the financial documents corresponding to the remaining dependency trees. Other methods can also be used in other embodiments, which will not be repeated here.
[0078] It should be noted that the global dependency relationship in this application represents the overall correlation relationship of mutual dependence between financial terms in various financial documents. By analyzing the global dependency relationship, we can understand the information network of financial documents, and then identify the mutual influence of key financial terms, so as to better grasp the overall structure of financial documents. At the same time, each financial document corresponds to a global dependency relationship.
[0079] In a specific implementation, constructing the element association graph of each financial document according to all global dependencies and element associations of all financial terms in each financial document can be implemented in the following manner, namely: selecting a financial document as the selected financial document, calculating the average of the element associations of all financial terms in the selected financial document, and using the obtained average as the element association equilibrium value, using the set of element associations whose element associations of the financial terms in the selected financial document are less than or equal to the element association equilibrium value as the low association set, and using the set of element associations whose element associations of the financial terms in the selected financial document are greater than the element association equilibrium value as the high association set, and then multiplying all element associations in the high association set by the global dependencies corresponding to the selected financial document, and using the multiplied values as element dependencies, wherein each element dependency corresponds to a financial term, and using all financial terms in the selected financial document as element nodes, and then selecting an element association from the low association set as the selected element association, calculating the absolute value of the difference between the selected element association and all element dependencies in the high association set, and using the obtained values as the financial term and corresponding to the selected element association. The element distance between the financial terms corresponding to each element dependency is continued to be processed in the same manner for the remaining element dependencies in the low correlation set, and then an element dependency is selected from the low correlation set as the selected element dependency, the absolute value of the difference between the selected element dependency and the remaining element dependencies in the low correlation set is calculated, and the obtained values are all used as the element distance between the financial term corresponding to the selected element dependency and the financial term corresponding to each element dependency, and the remaining element dependencies in the low correlation set are continued to be processed in the same manner, and then an element dependency is selected from the high correlation set as the selected element dependency, the absolute value of the difference between the selected element dependency and the remaining element dependencies in the high correlation set is calculated, and the obtained values are all used as the element distance between the financial term corresponding to the selected element dependency and the financial term corresponding to each element dependency, and the remaining element dependencies in the high correlation set are continued to be processed in the same manner, and finally, a graph structure is constructed according to the element distances between all element nodes and element nodes, and the obtained graph is used as the element association graph of the selected financial document, and the element association graph of the remaining financial documents is continued to be determined. In other embodiments, other methods can also be used to achieve this, which will not be repeated here.
[0080] It should be noted that the element association graph described in the present application represents a graph structure composed of element nodes and element distances. The element association graph can be used to identify the semantic consistency of financial terms in various financial documents, thereby reducing ambiguity in the interpretation of financial terms, and further helping to identify and understand the deep semantic connections between financial terms. In addition, it should be noted that each element association graph in the present application corresponds to a financial document.
[0081] In some embodiments, determining the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs may be implemented by the following steps:
[0082] Determine the semantic sensitivity of all financial terms in each financial document according to each semantic representation vector space;
[0083] The semantic coherence of all financial terms in each financial document is determined through all element association graphs and all semantic sensitivities.
[0084] In a specific implementation, the semantic sensitivity of all financial terms in each financial document can be determined according to each semantic representation vector space. The following method can be used, namely: a semantic representation vector space is selected as the selected semantic representation vector space, and a topic distribution vector is extracted from the financial document corresponding to the selected semantic representation vector space using a topic modeling method (such as a latent Dirichlet allocation model, which is not limited here), and the obtained topic distribution vectors are all used as the financial topic distribution vectors of the financial document corresponding to the selected semantic representation vector space, and then the Word2Vec model is used to convert all financial terms in the financial document corresponding to the selected semantic representation vector space into vectors, and the obtained vectors are all used as financial term vectors, and then the correlation between each financial term vector and the financial topic distribution vector is calculated. The Euclidean distance between the topic distribution vectors is calculated, and the obtained Euclidean distances are used as the topic distances of each financial term vector. The Euclidean distances between each financial term vector and each semantic representation vector in the selected semantic representation vector space are calculated, and the smallest Euclidean distances among the Euclidean distances between each financial term vector and each semantic representation vector in the selected semantic representation vector space are used as the semantic distances of the corresponding financial term vectors. The semantic distances of each financial term vector are further divided by the topic distances of the corresponding financial term vectors, and the values obtained by the division are used as the semantic sensitivity of the financial term corresponding to each financial term vector. The semantic sensitivity of all financial terms in the remaining financial documents is continued to be determined. Other methods can also be used in other embodiments, which are not limited here.
[0085] It should be noted that the semantic sensitivity described in this application represents an indicator for measuring the degree of semantic variation of financial terms in different contexts or topics. Through the semantic sensitivity, financial terms that show significant semantic variations in different financial documents can be identified. These financial terms often have special meanings in specific contexts, and identifying them helps to better understand the text content.
[0086] In specific implementation, determining the semantic coherence of all financial terms in each financial document through all element association graphs and all semantic sensitivities can be implemented in the following manner, namely: selecting an element association graph as the selected element association graph, then calculating the shortest element distance between each element node and other element nodes in the selected element association graph, and taking the reciprocal of an exponential function with a natural logarithm as the base for all the obtained shortest element distances, and then summing up all the values obtained by taking the reciprocal of the exponential function with a natural logarithm as the base, and taking the summed value as the element distance distribution value of the selected element association graph, further multiplying the semantic sensitivities of all financial terms in the financial document corresponding to the selected element association graph by the element distance distribution value, and taking the multiplied values as the semantic coherence of each financial term in the financial document corresponding to the selected element association graph, and continuing to determine the semantic coherence of each financial term in the financial document corresponding to the remaining element association graphs. In other embodiments, other methods can also be used for implementation, which will not be repeated here.
[0087] It should be noted that the semantic coherence described in this application refers to an indicator that measures the consistency and logical continuity of the semantic expression of financial terms in financial documents. It ensures that the use of terms in different documents is consistent by analyzing the correlation and semantic distribution between financial terms. The semantic coherence can help discover semantic anomalies across documents or within documents. When a financial term is used in different documents, if the semantic coherence is low, it means that there is inconsistency or ambiguity in the use of the financial term in these documents.
[0088] In step 104, keyword extraction is performed on the financial document data to obtain a plurality of financial keywords, and the semantic change amount of the financial keyword during the document detection process is determined according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword.
[0089] In some embodiments, extracting keywords from the financial document data to obtain multiple financial keywords can be achieved by using the following steps:
[0090] Preprocessing the financial document data to obtain financial document processing data;
[0091] The key features of the financial document data are extracted based on the occurrence frequency of each financial term in the financial document processing data to obtain a plurality of financial keywords.
[0092] In a specific implementation, the financial document data is preprocessed to obtain the financial document processing data, which can be implemented in the following manner, namely: first, irrelevant characters and punctuation marks in each financial document in the financial document data are removed; second, each financial document is segmented into multiple words using a word segmentation tool (for example, such as Jieba word segmentation, THULAC, etc., which are not limited here), and the obtained words are all used as financial words; then, stop words (such as de, shi, and ) except for common but low-information stop words in each financial word are removed; finally, a set of all financial words with stop words removed is used as financial document processing data. Other methods can also be used in other embodiments, which will not be repeated here.
[0093] In specific implementation, the financial document data is subjected to key feature extraction through the occurrence frequency of each financial term in the financial document processing data, and the multiple financial keywords can be obtained by the following method, namely: first, the frequency of each financial term in the financial document data is counted, and the obtained frequency is used as the global occurrence frequency of each financial term; secondly, the frequency of each financial term in each financial document in the financial document data is counted respectively, and the obtained frequency is used as the local occurrence frequency of each financial term; then, the total number of financial documents in the financial document data is divided by the global occurrence frequency of each financial term, and then all the values obtained by the division are taken by the logarithm of 10, and the values obtained by taking the logarithm of 10 are multiplied by the occurrence frequency of each corresponding financial term, and then all the values obtained by the division are taken as the key feature value of each financial term, and then all the key feature values are averaged, and the obtained average is taken as the equilibrium key feature value, and all the financial terms corresponding to the key feature values greater than the equilibrium key feature value are taken as financial keywords, so as to obtain multiple financial keywords. In other embodiments, other methods can also be used for implementation, which are not limited here.
[0094] In some embodiments, determining the semantic change amount of each financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword can be implemented by the following steps:
[0095] Determine the part-of-speech characteristics of each financial keyword;
[0096] Obtain the element relevance of all financial terms in each financial document;
[0097] Determine the semantic loss degree of each financial keyword based on the element relevance of all financial terms and the part-of-speech characteristics of each financial keyword;
[0098] The semantic change amount of each financial keyword in the document detection process is determined by the preset co-occurrence window and the semantic loss degree of each financial keyword.
[0099] In specific implementation, the part-of-speech features of each financial keyword can be determined in the following manner, namely: first, the financial sentences in which each financial keyword appears in each financial document are obtained, thereby obtaining multiple financial sentences; secondly, the SpaCy tool is used to perform part-of-speech tagging on the financial keywords in each financial sentence, thereby obtaining the part-of-speech features of each financial keyword. In other embodiments, other methods can also be used for implementation, which will not be repeated here.
[0100] It should be noted that the part-of-speech features described in this application represent the grammatical role or function played by each financial keyword in a financial sentence. It identifies the role of the word in the sentence structure, such as whether it is a noun, verb, adjective or adverb, etc. The part-of-speech features not only help to understand the function of a word, but also help to identify the meaning of a word in a specific context.
[0101] In specific implementation, the semantic loss degree of each financial keyword can be determined according to the element correlation of all financial terms and the part-of-speech characteristics of each financial keyword. The following method can be used for this purpose, namely: the mean of all element correlations is calculated, and the obtained mean is used as the balanced element correlation. The part-of-speech characteristics of each financial keyword are then converted into vectors using the Word2Vec model, and the obtained vectors are used as the part-of-speech vectors of each financial keyword. The Euclidean distance between the part-of-speech vector of each financial keyword and the part-of-speech vectors of other financial keywords is then calculated. The part-of-speech vectors of each financial keyword and the word vectors of other financial keywords are then compared. The maximum Euclidean distance between the part-of-speech vectors is taken as the maximum part-of-speech distance of the corresponding financial keyword. At the same time, the minimum Euclidean distance between the part-of-speech vector of each financial keyword and the part-of-speech vector of other financial keywords is taken as the minimum part-of-speech distance of the corresponding financial keyword. Further, the maximum part-of-speech distance of each financial keyword is subtracted from the minimum part-of-speech distance of each financial keyword, and the subtracted values are multiplied by the balance factor association degree, and the multiplied values are taken as the semantic loss degree of the corresponding financial keyword, thereby obtaining the semantic loss degree of each financial keyword. Other methods can also be used in other embodiments, which are not limited here.
[0102] It should be noted that the semantic loss degree in this application represents an indicator for measuring the degree of semantic consistency of financial keywords in different contexts or documents. The semantic loss degree reflects the degree of deviation of the semantic representation of financial keywords across documents or in different contexts. The greater the semantic loss degree, the higher the degree of deviation of the semantic representation of financial keywords across documents or in different contexts, and vice versa.
[0103] In addition, it should be noted that the common window in the present application represents a sliding window for processing all semantic loss degrees, which can be set using a fixed-length sequence, where the fixed length can be set using the value obtained by taking the square root of the total number of all semantic loss degrees and rounding it down.
[0104] In specific implementation, the semantic change amount of the financial keyword in the document detection process is determined by a preset co-occurrence window and the semantic loss degree of each financial keyword. The following method can be used, namely: first, the semantic loss degrees of all financial keywords are sorted in ascending order, and the sorted sequence is used as a semantic loss sequence, the co-occurrence window is aligned with the first semantic loss degree in the semantic loss sequence, the largest semantic loss degree and the smallest semantic loss degree are selected from the semantic loss degrees covered by the co-occurrence window, the smallest semantic loss degree is subtracted from the largest semantic loss degree, and the subtracted value is used as the semantic change amount of the financial keyword corresponding to the first semantic loss degree. quantification, sliding the co-occurrence window, aligning the co-occurrence window with the second semantic loss degree in the semantic loss sequence, selecting the largest semantic loss degree and the smallest semantic loss degree from the semantic loss degrees covered by the co-occurrence window, subtracting the smallest semantic loss degree from the largest semantic loss degree, and using the subtracted value as the semantic change amount of the financial keyword corresponding to the second semantic loss degree, repeating the above steps, sliding the co-occurrence window in sequence until the co-occurrence window is aligned with the last semantic loss degree, wherein the semantic change amount of the financial keyword corresponding to the last semantic loss degree is set to 0. Other methods may also be used in other embodiments, which will not be repeated here.
[0105] It should be noted that the semantic change amount described in this application represents a parameter quantity that measures the degree of semantic change of financial keywords in the document context. The semantic change amount can help detect whether professional terms across documents remain consistent in different contexts. When the semantic change amount is high, it indicates that the financial keyword has semantic anomalies or ambiguities in different semantic environments.
[0106] In step 105, the semantic outlier value of each financial term is determined by the semantic coherence and all semantic changes of each financial term, and anomaly detection is performed on the financial terms in the financial document according to all the semantic outlier values.
[0107] In some embodiments, determining the semantic outlier value of each financial term through the semantic coherence and all semantic variations of each financial term can be achieved by using the following steps:
[0108] Determine the amount of abnormal fluctuation in the document detection process based on all semantic changes;
[0109] The semantic abnormal value of each financial term is determined according to the abnormal fluctuation amount and the semantic coherence of each financial term.
[0110] In specific implementation, determining the abnormal fluctuation amount in the document detection process based on all semantic changes can be achieved in the following manner, namely: calculating the mean of all semantic changes, and using the obtained mean as the semantic co-occurrence equilibrium value, then selecting the largest semantic change amount and the smallest semantic change amount from all semantic changes, further subtracting the smallest semantic change amount from the largest semantic change amount, dividing the subtracted value by the semantic co-occurrence equilibrium value, and using the divided value as the abnormal fluctuation amount in the document detection process. Other methods can also be used in other embodiments, which will not be repeated here.
[0111] It should be noted that the abnormal fluctuation amount in this application refers to the degree of fluctuation of the semantic changes of financial keywords. The abnormal fluctuation amount can identify abnormal changes in the semantics of professional terms across documents. When the abnormal fluctuation amount is large, it means that the financial terms in the document may be semantically abnormal, which may lead to misunderstanding or incorrect information transmission.
[0112] In specific implementation, determining the semantic anomaly value of each financial term through the abnormal fluctuation amount and the semantic coherence of each financial term can be achieved in the following manner, namely: dividing the semantic coherence of each financial term by the abnormal fluctuation amount, and using the divided values as the semantic anomaly values of the corresponding financial term.
[0113] It should be noted that the semantic outlier value described in this application represents a measure of the degree of semantic anomaly of the financial term in the document. The larger the semantic outlier value, the higher the degree of semantic anomaly of the financial term in the document, and vice versa. The semantic outlier value can reveal whether there is semantic inconsistency in the financial term in the document. If the semantic outlier value of a financial term is high, it means that its semantic performance in the document is unstable or does not meet expectations.
[0114] In specific implementation, anomaly detection of financial terms in financial documents based on all semantic anomaly values can be implemented in the following manner, namely: taking the square root of the total number of all semantic anomaly values and rounding it down, and using the rounded-down value as a threshold multiple, then respectively calculating the mean and standard deviation of all semantic anomaly values, adding the obtained mean to the product of the standard deviation and the threshold multiple, and using the added value as the anomaly threshold, if the semantic anomaly value of each financial term in the financial document is greater than the anomaly threshold, the corresponding financial term in the financial document is marked as a semantic anomaly, if the semantic anomaly value of each financial term in the financial document is less than or equal to the anomaly threshold, the financial term in the financial document is not processed, and other methods can also be used in other embodiments, which are not limited here.
[0115] In addition, in another aspect of the present application, in some embodiments, the present application provides a financial document detection system combined with a large model, referring to Figure 5 , which is a schematic diagram of exemplary hardware and / or software of a financial document detection system combined with a large model according to some embodiments of the present application. The financial document detection system 500 combined with a large model includes: a collection module 501, a processing module 502 and an execution module 503, which are described as follows:
[0116] Collection module 501, in this application, the collection module 501 is mainly used to collect different types of financial documents, and then obtain financial document data;
[0117] Processing module 502, in the present application, is used to extract semantic representations of different types of financial documents based on a pre-trained large model to obtain a semantic representation vector space of each financial document;
[0118] It should be noted that the processing module 502 in the present application is also used to construct an element association graph of each financial document according to the association features between the financial terms in each financial document, and determine the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs;
[0119] In addition, the processing module 502 in the present application is also used to extract keywords from the financial document data to obtain multiple financial keywords, and determine the semantic change amount of the financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword;
[0120] Execution module 503, in the present application, execution module 503 is mainly used to determine the semantic outlier value of each financial term through the semantic coherence and all semantic changes of each financial term, and perform anomaly detection on the financial terms in the financial document according to all semantic outlier values.
[0121] In addition, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores codes, and the processor is configured to obtain the codes and execute the above-mentioned financial document detection method combined with a large model.
[0122] In some embodiments, reference Figure 6 , which is a schematic diagram of the structure of a computer device according to some embodiments of the present application using a financial document detection method combined with a large model. The financial document detection method combined with a large model in the above embodiment can be Figure 6 The computer device 600 shown in the figure is implemented, and the computer device 600 includes at least one processor 601, a communication bus 602, a memory 603 and at least one communication interface 604.
[0123] Processor 601 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more processors for controlling the execution of the financial document detection method combined with a large model in the present application.
[0124] The communication bus 602 may be used to transmit information between the above-mentioned components.
[0125] The memory 603 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 603 may exist independently and be connected to the processor 601 via the communication bus 602. The memory 603 may also be integrated with the processor 601.
[0126] The memory 603 is used to store the program code for executing the solution of the present application, and the execution is controlled by the processor 601. The processor 601 is used to execute the program code stored in the memory 603. The program code may include one or more software modules. The method described in the above method embodiment can be implemented by the processor 601 and one or more software modules in the program code in the memory 603.
[0127] The communication interface 604 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0128] In a specific implementation, as an embodiment, a computer device may include multiple processors, each of which may be a single-CPU processor or a multi-CPU processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0129] The above-mentioned computer device may be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device may be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of computer device.
[0130] In addition, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned financial document detection method combined with a large model.
[0131] In summary, in the financial document detection method and system combined with a large model disclosed in the embodiment of the present application, different types of financial documents are first collected to obtain financial document data; semantic representations of different types of financial documents are extracted based on the pre-trained large model to obtain the semantic representation vector space of each financial document; element association graphs of each financial document are constructed according to the association features between the financial terms in each financial document, and the semantic coherence of all financial terms in each financial document is determined through all semantic representation vector spaces and all element association graphs; keyword extraction is performed on the financial document data to obtain multiple financial keywords, and the semantic change amount of the financial keyword during the document detection process is determined according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword; the semantic outlier value of each financial term is determined through the semantic coherence of each financial term and all semantic changes, and the financial terms in the financial document are detected according to all semantic outliers. The scheme of the present application can realize the semantic anomaly recognition of professional terms across documents, thereby improving the consistency of financial term descriptions.
[0132] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A financial document detection method combined with a large model, It is characterized in that The steps include: Collect different types of financial documents to obtain financial document data; Based on the pre-trained large model, semantic representations of different types of financial documents are extracted to obtain the semantic representation vector space of each financial document; Constructing an element association graph of each financial document according to the association features between the financial terms in each financial document, and determining the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs; Perform keyword extraction on the financial document data to obtain a plurality of financial keywords, and determine the semantic change amount of the financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword; Determine the semantic outlier value of each financial term through the semantic coherence and all semantic changes of each financial term, and then perform anomaly detection on the financial terms in the financial document according to all the semantic outlier values; Among them, constructing the element association graph of each financial document according to the association characteristics between the financial terms in each financial document specifically includes: Dependency extraction is performed on financial sensitive words in each financial document to obtain the dependency tree of each financial document; Determine the element correlation of all financial terms in each financial document according to all dependency trees and correlation features between financial terms in each financial document; Determine the global dependencies of each financial document through all dependency trees; Constructing a factor association graph of each financial document according to all global dependencies and factor associations of all financial terms in each financial document; The semantic coherence of all financial terms in each financial document is determined through all semantic representation vector spaces and all element association graphs, specifically including: Determine the semantic sensitivity of all financial terms in each financial document according to each semantic representation vector space; Determine the semantic coherence of all financial terms in each financial document through all element association graphs and all semantic sensitivities; Among them, determining the semantic change amount of each financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword specifically includes: Determine the part-of-speech characteristics of each financial keyword; Obtain the element relevance of all financial terms in each financial document; Determine the semantic loss degree of each financial keyword based on the element relevance of all financial terms and the part-of-speech characteristics of each financial keyword; Determine the semantic change of each financial keyword during the document detection process through a preset co-occurrence window and the semantic loss degree of each financial keyword; The method of determining the semantic outlier value of each financial term through the semantic coherence and all semantic variations of each financial term specifically includes: Determine the amount of abnormal fluctuation in the document detection process based on all semantic changes; The semantic abnormal value of each financial term is determined according to the abnormal fluctuation amount and the semantic coherence of each financial term.
2. The method according to claim 1, It is characterized in that Based on the pre-trained large model, semantic representations of different types of financial documents are extracted, and the semantic representation vector space of each financial document is obtained, which specifically includes: Convert different types of financial documents into financial statement vector sets; Extracting multiple semantic representation vectors of each financial document from the financial sentence vector set based on the pre-trained large model; Then, a set of multiple semantic representation vectors of each financial document is used as the semantic representation vector space of the corresponding financial document.
3. The method according to claim 1, It is characterized in that The financial document data is subjected to keyword extraction to obtain a plurality of financial keywords, specifically including: Preprocessing the financial document data to obtain financial document processing data; The key features of the financial document data are extracted based on the occurrence frequency of each financial term in the financial document processing data to obtain a plurality of financial keywords.
4. A financial document detection system combined with a large model, which uses the method described in any one of claims 1 to 3 to perform financial document detection, It is characterized in that The financial document detection system comprises: A collection module is used to collect different types of financial documents and obtain financial document data; A processing module is used to extract semantic representations of different types of financial documents based on a pre-trained large model to obtain a semantic representation vector space of each financial document; The processing module is further used to construct an element association graph of each financial document according to the association features between the financial terms in each financial document, and determine the semantic coherence of all financial terms in each financial document through all semantic representation vector spaces and all element association graphs; The processing module is further used to extract keywords from the financial document data to obtain multiple financial keywords, and determine the semantic change amount of the financial keyword during the document detection process according to the part-of-speech features of all financial keywords and the semantic loss degree of each financial keyword; The execution module is used to determine the semantic anomaly value of each financial term through the semantic coherence and all semantic changes of each financial term, and perform anomaly detection on the financial terms in the financial document according to all the semantic anomaly values.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, It is characterized in that When the processor executes the computer program, the financial document detection method combined with a large model according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the financial document detection method combined with a large model as described in any one of claims 1 to 3 is implemented.
