Intelligent question answering method and system based on AI

By quantifying the matching of user inquiry text and knowledge graph in the Q&A system, filtering high-intensity semantic vocabulary and adjusting the parsing process, the problem of inaccurate semantic importance of keywords is solved, and more efficient and accurate Q&A results are achieved.

CN120407741AActive Publication Date: 2025-08-01HENAN KUKE CULTURE SCI & TECH CO LTD

Patent Information

Application Number
CN202510478798.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-01
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

When facing different input word orders and narrative habits, the existing question-and-answer system based on the transfomer model has problems of inaccurate sorting of keyword semantic importance, resulting in ambiguity in semantic understanding and affecting the accuracy of question-and-answer.

Method used

By matching the vocabulary in the user's query text with the knowledge graph nodes, quantifying the semantic intensity and distribution of marker vocabulary, establishing an analytical channel, filtering high-intensity semantic vocabulary, adjusting the analysis process to ensure accurate semantic weights, and generating reply texts based on the knowledge graph.

Benefits of technology

The semantic analysis efficiency and accuracy of the question-and-answer system are improved, the keyword recognition and analysis process is optimized, and the output answers are consistent with the semantics of user inquiry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407741A_ABST
    Figure CN120407741A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of semantic processing and knowledge maps, and provides an AI-based intelligent question-answering method and system, and the method comprises the steps: collecting a knowledge map of an intelligent question-answering library, and obtaining an inquiry text of a user; performing word segmentation on the inquiry text to obtain a plurality of vocabularies; obtaining a reply design scale of the inquiry text; determining the number of analysis queues and establishing a plurality of analysis channels; obtaining the semantic intensity of each marked vocabulary and obtaining a high-intensity semantic vocabulary sequence; quantizing the analysis contribution of each mark vocabulary at each moment and the initial analysis limit at each moment, and further obtaining the buffer semantic integrity retention degree at each moment; judging and establishing a buffer space in real time, adjusting an analysis process, and finally outputting a semantic weight of each vocabulary; and screening a plurality of core vocabularies, obtaining a relation path in combination with the knowledge graph, and further generating a reply text. The invention aims to solve the problem that semantic weight acquisition is inaccurate due to word order interference in text keyword analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of semantic processing and knowledge graph, and particularly relates to an AI-based intelligent question-answering method and system. Background Art

[0002] When existing question-answering is performed based on the transfomer and transfomer-like models, the keyword vocabulary in the user input question sentence is processed in parallel to achieve the ability to quickly and accurately understand the user's semantics. However, in the actual application input process, due to the different input word orders and narrative habits of users faced by the question-answering system, the distribution positions of the main keywords and the influence and association situations between the vocabulary are different. Therefore, when the question-answering model parallelly identifies the user's keywords, there is an understanding ambiguity problem that the semantic importance of the keywords recognized later is higher than that of the keywords recognized earlier.

[0003] In the prior art, for the attention allocation method of the semantic recognition process for the semantic ambiguity problem, the word order of the keywords is used as the analysis order of the question-answering content. Then, when the keywords with a higher word order complete the analysis, the keywords with a lower word order just start to be analyzed, resulting in the semantic weight of the keywords with a lower word order being unable to affect the analysis results of the previous keywords, leading to different knowledge domains of the keywords, and thus the semantic focus of the output answer text is different from the semantics of the question; and by setting a buffer area in the parsing process for the queue order during the keyword parsing process, and further through the semantic information between the current keyword and the remaining keywords included in the parameter of the keyword parsing result passed back in the buffer area, relying on the semantic tendency of the descriptive vocabulary, the back transmission of the parsed parameters in the network is controlled, so as to achieve the parsing of the actual semantic focus of the question-answering under different interrogation methods. Summary of the Invention

[0004] The present invention provides an AI-based intelligent question-answering method and system to solve the problem that the existing text keyword parsing is interfered by the word order and the semantic weight acquisition is inaccurate. The specific technical solutions adopted are as follows:

[0005] The present invention proposes an AI-based intelligent question-answering method, which includes the following steps:

[0006] Collect the knowledge graph of the intelligent question-answering library and obtain the user's interrogation text;

[0007] Segment the interrogation text to obtain a number of words; according to the word vector similarity relationship between each word and the nodes in the knowledge graph, quantify the marking times of each node and obtain a number of marked words; combine the distribution of the nodes with marks to obtain the reply design scale of the interrogation text; combine the proportion of the number of marked words in the interrogation text to determine the number of parsing queues and establish a number of parsing channels;

[0008] Determine the analysis range of each marked word according to the distribution of marked words in the query text; obtain the semantic intensity of each marked word based on the word vector similarity between other words and the marked word in the analysis range, as well as the occurrence probability of the same other words in different analysis ranges of the same marked word; screen the marked words in descending order of semantic intensity to obtain a high-intensity semantic word sequence;

