Natural language search statement parsing method, device, equipment and storage medium

By using the method of combining transfer learning and knowledge graph in the natural language retrieval system, entity recognition and syntax analysis are carried out, and the problems of large investment in development and maintenance, large corpus dependencies and low accuracy in the existing system are solved, and the improvement is achieved. Efficient and accurate natural language search.

CN111737973BActive Publication Date: 2025-02-21BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010610757.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-29
Publication Date
2025-02-21
Estimated Expiration
2040-06-29

AI Technical Summary

Technical Problem

The existing natural language search system has invested a lot of manpower in the development and maintenance, too much corpus dependent and insufficient accuracy.

Method used

The idea of ​​transfer learning is adopted for entity recognition and syntactic analysis, combined with the domain concept knowledge graph for knowledge reasoning, accurately identify the intention of the search statement and complete the analysis of the target object.

Benefits of technology

Reduces the need for corpus and rule configuration, improves the accuracy of retrieval statement intent recognition, and reduces the cost of development and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111737973B_ABST
    Figure CN111737973B_ABST
Patent Text Reader

Abstract

The present application provides a natural language search statement parsing method, device, equipment and storage medium, wherein the method includes: performing entity word recognition and question word recognition on an input statement to obtain entity word recognition results and question word recognition results respectively; performing dependency syntactic analysis on the input statement based on the entity word recognition results and the question word recognition results to obtain dependency syntactic analysis results; parsing a target object based on the dependency syntactic analysis results and a concept knowledge graph to obtain a target object parsing result. After performing entity recognition and syntactic analysis, the embodiment of the present application performs knowledge reasoning in combination with the domain concept knowledge graph to identify the intent of the search statement; the corpus and rule configuration required to complete the parsing of the target object are relatively small, and the accuracy is relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language retrieval, and in particular to a natural language retrieval statement parsing method, apparatus, device and storage medium. Background Art

[0002] With the development of Internet technology and the emergence of large-scale network data resources, people hope to obtain valuable information accurately and quickly from massive Internet data, which promotes the widespread application of retrieval technology. Therefore, natural language retrieval system is one of the hot directions of natural language processing. This technology allows users to input questions in natural language, and the system returns the corresponding answers after parsing. It can answer questions raised by users in natural language with accurate and concise natural language. The main reason for the rise of its research is people's demand for fast and accurate information acquisition.

[0003] In existing natural language retrieval, semantic analysis mainly identifies the user's question intention. Traditional semantic analysis is mainly based on three methods: rules, statistical models, and deep learning models. The rule-based method requires the maintenance of a large number of rules, while the statistical model and deep learning model require the reliance on a large amount of corpus. The retrieval system cannot accurately understand the user's retrieval intention through shallow semantic analysis of the combination of a few keywords. Especially in the face of complex natural language, the retrieval system often leads to omissions of information, returns error information, and returns too much information. These limitations make the retrieval effect always unsatisfactory. The existing technology has the problems of large manpower investment in development and maintenance, excessive reliance on corpus, and insufficient accuracy. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a natural language search statement parsing method, apparatus, device and storage medium to solve the problems of large manpower investment in development and maintenance, excessive corpus reliance and insufficient accuracy in the above-mentioned natural language search system.

[0005] In a first aspect, an embodiment of the present application provides a natural language search statement parsing method, which is applied in the field of natural language search, and includes:

[0006] Perform entity word recognition and question word recognition on the input sentence to obtain entity word recognition results and question word recognition results respectively;

[0007] According to the entity word recognition result and the question word recognition result, performing dependency syntactic analysis on the input sentence to obtain a dependency syntactic analysis result;

[0008] According to the dependency syntactic analysis results and the concept knowledge graph, the target object is parsed to obtain the target object parsing result.

[0009] In combination with the first aspect, the embodiment of the present application provides a first possible implementation of the first aspect, wherein the performing entity word recognition on the input sentence to obtain the entity word recognition result includes:

[0010] Performing word segmentation on the input sentence to obtain a word segmentation result;

[0011] According to the word segmentation result, entity word recognition is performed on the input sentence to obtain an entity word recognition result.

[0012] In combination with the first aspect, the embodiment of the present application provides a second possible implementation of the first aspect, wherein the step of performing interrogative word recognition on the input sentence to obtain an interrogative word recognition result includes:

[0013] Based on the question word recognition rule and the question word dictionary, question word recognition is performed on the input sentence.

