A language intention recognition method and system based on machine learning
Through the machine learning-based language intention recognition method, semantic analysis and feature model comparison, the problems of language complexity and context neglect in traditional information retrieval systems are solved, and the intent understanding and response accuracy in intelligent customer service and virtual assistant are realized. .
Patent Information
- Application Number
- CN202410934080.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Traditional information retrieval systems ignore the complexity and contextual importance of language, resulting in lack of accuracy and relevance of search results. Especially in smart customer service and virtual assistant application scenarios, users' diverse interaction methods increase the recognition of language intentions. Require.
Using a machine learning-based language intention recognition method, semantic analysis is performed by obtaining query statements, marking keywords and connecting words, constructing response feature models and query feature models, combining vocabulary meaning, vocabulary associations and context information, and comparing them to Confirm the response information.
It realizes accurate understanding of user intentions and accurate matching of response information, improves the accuracy and relevance of information retrieval, and is suitable for diversified user interaction scenarios.
Smart Images

Figure CN118535711B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of language analysis, and in particular to a language intention recognition method and system based on learning. Background Art
[0002] With the continuous advancement of Internet technology, the problem of information overload is becoming increasingly serious, and it is becoming increasingly difficult for users to find the information they need in massive data. Traditional information retrieval systems usually rely on keyword searches and simple text matching techniques, which often ignore the complexity of language and the importance of context, resulting in a lack of accuracy and relevance in retrieval results.
[0003] In the application scenarios of intelligent customer service and virtual assistants, users' interaction methods are more diverse and natural, which puts higher demands on language intent recognition technology. Users may ask questions through voice or text input, expecting the system to understand the intention behind it and provide appropriate responses. This requires not only recognizing the meaning of individual words, but also understanding the associations between words and contextual information. Summary of the invention
[0004] The purpose of the present invention is to provide a language intent recognition method and system that can perform intent analysis on a query sentence and accurately find response information based on the meaning of words, the association between words and context information in the sentence.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A language intention recognition method based on machine learning, comprising:
[0007] Obtaining a query statement, performing semantic analysis on the query statement, marking keywords and cohesive words, and obtaining a marked query statement;
[0008] Based on the feature analysis of the document information in the query database, the document information is truncated and classified to obtain several response information sets, and the response information in the response information sets is subjected to inter-word directional feature analysis and relative position analysis, and based on the analysis results, a response feature model is constructed;
[0009] Based on the method of truncation and classification of document information, a feature indexing tree is constructed, wherein the feature indexing tree includes a plurality of screening feature label nodes, and a continuous connection relationship is established between different feature label nodes according to the belonging relationship, and a response information set is associated with the feature label node at the end of the feature indexing tree;
[0010] Perform feature analysis on the keywords marked in the marked query statement, determine several main keywords, record the several main keywords as main keyword groups, compare the main keyword groups with the terminal branches corresponding to the feature search tree, determine the adapted feature label nodes, and call the response information set corresponding to the adapted feature label nodes;
[0011] Perform synonymous juxtaposition supplement on the marked keywords and linking words in the marked query sentence to obtain a preprocessed query sentence, perform inter-word directional feature analysis and relative position analysis on the preprocessed query sentence, and build a query feature model based on the analysis results;
[0012] The response feature model corresponding to the response information in the called response information set is compared with the query feature model, and the response information for responding to the query intention is selected based on the consistency.
[0013] In some embodiments disclosed in the present invention, the method for truncating and classifying document information includes:
[0014] Perform semantic analysis on the document information to identify the keywords in the document information, and confirm the directional characteristics and attention weight of each keyword. The directional characteristics of the keywords include the correlation between different keywords, and the attention weight is determined according to the subject of the document information.
[0015] Filling the document information into a preset grid template, wherein the grid template includes a grid array, and based on the directional characteristics between the keywords, the grid groups corresponding to the keywords are directional connected to form a directional expression grid diagram;
[0016] Determine the directional links corresponding to the keywords whose attention-required weights in the directional expression grid are greater than or equal to the preset value, record them as the directional links that require attention, and determine the range in which the directional links that require attention are mapped in the directional expression grid, record them as the first attention-required range;
[0017] Determine other directional links in the first attention-required range, record them as secondary attention-required directional links, and determine the range in which the secondary attention-required directional links are mapped in the directional expression grid diagram, record them as the second attention-required range;
[0018] The document information corresponding to the second focus range in the pointing expression grid is determined, and the complete paragraph of the document information that just highlights the second focus range is intercepted, and a single response information is obtained by combining the document information in the second focus range.
[0019] In some embodiments disclosed in the present invention, the method for analyzing the attention weight of a keyword includes:
[0020] Count the links pointing to the keywords, get the number of links, and count the frequency of occurrence of the keywords;
[0021] Based on the number of connections and the frequency of occurrence corresponding to the keyword, determine the attention-requiring parameter of the keyword, and based on the preset attention-requiring parameter interval to which the attention-requiring parameter belongs, determine the corresponding attention-requiring weight;
[0022] Among them, the expression for calculating the parameters that need attention is:
[0023] ;
[0024] in, To pay attention to the parameters, Adjust the weight for the number of connections, is the number of connections corresponding to the keyword, is the frequency weight adjustment coefficient, is the frequency of occurrence of the keyword. is the frequency adjustment constant, It is the frequency multiplier adjustment factor.
[0025] In some embodiments disclosed in the present invention, the method for truncating and classifying document information further includes:
[0026] Count the links pointing to each keyword in the document information to obtain the number of links, and sort the keywords based on the number of links, and record the formed sequence as the keyword sequence;
[0027] Based on the keyword sequence, constructing feature tags several times, each time constructing the feature tags includes selecting a feature keyword group formed by several keywords before a preset sequence as the feature tag;
[0028] Based on the equality of characteristic keyword groups, different response information are combined to form a response information set.
[0029] In some embodiments disclosed in the present invention, a method for comparing a feature keyword group with a terminal branch corresponding to a feature index tree to determine an adapted feature label node includes:
[0030] Perform feature label analysis on the feature label nodes on the feature addressing tree to determine the feature keyword group corresponding to the feature label node. If there is a situation where all feature keywords in the feature keyword group are completely present in the main keyword group, continue to analyze downward along the corresponding feature label node until all feature keyword groups corresponding to all branch nodes under the feature label node do not have a situation where the feature keywords are completely present in the main keyword group. The feature label node at this time is identified as an adapted feature label node.
[0031] In some embodiments disclosed in the present invention, the method of constructing a response feature model or a query feature model includes:
[0032] Construct a feature comparison circle and set a starting point on the feature comparison circle;
[0033] When building a response feature model:
[0034] Determine the keywords and linking words in the response information, and based on the positions of different keywords and linking words in the response information, set corresponding keyword mapping points and linking word mapping points on the feature comparison circle, and build keyword links between keyword mapping points based on the association directions between keywords to obtain a response feature model;
[0035] When building a query feature model:
[0036] The keywords and linking words in the preprocessed query statement are determined, and based on the positions of different keywords and linking words in the preprocessed query statement, corresponding keyword mapping points and linking word mapping points are set on the feature comparison circle, and based on the association pointing between the keywords, keyword connections are constructed between the keyword mapping points to obtain a query feature model.
[0037] In some embodiments disclosed in the present invention, the method of comparing the response feature model and the query feature model includes:
[0038] Analyze the volume multiples of the response information relative to the preprocessed query statement, and adjust the keyword mapping points and the linking word mapping points on the response feature model. The adjustment method includes adjusting the cumulative intervals of the keyword mapping points and the linking word mapping points relative to the initial points. The cumulative interval is the product of the original interval and the volume multiples. The adjusted response feature model is recorded as the comparison response feature model.
[0039] The query feature model and the comparison response feature model are driven to perform several relative rotations, and the keyword lines, keyword mapping points and linking word mapping points after each rotation are compared, and the matching keyword lines, keyword mapping points and linking word mapping points are identified as the basis for judging whether the comparison response feature model and the query feature model are consistent.
[0040] In some embodiments disclosed in the present invention, the method of comparing the response feature model with the query feature model includes:
[0041] Determine the directional features of each keyword in the response feature model and the query feature model, and determine the relative position of each keyword and each linking word in the corresponding response information or pre-processed query sentence;
[0042] Based on the correspondence between the keywords, keyword synonyms and linking words in the preprocessed query statement and the keywords and linking words in the response information, the corresponding keyword pointing features are compared, and the relative positions of the corresponding keywords and linking words are compared to determine the degree of consistency between the response feature model and the query feature model. If the degree of consistency is greater than or equal to a preset value, the response information corresponding to the response feature model is the response information used to respond to the query intent.
[0043] In some embodiments disclosed in the present invention, the expression for calculating the degree of conformity is:
[0044] ;
[0045] in, For the degree of conformity, is the relative position matching weight coefficient, is the weight coefficient of the pointing feature match, is a position matching judgment function. If the relative position of the ith keyword or linking word in the query feature model matches the corresponding keyword or linking word in the answer feature model, then the output is 1, otherwise the output is 0. n is the total number of keywords and linking words in the query model. is the pointing feature matching judgment function. If the keyword pointing feature corresponding to the xth keyword in the query feature model matches the corresponding keyword in the response feature model, then output 1, otherwise output 0. Adjust the constant for consistency.
[0046] In some embodiments disclosed in the present invention, there is also disclosed a language intention recognition system based on machine learning, including;
[0047] The first module is used to obtain a query statement, perform semantic analysis on the query statement, mark keywords and cohesive words, and obtain a marked query statement;
[0048] The second module is used to perform feature analysis on the document information in the query database, select and classify the document information, obtain several response information sets, perform inter-word directional feature analysis and relative position analysis on the response information in the response information sets, and construct a response feature model based on the analysis results;
[0049] The third module is used to construct a feature address tree based on the method of truncation and classification of document information, wherein the feature address tree includes a plurality of screening feature label nodes, and a continuous connection relationship is established between different feature label nodes according to the belonging relationship, and a response information set is associated with the feature label node at the end of the feature address tree;
[0050] The fourth module is used to perform feature analysis on the keywords marked in the marked query sentence, determine several main keywords, record the several main keywords as main keyword groups, compare the main keyword groups with the terminal branches corresponding to the feature address tree, determine the adapted feature label nodes, and call the response information set corresponding to the adapted feature label nodes;
[0051] The fifth module is used to perform synonymous juxtaposition supplement on the marked keywords and linking words in the marked query sentence to obtain a pre-processed query sentence, and perform inter-word directional feature analysis and relative position analysis on the pre-processed query sentence, and build a query feature model based on the analysis results;
[0052] The sixth module is used to compare the response feature model corresponding to the response information in the called response information set with the query feature model, and select the response information for responding to the query intention based on the consistency.
[0053] The present invention discloses a language intention recognition method and system based on machine learning, which relates to the technical field of language analysis. The method performs word-to-word directional feature analysis and relative position analysis on answer information in an answer information set, and based on the analysis result, builds an answer feature model, compares the terminal branch corresponding to the main keyword group and the feature search tree, determines the adapted feature label node, and calls the answer information set corresponding to the adapted feature label node, performs word-to-word directional feature analysis and relative position analysis on the preprocessed query statement, and builds a query feature model based on the analysis result, compares the answer feature model corresponding to the answer information in the called answer information set with the query feature model, and selects answer information for answering the query intention based on the consistency. The present invention realizes the analysis of vocabulary meaning, relationship between words and context information through the above technical scheme, and accurately finds the answer information in the answer information. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a method step diagram of a language intent recognition method based on machine learning disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0056] The present invention adopts the following technical solutions:
[0057] A language intent recognition method based on machine learning, see Figure 1 ,include:
[0058] Step S100, obtaining a query statement, performing semantic analysis on the query statement, marking keywords and cohesive words, and obtaining a marked query statement.
[0059] The system first receives the query sentence input by the user; this query sentence can be in text form or converted into text through speech recognition technology; next, the system uses natural language processing (NLP) technology to perform semantic analysis on the query sentence; this process includes part-of-speech tagging of each word in the sentence to distinguish whether they are nouns, verbs, adjectives, etc.; syntactic analysis to understand the grammatical relationship between words; and identification of entities in the sentence, such as names, places, organizations, etc. Based on the semantic analysis, the system further marks the keywords and cohesive words in the query sentence; keywords are those words that can express the main content of the query, which are crucial to understanding the query intent; cohesive words are words used to connect different parts of the sentence, such as conjunctions and prepositions, which help understand the structure and logical relationship of the sentence. Through this deep semantic analysis and tagging, the system can not only understand the literal meaning of the query sentence, but also grasp its deep meaning and structure; this is crucial to accurately identify the user's query intent because it provides a clear foundation for subsequent feature analysis and model building.
[0060] Step S200, based on feature analysis of document information in the query database, the document information is truncated and classified to obtain several response information sets, inter-word directional feature analysis and relative position analysis are performed on the response information in the response information sets, and a response feature model is constructed based on the analysis results.
[0061] The system first performs feature analysis on the document information in the query database; this analysis process involves identifying and extracting key information such as keywords, phrases, sentences, etc. in the document, and understanding the association and contextual relationship between them; through this feature analysis, the system can summarize and understand the main content and intent of the document. Next, the system extracts and classifies these document information to form several answer information sets; extraction refers to extracting the parts related to the query intent from the document, while classification is to organize these parts into different sets, each of which contains a set of related answer information. Then, the system performs inter-word directional features and relative position analysis on each answer information set; inter-word directional features focus on the association and directional relationship between words, such as the performer and recipient of an action; relative position analysis focuses on the position and arrangement of words in the sentence, and how they express meaning together. Finally, based on the above analysis, the system constructs answer feature models; these models are abstract representations of answer information, and they contain detailed information about the structure and intent of the answer information; these answer feature models will be compared with the query feature models in subsequent steps to find the best matching answer.
[0062] In some embodiments disclosed in the present invention, the method for truncating and classifying document information includes:
[0063] Step S201, perform semantic analysis on the document information, determine the keywords in the document information, and confirm the directional characteristics and attention weight of each keyword, wherein the directional characteristics of the keyword include the correlation direction between different keywords, and the attention weight is determined according to the subject of the document information.
[0064] Step S202, fill the document information into a preset grid template, the grid template includes a grid array, and based on the directional characteristics between keywords, the grid groups corresponding to the keywords are directional connected to form a directional expression grid diagram.
[0065] Step S203, determine the directional links corresponding to the keywords whose weights need to be paid attention to in the directional expression grid diagram are greater than or equal to the preset value, record them as the directional links need to be paid attention to, and determine the range of the directional links need to be paid attention to in the directional expression grid diagram, record them as the first range needing attention.
[0066] In some embodiments disclosed in the present invention, the method for analyzing the attention weight of a keyword includes:
[0067] Step S2031, counting the links pointing to the keywords to obtain the number of links, and counting the frequency of occurrence of the keywords.
[0068] Step S2032, based on the number of links and the frequency of occurrence corresponding to the keyword, determine the attention-requiring parameter of the keyword, and based on the preset attention-requiring parameter interval to which the attention-requiring parameter belongs, determine the corresponding attention-requiring weight.
[0069] Among them, the expression for calculating the parameters that need attention is:
[0070] .
[0071] in, To pay attention to the parameters, Adjust the weight for the number of connections, is the number of connections corresponding to the keyword, is the frequency weight adjustment coefficient, is the frequency of occurrence of the keyword. is the frequency adjustment constant, It is the frequency multiplier adjustment factor.
[0072] Step S204, determine other directional links in the first focus range, record them as secondary focus directional links, and determine the range of the secondary focus directional links mapped in the directional expression grid diagram, record them as the second focus range.
[0073] Step S205, determining the document information corresponding to the second focus range in the pointing expression grid, and extracting a complete paragraph of the portion of the document information that just highlights the second focus range, and combining the document information in the second focus range to obtain a single response information.
[0074] In some embodiments disclosed in the present invention, the method for truncating and classifying document information further includes:
[0075] Step S206, counting the links pointing to each keyword in the document information to obtain the number of links, and sorting the keywords based on the number of links, and recording the formed sequence as a keyword sequence;
[0076] Step S207, constructing feature tags several times based on the keyword sequence, each time constructing the feature tag includes selecting a feature keyword group formed by several keywords before a preset sequence as the feature tag;
[0077] Step S208: Based on the equality of the characteristic keyword groups, different response information are combined to form a response information set.
[0078] Step S300, based on the method of truncation and classification of document information, construct a feature address tree, the feature address tree includes a number of screening feature label nodes, and a continuous connection relationship is established between different feature label nodes according to the belonging relationship, and a response information set is associated with the feature label node at the end of the feature address tree.
[0079] The system constructs a feature addressing tree based on the way of truncation and classification of document information; the data index of this tree structure includes multiple feature label nodes, each node represents a feature label; these feature labels can express the main content and intention of the document. Different feature label nodes establish a continuous connection relationship based on their affiliation; this connection relationship reflects the hierarchy and association between features, which helps the system better understand and match query statements during the retrieval process. The feature label node at the end of the feature addressing tree is associated with a response information set; this means that each feature label node corresponds to a set of related response information; when the system finds a feature label node that matches the query statement during the retrieval process, it can quickly call the corresponding response information set to provide the user with the most relevant response.
[0080] Step S400, perform feature analysis on the marked keywords in the marked query statement, determine several main keywords, record the several main keywords as main keyword groups, compare the main keyword groups with the corresponding terminal branches of the feature addressing tree, determine the adapted feature label nodes, and call the response information set corresponding to the adapted feature label nodes.
[0081] The system first performs feature analysis on the keywords in the marked query statements; this includes an in-depth understanding of the meaning of the keywords, their contextual relationships, and their importance in the query statements; through feature analysis, the system can determine which keywords are the main ones and they play a key role in the query statement. Next, the system groups the main keywords into a keyword group; this keyword group represents the core intent and main content of the query statement; the keyword group is compared with the corresponding terminal branch of the feature addressing tree to find the most matching feature label node; this means that the system compares the core intent of the query statement with the feature labels in the document information to find the feature label node that best matches the query intent. After determining the adapted feature label node, the system calls the corresponding response information set; these response information sets are the set of information most relevant to the query intent, and they can accurately answer the user's query.
[0082] In some embodiments disclosed in the present invention, a method for comparing a feature keyword group with a terminal branch corresponding to a feature index tree to determine an adapted feature label node includes:
[0083] Step S401, perform feature label analysis on the feature label node on the feature indexing tree to determine the feature keyword group corresponding to the feature label node. If there is a situation where all feature keywords in the feature keyword group are completely present in the main keyword group, continue to analyze downward along the corresponding feature label node until all feature keyword groups corresponding to all branch nodes under the feature label node do not have a situation where the feature keywords are completely present in the main keyword group. The feature label node at this time is identified as an adapted feature label node.
[0084] Step S500, synonyms are supplemented for the marked keywords and linking words in the marked query to obtain a preprocessed query, and inter-word directional feature analysis and relative position analysis are performed on the preprocessed query, and a query feature model is constructed based on the analysis results.
[0085] The system first supplements the keywords and linking words in the marked query statements with synonyms; this means that the system replaces the keywords and linking words in the query statements with their synonyms to expand the meaning and coverage of the query statements; through this supplementation, the system can understand the query statements more comprehensively, thereby improving the accuracy of subsequent matching. Next, the system performs inter-word directional feature analysis and relative position analysis on the pre-processed query statements; inter-word directional feature analysis focuses on the association and directional relationship between words, such as the executor and recipient of an action; relative position analysis focuses on the position and arrangement of words in the sentence, and how they express meaning together; through these analyses, the system can have a deeper understanding of the structure and logical relationship of the query statements. Finally, based on the above analysis, the system constructs query feature models. These models are abstract representations of query statements, and they contain detailed information about the structure, logical relationship, and intent of the query statements; these query feature models will be compared with the answer feature models in subsequent steps to find the best matching answer.
[0086] Step S600, comparing the response feature model corresponding to the response information in the called response information set with the query feature model, and selecting the response information for responding to the query intention based on the consistency.
[0087] The system first compares the response feature model corresponding to the response information in the called response information set with the query feature model; the response feature model is an abstract representation of the response information, which contains detailed information about the structure and intent of the response information; and the query feature model is an abstract representation of the query statement, which contains detailed information about the structure, logical relationship and intent of the query statement. By comparing the two models, the system can judge the consistency between them; consistency refers to the degree of similarity between the two models in structure and intent, which is an important basis for the system to select the most appropriate response information. Based on the judgment of consistency, the system selects the response information used to respond to the query intent; this means that the system will select the response information that best meets the query intent based on the similarity between the response feature model and the query feature model.
[0088] In some embodiments disclosed in the present invention, the method of comparing the response feature model with the query feature model includes:
[0089] Step S601, determining the directional features of each keyword in the response feature model and the query feature model, and determining the relative position of each keyword and each linking word in the corresponding response information or pre-processed query sentence;
[0090] Step S603, based on the correspondence between the keywords, keyword synonyms and linking words in the preprocessed query statement and the keywords and linking words in the response information, the corresponding keyword pointing features are compared, and the relative positions of the corresponding keywords and linking words are compared to determine the degree of consistency between the response feature model and the query feature model. If the degree of consistency is greater than or equal to a preset value, the response information corresponding to the response feature model is the response information used to respond to the query intent.
[0091] In some embodiments disclosed in the present invention, the expression for calculating the degree of conformity is:
[0092] ;
[0093] in, For the degree of conformity, is the relative position matching weight coefficient, is the weight coefficient of the pointing feature match, is a position matching judgment function. If the relative position of the ith keyword or linking word in the query feature model matches the corresponding keyword or linking word in the answer feature model, then the output is 1, otherwise the output is 0. n is the total number of keywords and linking words in the query model. is the pointing feature matching judgment function. If the keyword pointing feature corresponding to the xth keyword in the query feature model matches the corresponding keyword in the response feature model, then output 1, otherwise output 0. Adjust the constant for consistency.
[0094] In some embodiments disclosed in the present invention, the method of constructing a response feature model or a query feature model includes:
[0095] Step S700, constructing a feature comparison circle and setting a starting point on the feature comparison circle;
[0096] When building a response feature model:
[0097] Step S800, determine the keywords and linking words in the response information, and set corresponding keyword mapping points and linking word mapping points on the feature comparison circle based on the positions of different keywords and linking words in the response information, and build keyword links between keyword mapping points based on the association directions between keywords to obtain the response feature model.
[0098] The system first determines the keywords and linking words in the response information. These keywords and linking words are the key elements in the response information, and they can express the main content and intention of the response information. By determining these keywords and linking words, the system can better understand the core content of the response information. Then, the system sets the starting point on the feature comparison circle and maps the keywords and linking words in the response information to the feature comparison circle. These mapping points represent the positions and relationships of the keywords and linking words in the response information. Through this mapping, the system can correspond the response information to the structure on the feature comparison circle. Then, based on the association and pointing between the keywords, the system constructs keyword lines between the keyword mapping points. These keyword lines represent the association and pointing relationship between the keywords, and they can express the logical structure and relationship in the response information. By constructing these keyword lines, the system can better understand and express the response information. Finally, through the above steps, the system obtains the response feature model. This model is an abstract representation of the response information, which contains detailed information about the structure, logical relationship and intention of the response information. This response feature model will be compared with the query feature model in the subsequent steps to find the best matching response information.
[0099] When building a query feature model:
[0100] Step S900, determine the keywords and linking words in the preprocessed query statement, and based on the positions of different keywords and linking words in the preprocessed query statement, set corresponding keyword mapping points and linking word mapping points on the feature comparison circle, and based on the association pointing between the keywords, build keyword lines between the keyword mapping points to obtain a query feature model.
[0101] In some embodiments disclosed in the present invention, the method of comparing the response feature model and the query feature model includes:
[0102] Step S1000, analyze the volume multiples of the response information relative to the preprocessed query statement, and adjust the keyword mapping points and the connection word mapping points on the response feature model. The adjustment method includes adjusting the cumulative intervals of the key mapping points and the connection mapping points relative to the initial points. The cumulative interval is the product of the original interval and the volume multiple. The adjusted response feature model is recorded as the response feature model for comparison.
[0103] Step S1100 drives the query feature model and the comparison response feature model to perform several relative rotations, and compares the keyword lines, keyword mapping points and linking word mapping points after each rotation, and identifies the matching keyword lines, keyword mapping points and linking word mapping points as the basis for judging whether the comparison response feature model and the query feature model are consistent.
[0104] In some embodiments disclosed in the present invention, there is also disclosed a language intention recognition system based on machine learning, including;
[0105] The first module is used to obtain a query statement, perform semantic analysis on the query statement, mark keywords and cohesive words, and obtain a marked query statement;
[0106] The second module is used to perform feature analysis on the document information in the query database, select and classify the document information, obtain several response information sets, perform inter-word directional feature analysis and relative position analysis on the response information in the response information sets, and construct a response feature model based on the analysis results;
[0107] The third module is used to construct a feature address tree based on the method of truncation and classification of document information, wherein the feature address tree includes a plurality of screening feature label nodes, and a continuous connection relationship is established between different feature label nodes according to the belonging relationship, and a response information set is associated with the feature label node at the end of the feature address tree;
[0108] The fourth module is used to perform feature analysis on the keywords marked in the marked query sentence, determine several main keywords, record the several main keywords as main keyword groups, compare the main keyword groups with the terminal branches corresponding to the feature address tree, determine the adapted feature label nodes, and call the response information set corresponding to the adapted feature label nodes;
[0109] The fifth module is used to perform synonymous juxtaposition supplement on the marked keywords and linking words in the marked query sentence to obtain a pre-processed query sentence, and perform inter-word directional feature analysis and relative position analysis on the pre-processed query sentence, and build a query feature model based on the analysis results;
[0110] The sixth module is used to compare the response feature model corresponding to the response information in the called response information set with the query feature model, and select the response information for responding to the query intention based on the consistency.
[0111] The present invention discloses a language intention recognition method and system based on machine learning, which relates to the technical field of language analysis. The method performs word-to-word directional feature analysis and relative position analysis on answer information in an answer information set, and based on the analysis result, builds an answer feature model, compares the terminal branch corresponding to the main keyword group and the feature search tree, determines the adapted feature label node, and calls the answer information set corresponding to the adapted feature label node, performs word-to-word directional feature analysis and relative position analysis on the preprocessed query statement, and builds a query feature model based on the analysis result, compares the answer feature model corresponding to the answer information in the called answer information set with the query feature model, and selects answer information for answering the query intention based on the consistency. The present invention realizes the analysis of vocabulary meaning, relationship between words and context information through the above technical scheme, and accurately finds the answer information in the answer information.
[0112] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A language intention recognition method based on machine learning, characterized in that: include: Obtaining a query statement, performing semantic analysis on the query statement, marking keywords and cohesive words, and obtaining a marked query statement; Based on the feature analysis of the document information in the query database, the document information is truncated and classified to obtain several response information sets, and the response information in the response information sets is subjected to inter-word directional feature analysis and relative position analysis, and based on the analysis results, a response feature model is constructed; Based on the method of truncation and classification of document information, a feature indexing tree is constructed, wherein the feature indexing tree includes a plurality of screening feature label nodes, and a continuous connection relationship is established between different feature label nodes according to the belonging relationship, and a response information set is associated with the feature label node at the end of the feature indexing tree; Perform feature analysis on the keywords marked in the marked query statement, determine several main keywords, record the several main keywords as main keyword groups, compare the main keyword groups with the terminal branches corresponding to the feature search tree, determine the adapted feature label nodes, and call the response information set corresponding to the adapted feature label nodes; Perform synonymous juxtaposition supplement on the marked keywords and linking words in the marked query sentence to obtain a preprocessed query sentence, perform inter-word directional feature analysis and relative position analysis on the preprocessed query sentence, and build a query feature model based on the analysis results; Compare the response feature model corresponding to the response information in the called response information set with the query feature model, and select the response information for responding to the query intention based on the consistency; Methods for truncating and classifying document information include: Perform semantic analysis on the document information to identify the keywords in the document information, and confirm the directional characteristics and attention weight of each keyword. The directional characteristics of the keywords include the correlation between different keywords, and the attention weight is determined according to the subject of the document information. Filling the document information into a preset grid template, wherein the grid template includes a grid array, and based on the directional characteristics between the keywords, the grid groups corresponding to the keywords are directional connected to form a directional expression grid diagram; Determine the directional links corresponding to the keywords whose attention-required weights in the directional expression grid are greater than or equal to the preset value, record them as the directional links that require attention, and determine the range in which the directional links that require attention are mapped in the directional expression grid, record them as the first attention-required range; Determine other directional links in the first attention-required range, record them as secondary attention-required directional links, and determine the range in which the secondary attention-required directional links are mapped in the directional expression grid diagram, record them as the second attention-required range; Determine the document information corresponding to the second focus range in the pointing expression grid, and extract the complete paragraph of the part of the document information that just highlights the second focus range, and combine the document information in the second focus range to obtain a single response information; Methods for constructing a response feature model or a query feature model include: Construct a feature comparison circle and set a starting point on the feature comparison circle; When building a response feature model: Determine the keywords and linking words in the response information, and based on the positions of different keywords and linking words in the response information, set corresponding keyword mapping points and linking word mapping points on the feature comparison circle, and build keyword links between keyword mapping points based on the association directions between keywords to obtain a response feature model; When building a query feature model: Determine the keywords and linking words in the preprocessed query sentence, and based on the positions of different keywords and linking words in the preprocessed query sentence, set corresponding keyword mapping points and linking word mapping points on the feature comparison circle, and build keyword lines between the keyword mapping points based on the association pointing between the keywords to obtain the query feature model; The method of comparing the response feature model and the query feature model includes: Analyze the volume multiples of the response information relative to the preprocessed query statement, and adjust the keyword mapping points and the linking word mapping points on the response feature model. The adjustment method includes adjusting the cumulative intervals of the keyword mapping points and the linking word mapping points relative to the initial points. The cumulative interval is the product of the original interval and the volume multiples. The adjusted response feature model is recorded as the comparison response feature model. Driving the query feature model and the comparison answer feature model to perform a number of relative rotations, and comparing the keyword connection lines, keyword mapping points and linking word mapping points after each rotation, and identifying the matching keyword connection lines, keyword mapping points and linking word mapping points as the basis for judging whether the comparison answer feature model and the query feature model are consistent; The expression for calculating the degree of match is: ; in, For the degree of conformity, is the relative position matching weight coefficient, is the weight coefficient of the pointing feature match, is a position matching judgment function. If the relative position of the ith keyword or linking word in the query feature model matches the corresponding keyword or linking word in the answer feature model, then the output is 1, otherwise the output is 0. n is the total number of keywords and linking words in the query model. is the pointing feature matching judgment function. If the keyword pointing feature corresponding to the xth keyword in the query feature model matches the corresponding keyword in the response feature model, then output 1, otherwise output 0. Adjust the constant for consistency.
2. The method for language intention recognition based on machine learning according to claim 1, characterized in that: Methods for analyzing the weight of keywords include: Count the links pointing to the keywords, get the number of links, and count the frequency of occurrence of the keywords; Based on the number of connections and the frequency of occurrence corresponding to the keyword, determine the attention-requiring parameter of the keyword, and based on the preset attention-requiring parameter interval to which the attention-requiring parameter belongs, determine the corresponding attention-requiring weight; Among them, the expression for calculating the parameters that need attention is: ; in, To pay attention to the parameters, Adjust the weight for the number of connections, is the number of connections corresponding to the keyword, is the frequency weight adjustment coefficient, is the frequency of occurrence of the keyword. is the frequency adjustment constant, It is the frequency multiplier adjustment factor.
3. The method for language intention recognition based on machine learning according to claim 1, characterized in that: The method for selecting and classifying document information also includes: Count the links pointing to each keyword in the document information to obtain the number of links, and sort the keywords based on the number of links, and record the formed sequence as the keyword sequence; Based on the keyword sequence, constructing feature tags several times, each time constructing the feature tags includes selecting a feature keyword group formed by several keywords before a preset sequence as the feature tag; Based on the equality of characteristic keyword groups, different response information are combined to form a response information set.
4. The method for language intention recognition based on machine learning according to claim 1, characterized in that: The method of comparing the feature keyword group with the terminal branch corresponding to the feature index tree to determine the adapted feature label node includes: Perform feature label analysis on the feature label nodes on the feature addressing tree to determine the feature keyword group corresponding to the feature label node. If there is a situation where all feature keywords in the feature keyword group are completely present in the main keyword group, continue to analyze downward along the corresponding feature label node until all feature keyword groups corresponding to all branch nodes under the feature label node do not have a situation where the feature keywords are completely present in the main keyword group. The feature label node at this time is identified as an adapted feature label node.
5. The method for language intention recognition based on machine learning according to claim 1, characterized in that: The method of comparing the response feature model with the query feature model includes: Determine the directional features of each keyword in the response feature model and the query feature model, and determine the relative position of each keyword and each linking word in the corresponding response information or pre-processed query sentence; Based on the correspondence between the keywords, keyword synonyms and linking words in the preprocessed query statement and the keywords and linking words in the response information, the corresponding keyword pointing features are compared, and the relative positions of the corresponding keywords and linking words are compared to determine the degree of consistency between the response feature model and the query feature model. If the degree of consistency is greater than or equal to a preset value, the response information corresponding to the response feature model is the response information used to respond to the query intent.
6. A language intention recognition system based on machine learning, used to execute the language intention recognition method according to any one of claims 1 to 5, characterized in that: include: The first module is used to obtain a query statement, perform semantic analysis on the query statement, mark keywords and cohesive words, and obtain a marked query statement; The second module is used to perform feature analysis on the document information in the query database, select and classify the document information, obtain several response information sets, perform inter-word directional feature analysis and relative position analysis on the response information in the response information sets, and construct a response feature model based on the analysis results; The third module is used to construct a feature address tree based on the method of truncation and classification of document information, wherein the feature address tree includes a plurality of screening feature label nodes, and a continuous connection relationship is established between different feature label nodes according to the belonging relationship, and a response information set is associated with the feature label node at the end of the feature address tree; The fourth module is used to perform feature analysis on the keywords marked in the marked query sentence, determine several main keywords, record the several main keywords as main keyword groups, compare the main keyword groups with the terminal branches corresponding to the feature address tree, determine the adapted feature label nodes, and call the response information set corresponding to the adapted feature label nodes; The fifth module is used to perform synonymous juxtaposition supplement on the marked keywords and linking words in the marked query sentence to obtain a pre-processed query sentence, and perform inter-word directional feature analysis and relative position analysis on the pre-processed query sentence, and build a query feature model based on the analysis results; The sixth module is used to compare the response feature model corresponding to the response information in the called response information set with the query feature model, and select the response information for responding to the query intention based on the consistency.
Citation Information
Patent Citations
Enquiry statement analytical method and system for information retrieval
CN101510221A
Content recommendation method based on deep learning
CN108256083A