[0009] Input the marked words into the parsing network based on the high-intensity semantic word sequence to obtain the parsing process of each step at each moment; according to the parsing process corresponding to the marked words, quantify the parsing contribution of each marked word and the initial parsing limit at each moment, and then obtain the buffer semantic integrity retention degree at each moment; based on the buffer semantic integrity retention degree, judge and establish a buffer space in real time, and adjust the parsing process, and finally output the semantic weight of each word;

[0010] Screen several core words based on the semantic weights, and combine the knowledge graph to obtain a relationship path, and then generate a reply text.

[0011] Optionally, the specific method for quantifying the marking times of each node and obtaining several marked words includes:

[0012] Obtain the word vectors of each word in the query text and the word vectors of the words corresponding to each node in the knowledge graph;

[0013] If the similarity between the word vector of any word in the query text and the word vector of the word corresponding to any node is greater than the matching threshold, use the word in the query text as a marked word, and the word in the query text marks the node once;

[0014] And so on, obtain all the marked words in the query text, and mark the nodes to obtain the marking times of each node.

[0015] Optionally, the specific method for obtaining the reply design scale of the query text includes:

[0016] Obtain the distance between any two marked nodes in the knowledge graph;

[0017] According to the marking times of the nodes and their average distance from other marked nodes, obtain the marking scale of each marked node. The marking scale is positively correlated with the marking times, and the marking scale is negatively correlated with the average distance;

[0018] Accumulate the marking scales of all marked nodes to obtain the reply design scale of the query text.

[0019] Optionally, the specific method for obtaining the number of parsing queues is:

[0020] According to the proportion of the marked words in the query text among all words, combined with the scale of the reply design, the number of parsing queues is obtained, and the number of parsing queues is positively correlated with both the proportion and the scale of the reply design.

[0021] Optionally, the analysis range of each marked word is specifically obtained as follows:

[0022] For any marked word in the query text, obtain several other words before and after the word order of the marked word, and the other words are non-marked words. Stop obtaining until another marked word is traversed. All the obtained other words form the analysis range of the marked word.

[0023] Optionally, the specific methods for obtaining the semantic intensity of each marked word include:

[0024] For any other word in the analysis range of any marked word, obtain the similarity between the word vector of the other word and the word vector of the marked word, and use it as the semantic relevance of the other word;

[0025] Obtain several marked words in the query text that have the same word vector as the marked word, and use them as several reference words for the marked word. Use the frequency of the other word appearing in the analysis ranges of the marked word and all its reference words as the co-occurrence probability of the other word and the marked word;

[0026] For all other words in the analysis range of the marked word, perform a weighted sum of the semantic relevance with the co-occurrence probability as the weight. Use the ratio of the obtained sum value to the number of words in the analysis range of the marked word as the semantic intensity of the marked word.

[0027] Optionally, the specific methods for quantifying the parsing contribution of each marked word at each moment and the initial parsing limit at each moment, and then obtaining the buffer semantic integrity retention degree at each moment include:

[0028] The parsing process of each step at each moment includes the parsing or feedback of each word. For any moment and any high-intensity semantic word, obtain the difference between the number of steps for the high-intensity semantic word to complete parsing and the number of steps for feedback at this moment, and combine the semantic intensity of the high-intensity semantic word to obtain the parsing contribution of the high-intensity semantic word;

[0029] Obtain the ratio of the number of words that have entered the parsing process at this moment to the number of words in the high-intensity semantic word sequence as the initial parsing limit at this moment;

[0030] For several words that have entered the parsing process at this moment, calculate the skewness based on the parsing contributions of each word, and combine the initial parsing limit at this moment to obtain the buffer semantic integrity retention degree at this moment. The buffer semantic integrity retention degree has a positive correlation with both the skewness and the initial parsing limit.

[0031] Optionally, the specific method for judging and establishing a buffer space in real time based on the buffer semantic integrity retention degree, adjusting the parsing process, and finally outputting the semantic weights of each word includes:

[0032] Set a buffer threshold. During the operation of the parsing network, when the buffer semantic integrity retention degree of a moment appears greater than the buffer threshold for the first time, establish a buffer space, put all the parsing processes of this moment into the buffer space, re - sort the several words in the parsing process in the buffer space in descending order according to the corresponding semantic intensity, and re - allocate the parsing processes of subsequent moments;

[0033] Continue to parse and back - propagate the high - intensity semantic words until the buffer semantic integrity retention degree of a moment appears greater than the buffer threshold again, establish a buffer space and re - allocate the parsing process;

[0034] And so on. After all the high - intensity semantic words are parsed and back - propagated, other marked words and other words are normally input into the parsing network for parsing and back - propagation, and no buffer space is established until the parsing and back - propagation of all words in the query text are completed, and the parsing network outputs the semantic weights of each word.

[0035] Optionally, the specific method for screening several core words based on the semantic weights and obtaining the relationship path by combining with the knowledge graph includes:

[0036] Arrange all the words in the query text in descending order of semantic weights to obtain a semantic weight word sequence; use the Top - K method to obtain the first K words in the semantic weight word sequence and use them as core words;

[0037] Obtain the nodes marked by each core word in the knowledge graph, sort the nodes corresponding to each core word in descending order of semantic weights to obtain a core word node traversal sequence;

[0038] Obtain the shortest path between adjacent nodes in the core word node traversal sequence in the knowledge graph, and connect each shortest path in the node order to obtain a relationship path.

[0039] The present invention also proposes an AI - based intelligent question - answering system, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the above - mentioned method.

[0040] The beneficial effects of the present invention are as follows: By matching the words in the query text with the nodes in the knowledge graph, the marked words and the marked nodes are obtained. Then, according to the distribution of the marked nodes and the number of markings, the design scale of the response text is determined, and the resource scale required for keyword parsing in the query text is preliminarily judged. Further, in combination with the number of marked words, the marked words are allocated for subsequent parsing to establish a parsing channel; the other words before and after the order of the marked words are all related to the description prompts of the marked words, and can play a further analysis between the marked words and the corresponding marked nodes during the knowledge graph matching and overlapping process. Their associated manifestations, such as multiple simultaneous occurrences and the similarity relationship between the semantics reflected by the word vectors, further indicate the semantic intensity of the marked words. The high-intensity semantic words are selected as the basis for semantic parsing to extract the keyword main structure of the query text; through the parsing network constructed by the parsing channel and the parsing process at each moment, the necessity of establishing the buffer space at each moment is quantified, that is, the buffer semantic integrity retention degree, which presents the possibility that the semantic results of the words at the corresponding moment are affected by other semantics. Further, the parsing process is adjusted by combining the buffer space and the semantic intensity to ensure that the semantics parsed by the words with higher semantic intensity are more accurate; the parsing network outputs the semantic weights of each word, which can be used to screen out the most critical words for answer generation, as the core words, and combine them with the corresponding nodes in the knowledge graph to generate a relationship path, so as to optimize the semantic parsing efficiency of the query text and improve the accuracy, and finally complete an efficient intelligent question and answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0042] Figure 1 Schematic diagram of a process of an AI-based intelligent question and answer method provided by an embodiment of the present invention;

[0043] Figure 2 Schematic diagram of a user inputting a query text through a client;

[0044] Figure 3 Schematic diagram of the result obtained by segmenting the query text;

[0045] Figure 4 Schematic diagram of the parsing process of each step in the parsing network. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0047] Please refer to Figure 1 , which shows a flowchart of an AI-based intelligent question-answering method provided by an embodiment of the present invention. The method includes the following steps:

[0048] Step S001: Collect the knowledge graph of the intelligent question-answering library and obtain the user's query text.

[0049] The purpose of this embodiment is to match in the knowledge graph of the intelligent question-answering library based on the user's query text, and then generate a reply text to achieve AI intelligent question-answering. In the matching and analysis process, it is necessary to consider the influence of word order on the semantic weight of keywords in the query text. Therefore, it is first necessary to obtain the corresponding knowledge graph and the query text input by the user.

[0050] Specifically, the user inputs text in the client of the intelligent question-answering as the user's query text, as shown in Figure 2 .

[0051] Step S002: Obtain several words by word segmentation of the query text; quantify the marking times of each node according to the word vector similarity relationship between each word and the nodes in the knowledge graph and obtain several marked words; combine the distribution of the nodes with marks to obtain the reply design scale of the query text; determine the number of parsing queues and establish several parsing channels in combination with the proportion of the number of marked words in the query text.

[0052] It should be noted that the user's questioning method and the number of knowledge points required are related to the number of parses. Therefore, it is necessary to match and overlap several words obtained by word segmentation of the query text with the knowledge graph, mark the corresponding nodes, and the marked times and distribution of the marked nodes reflect the scale involved in the parsing process of the query text, so as to obtain the reply design scale; and the establishment of the parsing channel needs to consider the number of important words on the basis of the design scale, that is, the words of the successfully marked nodes, that is, the parsing mainly focuses on the important words for parsing, and then completes the establishment of the parsing channel.

[0053] Preferably, in an embodiment of the present invention, obtaining several words by word segmentation of the query text includes the following specific methods:

[0054] Use Jieba word segmentation to segment the user's query text to obtain several words, as shown in Figure 3As shown; Jieba word segmentation is an existing technology and will not be elaborated in this embodiment; specifically, in the case of exactly the same vocabulary, it is still treated as multiple vocabularies for subsequent processing, and the same vocabularies are not merged.

[0055] It should be noted that during the matching process of vocabulary and nodes, the matching is based on the similarity relationship of word vectors. When a certain similarity is reached, the vocabulary successfully marks the node and subsequent processing is performed.