[0014] In combination with the first aspect, the embodiment of the present application provides a third possible implementation of the first aspect, wherein, before word segmentation of the input sentence, the method further includes:

[0015] A domain-defined dictionary is set, and the input sentence is segmented according to the domain-defined dictionary.

[0016] In combination with the first aspect, the embodiment of the present application provides a fourth possible implementation of the first aspect, wherein the input sentence is segmented to obtain the segmentation result, including:

[0017] Part-of-speech tagging is performed on the word segmentation result to obtain a part-of-speech tagging result for dependency syntactic analysis.

[0018] In combination with the first aspect, an embodiment of the present application provides a fifth possible implementation of the first aspect, wherein, according to the entity word recognition result and the question word recognition result, the input sentence is subjected to dependency syntactic analysis, including:

[0019] The word segmentation result, the part-of-speech tagging result and the entity word recognition result are used as input features and input into a dependency syntactic analysis model algorithm to obtain a dependency syntactic analysis result.

[0020] In combination with the first aspect, the embodiment of the present application provides a sixth possible implementation of the first aspect, wherein the method further includes:

[0021] Search for a matching answer based on the obtained target object parsing result.

[0022] In a second aspect, the embodiment of the present application provides a natural language search sentence parsing device, which is applied to the field of natural language search, including:

[0023] A recognition module is used to perform entity word recognition and question word recognition on the input sentence, and obtain entity word recognition results and question word recognition results respectively;

[0024] A dependency syntactic analysis module, configured to perform dependency syntactic analysis on the input sentence according to the entity word recognition result and the question word recognition result, to obtain a dependency syntactic analysis result;

[0025] The target object parsing module is used to parse the target object according to the dependency syntactic analysis result and the concept knowledge graph to obtain the target object parsing result.

[0026] In combination with the second aspect, an embodiment of the present application provides a first possible implementation of the second aspect, wherein the recognition module is used to perform entity word recognition on an input sentence to obtain an entity word recognition result, including:

[0027] Performing word segmentation on the input sentence to obtain a word segmentation result;

[0028] According to the word segmentation result, entity word recognition is performed on the input sentence to obtain an entity word recognition result.

[0029] In combination with the second aspect, an embodiment of the present application provides a second possible implementation of the second aspect, wherein the recognition module is used to perform interrogative word recognition on the input sentence to obtain an interrogative word recognition result, including:

[0030] Based on the question word recognition rule and the question word dictionary, question word recognition is performed on the input sentence.

[0031] In combination with the second aspect, the embodiment of the present application provides a third possible implementation of the second aspect, wherein the identification module is further used to:

[0032] Before the input sentence is segmented, a domain-defined dictionary is set, and the input sentence is segmented according to the domain-defined dictionary.

[0033] In combination with the second aspect, the embodiment of the present application provides a fourth possible implementation of the second aspect, wherein the identification module is further used to:

[0034] The input sentence is segmented to obtain a segmentation result, and then the segmentation result is tagged with parts of speech to obtain a part of speech tagging result for dependency syntax analysis.

[0035] In combination with the second aspect, an embodiment of the present application provides a fifth possible implementation of the second aspect, wherein the dependency syntactic analysis module is used to perform dependency syntactic analysis on the input sentence according to the entity word recognition result and the question word recognition result, including:

[0036] The word segmentation result, the part-of-speech tagging result and the entity word recognition result are used as input features and input into a dependency syntactic analysis model algorithm to obtain a dependency syntactic analysis result.

[0037] In combination with the second aspect, the embodiment of the present application provides a sixth possible implementation of the second aspect, wherein the target object parsing module is further used to:

[0038] Search for a matching answer based on the obtained target object parsing result.

[0039] In a third aspect, an embodiment of the present application provides an electronic device for natural language retrieval statement parsing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the natural language retrieval statement parsing method as described in any one of the first aspects is implemented.

