CN111813914B - Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium - Google Patents

Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium Download PDF

Info

Publication number
CN111813914B
CN111813914B CN202010666284.3A CN202010666284A CN111813914B CN 111813914 B CN111813914 B CN 111813914B CN 202010666284 A CN202010666284 A CN 202010666284A CN 111813914 B CN111813914 B CN 111813914B
Authority
CN
China
Prior art keywords
entity
alias name
preset
dictionary tree
alias
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010666284.3A
Other languages
Chinese (zh)
Other versions
CN111813914A (en
Inventor
聂镭
齐凯杰
聂颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Longma Zhixin Zhuhai Hengqin Technology Co ltd
Original Assignee
Longma Zhixin Zhuhai Hengqin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Longma Zhixin Zhuhai Hengqin Technology Co ltd filed Critical Longma Zhixin Zhuhai Hengqin Technology Co ltd
Priority to CN202010666284.3A priority Critical patent/CN111813914B/en
Publication of CN111813914A publication Critical patent/CN111813914A/en
Application granted granted Critical
Publication of CN111813914B publication Critical patent/CN111813914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application is applicable to the technical field of natural language processing, and provides a question and answer method, a device, a recognition device and a readable storage medium based on a dictionary tree, wherein the method comprises the following steps: acquiring inquiry information input by a user; inputting inquiry information into a preset dictionary tree to obtain a first entity of the inquiry information; inputting the first entity into a preset knowledge graph to obtain a second entity corresponding to the first entity; and generating answer information according to the second entity, and returning the answer information to the user. Therefore, the problem that the question answering system in the prior art cannot well identify the user input due to the fact that the calling modes of the alias names of the entities are more in the prior art can be solved, and the effect that the user can be accurately replied in the question answering process is achieved.

Description

Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium
Technical Field
The application belongs to the technical field of natural language processing, and particularly relates to a question and answer method and device based on a dictionary tree, a recognition device and a readable storage medium.
Background
In the prior art, a common question-answering system can provide answers to questions for users by using accurate and concise natural language, and generally has the working principle that the questions input by the users are decomposed into a plurality of small questions, then answers matched with the small questions are extracted from a knowledge base one by one, and finally the answers matched with the small questions are displayed to the clients.
Generally, in questions input by a user to a question-answering system, due to different individual spoken language expression habits of the user, names corresponding to the same entity in the questions can be universal name names or alias names, and due to more calling ways of the alias names of the entities, the question-answering system in the prior art cannot well identify the questions input by the user, so that the questions input by the user cannot be accurately replied in the question-answering process.
Disclosure of Invention
The embodiment of the application provides a question-answering method and device based on a dictionary tree, question-answering equipment and a readable storage medium, and can solve the problem that user input cannot be well recognized in the prior art.
In a first aspect, an embodiment of the present application provides a question-answering method based on a dictionary tree, including:
acquiring inquiry information input by a user, wherein the inquiry information comprises an alias name;
inputting the query information into a preset dictionary tree to obtain a first entity of the query information;
inputting the first entity into a preset knowledge graph to obtain a second entity corresponding to the first entity;
and generating answer information according to the second entity, and returning the answer information to the user.
In a possible manner of the first aspect, before the obtaining of the query information input by the user, the method includes:
finding out the first entity from the preset knowledge graph;
acquiring an alias name corresponding to the first entity according to a preset alias construction rule, and establishing a corresponding relation between the first entity and the alias name;
and constructing the preset dictionary tree according to the alias name.
In a possible manner of the first aspect, constructing the preset trie according to the alias name includes:
converting the alias name into character data, wherein the character data comprises a first head element, a first middle element and a first tail element;
inserting character data with the same first head element into a first branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, a first middle element and a first tail element, and inserting character data with different first head elements into a second branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, the first middle element and the first tail element, so as to form the preset dictionary tree.
In a possible implementation manner of the first aspect, acquiring an alias name corresponding to the first entity according to a preset alias construction rule, and establishing a correspondence between the first entity and the alias name includes:
dividing the first entity into sub-entities;
determining a sub-alias name corresponding to the sub-entity;
combining the sub-alias names to obtain the alias names;
and establishing a corresponding relation between the first entity and the alias name.
In a possible implementation manner of the first aspect, inputting the query information into a preset dictionary tree to obtain a first entity of the query information includes:
searching the alias name corresponding to the inquiry information in the preset dictionary tree;
and taking the first entity corresponding to the alias name as the first entity of the query information based on the corresponding relation between the alias name and the first entity.
In a possible implementation manner of the first aspect, generating answer information according to the second entity, and returning the answer information to the user includes:
acquiring candidate answer information matched with the second entity from a preset answer library;
screening out candidate answer information with the highest weight value in the candidate answer information, and taking the candidate answer information with the highest weight value as the answer information.
In a second aspect, an embodiment of the present application provides a question answering device based on a dictionary tree, including:
and the acquisition device is used for acquiring inquiry information input by a user.
Wherein the query information includes an alias name;
the first searching module is used for inputting the inquiry information into a preset dictionary tree to obtain a first entity of the inquiry information.
The second searching module is used for inputting the first entity into a preset knowledge graph to obtain a second entity corresponding to the first entity;
and the feedback module is used for generating answer information according to the second entity and returning the answer information to the user.
In a possible implementation manner of the second aspect, the question answering device further includes:
the searching unit is used for searching the first entity from the preset knowledge graph;
the obtaining unit is used for obtaining an alias name corresponding to the first entity according to a preset alias construction rule and establishing a corresponding relation between the first entity and the alias name;
and the construction unit is used for constructing the preset dictionary tree according to the alias name.
In a possible implementation manner of the second aspect, the building unit includes:
a conversion subunit, configured to convert the alias name into character data, where the character data includes a first head element, a first middle element, and a first tail element;
and the construction subunit is used for inserting the character data with the same first head element into a first branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, the first middle element and the first tail element, and inserting the character data with different first head elements into a second branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, the first middle element and the first tail element to form the preset dictionary tree.
In a possible implementation manner of the second aspect, the obtaining unit includes:
a partitioning subunit, configured to partition the first entity into sub-entities;
a determining subunit, configured to determine a sub-alias name corresponding to the sub-entity;
the combination unit is used for combining the sub-alias names to obtain the alias names;
and the establishing subunit is used for establishing the corresponding relation between the first entity and the alias name.
In a possible implementation manner of the second aspect, the first lookup module includes:
the alias name searching unit is used for searching the alias name corresponding to the inquiry information in the preset dictionary tree;
and the searching unit is used for taking the first entity corresponding to the alias name as the first entity of the query information based on the corresponding relation between the alias name and the first entity.
In one possible implementation manner of the second aspect, the feedback module includes:
the candidate answer obtaining module is used for obtaining candidate answer information matched with the second entity from a preset answer library;
and the screening module is used for screening out the candidate answer information with the highest weight value in the candidate answer information, and taking the candidate answer information with the highest weight value as the answer information.
In a third aspect, an embodiment of the present application provides a question answering device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the method according to the first aspect
In a fourth aspect, the present application provides a readable storage medium, and the computer program when executed by a processor implements the method as described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that:
according to the embodiment of the application, the alias name of the inquiry information and the first entity corresponding to the alias name are firstly identified by using the preset dictionary tree, then the second entity corresponding to the first entity is obtained according to the preset knowledge graph, and finally the answer information is formed according to the second entity, so that the problem that in the prior art, the question answering system in the prior art cannot well identify the user input due to the fact that the alias names of the entities are in a plurality of calling modes is solved, and the effect of accurately replying the user in the question answering process is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a question-answering method based on a dictionary tree according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for question answering based on a dictionary tree according to an embodiment of the present application before step S101 in fig. 1;
fig. 3 is a schematic specific flowchart of step S202 in fig. 1 of a question-answering method based on a dictionary tree according to an embodiment of the present application;
fig. 4 is a schematic flowchart of step S203 in fig. 1 of a question-answering method based on a dictionary tree according to an embodiment of the present application;
fig. 5 is a schematic flowchart of step S102 in fig. 1 of a question-answering method based on a dictionary tree according to an embodiment of the present application;
fig. 6 is a schematic flowchart of step S104 in fig. 1 applying for the question-answering method based on the dictionary tree according to the embodiment;
fig. 7 is a schematic structural diagram of a question answering device based on a dictionary tree according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a question answering device provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a preset dictionary tree of the question answering method based on the dictionary tree according to the embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The technical solution provided by the present application is described below by specific examples.
Referring to fig. 1, a schematic flow chart of a question-answering method based on a dictionary tree provided in an embodiment of the present application is applied to a question-answering device, where the question-answering device includes a server or a terminal device, and the method includes:
and step S101, acquiring inquiry information input by a user.
The query information includes an alias name and a common name.
It should be noted that the query information input by the user may be text information or text information converted according to the voice information input by the user, and the source of the query information input by the user is not limited in this embodiment of the application.
Referring to fig. 2 by way of example and not limitation, a flow chart of the method for question answering based on a dictionary tree in fig. 1 before step S101 according to the embodiment of the present application is shown, where before obtaining query information input by a user, the method includes:
step S201, finding out a first entity from a preset knowledge graph.
The preset knowledge graph comprises a question-answer association relation; the preset knowledge graph includes a first entity, a relationship between the first entity and a second entity, specifically, the first entity may refer to an entity extracted from query information input by a user, for example, how many nationalities the china has, and then the entity extracted from how many nationalities the china has is "china", "how many" and "nationalities", and correspondingly, the second entity may refer to an entity corresponding to the first entity, for example, "56".
In specific application, the knowledge graph content to be displayed is stored in a database in advance according to different application scenes, and different databases such as a neo4j database, a mongoDB database and the like can be selected according to corresponding service scenes. Then, the first entity is found from the preset knowledge graph, namely the first entity is found from the database corresponding to the preset knowledge graph.
Step S202, obtaining an alias name corresponding to the first entity according to a preset alias construction rule, and establishing a corresponding relation between the first entity and the alias name.
As an example and not by way of limitation, the preset alias construction rule may refer to different expression ways of the same entity, that is, the different expression ways substantially point to the same entity, for example, a common name of the entity "china" may be "china", and an alias name may be "china", "the people's republic of china"; for example, the alias name of the entity "frog, level I, mid-landing ship" may be "Frosch, type 108, LSM", where it may be "hundredth company" or "hundredth", "Frosch" is substantially the same as "frog", "level I" is substantially the same as "type 108", and "LSM" is substantially the same as "mid-landing ship". Also for example, the alias name of the entity "Beijing Baidu network science and technology Co., Ltd" may be "Baidu", or "Baidu Co., Ltd".
Specifically, referring to fig. 3, for a specific flowchart of step S202 in fig. 1 of the question-answering method based on the dictionary tree provided in the embodiment of the present application, obtaining an alias name corresponding to a first entity according to a preset alias construction rule, and establishing a corresponding relationship between the first entity and the alias name includes:
step S301, dividing the first entity into sub-entities.
For example, the first entity is "frog, level l, medium landing ship", then the sub-entities are "frog", "level l", "medium landing ship", respectively.
Step S302, the name of the sub-alias corresponding to the sub-entity is determined.
For example, the sub-alias name corresponding to the sub-entity "frog" may be "Frosch", and the sub-alias name corresponding to the sub-entity "medium landing ship" may be "LSM".
And step S303, combining the sub-alias names to obtain the alias names.
It will be appreciated that there may be more than one of each sub-entity and that each of the sub-entities may be combined with each other.
Preferentially, after the sub-alias name corresponding to the sub-entity is determined, some unreasonable data can be cleaned, for example, the entity "Manshan (525) guard ship", and the obtained alias name includes "Manshan" guard ship, "525" and "525 guard ship", where "525" only contains data and cannot actually obtain the corresponding equipment entity through "525", and therefore, similar data which do not conform to the actual situation are removed, and redundancy of the data is reduced.
And step S304, establishing a corresponding relation between the first entity and the alias name.
Specifically, the correspondence between the first entity and the alias name may be established in a mapping manner.
And step S203, constructing a preset dictionary tree according to the alias name.
Specifically, referring to fig. 4, for a specific flowchart illustration in step S203 in fig. 1 of the question-answering method based on the dictionary tree provided in the embodiment of the present application, the construction of the dictionary tree according to the alias name includes:
step S401 converts the alias name into character data.
The character data comprises a first head element, a first middle element and a first tail element.
For example, if the alias name is "Jian-15", the character data is "a, b, c", where "a" corresponds to "Jian", "b" corresponds to "1", and "c" corresponds to "5", where "a" is the first head element, "b" is the first middle element, and "c" is the first tail element.
Step S402, inserting character data with the same first head element into a first branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, a first middle element and a first tail element, and inserting character data with different first head elements into a second branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, the first middle element and the first tail element, so as to form a preset dictionary tree.
Referring to fig. 9, a schematic structural diagram of a preset dictionary tree of the question-answering method based on the dictionary tree provided in the embodiment of the present application includes character data "fighter 15", character data "fighter 32", and character data "fortune 18", where a first head element of the character data "fighter 15" is "fighter", an intermediate element is "1" and a first tail element is "5", a first head element of the character data "fighter 32" is "fighter", an intermediate element is "3" and a first tail element is "2", a first head element of the character data "fortune 18" is "fortune", an intermediate element is "1" and a first tail element is "8". As can be seen, the character data "fighter 15" and the character data "fighter 32" form a first branch, and the character data "fortune 18" form a second branch.
Step S102, inputting the inquiry information into a preset dictionary tree to obtain a first entity of the inquiry information.
Referring to fig. 5 by way of example and not limitation, a specific flowchart of step S102 in fig. 1 of a method for question answering based on a dictionary tree according to an embodiment of the present application is shown, where query information is input into a preset dictionary tree to obtain a first entity of the query information, where the first entity includes:
step S501, looking up the alias name corresponding to the query information in a preset dictionary tree.
Specifically, each character data in the query information is input into the preset dictionary tree, and is matched with the character data corresponding to the alias name of the preset dictionary tree, so that the alias name corresponding to the successfully matched character data is obtained.
Step S502, based on the corresponding relation between the alias name and the first entity, the first entity corresponding to the alias name is used as the first entity of the query information.
It can be understood that, after the alias name corresponding to the query information is found, the first entity corresponding to the alias name can be obtained.
Step S103, inputting the first entity into a preset knowledge graph to obtain a second entity corresponding to the first entity.
The preset knowledge graph stores the corresponding relation between the first entity and the second entity.
And step S104, generating answer information according to the second entity, and returning the answer information to the user.
By way of example and not limitation, referring to fig. 6, a specific flowchart of step S104 in fig. 1 of the method for question answering based on a dictionary tree according to an embodiment of the present application is shown, where generating answer information according to a second entity and returning the answer information to a user includes:
step S601, obtaining candidate answer information matched with the second entity from a preset answer library.
It is understood that after the second entity is found, the answer information is formed by using the preset answer library.
Step S602, the candidate answer information with the highest weight value among the candidate answer information is screened out, and the candidate answer information with the highest weight value is used as the answer information.
The weight value is preset, and may be set manually, or set according to the number of occurrences of the candidate answer information.
According to the embodiment of the application, the alias name of the inquiry information and the first entity corresponding to the alias name are firstly identified by using the preset dictionary tree, then the second entity corresponding to the first entity is obtained according to the preset knowledge graph, and finally the answer information is formed according to the second entity, so that the problem that in the prior art, the question answering system in the prior art cannot well identify the user input due to the fact that the alias names of the entities are in a plurality of calling modes is solved, and the effect of accurately replying the user in the question answering process is achieved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the question-answering method based on the dictionary tree described in the above embodiment, fig. 7 shows a structural block diagram of the question-answering device based on the dictionary tree provided in the embodiment of the present application, and for convenience of explanation, only the parts related to the embodiment of the present application are shown.
Referring to fig. 7, the trehelf-based question answering apparatus includes:
the obtaining device 71 is used for obtaining the inquiry information input by the user.
Wherein the query information includes an alias name;
the first lookup module 72 is configured to input the query information into a preset dictionary tree, so as to obtain a first entity of the query information.
A second searching module 73, configured to input the first entity into a preset knowledge graph, so as to obtain a second entity corresponding to the first entity;
and a feedback module 74, configured to generate answer information according to the second entity, and return the answer information to the user.
In one possible implementation manner, the question answering apparatus further includes:
the searching unit is used for searching the first entity from the preset knowledge graph;
the obtaining unit is used for obtaining an alias name corresponding to the first entity according to a preset alias construction rule and establishing a corresponding relation between the first entity and the alias name;
and the construction unit is used for constructing the preset dictionary tree according to the alias name.
In one possible implementation, the building unit includes:
a conversion subunit, configured to convert the alias name into character data, where the character data includes a first head element, a first middle element, and a first tail element;
and the construction subunit is used for inserting the character data with the same first head element into a first branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, the first middle element and the first tail element, and inserting the character data with different first head elements into a second branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, the first middle element and the first tail element to form the preset dictionary tree.
In one possible implementation, the obtaining unit includes:
a partitioning subunit, configured to partition the first entity into sub-entities;
a determining subunit, configured to determine a sub-alias name corresponding to the sub-entity;
the combination unit is used for combining the sub-alias names to obtain the alias names;
and the establishing subunit is used for establishing the corresponding relation between the first entity and the alias name.
In one possible implementation, the first lookup module includes:
the alias name searching unit is used for searching the alias name corresponding to the inquiry information in the preset dictionary tree;
and the searching unit is used for taking the first entity corresponding to the alias name as the first entity of the query information based on the corresponding relation between the alias name and the first entity.
In one possible implementation, the feedback module includes:
the candidate answer obtaining module is used for obtaining candidate answer information matched with the second entity from a preset answer library;
and the screening module is used for screening out the candidate answer information with the highest weight value in the candidate answer information, and taking the candidate answer information with the highest weight value as the answer information.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Fig. 8 is a schematic structural diagram of a question answering device according to an embodiment of the present application. As shown in fig. 8, the question answering apparatus of this embodiment includes: at least one processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, the processor 80 implementing the steps in the above-described dictionary-tree based method embodiment when executing the computer program 82.
The question answering device 8 may be a terminal device or a server, wherein the terminal device may be a computing device such as a desktop computer, a notebook computer, a palm computer, and the like, and the server may be a computing device such as a cloud server. The question answering device may include, but is not limited to, a processor 80, a memory 81.
The Processor 80 may be a Central Processing Unit (CPU), and the Processor 80 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may be an internal storage unit of the question answering device 8 in some embodiments, such as a hard disk or a memory of the question answering device 8.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a readable storage medium, which may be a computer readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (7)

1. A question-answering method based on a dictionary tree is characterized by comprising the following steps:
acquiring inquiry information input by a user, wherein the inquiry information comprises an alias name and a universal name;
inputting the query information into a preset dictionary tree to obtain a first entity of the query information;
inputting the query information into a preset dictionary tree to obtain a first entity of the query information, wherein the first entity comprises: searching an alias name corresponding to the query information in the preset dictionary tree, and taking a first entity corresponding to the alias name as a first entity of the query information based on the corresponding relation between the alias name and the first entity;
inputting the first entity into a preset knowledge graph to obtain a second entity corresponding to the first entity;
generating answer information according to the second entity, and returning the answer information to the user;
before the query information input by the user is acquired, the method comprises the following steps:
finding out the first entity from the preset knowledge graph;
acquiring an alias name corresponding to the first entity according to a preset alias construction rule, and establishing a corresponding relation between the first entity and the alias name;
constructing the preset dictionary tree according to the alias name;
constructing the preset dictionary tree according to the alias name, wherein the construction comprises the following steps:
converting the alias name into character data, wherein the character data comprises a first head element, a first middle element and a first tail element;
inserting character data with the same first head element into a first branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, a first middle element and a first tail element, and inserting character data with different first head elements into a second branch of the dictionary tree from near to far according to the arrangement sequence of the first head element, the first middle element and the first tail element, so as to form the preset dictionary tree.
2. The question-answering method based on the dictionary tree of claim 1, wherein obtaining an alias name corresponding to the first entity according to a preset alias construction rule, and establishing a correspondence between the first entity and the alias name comprises:
dividing the first entity into sub-entities;
determining a sub-alias name corresponding to the sub-entity;
combining the sub-alias names to obtain the alias names;
and establishing a corresponding relation between the first entity and the alias name.
3. The method of claim 1, wherein generating answer information from the second entity and returning the answer information to the user comprises:
acquiring candidate answer information matched with the second entity from a preset answer library;
screening out candidate answer information with the highest weight value in the candidate answer information, and taking the candidate answer information with the highest weight value as the answer information.
4. A question-answering device based on a dictionary tree, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring inquiry information input by a user, and the inquiry information comprises an alias name and a universal name;
the first entity information generation module is used for inputting the inquiry information into a preset dictionary tree to obtain a first entity of the inquiry information;
the second entity new generation module is used for inputting the first entity into a preset knowledge graph to obtain a second entity corresponding to the first entity;
the feedback module is used for generating answer information according to the second entity and returning the answer information to the user;
a first entity information generation module comprising:
the alias name searching unit is used for searching the alias name corresponding to the inquiry information in the preset dictionary tree;
and the searching unit is used for taking the first entity corresponding to the alias name as the first entity of the query information based on the corresponding relation between the alias name and the first entity.
5. The dictionary-tree based question answering device according to claim 4, wherein said question answering device further comprises:
the searching unit is used for searching the first entity from the preset knowledge graph;
the obtaining unit is used for obtaining an alias name corresponding to the first entity according to a preset alias construction rule and establishing a corresponding relation between the first entity and the alias name;
and the construction unit is used for constructing the preset dictionary tree according to the alias name.
6. A question-answering apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any one of claims 1 to 3 when executing the computer program.
7. A readable storage medium, storing a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any of claims 1 to 3.
CN202010666284.3A 2020-07-13 2020-07-13 Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium Active CN111813914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010666284.3A CN111813914B (en) 2020-07-13 2020-07-13 Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010666284.3A CN111813914B (en) 2020-07-13 2020-07-13 Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111813914A CN111813914A (en) 2020-10-23
CN111813914B true CN111813914B (en) 2021-07-06

Family

ID=72842804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010666284.3A Active CN111813914B (en) 2020-07-13 2020-07-13 Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111813914B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112668334B (en) * 2020-12-16 2024-02-13 科大讯飞股份有限公司 Entity identification method, electronic equipment and storage device
CN112685544A (en) * 2020-12-25 2021-04-20 中国联合网络通信集团有限公司 Telecommunication information query method, device, equipment and medium
CN113627178A (en) * 2021-08-27 2021-11-09 四川长虹电器股份有限公司 Configurable field recognition method based on dictionary tree classification

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480125A (en) * 2017-07-05 2017-12-15 重庆邮电大学 A kind of relational links method of knowledge based collection of illustrative plates
CN109165284A (en) * 2018-08-22 2019-01-08 重庆邮电大学 A kind of financial field human-computer dialogue intension recognizing method based on big data
CN109670163A (en) * 2017-10-17 2019-04-23 阿里巴巴集团控股有限公司 Information identifying method, information recommendation method, template construction method and calculating equipment
CN110399457A (en) * 2019-07-01 2019-11-01 吉林大学 A kind of intelligent answer method and system
CN110457431A (en) * 2019-07-03 2019-11-15 深圳追一科技有限公司 Answering method, device, computer equipment and the storage medium of knowledge based map
CN110929016A (en) * 2019-12-10 2020-03-27 北京爱医生智慧医疗科技有限公司 Intelligent question and answer method and device based on knowledge graph
CN111368011A (en) * 2020-03-03 2020-07-03 京东方科技集团股份有限公司 Knowledge graph construction method and device, computer equipment and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9189742B2 (en) * 2013-11-20 2015-11-17 Justin London Adaptive virtual intelligent agent
CN107977393A (en) * 2017-05-22 2018-05-01 海南大学 A kind of recommended engine design method based on data collection of illustrative plates, Information Atlas, knowledge mapping and wisdom collection of illustrative plates towards 5W question and answer
CN107341215B (en) * 2017-06-07 2020-05-12 北京航空航天大学 Multi-source vertical knowledge graph classification integration query system based on distributed computing platform
CN107748757B (en) * 2017-09-21 2021-05-07 北京航空航天大学 Question-answering method based on knowledge graph
US10846288B2 (en) * 2018-07-02 2020-11-24 Babylon Partners Limited Computer implemented method for extracting and reasoning with meaning from text
CN109408627B (en) * 2018-11-15 2021-03-02 众安信息技术服务有限公司 Question-answering method and system fusing convolutional neural network and cyclic neural network
CN109710942B (en) * 2018-12-28 2022-11-18 零犀(北京)科技有限公司 Map construction method and device and electronic equipment
CN111309863B (en) * 2020-02-10 2020-12-18 北京声智科技有限公司 Natural language question-answering method and device based on knowledge graph

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480125A (en) * 2017-07-05 2017-12-15 重庆邮电大学 A kind of relational links method of knowledge based collection of illustrative plates
CN109670163A (en) * 2017-10-17 2019-04-23 阿里巴巴集团控股有限公司 Information identifying method, information recommendation method, template construction method and calculating equipment
CN109165284A (en) * 2018-08-22 2019-01-08 重庆邮电大学 A kind of financial field human-computer dialogue intension recognizing method based on big data
CN110399457A (en) * 2019-07-01 2019-11-01 吉林大学 A kind of intelligent answer method and system
CN110457431A (en) * 2019-07-03 2019-11-15 深圳追一科技有限公司 Answering method, device, computer equipment and the storage medium of knowledge based map
CN110929016A (en) * 2019-12-10 2020-03-27 北京爱医生智慧医疗科技有限公司 Intelligent question and answer method and device based on knowledge graph
CN111368011A (en) * 2020-03-03 2020-07-03 京东方科技集团股份有限公司 Knowledge graph construction method and device, computer equipment and medium

Also Published As

Publication number Publication date
CN111813914A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN111813914B (en) Question-answering method and device based on dictionary tree, recognition equipment and readable storage medium
EP3514694B1 (en) Query translation
US10936956B2 (en) Cognitive question answering pipeline blending
US10303689B2 (en) Answering natural language table queries through semantic table representation
JP2018533126A (en) Method, system, and computer program product for a natural language interface to a database
US20200074999A1 (en) Semi-supervised question answering machine
US20200097843A1 (en) Cognitive question answering pipeline calibrating
WO2021218144A1 (en) Data processing method and apparatus, computer device, and storage medium
US11663255B2 (en) Automatic collaboration between distinct responsive devices
JP2007535741A (en) Two-step data validation and mapping for database access
CN113906445A (en) Context aware data mining
CN112115232A (en) Data error correction method and device and server
CN112925898B (en) Question-answering method and device based on artificial intelligence, server and storage medium
US7685120B2 (en) Method for generating and prioritizing multiple search results
US20140244641A1 (en) Holistic customer record linkage via profile fingerprints
US10324949B2 (en) Method and system for consolidating data retrieved from different sources
CN110209780B (en) Question template generation method and device, server and storage medium
US20210216713A1 (en) Method, apparatus, device and storage medium for intelligent response
CN113326363B (en) Searching method and device, prediction model training method and device and electronic equipment
CN110717012A (en) Method, device, equipment and storage medium for recommending grammar
CN110750509A (en) Enterprise name duplicate checking method and device, equipment and medium
CN115098655A (en) Common question answering method, system, equipment and medium
US11341190B2 (en) Name matching using enhanced name keys
CN111737425B (en) Response method, device, server and storage medium
CN113468306A (en) Voice conversation method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 519031 office 1316, No. 1, lianao Road, Hengqin new area, Zhuhai, Guangdong

Patentee after: LONGMA ZHIXIN (ZHUHAI HENGQIN) TECHNOLOGY Co.,Ltd.

Address before: Room 417.418.419, building 20, creative Valley, 1889 Huandao East Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee before: LONGMA ZHIXIN (ZHUHAI HENGQIN) TECHNOLOGY Co.,Ltd.