[0056] Preferably, in an embodiment of the present invention, according to the similarity relationship of word vectors between each vocabulary and nodes in the knowledge graph, the marking times of each node are quantified to obtain several marked vocabularies. The specific method includes:

[0057] Obtain the word vectors of each vocabulary in the query text and the word vectors of the corresponding vocabularies of each node in the knowledge graph; preset a matching threshold, and in this embodiment, the matching threshold is described using 0.8; if the similarity between the word vector of a vocabulary in the query text and the word vector of the corresponding vocabulary of any node is greater than the matching threshold, the vocabulary in the query text is used as a marked vocabulary, and the vocabulary in the query text marks the node once; and so on, obtain all the marked vocabularies in the query text and mark the nodes to obtain the marking times of each node.

[0058] It should be noted that the similarity of word vectors is calculated using the Pearson correlation coefficient in this embodiment; different vocabularies in the query text may successfully mark the same node in the knowledge graph, so the marking times of the node may be greater than 1; at the same time, if any vocabulary matches multiple nodes in the knowledge graph successfully, the node corresponding to the maximum similarity is used as the node marked by the vocabulary.

[0059] Preferably, in an embodiment of the present invention, in combination with the distribution of marked nodes, the reply design scale of the query text is obtained. The specific method includes:

[0060] Obtain the distance between any two marked nodes in the knowledge graph; according to the marking times of the nodes and their average distances from other marked nodes, obtain the marking scale of each marked node. The marking scale is positively correlated with the marking times, and the marking scale is negatively correlated with the average distance; accumulate the marking scales of all marked nodes to obtain the reply design scale of the query text.

[0061] As an example, the calculation method of the reply design scale m is:

[0062]

[0063] where G represents the number of marked nodes, n g represents the marking times of the g-th marked node, represents the average distance between the node with the g-th existence mark and other nodes with existence marks. represents the mark scale of the node with the g-th existence mark.

[0064] It should be noted that the larger the number of marks of the node itself, the larger the design scale of the reply text is required to satisfy the parsing of more vocabulary. And the smaller the distance between the marked nodes, that is, the denser the distribution, the more parsing channels need to be established for parsing in the densely distributed knowledge graph, and thus the larger the design scale.

[0065] Preferably, in an embodiment of the present invention, in combination with the proportion of the number of marked vocabulary in the query text, the number of parsing queues is determined and several parsing channels are established. The specific method includes:

[0066] According to the proportion of the number of marked vocabulary in all vocabulary in the query text, in combination with the reply design scale, the number of parsing queues is obtained. The number of parsing queues has a positive correlation with both the proportion and the reply design scale.

[0067] As an example, the calculation method of the number of parsing queues F is:

[0068]

[0069] where m represents the reply design scale, N h represents the number of marked vocabulary, and N0 represents the total number of vocabulary in the query text. represents the ceiling function.

[0070] It should be noted that on the basis of the design scale, parsing channels are constructed in combination with the proportion of marked vocabulary, that is, parsing channels are allocated to the marked vocabulary.

[0071] Furthermore, the server of the intelligent Q&A library retrieves idle computing resources and establishes F parsing channels.

[0072] So far, by matching the vocabulary in the query text with the nodes in the knowledge graph, the marked vocabulary and the marked nodes are obtained. And according to the distribution of the marked nodes and the number of marks, the design scale of the reply text is determined, and the resource scale required for keyword parsing in the query text is initially judged. Further, in combination with the number of marked vocabulary, the marked vocabulary is allocated for subsequent parsing, and thus parsing channels are established.

[0073] Step S003: Determine the analysis scope of each marked word according to the distribution of marked words in the query text; based on the word vector similarity between other words in the analysis scope and the marked words, as well as the occurrence probability of the same other words in different analysis scopes of the same marked word, obtain the semantic intensity of each marked word; screen the marked words in descending order of semantic intensity to obtain a high-intensity semantic word sequence.

[0074] It should be noted that after the marked words successfully mark the nodes, it is necessary to combine the descriptions of other non-marked words before and after the marked words to further overlap with the knowledge graph, so as to judge the user's query request. Then, it is necessary to determine the analysis scope of the marked words through other non-marked words, and further quantify the semantic intensity of the marked words based on the association performance between other words and the marked words. Then, in the subsequent parsing process, the parsing is carried out according to the order of semantic intensity.

[0075] Preferably, in an embodiment of the present invention, determining the analysis scope of each marked word according to the distribution of marked words in the query text includes the following specific methods:

[0076] For any marked word in the query text, obtain several other words before and after the word order of the marked word. The other words are non-marked words, and stop obtaining until other marked words are traversed. All the obtained other words form the analysis scope of the marked word.

[0077] Preferably, in an embodiment of the present invention, obtaining the semantic intensity of each marked word based on the word vector similarity between other words in the analysis scope and the marked words, as well as the occurrence probability of the same other words in different analysis scopes of the same marked word, includes the following specific methods:

[0078] For any other word in the analysis scope of any marked word, obtain the similarity between the word vector of the other word and the word vector of the marked word, and use it as the semantic relevance of the other word.

[0079] Furthermore, obtain several marked words in the query text that have the same word vector as the marked word, that is, the same words corresponding to different word segmentations in the query text, and use them as several reference words of the marked word. Use the frequency of the other word appearing in the analysis scope of the marked word and all its reference words as the co-occurrence probability of the other word and the marked word; it should be noted that if the other word appears multiple times in one analysis scope, that is, other words with the same word vector appear multiple times in the same analysis scope, only count it once. Then the frequency is the ratio of the number of times the other word appears in the analysis scope of the marked word and all its reference words to the number of analysis scopes of the marked word and all its reference words.

[0080] Further, for all other words in the analysis scope of the marked word, the semantic relevance is weighted and summed with the co-occurrence probability as the weight, and the ratio of the obtained sum value to the number of words in the analysis scope of the marked word is used as the semantic intensity of the marked word.

[0081] As an example, the semantic intensity Q of the marked word w w is calculated as follows:

[0082]

[0083] where N' w represents the number of words in the analysis scope of the marked word w, P w,i represents the co-occurrence probability between the i-th other word in the analysis scope of the marked word w and the marked word w, and c w,i represents the semantic relevance of the i-th other word in the analysis scope of the marked word w.

[0084] It should be noted that in the process of quantifying the semantic intensity of the marked word, it is comprehensively quantified based on the relevance between other words in the analysis scope. At the same time, for other words, the co-occurrence probability is used as a reference weight, that is, the more times the two appear simultaneously, the greater the correlation between them, and the greater the correlation, the greater the semantic intensity.

[0085] Furthermore, it should be noted that on the basis of not parsing words according to word order, for words with higher semantic intensity, their parsing priority should be higher. Then, high-intensity semantic words need to be screened. The structure between high-intensity semantic words builds the main semantic structure of the query text. During the parsing process, attention should be paid to the main semantic structure of the text first to highlight the actual key points of the query text, rather than analyzing all global words at the same time, which may interfere with the influence of the word order distribution of words on the actual semantic structure.

[0086] Preferably, in an embodiment of the present invention, the method for obtaining a high-intensity semantic word sequence by screening the marked words in descending order of semantic intensity includes the following specific methods:

[0087] Sort all marked words in descending order of semantic intensity to obtain a semantic intensity word sequence; obtain a semantic intensity difference sequence through first-order difference. The difference process is the semantic intensity of the previous marked word in the semantic intensity word sequence minus the semantic intensity of the next marked word. Then, the semantic intensity difference sequence is a series of differences arranged in order; the two marked words corresponding to the maximum difference value in the semantic difference sequence are used as segmenting words; the previous segmenting word among the two segmenting words in the semantic intensity word sequence and all marked words before it are used as high-intensity semantic words, and a high-intensity semantic word sequence is obtained by sorting them in descending order of semantic intensity.

[0088] So far, the other words before and after the marked vocabulary order are all related to the description prompts of the marked vocabulary, and can play a further analysis between the marked vocabulary and the nodes of the corresponding marks during the knowledge graph matching and overlapping process. Their associated manifestations, such as appearing simultaneously multiple times and the similarity relationship between the semantics reflected by the word vectors, further indicate the semantic intensity of the marked vocabulary. High-intensity semantic words are selected as the basis for semantic parsing to extract the keyword main structure of the query text.

[0089] Step S004: Input the marked vocabulary into the parsing network based on the high-intensity semantic word sequence to obtain the parsing processes of each step at each moment; according to the parsing processes corresponding to the marked vocabulary, quantify the parsing contributions of each marked vocabulary and the initial parsing limitations at each moment, and then obtain the buffer semantic integrity retention degree at each moment; based on the buffer semantic integrity retention degree, judge and establish a buffer space in real time, and adjust the parsing process, and finally output the semantic weights of each word.

[0090] It should be noted that after screening the high-intensity semantic words, the parsing is carried out in the order of high-intensity semantic words, other marked words, and other words. The parsing channel has been established, and in the parsing process, after inputting the words in order and parsing them process by process, the semantic weights generated by the parsing are reversely transmitted to the previous processes (steps), as Figure 4 shown, which shows the process of parsing and transmitting word X1, X2, and X3 one by one. Taking 3 parsing channels as an example; then through parsing and transmission, the parsing accuracy when the same word, such as X1, appears again next time is ensured.

[0091] Furthermore, it should be noted that during the process-by-process parsing of high-intensity semantic words, when more high-intensity semantic words complete relatively later parsing processes and fewer complete all transmission processes, a buffer space is established at this time, and the parsing process and transmission process in the buffer space are adjusted according to the semantic intensity, so as to avoid the influence of the order on the semantic weights of high-intensity semantic words.