[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the natural language retrieval statement parsing method described in any one of the above-mentioned first aspects is executed.

[0041] This patent invents a method for parsing the target object of a natural language search statement. It abandons the traditional method of using a classification model for intent recognition and instead applies the idea of ​​transfer learning. After entity recognition and syntactic analysis, it combines the domain concept knowledge graph for knowledge reasoning. It can very accurately identify the intent of the search statement, and the corpus and rule configuration required to complete the analysis of the target object are relatively small.

[0042] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A flowchart of a natural language search statement parsing method provided in an embodiment of the present application is shown;

[0045] Figure 2 A flowchart showing a target object parsing flow chart in a natural language search statement parsing method provided in an embodiment of the present application;

[0046] Figure 3 An example diagram of question words in a natural language search sentence parsing method provided in an embodiment of the present application is shown;

[0047] Figure 4 An example diagram of dependency syntax analysis results in a natural language search sentence parsing method provided in an embodiment of the present application is shown;

[0048] Figure 5 The following is a description of the rules for determining the target object in a natural language search statement parsing method provided in an embodiment of the present application.

[0049] Figure 6 A table showing the accuracy of a test in a natural language search statement parsing method provided in an embodiment of the present application is shown;

[0050] Figure 7 A schematic diagram of the structure of a natural language search statement parsing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0051] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0052] This patent invents a target object parsing method for natural language search sentences, which is applied to natural language search systems. In natural language search systems, it is necessary to perform intent analysis on search sentences input by users, such as "find a red car", "what is Zhang San's phone number?", "who is the woman traveling with Wang Wu today?".

[0053] This application abandons the traditional method of using classification models for intent recognition, and instead applies the idea of ​​transfer learning. After entity recognition and syntactic analysis, it combines the domain concept knowledge graph for knowledge reasoning. It can very accurately identify the intent of the search sentence, and the corpus and rule configuration required to complete the analysis of the target object are relatively small.

[0054] Figure 1 A flowchart of a natural language search statement parsing method provided in an embodiment of the present application is shown. Figure 1 As shown, the method comprises the following steps:

[0055] S1: Perform entity word recognition and question word recognition on the input sentence to obtain entity word recognition results and question word recognition results respectively.

[0056] When a user inputs a sentence, entity word recognition is performed on the sentence input by the user, involving the recognition of general entities and domain entities. General entities include names of people, places, names of organizations, numbers, percentages, amounts, etc. Domain entities refer to entities related to the business domain.

[0057] In the entity word recognition step, there are also relationship word recognition and attribute word recognition. Relation word recognition recognizes the custom relationship. The relationship recognition method is the same as entity recognition, but the relationship can be a verb in addition to a noun. Relationship recognition uses the rule recognition method and is maintained by a dictionary. For example, business domain words such as "parents", "relatives", "colleagues", "peers", and "positions" are used.

[0058] Attribute word recognition is used to identify custom attributes. The method of attribute recognition is the same as that of entity recognition. Attribute recognition uses rule recognition and is maintained by a dictionary. For example, business domain words such as "height", "body shape", and "blood type" are used.

[0059] S2: performing dependency syntactic analysis on the input sentence according to the entity word and question word recognition results to obtain a dependency syntactic analysis result. Figure 2 A flowchart of a target object parsing flow chart in a natural language search statement parsing method provided in an embodiment of the present application is shown.

[0060] Syntactic analysis is the study of the phrase structure in a sentence or the dependency relationship between words, including two types of tasks: phrase structure analysis and dependency syntactic analysis. Phrase structure analysis is the study of the phrase structure in a sentence, such as noun phrases, verb phrases, verb-object phrases, etc., while dependency syntactic analysis is the study of the dependency relationship of all words in a sentence.

[0061] Please refer to Figure 4 The figure shows an example diagram of dependency syntactic analysis results in a natural language retrieval sentence parsing method provided in an embodiment of the present application. The results of word segmentation, part of speech, and entity recognition are used as features and input into a dependency syntactic analysis model to establish a dependency syntactic tree. The above-mentioned dependency syntactic analysis models include Stack LSTM models, CRF-based Chinese syntactic dependency analysis models, etc. The dependency relationship itself is a tree structure, each word is regarded as a node, and the dependency relationship is a directed edge.

[0062] S3: According to the dependency syntactic analysis results and the concept knowledge graph, the target object is parsed to obtain the target object parsing result.

[0063] The syntactic rules are combined with the concept knowledge graph to perform knowledge reasoning and complete the analysis of the target object. In this embodiment, the target object can be an entity word, or a relational word, an attribute word, etc.

[0064] Based on the above analysis, it can be seen that the natural language search statement parsing method provided by the embodiment of the present application does not need to maintain a large number of rules compared to the rule-based method, which greatly reduces the manpower invested from the development and maintenance perspectives, and does not need to rely on a large amount of corpus compared to the statistical model and deep learning model. This patent invents a target object parsing method for natural language search statements, abandoning the traditional method of using classification models for intent recognition, but instead applying the idea of ​​transfer learning, performing entity recognition and syntactic analysis, and combining domain concept knowledge graphs for knowledge reasoning, which can very accurately identify the intent of the search statement, and complete the parsing of the target object with minimal corpus and rule configuration.

