Intelligent financial query method and device, equipment and medium
By building public and sub-knowledge graphs, the problem of complex data query logic in corporate financial systems is solved, personalized query methods are provided, and financial query efficiency is improved.
Patent Information
- Application Number
- CN202411288312.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-10-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing enterprise financial systems based on natural language processing have complex logic in the data query process and lack the distinction between commonly used data and non-common data, resulting in untimely query responses and difficulty in improving system financial query efficiency.
By building a public knowledge graph and sub-knowledge graph for enterprise financial systems, we can filter out identifiable nodes and target edges based on the text to be queried, calculate the weight value of the sub-knowledge graph in the public knowledge graph, select the appropriate graph to output query results, and provide personalized oriented query methods.
It realizes the distinction between commonly used data and non-used data, reduces the problem of untimely query response, and improves the efficiency of system financial query.
Smart Images

Figure CN118796984A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an intelligent financial query method, device, equipment and medium. Background Art
[0002] As enterprises expand and their businesses diversify, the amount of financial data grows exponentially. Traditional manual query methods are unable to cope with the massive and complex account information. Existing enterprise financial systems generally use natural language processing for querying. Users use natural language to ask questions, and the system quickly locates the corresponding location and extracts the required financial data, which greatly improves query efficiency compared to traditional manual query.
[0003] However, the existing enterprise financial system based on natural language processing has complex logic in the entire data query process, has no distinction between queries for commonly used data and uncommon data, and lacks personalized financial query methods for different business needs, resulting in untimely query responses and difficulty in improving the efficiency of system financial queries.
[0004] Therefore, there is an urgent need for an intelligent financial query method that can improve the efficiency of financial query. Summary of the invention
[0005] In view of this, with respect to the enterprise financial system based on natural language processing in the prior art, the logic of the entire data query process is complex, there is no distinction between queries for commonly used data and uncommon data, and there is a lack of personalized financial query methods for different business needs, resulting in untimely query responses and difficulty in improving the efficiency of system financial queries. The present disclosure provides an intelligent financial query method, device, equipment and medium.
[0006] According to a first aspect of the present invention, there is provided an intelligent financial query method, comprising: Construct nodes of a public knowledge graph and the edges connecting them based on query items and query relationships for enterprise financial systems; Filter out identifiable nodes in the public knowledge graph based on the query items in the text to be queried; Determine a target edge from the edges connecting the identifiable nodes and determine a target node among the identifiable nodes based on the target edge, and construct a sub-knowledge graph based on the target node and the target edge; In response to the enterprise financial system receiving the text to be queried again, the weight value of the sub-knowledge graph in the public knowledge graph is determined, and based on the weight value, the sub-knowledge graph or the public knowledge graph is selected to output the corresponding query result.
[0007] In some embodiments, the step of determining a target edge from the edges connected between the identifiable nodes and determining a target node among the identifiable nodes based thereon comprises: Calculate the selected frequency values corresponding to the edges connecting the identifiable nodes respectively; Filter out a target edge among the edges connecting the identifiable nodes based on the selected frequency value being greater than or equal to a frequency threshold; A connected target node is determined from the identifiable nodes based on the target edge.
[0008] In some embodiments, the step of determining the weight value of the sub-knowledge graph in the public knowledge graph includes: The weight values corresponding to the edges connected to each identifiable node of the sub-knowledge graph in the public knowledge graph are traversed and added up to obtain the weight value of the sub-knowledge graph in the public knowledge graph.
[0009] In some embodiments, the step of selecting the sub-knowledge graph or the public knowledge graph based on the weight value to output the corresponding query result includes: If the weight value of the sub-knowledge graph in the public knowledge graph is greater than or equal to a preset weight threshold, output the corresponding query result based on the sub-knowledge graph; If the weight value of the sub-knowledge graph in the public knowledge graph is less than the preset weight threshold, the corresponding query result is output based on the public knowledge graph.
[0010] In some embodiments, the step of constructing nodes of a public knowledge graph and edges connecting them based on query items and query relationships for an enterprise financial system includes: The first natural language processing model is trained to extract texts related to building a public knowledge graph from several existing data sources and segment and tag the texts to obtain preprocessed texts. Identify the corresponding query items and query relationships in the preprocessed text from the pre-trained entity library, and update the parameters of the first natural language processing model based on the two; The first natural language processing model is trained for several rounds, and the nodes of the public knowledge graph and the edges connecting them are constructed based on the query items and query relationships obtained from the final round of training of the first natural language processing model.
[0011] In some embodiments, the step of identifying corresponding query terms and query relationships in the preprocessed text from the pre-trained entity library includes: Based on the pre-trained entity library, corresponding entities in the pre-processed text are identified and used as query items; Based on the part-of-speech tags corresponding to all the identified entities, the relationship between all the entities is learned and used as the query relationship.
[0012] In some embodiments, the step of filtering out identifiable nodes in the public knowledge graph based on the query terms in the query text includes: Converting the text to be queried into a preprocessed text to be queried in the same format as the preprocessed text; Extracting identifiable query items from the preprocessed text to be queried based on the trained first natural language processing model and constructing query conditions applicable to the public knowledge graph based on the identifiable query items; Based on the query condition, corresponding identifiable nodes are filtered out from the public knowledge graph.
[0013] According to a second aspect of the present invention, there is provided an intelligent financial query device, the device comprising: The first module is used to construct nodes of a public knowledge graph and the edges connecting them based on query items and query relationships for enterprise financial systems; The second module is used to filter out identifiable nodes in the public knowledge graph based on the query items in the text to be queried; A third module is used to determine a target edge from the edges connecting the identifiable nodes and determine a target node among the identifiable nodes based on the target edge, and construct a sub-knowledge graph based on the target node and the target edge; The fourth module is used to determine the weight value of the sub-knowledge graph in the public knowledge graph in response to the enterprise financial system receiving the text to be queried again, and select the sub-knowledge graph or the public knowledge graph to output the corresponding query result based on the weight value.
[0014] According to a third aspect of the present invention, there is further provided an electronic device, the electronic device comprising: At least one processor; and a memory, wherein the memory stores a computer program that can be run on the processor, and the processor executes the aforementioned intelligent financial query method when executing the program.
[0015] According to a fourth aspect of the present invention, there is further provided a computer-readable storage medium storing a computer program, wherein the computer program executes any one of the above-mentioned intelligent financial query methods when executed by a processor.
[0016] The above-mentioned intelligent financial query method constructs nodes of a public knowledge graph and edges connecting them based on query items and query relationships for the enterprise financial system, selects identifiable nodes in the public knowledge graph based on query items in the text to be queried, determines target edges from edges connecting identifiable nodes and determines target nodes in identifiable nodes based on them, and constructs a sub-knowledge graph based on the two. If the enterprise financial system receives the text to be queried again, it determines the weight value of the sub-knowledge graph in the public knowledge graph, and selects the sub-knowledge graph or the public knowledge graph to output the corresponding query result based on the weight value. In the enterprise financial system based on natural language processing, a combination of public knowledge graph and sub-knowledge graph is used to process business query texts to ensure that queries for commonly used data and uncommon data have corresponding differentiation, so as to provide personalized query methods for different business query needs, reduce the problem of untimely query responses, and improve the efficiency of system financial queries.
[0017] In addition, the present invention also provides an intelligent financial query device and an electronic device, which can also achieve the above-mentioned technical effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flowchart of an intelligent financial query method provided by one embodiment of the present invention; Figure 2 Another flow chart of an intelligent financial query method provided by another embodiment of the present invention; Figure 3 Shown is a schematic diagram of the structure of a sub-knowledge graph provided by another embodiment of the present invention; Figure 4 A schematic diagram of the structure of an intelligent financial query device provided by another embodiment of the present invention; Figure 5 is an internal structure diagram of an electronic device in another embodiment of the present invention; Figure 6 It is a schematic diagram of the structure of a computer-readable storage medium in another embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0021] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.
[0022] In one embodiment, please refer to Figure 1 As shown, the present invention provides an intelligent financial query method 100, specifically, comprising the following steps: Step 101, constructing nodes of a public knowledge graph and edges connecting them based on query items and query relationships for an enterprise financial system; Step 102, filtering out identifiable nodes in the public knowledge graph based on the query items in the text to be queried; Step 103, determining a target edge from the edges connecting the identifiable nodes and determining a target node among the identifiable nodes based on the target edge, and constructing a sub-knowledge graph based on the target node and the target edge; Step 104, in response to the enterprise financial system receiving the text to be queried again, determines the weight value of the sub-knowledge graph in the public knowledge graph, and selects the sub-knowledge graph or the public knowledge graph to output the corresponding query result based on the weight value.
[0023] Among them, the knowledge graph is a network structure based on entities and relationships. In the knowledge graph, nodes correspond to entities, that is, query items, and edges correspond to the relationships between entities, that is, query relationships. The nodes in the constructed public knowledge graph correspond to query items such as account books, subjects, periods, and trading units in the enterprise financial system, and the edges in the constructed public knowledge graph correspond to the relationships between query items in the enterprise financial system, such as "account book A contains subject B", "trading unit C has the name E when the period is D", etc. A sub-knowledge graph is constructed based on the target nodes separated from the public knowledge graph and the target edges connecting them. The sub-knowledge graph is a subset of the public knowledge graph. When the enterprise financial system receives the text to be queried again, it chooses to output the corresponding query results based on the public knowledge graph or the sub-knowledge graph based on the corresponding conditions.
[0024] Therefore, the above-mentioned intelligent financial query method can provide an optional personalized query method for different business query needs to ensure that queries for commonly used data and uncommon data have corresponding differentiation, reduce the problem of untimely query responses, and improve the efficiency of system financial queries.
[0025] According to some embodiments of the present invention, the step of determining the target edge from the edges connecting between identifiable nodes and determining the target node in the identifiable nodes based on the target edge includes: calculating the selected frequency values corresponding to the edges connecting between the identifiable nodes; filtering out the target edge from the edges connecting between the identifiable nodes based on the selected frequency value being greater than or equal to the frequency threshold; and determining the connected target node from the identifiable nodes based on the target edge. If the selected frequency value is greater than or equal to the frequency threshold, it means that the query relationship is selected at a high frequency in the public knowledge graph, that is, it is a frequently used query relationship. Based on this, it is filtered out from the public knowledge graph, which is conducive to narrowing the query scope and building a more accurate sub-knowledge graph that better matches the text to be queried.
[0026] According to some embodiments of the present invention, the step of determining the weight value of the sub-knowledge graph in the public knowledge graph includes: traversing the weight values corresponding to the edges connected to each identifiable node of the sub-knowledge graph in the public knowledge graph and adding them up to obtain the weight value of the sub-knowledge graph in the public knowledge graph. By calculating the weight proportion of the sub-knowledge graph in the public knowledge graph, the importance of the sub-graph is quantitatively evaluated, and which parts contribute more to the global knowledge graph and which parts may be relatively less important or redundant are identified. Based on this, the important parts are marked or extracted so that the corresponding data can be prepared in advance when the query text is received again in the future, thereby reducing the query waiting time, improving the system responsiveness, and improving the system query efficiency.
[0027] According to some embodiments of the present invention, the step of selecting a sub-knowledge graph or a public knowledge graph based on a weight value to output a corresponding query result includes: if the weight value of the sub-knowledge graph in the public knowledge graph is greater than or equal to a preset weight threshold, the corresponding query result is output based on the sub-knowledge graph; if the weight value of the sub-knowledge graph in the public knowledge graph is less than the preset weight threshold, the corresponding query result is output based on the public knowledge graph. In an enterprise financial system, if the weight value of the sub-knowledge graph in the public knowledge graph is greater than or equal to the preset weight threshold, it means that the probability of the sub-knowledge graph being selected as a whole is relatively large, that is, there are often cases where financial data is queried based on the sub-knowledge graph. In this case, the sub-knowledge graph is marked, and if the text to be queried is received again, the financial data to be queried is prepared in advance based on the sub-knowledge graph, so that the user directly obtains the data to be queried, avoiding the step of re-experiencing the query from the public knowledge graph, simplifying the process of querying commonly used financial data, ensuring that the query of commonly used data and uncommon data has corresponding differentiation, reducing the problem of untimely query response, and improving the efficiency of system financial queries.
[0028] According to several embodiments of the present invention, the steps of constructing the nodes of a public knowledge graph and the edges connecting them based on query items and query relationships for an enterprise financial system include: training a first natural language processing model to extract text related to constructing a public knowledge graph from several existing data sources and segmenting and tagging the text to obtain preprocessed text; identifying the corresponding query items and query relationships in the preprocessed text from a pre-trained entity library, and updating the parameters of the first natural language processing model based on the two; performing several rounds of training on the first natural language processing model, and constructing the nodes of the public knowledge graph and the edges connecting them based on the query items and query relationships obtained from the final round of training of the first natural language processing model.
[0029] Among them, the first natural language model is the Transformer model. The training process of the Transformer model involves the following: (1) Data preprocessing Text segmentation: Convert the input text into a series of words or subword units based on the public knowledge graph.
[0030] Build vocabulary: Build a vocabulary based on the training data and assign a unique identifier (ID) to each word or subword.
[0031] Encoding input: Convert words or subwords in the text into corresponding ID sequences, and perform necessary padding or truncation operations to ensure that all input sequences have the same length.
[0032] (2) Input Embedding Word embedding: Convert the ID of each word or subword into a vector representation in a high-dimensional space, namely word embedding, to convert text data into a numerical form that the model can process.
[0033] Positional encoding: Since the Transformer model itself does not have the ability to process sequence order, positional encoding is added to provide the position information of the word in the sequence. Positional encoding is usually added to word embedding to generate the final input representation.
[0034] (3) Encoder Self-Attention Mechanism: Inside the encoder, the self-attention mechanism enables the model to simultaneously focus on different positions in the input sequence, thereby capturing the dependencies between words. The self-attention mechanism generates a contextual representation of each word by calculating the similarity scores between all words in the input sequence and weighted summing the words based on these scores.
[0035] Multi-head attention mechanism: In order to enhance the model's attention ability, Transformer adopts a multi-head attention mechanism, which divides the input vector into multiple heads. Each head performs self-attention calculation independently and concatenates the results so that the model can simultaneously focus on different subspace information in the input sequence.
[0036] Residual connection and layer normalization: After each sublayer (such as self-attention layer, feedforward neural network layer), residual connection and layer normalization are performed to ensure the training stability and performance of the model.
[0037] (4) Decoder Self-attention mechanism: Similar to the encoder, the decoder uses a self-attention mechanism to capture the dependencies between words in the output sequence. During the decoding process, in order to prevent the model from seeing future information, a masking operation is required on the self-attention mechanism.
[0038] Encoder-Decoder Attention Mechanism: The decoder also contains an Encoder-Decoder Attention Mechanism, which allows the decoder to focus on the encoder’s output representation when generating each output word, thereby leveraging information from the source language sequence to guide the generation of the target language sequence.
[0039] (5) Output layer Linear Layer and Softmax Layer: The output of the decoder is processed by a linear layer and a softmax layer to generate the final probability distribution over the vocabulary, and then the word with the highest probability is selected as the output of the current time step.
[0040] (6) Loss calculation and back propagation Loss calculation: Calculate the loss function (such as cross entropy loss) based on the model's output and the true label to evaluate the model's performance.
[0041] Backpropagation: The backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters, and the model parameters are updated according to these gradients to optimize the model performance.
[0042] (7) Model evaluation and fine-tuning Model evaluation: Use the validation set to evaluate the model regularly during the training process to understand the generalization ability of the model.
[0043] Model fine-tuning: If the model performs poorly on a specific task, the model performance can be improved by fine-tuning the model parameters or adding additional task-specific layers.
[0044] According to several embodiments of the present invention, the step of identifying corresponding query items and query relationships in a preprocessed text from a pretrained entity library includes: identifying corresponding entities in the preprocessed text based on the pretrained entity library and using them as query items; learning the relationship between all entities based on the part-of-speech tags corresponding to all identified entities and using them as query relationships.
[0045] According to several embodiments of the present invention, the step of filtering out identifiable nodes in a public knowledge graph based on query items in a text to be queried includes: converting the text to be queried into a preprocessed text to be queried in the same format as a preprocessed text; extracting identifiable query items in the preprocessed text to be queried based on a trained first natural language processing model and constructing query conditions suitable for the public knowledge graph based on the query items; and filtering out corresponding identifiable nodes from the public knowledge graph based on the query conditions.
[0046] In order to further understand the intelligent financial query method provided by the present invention, Figure 2 Another flow chart of the intelligent financial query method provided by another specific embodiment of the present invention is shown. Figure 2 As shown, first, a public knowledge graph for the enterprise financial system is constructed, including collecting data and performing entity recognition and relationship extraction based on the collected data.
[0047] The first natural language processing model is trained to extract text related to the construction of a public knowledge graph from several existing data sources and perform word segmentation and part-of-speech tagging to obtain preprocessed text. Specifically, data related to the construction of a public knowledge graph for an enterprise financial system is collected from various data sources. The data sources include structured databases, semi-structured web pages, unstructured texts, etc. The collected data includes data related to account books, subjects, periods, and trading units. Among them, the sources of various data sources include basic data of the enterprise's internal financial system, external industry reports, public databases, etc. The collected data related to the construction of a public knowledge graph for an enterprise financial system can be displayed in the form of a data table for easy viewing.
[0048] The corresponding query items and query relations in the preprocessed text are identified from the pre-trained entity library, and the parameters of the first natural language processing model are updated based on the two. After several rounds of training, the nodes of the public knowledge graph and the edges connecting them are constructed based on the query items and query relations obtained in the final round of training. The entity recognition process is as follows: the input text is preprocessed by word segmentation, part-of-speech tagging and other preprocessing operations to obtain the preprocessed text; features are extracted from the preprocessed text, such as using rule-based feature extraction methods to extract features based on part of speech, word form, context, etc., and features can also be learned from the preprocessed text based on methods such as convolutional neural networks (CNN) and recurrent neural networks (RNN); then the part-of-speech tagged data and the extracted features are used to train the first natural language processing model, such as the maximum entropy model (Maximum EntropyModel), conditional random fields (Conditional Random Fields), etc.; the trained first language processing model is used to perform entity recognition prediction on the new text. During the prediction process, the optimal entity boundary and category combination is found by decoding using heuristic methods such as the Viterbi Algorithm. The relationship extraction process is as follows. As mentioned above, the input text is preprocessed by word segmentation, part-of-speech tagging and other preprocessing operations to obtain preprocessed text; named entity recognition technology is used to identify named entities from the preprocessed text; based on the part-of-speech tags corresponding to all the identified entities, the relationship between all entities is learned, such as using rule-based methods and sequence-based tagging methods to learn the relationship between all entities; the trained first language processing model is used to predict entity relationship extraction for new texts. During the prediction process, heuristic methods such as K-nearest neighbor algorithm are used for classification. Finally, the relationship between entities is extracted from the text, such as "account book A contains account B", "the name of the trading unit C is E when the period is D", etc. The identified entities and relationships are vectorized and stored in the public knowledge graph to form a structured knowledge representation. The entities correspond to the nodes of the public knowledge graph, and the relationships correspond to the edges of the public knowledge graph. The nodes of the public knowledge graph and the edges connecting them are constructed based on entity recognition and relationship extraction.
[0049] The query text is converted into a preprocessed query text having the same format as the preprocessed text. The query text is preprocessed by removing special characters, numbers, pauses, extra spaces, repeated words, etc. from the query text to convert the query text into a preprocessed query text having the same format as the preprocessed text.
[0050] Combine the preprocessed text to be queried with the public knowledge graph for intent recognition and entity recognition. In a specific example, query a certain account balance sheet, and ID the sentence, slot label (key information in the sentence, such as date, amount, etc.), and intent (the purpose of the user's query, such as querying the balance) and save them in a file, that is, convert the processed data (sentences, slot labels, intents) into corresponding IDs. Input the list of sentences, the list of the length of each sentence, the slot list, and the intent list into the model, and use the model to predict the slot list and intent list. Calculate the loss of slots, intents, and actual values through loss functions such as the NLLLoss function (only accepts data after log_softmax), and then select the Adam function to optimize the loss to perform intent recognition on the preprocessed text to be queried. Then, combine the preprocessed text to be queried with the public knowledge graph for entity recognition. Based on the trained first natural language processing model, identifiable query items are extracted, query conditions suitable for the public knowledge graph are constructed based on the identifiable query items, corresponding identifiable nodes are screened out from the public knowledge graph based on the query conditions, and the selected frequency values corresponding to the edges connecting the identifiable nodes are calculated. The selected frequency value refers to the frequency at which the identifiable nodes are selected within a period of time. The selected frequency value is compared with the preset frequency threshold to screen out the target edges among the edges connecting the identifiable nodes. If the selected frequency value is greater than or equal to the frequency threshold, it means that the query relationship is selected more frequently in the public knowledge graph, that is, it is a frequently used query relationship. Based on this, it is screened out from the public knowledge graph. Further, based on the screened target edges, the connected target nodes are determined from the identifiable nodes, and a sub-knowledge graph is constructed based on the target nodes and target edges. The schematic diagram of the constructed sub-knowledge graph is as shown in the figure. Figure 3 As shown in the figure, the sub-knowledge graph corresponds to the public knowledge graph. For the corresponding query text, it can provide personalized query methods for different business query needs based on the sub-knowledge graph, which is conducive to narrowing the query scope.
[0051] The Louvain algorithm is a community discovery algorithm based on modularity. Specifically, if there are two nodes i and j in the same community and there is a weight w between them ij The contribution of this edge to the new node after the merger is w ij. If there are multiple such node pairs in the community, it is necessary to add up the weights between them to obtain the total weight within the community, that is, the self-loop weight of the new node. Based on this, according to the Louvain algorithm, the weight values corresponding to the edges connected to each identifiable node of the sub-knowledge graph in the public knowledge graph are traversed and added to obtain the weight value of the sub-knowledge graph in the public knowledge graph, and then the weight value of the sub-knowledge graph in the public knowledge graph is compared with the preset weight threshold. If the weight value of the sub-knowledge graph in the public knowledge graph is greater than or equal to the preset weight threshold, it means that the probability of the sub-knowledge graph being selected as a whole is relatively high, and the sub-knowledge graph is marked. When the text to be queried is received again, the corresponding data is queried directly based on the sub-knowledge graph, which simplifies the process of querying commonly used financial data, ensures that the queries of commonly used data and uncommon data have corresponding differentiation, and reduces the problem of untimely query response.
[0052] According to some embodiments of the present invention, please refer to Figure 4 As shown, the present invention also provides an intelligent financial query device 200, the device comprising: The first module 201 is used to construct nodes of a public knowledge graph and edges connecting them based on query items and query relationships for an enterprise financial system; The second module 202 is used to filter out identifiable nodes in the public knowledge graph based on the query items in the query text; The third module 203 is used to determine the target edge from the edges connecting the identifiable nodes and determine the target node among the identifiable nodes based on the target edge, and construct a sub-knowledge graph based on the target node and the target edge; The fourth module 204 is used to determine the weight value of the sub-knowledge graph in the public knowledge graph in response to the enterprise financial system receiving the query text again, and select the sub-knowledge graph or the public knowledge graph to output the corresponding query result based on the weight value.
[0053] It should be noted that each module in the above-mentioned intelligent financial query device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0054] According to another aspect of the present invention, an electronic device is provided. The electronic device may be a server. Figure 5As shown. The electronic device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned intelligent financial query method is implemented.
[0055] According to another aspect of the present invention, a computer readable storage medium is provided. Figure 6 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, the above-mentioned intelligent financial query method is implemented.
[0056] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0057] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0058] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An intelligent financial query method, characterized in that: include: Construct nodes of a public knowledge graph and the edges connecting them based on query items and query relationships for enterprise financial systems; Filter out identifiable nodes in the public knowledge graph based on the query items in the text to be queried; Determine a target edge from the edges connecting the identifiable nodes and determine a target node among the identifiable nodes based on the target edge, and construct a sub-knowledge graph based on the target node and the target edge; In response to the enterprise financial system receiving the text to be queried again, the weight value of the sub-knowledge graph in the public knowledge graph is determined, and based on the weight value, the sub-knowledge graph or the public knowledge graph is selected to output the corresponding query result.
2. The intelligent financial query method according to claim 1, characterized in that: The step of determining a target edge from the edges connected between the identifiable nodes and determining a target node among the identifiable nodes based on the target edge comprises: Calculate the selected frequency values corresponding to the edges connecting the identifiable nodes respectively; Filter out a target edge among the edges connecting the identifiable nodes based on the selected frequency value being greater than or equal to a frequency threshold; A connected target node is determined from the identifiable nodes based on the target edge.
3. The intelligent financial query method according to claim 1, characterized in that: The step of determining the weight value of the sub-knowledge graph in the public knowledge graph includes: The weight values corresponding to the edges connected to each identifiable node of the sub-knowledge graph in the public knowledge graph are traversed and added up to obtain the weight value of the sub-knowledge graph in the public knowledge graph.
4. The intelligent financial query method according to claim 3, characterized in that: The step of selecting the sub-knowledge graph or the public knowledge graph based on the weight value to output the corresponding query result includes: If the weight value of the sub-knowledge graph in the public knowledge graph is greater than or equal to a preset weight threshold, output the corresponding query result based on the sub-knowledge graph; If the weight value of the sub-knowledge graph in the public knowledge graph is less than the preset weight threshold, the corresponding query result is output based on the public knowledge graph.
5. The intelligent financial query method according to claim 1, characterized in that: The step of constructing nodes of a public knowledge graph and edges connecting them based on query items and query relationships for an enterprise financial system includes: The first natural language processing model is trained to extract texts related to building a public knowledge graph from several existing data sources and segment and tag the texts to obtain preprocessed texts. Identify the corresponding query items and query relationships in the preprocessed text from the pre-trained entity library, and update the parameters of the first natural language processing model based on the two; The first natural language processing model is trained for several rounds, and the nodes of the public knowledge graph and the edges connecting them are constructed based on the query items and query relationships obtained from the final round of training of the first natural language processing model.
6. The intelligent financial query method according to claim 5, characterized in that: The step of identifying corresponding query items and query relationships in the preprocessed text from the pre-trained entity library includes: Based on the pre-trained entity library, corresponding entities in the pre-processed text are identified and used as query items; Based on the part-of-speech tags corresponding to all the identified entities, the relationship between all the entities is learned and used as the query relationship.
7. The intelligent financial query method according to claim 5, characterized in that: The step of filtering out identifiable nodes in the public knowledge graph based on the query items in the text to be queried includes: Converting the text to be queried into a preprocessed text to be queried in the same format as the preprocessed text; Extracting identifiable query items from the preprocessed text to be queried based on the trained first natural language processing model and constructing query conditions applicable to the public knowledge graph based on the identifiable query items; Based on the query condition, corresponding identifiable nodes are filtered out from the public knowledge graph.
8. An intelligent financial inquiry device, characterized in that: The device comprises: The first module is used to construct nodes of a public knowledge graph and the edges connecting them based on query items and query relationships for enterprise financial systems; The second module is used to filter out identifiable nodes in the public knowledge graph based on the query items in the text to be queried; A third module is used to determine a target edge from the edges connecting the identifiable nodes and determine a target node among the identifiable nodes based on the target edge, and construct a sub-knowledge graph based on the target node and the target edge; The fourth module is used to determine the weight value of the sub-knowledge graph in the public knowledge graph in response to the enterprise financial system receiving the text to be queried again, and select the sub-knowledge graph or the public knowledge graph to output the corresponding query result based on the weight value.
9. An electronic device, characterized in that: include: at least one processor; as well as A memory, wherein the memory stores a computer program that can be executed in the processor, and the processor executes the intelligent financial query method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the intelligent financial query method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
A multi-strategy fusion knowledge question and answer method and system
CN109918489A
Intelligent learning platform and construction method thereof
CN110888989A
Knowledge graph-based case retrieval method, device and equipment, and storage medium
CN111241241A
Intelligent search system based on knowledge graph
CN114218472A
Sub-graph-based tense knowledge graph question and answer method
CN114706951A
Cited By
Regional development element data processing method and system
CN120355107A
A method and system for processing regional development factor data
CN120355107B
Multi-source heterogeneous data fusion type financial analysis report generation method and system and medium
CN120781987A
Multi-source heterogeneous data fusion type financial analysis report generation method and system and medium
CN120781987B