[0092] Preferably, in an embodiment of the present invention, inputting the marked vocabulary into the parsing network based on the high-intensity semantic word sequence to obtain the parsing processes of each step at each moment includes the following specific methods:

[0093] According to the established F parsing channels, high-intensity semantic words are input into the parsing network one by one according to the high-intensity semantic word sequence, and the parsing is carried out downward one by one for each parsing channel, and backpropagation starts after all parsing channels are completed, that is, backpropagation is carried out upward one by one for each parsing channel; after the input of high-intensity semantic words is completed, other marked words are continuously input according to the semantic intensity word sequence. After all marked words are input, the other words in the query text except the marked words are input according to the word order in the query text; for each parsing channel in the parsing network, the parsing channel corresponds to a step, and the parsing process of each step at each moment is generated, that is, which word is being parsed or backpropagated at each step at each moment.

[0094] It should be noted that based on the parsing process of each step at each moment, it is necessary to judge in real time the necessity of establishing a buffer space at this time, that is, how many words in the buffer space established at this time have not completed all backpropagation steps, and a relatively large number of parsing steps have been completed. That is, in this case, its semantic content is easily affected by the semantic parsing results of other words, so it is necessary to adjust the parsing or backpropagation process by establishing a buffer space to eliminate this influence.

[0095] Preferably, in an embodiment of the present invention, according to the parsing process corresponding to the marked words, the parsing contribution of each marked word at each moment and the initial parsing limit at each moment are quantified, and then the buffer semantic integrity retention degree at each moment is obtained. The specific method included is as follows:

[0096] For any moment and any high-intensity semantic word, the difference obtained by subtracting the number of steps completed for backpropagation from the number of steps completed for parsing of the high-intensity semantic word at this moment is combined with the semantic intensity of the high-intensity semantic word to obtain the parsing contribution of the high-intensity semantic word.

[0097] As an example, the parsing contribution γ v,t of the high-intensity semantic word v at the t-th moment is calculated as follows:

[0098]

[0099] where Q v represents the semantic intensity of the high-intensity semantic word v, Q max represents the maximum value among the semantic intensities of all marked words, H v,t represents the number of steps completed for parsing of the high-intensity semantic word v at the t-th moment, and R v,t represents the number of steps completed for backpropagation of the high-intensity semantic word v at the t-th moment.

[0100] It should be noted that after obtaining the difference by subtracting the number of backpropagation steps from the number of parsing steps, it reflects the parsing depth of high-intensity semantic words at the corresponding moment. The greater the parsing depth, the more easily it is affected by the semantics of other words. Combining with a greater semantic intensity, the corresponding parsing contribution is greater.

[0101] Furthermore, obtain the ratio of the number of words that have entered the parsing process at any moment to the number of words in the high-intensity semantic word sequence as the initial parsing limit at that moment; it should be noted that the words that have entered the parsing process are the words that have been input into the parsing network, that is, they have started the parsing process from the first parsing channel (step), and the number of words that have entered the parsing process includes the high-intensity semantic words that have completed the entire backpropagation process.

[0102] Furthermore, for a number of words that have entered the parsing process at that moment, calculate the skewness based on the parsing contribution of each word, and combine the initial parsing limit at that moment to obtain the buffer semantic integrity retention degree at that moment. The buffer semantic integrity retention degree has a positive correlation with both the skewness and the initial parsing limit.

[0103] As an example, the buffer semantic integrity retention degree δ at the t-th moment t is calculated as follows:

[0104]

[0105] where y t represents the initial parsing limit at the t-th moment, p t represents the number of words that have entered the parsing process at the t-th moment, γ q,t represents the parsing contribution of the q-th high-intensity semantic word at the t-th moment, represents the average parsing contribution of all words that have entered the parsing process at the t-th moment, and σ(γ t ) represents the standard deviation of the parsing contributions of all words that have entered the parsing process at the t-th moment.

[0106] It should be noted that when the initial parsing limit is larger, that is, the more input words, and if the skewness is larger, that is, the parsing contributions are more biased towards the same value, the parsing contributions are similar. At this time, establishing a buffer space to adjust the parsing process is more likely to reduce the influence between semantic results.

[0107] Preferably, in an embodiment of the present invention, based on the buffer semantic integrity retention degree, a buffer space is established and the parsing process is adjusted in real time, and finally the semantic weights of each word are output. The specific method includes:

[0108] Set a buffer threshold. In this embodiment, the buffer threshold is described using 3. During the process of running the parsing network, when the buffer semantic integrity retention degree at a certain moment is greater than the buffer threshold for the first time, a buffer space is established, and all the parsing processes at that moment are put into the buffer space. For several words (either in the parsing process or in the feedback process) in the buffer space, they are re-sorted in descending order according to the corresponding semantic intensity, and the parsing processes for subsequent moments are re-allocated. For example Figure 4 At time T6 in Figure 4 , both words X1 and X2 are in the feedback process, and the semantic intensity of X1 is greater than that of X2. After re-allocation, the feedback process of X1 will be preferentially executed subsequently.