[0065] In another embodiment of the present application, the methods used for entity recognition include: rule combined with dictionary, biLSTM+CRF model and composite method, etc.

[0066] For simple entities with clear rules, such as ID card number, mobile phone number, license plate number, train number, etc., rules are combined with dictionaries to perform identification and validity verification.

[0067] For entities with more variable and complex rules, such as time entities, the model uses more than 300 rules to identify and standardize time entities.

[0068] For enumerated entities that rely on knowledge (variable), such as brand, province, color, etc., a knowledge base is established for regular maintenance.

[0069] The biLSTM+CRF model uses deep learning + CRF model for training for entities that have no clear rules and cannot be enumerated, and identifies the type and boundary of the entity. The model is used for entity recognition: names of people, places, and institutions (including enterprise names, hotel names, Internet cafe names, etc.).

[0070] Some entities in the composite method are identified based on other entities, such as height (number + unit), date of birth (birth description rule + date), place of birth (birth description rule + address), and path (address / city + address / city). In this case, the dependent entities need to be identified first and then identified, which may involve both models and rules.

[0071] Please refer to Figure 3 , Figure 3The example of question words in a natural language search sentence parsing method provided by the embodiment of the present application is shown. The question word recognition method uses a rule combined with a dictionary to utilize a question word library, a Chinese quantifier word library, and a commonly used adjective library.

[0072] In one embodiment of the present application, an open source transfer-based dependency analysis method is adopted, the public Chinese Dependency Treebank People's Daily test set is used as the corpus, and the Stack LSTM neural network is used as the classifier to train the construction model of the dependency syntax tree.

[0073] Please refer to Figure 5 , Figure 5 The following is a description of the rules for determining the target object in a natural language search sentence parsing method provided in an embodiment of the present application. In this embodiment, syntactic rules are combined with concept knowledge graphs for knowledge reasoning to complete the parsing of the target object (the target object can be an entity word, or a relational word, or an attribute word), which is divided into five cases:

[0074] 1. The entity words that the question words depend on are selected as the target objects. For example: "which place", "what time", "which position", "what relationship". The target objects are the entities or relationship types corresponding to "place", "time", "position", and "relationship". If the question words are "how much" or "how many", and there is a predicate "there is" with a VOB (object-verb relationship), it is intended to count the number, and a numerical answer should be returned (the statistical intention is not within the scope of this patent).

[0075] 2. If the question word does not have a directly dependent entity but has entity information, the entity is selected as the target object. For example, the target objects of “who”, “where” and “which day” are “person”, “address” and “time” respectively.

[0076] 3. The interrogative word has no directly dependent entity and no entity information. Then find the predicate V that meets any of the following conditions: a) The relationship with the interrogative word is VOB (verb-object relationship); b) The relationship with a preposition is CMP, and the relationship between the preposition and the interrogative word is POB. (That is, the interrogative word is the object);

[0077] If there is an entity E (which can be any of entity words, attribute words, or relational words) that depends on the predicate, and the relationship is SBV (subject-predicate relationship), there are two cases:

[0078] 3.1 When the predicate is a relational word, select the predicate as the target object. The entity type corresponding to the retrieval result is: with entity E as the subject, the predicate as the relationship, and the object type in the concept knowledge graph as the target object. For example, "Where did Zhang San live yesterday?" and "Which company does Zhang San work for?" Since "live" is a relational word (and also the target object), and "Zhang San" is an entity word E1, look up the SPO triple type in the concept knowledge graph (person -> live -> location), and the returned result is of the "location" type. Similarly, for the second sentence, "work" is a relational word (and also the target object), and the returned result is of the "company" type.

[0079] 3.2 When the predicate is not a relational word, select entity E as the target object. For example, when the predicate contains "is", "is called", "has", regardless of whether entity E is an entity word or a relational word, entity E is taken as the target object.

[0080] 4. If the interrogative word has no directly dependent entity, find the predicate V whose relationship with the interrogative word is SBV (verb-object relationship). (That is, the case where the interrogative word is the subject)

[0081] If there is an entity E whose relationship with the predicate satisfies any of the following conditions: a) The relationship with the predicate is VOB (verb-object relationship); b) The relationship with a certain preposition is POB, and the relationship between this preposition and the predicate is POB. Then it is divided into two cases:

[0082] 4.1 When the predicate is a relational word, select the predicate as the target object. The entity type corresponding to the retrieval result is: with entity E as the object, the predicate as the relationship, and the subject type in the concept knowledge graph as the target object.

[0083] 4.2 When the predicate is not a relational word, select entity E as the target object. For example, when the predicate contains "is", "is called", "has", regardless of whether entity E is an entity word or a relational word, entity E is taken as the target object.

[0084] 5. In the case where no interrogative word appears, take the last entity E (which can be any of an entity word, an attribute word, or a relational word) that appears in the sentence as the target object. If entity E is an entity word, it is taken as the target object; if it is an attribute word or a relational word, look up the SPO triple type in the concept knowledge graph (person -> live -> location), and the corresponding object is the returned entity type.

[0085] In addition, there is also the case where no entity is recognized, which may be caused by inaccurate entity recognition or the knowledge graph not covering it, and then return the information of "failed to parse".

[0086] The detection of the technical solution of this application uses the retrieved corpus as an application case, and the accuracy rate of the test is as Figure 6 shown.

[0087] Based on the above content, it can be seen that compared with modeling and other methods in related technologies, this application abandons the traditional method of using classification models for intent recognition, but instead applies the idea of ​​transfer learning. After entity recognition and syntactic analysis, it combines the domain concept knowledge graph for knowledge reasoning. The corpus and rule configuration required to complete the analysis of the target object are relatively small, and the intent of the search sentence can be identified very accurately.

[0088] Figure 7 A schematic diagram of the structure of a natural language search statement parsing device provided in an embodiment of the present application is shown. Figure 7 As shown, the device comprises:

[0089] The recognition module 71 is used to perform entity word recognition and question word recognition on the input sentence, and obtain entity word recognition results and question word recognition results respectively;

[0090] A dependency syntactic analysis module 72, configured to perform dependency syntactic analysis on the input sentence according to the entity word recognition result and the question word recognition result, to obtain a dependency syntactic analysis result;

[0091] The target object parsing module 73 is used to parse the target object according to the dependency syntax analysis result and the concept knowledge graph to obtain the target object parsing result.

[0092] In a feasible implementation manner, the recognition module 71 is used to perform entity word recognition on an input sentence to obtain an entity word recognition result, including:

[0093] Performing word segmentation on the input sentence to obtain a word segmentation result;

[0094] According to the word segmentation result, entity word recognition is performed on the input sentence to obtain an entity word recognition result.

[0095] In a feasible implementation manner, when the recognition module 71 is used to perform interrogative word recognition on the input sentence to obtain an interrogative word recognition result, it includes:

[0096] Based on the question word recognition rule and the question word dictionary, question word recognition is performed on the input sentence.

[0097] In a feasible implementation scheme, the identification module 71 is further used for:

[0098] Before the input sentence is segmented, a domain-defined dictionary is set, and the input sentence is segmented according to the domain-defined dictionary.

[0099] In a feasible implementation scheme, the identification module 71 is further used for:

[0100] The input sentence is segmented to obtain a segmentation result, and then the segmentation result is tagged with parts of speech to obtain a part of speech tagging result for dependency syntax analysis.

[0101] In a feasible implementation, the dependency syntax analysis module 72 is used to perform dependency syntax analysis on the input sentence according to the entity word recognition result and the question word recognition result, including:

[0102] The word segmentation result, the part-of-speech tagging result and the entity word recognition result are used as input features and input into a dependency syntactic analysis model algorithm to obtain a dependency syntactic analysis result.

[0103] In a feasible implementation scheme, the target object parsing module 73 is also used for:

[0104] Search for a matching answer based on the obtained target object parsing result.

[0105] A natural language search statement parsing device can be specific hardware on a device or software or firmware installed on a device. The device provided in the embodiment of the present application has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding contents in the aforementioned method embodiment. Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0106] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0108] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0109] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0110] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0111] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A natural language search sentence parsing method, applied in the field of natural language search, characterized in that: include: Perform entity word recognition and question word recognition on the input sentence to obtain entity word recognition results and question word recognition results respectively; According to the entity word recognition result and the question word recognition result, the input sentence is subjected to dependency syntactic analysis to obtain a dependency syntactic analysis result; wherein the dependency syntactic analysis is to study the dependency relationship of all words in the sentence; Parsing the target object according to the dependency syntactic analysis result and the concept knowledge graph to obtain a target object parsing result; The target object is determined in the following way: Select the entity words that the question words depend on as the target objects; When the question word has no directly dependent entity, and the question word itself contains entity information, the entity is selected as the target object; When the question word has no directly dependent entity and the question word does not carry entity information, search for a predicate that meets any of the following conditions: the relationship with the question word is a subject-object relationship, the relationship with one of the prepositions is CMP, and the relationship between the preposition and the question word is POB; if there is an entity that depends on the predicate and the relationship is a subject-predicate relationship, when the predicate is a relational word, select the predicate as the target object; when the predicate is not a relational word, select the entity as the target object; When the question word has no directly dependent entity, search for a predicate whose relationship with the question word is a subject-verb relationship; if the relationship between an entity and the predicate satisfies any of the following conditions: the relationship with the predicate is a subject-verb relationship, the relationship with one of the prepositions is POB, and the relationship between the preposition and the predicate is POB, then if the predicate is a relational word, select the predicate as the target object, and if the predicate is not a relational word, select the entity as the target object; When no question words appear, the last entity appearing in the sentence is used as the target object; Performing question word recognition on the input sentence to obtain a question word recognition result includes: Based on the question word recognition rule and the question word dictionary, question word recognition is performed on the input sentence.

2. The natural language search statement parsing method according to claim 1, characterized in that: The step of performing entity word recognition on the input sentence to obtain an entity word recognition result includes: Performing word segmentation on the input sentence to obtain a word segmentation result; According to the word segmentation result, entity word recognition is performed on the input sentence to obtain an entity word recognition result.

3. The natural language search statement parsing method according to claim 2, characterized in that: Before segmenting the input sentence, the method further includes: A domain-defined dictionary is set, and the input sentence is segmented according to the domain-defined dictionary.

4. The natural language search sentence parsing method according to claim 2, characterized in that: The input sentence is segmented to obtain the segmentation result, including: Part-of-speech tagging is performed on the word segmentation result to obtain a part-of-speech tagging result for dependency syntactic analysis.

5. The natural language search sentence parsing method according to claim 4, characterized in that: According to the entity word recognition result and the question word recognition result, the input sentence is subjected to dependency syntactic analysis, including: The word segmentation result, the part-of-speech tagging result and the entity word recognition result are used as input features and input into a dependency syntactic analysis model algorithm to obtain a dependency syntactic analysis result.

6. A natural language search sentence parsing device, applied to the field of natural language search, characterized in that: include: A recognition module is used to perform entity word recognition and question word recognition on the input sentence, and obtain entity word recognition results and question word recognition results respectively; A dependency syntactic analysis module, used to perform dependency syntactic analysis on the input sentence according to the entity word recognition result and the question word recognition result, to obtain a dependency syntactic analysis result; wherein the dependency syntactic analysis is to study the dependency relationship of all words in the sentence; The target object parsing module is used to parse the target object according to the dependency syntactic analysis result and the concept knowledge graph to obtain the target object parsing result; wherein the target object is determined by: Select the entity words that the question words depend on as the target objects; When the question word has no directly dependent entity, and the question word itself contains entity information, the entity is selected as the target object; When the question word has no directly dependent entity and the question word does not carry entity information, search for a predicate that meets any of the following conditions: the relationship with the question word is a subject-object relationship, the relationship with one of the prepositions is CMP, and the relationship between the preposition and the question word is POB; if there is an entity that depends on the predicate and the relationship is a subject-predicate relationship, when the predicate is a relational word, select the predicate as the target object; when the predicate is not a relational word, select the entity as the target object; When the question word has no directly dependent entity, search for a predicate whose relationship with the question word is a subject-verb relationship; if the relationship between an entity and the predicate satisfies any of the following conditions: the relationship with the predicate is a subject-verb relationship, the relationship with one of the prepositions is POB, and the relationship between the preposition and the predicate is POB, then if the predicate is a relational word, select the predicate as the target object, and if the predicate is not a relational word, select the entity as the target object; When no question words appear, the last entity appearing in the sentence is used as the target object; When the recognition module is used to perform interrogative word recognition on the input sentence to obtain an interrogative word recognition result, it includes: Based on the question word recognition rule and the question word dictionary, question word recognition is performed on the input sentence.

7. The natural language search sentence parsing device according to claim 6, characterized in that: Also includes: The retrieval module is used to search for the appropriate answer based on the obtained target object analysis result.

8. An electronic device for parsing natural language search statements, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the natural language search statement parsing method according to any one of claims 1 to 5 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are executed.

Citation Information

Patent Citations

  • User intention identification method and user intention identification system

    CN108304466A

  • A data processing method and server

    CN109408811A