[0109] Furthermore, continue to parse and feedback high-intensity semantic words until the buffer semantic integrity retention degree at a certain moment is greater than the buffer threshold again, at which time a buffer space is established and the parsing process is re-allocated. And so on. After all high-intensity semantic words are parsed and feedback, other marked words and other words are normally input into the parsing network for parsing and feedback, and no buffer space is established until all words in the query text are parsed and feedback, and the parsing network outputs the semantic weights of each word.

[0110] It should be noted that after all high-intensity semantic words are input, for other marked words and other words, they are input and parsed and feedback one by one in a fixed order. The input order has been shown in the above steps. Other marked words are other marked words among all marked words except high-intensity semantic words, and other words are other words in the query text except marked words.

[0111] So far, through the parsing network constructed by the parsing channel and the parsing processes at each moment, the necessity of establishing the buffer space at each moment is quantified, that is, the buffer semantic integrity retention degree, which presents the possibility that the semantic results of words at corresponding moments are affected by other semantics. Further, the parsing process is adjusted by combining the buffer space and semantic intensity to ensure that the semantics parsed for words with higher semantic intensity are more accurate.

[0112] Step S005: Screen several core words based on the semantic weights, obtain the relationship path in combination with the knowledge graph, and then generate a reply text.

[0113] Specifically, all the words in the query text are sorted in descending order of semantic weight to obtain a semantic weight word sequence; the top K words in the semantic weight word sequence are obtained by the Top-K method and used as core words. In this embodiment, K = 5 is used for description; the nodes marked by each core word in the knowledge graph are obtained, and the nodes corresponding to each core word are sorted in descending order of semantic weight to obtain a core word node traversal sequence; the shortest paths between adjacent nodes in the core word node traversal sequence are obtained in the knowledge graph, and each shortest path is connected in the node order to obtain a relationship path.

[0114] Further, the language library words corresponding to the nodes of each core word in the intelligent Q&A library are retrieved according to the relationship path, and the one with the greatest similarity to all the keywords in the relationship path is obtained for matching, so as to complete the parsing of the entire query text. Then, based on the parsing result, the intelligent Q&A library generates a corresponding reply text.

[0115] So far, the parsing network outputs the semantic weights of each word, which can screen out the most critical words for answer generation as core words and combine them with the corresponding nodes in the knowledge graph to generate a relationship path, thereby optimizing the semantic parsing efficiency of the query text and improving the accuracy, and finally completing efficient intelligent question answering.

[0116] Another embodiment of the present invention provides an AI-based intelligent Q&A system, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the above method steps S001 to S005 are implemented.

[0117] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An AI-based intelligent question-answering method, characterized in that, The method includes the following steps: Collect the knowledge graph of the intelligent Q&A library and obtain the user's query text; Perform word segmentation on the query text to obtain a number of words; according to the word vector similarity relationship between each word and the nodes in the knowledge graph, quantify the marking times of each node and obtain a number of marked words; combine the distribution of the nodes with marks to obtain the reply design scale of the query text; combine the proportion of the number of marked words in the query text to determine the number of parsing queues and establish a number of parsing channels; According to the distribution of the marked words in the query text, determine the analysis scope of each marked word; based on the word vector similarity between other words and the marked words in the analysis scope, and the occurrence probability of the same other words in different analysis scopes of the same marked word, obtain the semantic intensity of each marked word; screen the marked words in descending order of semantic intensity to obtain a high-intensity semantic word sequence; Based on the high-intensity semantic word sequence, input the marked words into the parsing network to obtain the parsing process of each step at each moment; according to the parsing process corresponding to the marked words, quantify the parsing contribution of each marked word and the initial parsing limit at each moment, and then obtain the buffer semantic integrity retention degree at each moment; based on the buffer semantic integrity retention degree, judge and establish a buffer space in real time, and adjust the parsing process, and finally output the semantic weight of each word; Screen a number of core words based on the semantic weight, and combine the knowledge graph to obtain a relationship path, and then generate a reply text.

2. The intelligent question-answering method based on AI according to claim 1, wherein The specific method for quantifying the marking times of each node and obtaining a number of marked words includes: Obtain the word vectors of each word in the query text and the word vectors of the words corresponding to each node in the knowledge graph; If the similarity between the word vector of any word in the query text and the word vector of the word corresponding to any node is greater than the matching threshold, use the word in the query text as a marked word, and the word in the query text marks the node once; And so on, obtain all the marked words in the query text, and mark the nodes to obtain the marking times of each node.

3. The intelligent question-answering method based on AI according to claim 1, characterized in that, The specific method for obtaining the reply design scale of the query text includes: Obtain the distance between any two marked nodes in the knowledge graph; According to the marking times of the nodes and their average distance from other marked nodes, obtain the marking scale of each marked node, the marking scale is positively correlated with the marking times, and the marking scale is negatively correlated with the average distance; Accumulate the marking scales of all marked nodes to obtain the reply design scale of the query text.

4. An AI-based intelligent question-answering method according to claim 1, characterized in that, The specific method for obtaining the number of parsing queues is: According to the proportion of the number of marked words in all words in the query text, combined with the reply design scale, obtain the number of parsing queues, and the number of parsing queues is positively correlated with the proportion and the reply design scale.

5. An AI-based intelligent question-answering method according to claim 1, characterized in that, The specific method for obtaining the analysis scope of each marked word is: For any marked word in the query text, obtain several other words before and after the marked word in terms of word order. These other words are unmarked words, and stop obtaining until another marked word is traversed. All the obtained other words constitute the analysis scope of the marked word.

6. The intelligent question answering method based on AI according to claim 1, wherein The specific method for obtaining the semantic intensity of each marked word includes: For any other word in the analysis scope of a marked word, obtain the similarity between the word vector of this other word and the word vector of the marked word, and use it as the semantic relevance of this other word. Obtain several marked words in the query text that have the same word vector as this marked word, and use them as several reference words of this marked word. Use the frequency of occurrence of this other word in the analysis scope of this marked word and all its reference words as the co-occurrence probability of this other word and this marked word. For all other words in the analysis scope of this marked word, perform weighted summation on the semantic relevance with the co-occurrence probability as the weight, and use the ratio of the obtained sum value to the number of words in the analysis scope of this marked word as the semantic intensity of this marked word.

7. The intelligent question-answering method based on AI according to claim 1, wherein The specific method for quantifying the parsing contribution of each marked word and the initial parsing limit at each moment, and then obtaining the buffer semantic integrity retention degree at each moment includes: The parsing process of each step at each moment includes parsing or backpropagation of each word. For any moment and any high-intensity semantic word, obtain the difference between the number of steps for parsing completed by this high-intensity semantic word at this moment and the number of steps for backpropagation completed, and combine it with the semantic intensity of this high-intensity semantic word to obtain the parsing contribution of this high-intensity semantic word. Obtain the ratio of the number of words that have entered the parsing process at this moment to the number of words in the high-intensity semantic word sequence as the initial parsing limit at this moment. For several words that have entered the parsing process at this moment, calculate the skewness based on the parsing contribution of each word, and combine it with the initial parsing limit at this moment to obtain the buffer semantic integrity retention degree at this moment. The buffer semantic integrity retention degree is positively correlated with both the skewness and the initial parsing limit.

8. An AI-based intelligent question-answering method according to claim 7, characterized in that, The specific method for establishing a buffer space based on the buffer semantic integrity retention degree in real time, adjusting the parsing process, and finally outputting the semantic weights of each word includes: Set a buffer threshold. During the operation of the parsing network, when the buffer semantic integrity retention degree of a moment is greater than the buffer threshold for the first time, establish a buffer space, and put all the parsing processes of this moment into the buffer space. For several words in the buffer space that are in the parsing process, re-sort them in descending order according to the corresponding semantic intensity, and re-allocate the parsing processes of subsequent moments. Continue to parse and backpropagate high-intensity semantic words until the buffer semantic integrity retention degree of a moment is greater than the buffer threshold again, establish a buffer space and re-allocate the parsing process. And so on. When all high-intensity semantic words are parsed and backpropagated, other marked words and other words are normally input into the parsing network for parsing and backpropagation, and no buffer space is established until the parsing and backpropagation of all words in the query text are completed, and the parsing network outputs the semantic weights of each word.

9. An AI-based intelligent question and answer method according to claim 1, characterized in that, Screening several core words based on the semantic weights and obtaining a relationship path in combination with a knowledge graph, the specific method included is as follows: Arrange all words in the query text in descending order of semantic weights to obtain a semantic weight word sequence; obtain the first K words in the semantic weight word sequence through the Top-K method and use them as core words; Obtain the nodes marked by each core word in the knowledge graph, sort the nodes corresponding to each core word in descending order of semantic weights to obtain a core word node traversal sequence; Obtain the shortest path in the knowledge graph for adjacent nodes in the core word node traversal sequence, and connect each shortest path in the node order to obtain a relationship path.

10. An AI-based intelligent question-answering system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for an AI-based intelligent question-answering method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Knowledge graph intelligent question-answer method fusing pointer generation network

    CN113010693A

  • Construction method and device of knowledge base question-answering system, equipment and storage medium

    CN119293164A

  • Intelligent response method, electronic device and storage medium

    WO2019153607A1

Cited By

  • Intelligent interaction system applied to AI training

    CN120994071A

  • Intelligent interaction method and system based on AIGC

    CN120996212A