CN115525804A - Information query method and device, electronic equipment and storage medium - Google Patents

Information query method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115525804A
CN115525804A CN202211170281.6A CN202211170281A CN115525804A CN 115525804 A CN115525804 A CN 115525804A CN 202211170281 A CN202211170281 A CN 202211170281A CN 115525804 A CN115525804 A CN 115525804A
Authority
CN
China
Prior art keywords
information
named entity
entity
question
queried
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.)
Pending
Application number
CN202211170281.6A
Other languages
Chinese (zh)
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.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software 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 Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202211170281.6A priority Critical patent/CN115525804A/en
Publication of CN115525804A publication Critical patent/CN115525804A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • 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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Landscapes

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

Abstract

The application provides an information query method, an information query device, electronic equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of carrying out named entity identification on the obtained information to be inquired to obtain a named entity identification result, inquiring whether a named entity exists in a preset graph database or not under the condition that the named entity identification result indicates that the information to be inquired comprises the named entity, obtaining entity information corresponding to the named entity from the graph database under the condition that the named entity exists in the graph database, obtaining all information related to the entity information from the preset information database according to the entity information and outputting all information related to the entity information. Therefore, all information related to the entity information contained in the query information can be quickly and accurately provided in a more automatic mode, and the information acquisition efficiency is improved.

Description

Information query method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information query method, apparatus, electronic device, and storage medium.
Background
With the development of economy, more and more fields are well developed. For example, in the credit field, in order to facilitate that a credit service transactor can become familiar with a credit service system as soon as possible, in the related art, a manual training mode is usually adopted to train the credit service transactor on the credit service system, however, it is difficult to comprehensively introduce all details related to the credit service system in the training process, and the credit service transactor usually needs more operations to acquire all information corresponding to the entity information required by the credit service transactor during the process of using the credit service system, which is inconvenient to acquire the information.
Disclosure of Invention
The application provides an information query method, an information query device, electronic equipment and a storage medium.
An embodiment of one aspect of the present application provides an information query method, which obtains information to be queried; carrying out named entity identification on information to be queried to obtain a named entity identification result; under the condition that the named entity identification result indicates that the information to be inquired contains the named entity, inquiring whether the named entity exists in a preset graph database or not; under the condition that the named entity exists in the graphic database, acquiring entity information corresponding to the named entity from the graphic database; acquiring all information related to the entity information from a preset information database according to the entity information; and outputting all information related to the entity information.
In a possible embodiment, the outputting all information related to the entity information includes: determining an entity type of the named entity; acquiring an information display template corresponding to the entity type; and filling all the information into the information display template, and displaying the filled information display template.
In one possible embodiment, the method further comprises: acquiring a target question matched with the information to be inquired from a question and answer database under the condition that the named entity identification result indicates that the information to be inquired does not contain a named entity or the named entity does not exist in the graph database; acquiring answer information corresponding to the target question from the question-answer database; and outputting the answer information.
In a possible implementation manner, the obtaining, from the question-and-answer database, the target question matched with the information to be queried includes: determining semantic similarity between the information to be queried and each question in the question-answer database; and selecting a target question matched with the information to be inquired from the questions according to the semantic similarity.
In a possible implementation manner, the determining semantic similarity between the information to be queried and each question in the question-and-answer database includes: inputting the information to be inquired and each question in the question-answer database into a text matching model; determining semantic feature vectors of the information to be queried and each question through a feature layer of the text matching model; and determining semantic similarity between the information to be queried and each question in the question-answer database according to semantic similarity between the semantic feature vector of the information to be queried and the semantic feature vector of each question through a feature processing layer of a text matching model.
In a possible implementation manner, the performing named entity recognition on the information to be queried to obtain a named entity recognition result includes: under the condition that the information to be inquired is voice, carrying out character recognition on the information to be inquired to obtain a character recognition result of the information to be inquired; and carrying out named entity recognition on the character recognition result to obtain a named entity recognition result.
In a possible implementation manner, the performing named entity recognition on the word recognition result to obtain the named entity recognition result includes: and inputting the character recognition result into a pre-trained named entity recognition model to obtain a named entity recognition result.
The information query method provided by the embodiment of the application performs named entity recognition on the obtained information to be queried to obtain a named entity recognition result, queries whether a named entity exists in a preset graphic database or not under the condition that the named entity recognition result indicates that the information to be queried includes the named entity, obtains entity information corresponding to the named entity from the graphic database under the condition that the named entity exists in the graphic database, obtains all information related to the entity information from the preset information database according to the entity information, and outputs all information related to the entity information. Therefore, all information related to entity information contained in the query information can be quickly and accurately provided in a relatively automatic mode, and the information acquisition efficiency is improved.
An embodiment of another aspect of the present application provides an information query apparatus, where the apparatus includes: the first acquisition module is used for acquiring information to be inquired; the named entity recognition module is used for carrying out named entity recognition on the information to be queried so as to obtain a named entity recognition result; the query module is used for querying whether the named entity exists in a preset graphic database or not under the condition that the named entity identification result indicates that the information to be queried contains the named entity; the second acquisition module is used for acquiring entity information corresponding to the named entity from the graphic database under the condition that the named entity exists in the graphic database; a third obtaining module, configured to obtain all information related to the entity information from a preset information database according to the entity information; and the output module is used for outputting all information related to the entity information.
The information query device provided in this application embodiment performs named entity identification on the obtained information to be queried to obtain a named entity identification result, queries whether a named entity exists in a preset graphic database under the condition that the named entity identification result indicates that the information to be queried includes the named entity, obtains entity information corresponding to the named entity from the graphic database under the condition that the named entity exists in the graphic database, obtains all information related to the entity information from the preset information database according to the entity information, and outputs all information related to the entity information. Therefore, all information related to the entity information contained in the query information can be quickly and accurately provided in a more automatic mode, and the information acquisition efficiency is improved.
An embodiment of another aspect of the present application provides an electronic device, including: a memory, a processor; the memory stores computer instructions, and when the computer instructions are executed by the processor, the information query method in the embodiment of the application is realized.
Another embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute an information query method disclosed in an embodiment of the present application.
Another embodiment of the present application provides a computer program product, where when executed by an instruction processor in the computer program product, the information query method in the embodiment of the present application is implemented.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be considered limiting of the present application. Wherein:
fig. 1 is a flowchart illustrating an information query method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating an information query method according to another embodiment of the present application.
Fig. 3 is a schematic diagram of a detailed process of obtaining a target question matched with information to be queried from a question-answer database according to an embodiment of the present application.
Fig. 4 is a flowchart illustrating an information query method according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an information query device according to an embodiment of the present application.
FIG. 6 is a block diagram of an electronic device according to one embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
An information query method, an information query device, and an electronic device according to embodiments of the present application are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating an information query method according to an embodiment of the present application. It should be noted that an execution subject of the information query method provided in this embodiment is an information query apparatus, the information query apparatus may be implemented by software and/or hardware, and the information query apparatus in this embodiment may be an electronic device, or may be configured in an electronic device. The electronic device in the embodiment of the present application may include a terminal device, a server, and the like, and the embodiment does not specifically limit the electronic device.
As shown in fig. 1, the information query method may include:
step 101, obtaining information to be queried.
The information to be queried in this example refers to one piece of query information to be processed in the information query device.
The query information may be query information input by a user in a voice or text manner. For example, in the case that the user has a request for inquiry, the information to be inquired may be inputted in the input interface provided by the inquiry information device in a text manner or a voice manner, for example, what the credit business transaction flow is.
And 102, carrying out named entity identification on the information to be queried to obtain a named entity identification result.
In some exemplary embodiments, in the case that the information to be queried is text, that is, in the case that the information to be queried is input in the form of text, the information to be queried may be directly input into a named entity recognition model trained in advance, so as to obtain a named entity recognition result through the named entity recognition model. Therefore, named entity recognition of the information to be queried is quickly and accurately realized through the named entity recognition model.
In some exemplary embodiments, in the case that the information to be queried is voice, that is, in the case that the information to be queried is input in a voice manner, text recognition may be performed on the information to be queried to obtain a text recognition result of the information to be queried, and named entity recognition may be performed on the text recognition result to obtain a named entity recognition result.
In some exemplary embodiments, in order to accurately and quickly determine the named entity in the word recognition result, the possible implementation manners of performing named entity recognition on the word recognition result to obtain the named entity recognition result include: and inputting the character recognition result into a named entity recognition model trained in advance to obtain a named entity recognition result.
And 103, under the condition that the named entity identification result indicates that the information to be inquired contains the named entity, inquiring whether the named entity exists in a preset graph database or not.
The graph database is used for storing a named entity relation graph, wherein the named entity relation graph comprises entity information of named entities and relations among the named entities.
And 104, under the condition that the named entity exists in the graphic database, acquiring entity information corresponding to the named entity from the graphic database.
Specifically, whether the named entity exists in the named entity relationship diagram or not can be determined, and if the named entity exists, entity information corresponding to the named entity is obtained from the named entity relationship diagram.
The entity information refers to information reflecting the named entity itself, that is, the entity information refers to information about the named entity itself, and may include, but is not limited to, entity identification information, entity type, entity profile information, entity attribute information, and the like.
For example, the named entity is "XX company", and the corresponding entity information may include company identification information, basic type of company, company profile information, and the like.
It should be noted that, in this example, the entity information of the named entity is taken as the entity identification information corresponding to the named entity for example to perform an exemplary description.
And 105, acquiring all information related to the entity information from a preset information database according to the entity information.
The information database stores various information related to entity information.
For example, the entity information includes corresponding company identification information, and correspondingly, all information related to the company identification information, such as high-management information corresponding to the company identification and all corresponding related enterprise information, may be obtained from a preset information database according to the company identification information.
And 106, outputting all information related to the entity information.
That is, in this example, all information related to the entity information is output as the query result corresponding to the information to be queried.
In some exemplary embodiments, in order to facilitate the user to view all the information related to the entity information, one possible implementation manner of outputting all the information related to the entity information is as follows: determining an entity type of the named entity; and acquiring an information display template corresponding to the entity type, filling all information into the information display template, and displaying the filled information display template.
In some examples, the entity type of the named entity may be determined from entity information corresponding to the named entity.
The entity type may include, but is not limited to, a person name, a place name, an organization name, and the like, and this embodiment is not limited in this respect.
In some examples, another possible implementation manner of the above outputting all information related to the entity information is: directly displays all information related to the entity information.
In other examples, another possible implementation manner of outputting all the information related to the entity information is as follows: and directly outputting all information related to the entity information in a voice mode.
The information query method provided by the embodiment of the application performs named entity identification on the acquired information to be queried to obtain a named entity identification result, queries whether a named entity exists in a preset graphic database or not under the condition that the named entity identification result indicates that the information to be queried includes the named entity, acquires entity information corresponding to the named entity from the graphic database under the condition that the named entity exists in the graphic database, acquires all information related to the entity information from the preset information database according to the entity information, and outputs all information related to the entity information. Therefore, all information related to entity information contained in the query information can be quickly and accurately provided in a relatively automatic mode, and the information acquisition efficiency is improved.
Fig. 2 is a flowchart illustrating an information query method according to another embodiment of the present application. The present embodiment is further detailed or optimized for the above embodiments.
As shown in fig. 2, the information query method may include:
step 201, obtaining information to be queried.
Step 202, conducting named entity identification on the information to be queried to obtain a named entity identification result.
It should be noted that, for specific implementation manners of step 201 to step 202, reference may be made to relevant descriptions in the embodiments of the present application, and details are not described herein again.
Step 203, according to the result of the named entity identification, determining whether the information to be queried includes the named entity, if yes, executing step 204, otherwise, executing step 208.
Step 204, inquiring whether a named entity exists in a preset graph database, if so, executing step 205, otherwise, executing step 208.
Step 205, obtaining entity information corresponding to the named entity from the graph database.
That is, when the named entity exists in the graphic database, the entity information corresponding to the named entity is acquired from the graphic database.
And step 206, acquiring all information related to the entity information from a preset information database according to the entity information.
Step 207, all information related to the entity information is output.
It should be noted that, for specific implementation manners of step 205 to step 207, reference may be made to relevant descriptions in the embodiments of the present application, and details are not described herein again.
And step 208, acquiring a target question matched with the information to be inquired from the question-answer database.
In some exemplary embodiments, the information to be queried may be matched with each question in the question-answer database to obtain a matching degree between the information to be queried and each question in the question-answer database, and a question with the largest matching degree is selected from the questions in the question-answer database as a target question matched with the information to be queried.
Step 209, obtaining answer information corresponding to the target question from the question-answer database.
And step 210, outputting answer information.
That is, in this example, the answer information is used as the query result corresponding to the information to be queried, and the query result is output.
In some exemplary embodiments, the answer information may be output in a display manner. In other exemplary embodiments, the answer information may also be output by voice playing. In other exemplary embodiments, the answer information may also be output by way of display and voice playing.
It may be understood that, in some examples, the answer information may also be output according to a preset output manner to meet a requirement of a user for personalized setting of the output manner, which is not specifically limited in this embodiment.
In this example, after the information to be queried is identified by the named entity, if the named entity is not identified, it may be determined that the information to be queried input by the corresponding user is a question, and in order to facilitate the corresponding user to obtain a query result of the information to be queried in time, a target question matched with the information to be queried may be obtained from a preset question-answer database, answer information corresponding to the target question may be obtained from the question-answer database, and the answer information may be output as a query result of the information to be queried. Therefore, the query result corresponding to the information to be queried is provided quickly and accurately, and the information acquisition efficiency is improved.
In an embodiment of the present application, in order to clearly understand how to obtain a target question matched with information to be queried from a question-and-answer database, a possible implementation manner of obtaining the target question matched with the information to be queried from the question-and-answer database is exemplarily described below with reference to fig. 3, where fig. 3 is a schematic diagram of a detailed flow of obtaining the target question matched with the information to be queried from the question-and-answer database according to an embodiment of the present application.
As shown in fig. 3, the method further comprises:
step 301, determining semantic similarity between the information to be queried and each question in the question-answer database.
It can be understood that, in different application scenarios, the implementation manners of determining semantic similarity between the information to be queried and each question in the question-and-answer database are different, and an exemplary implementation manner is as follows:
as an example, for each question in the question-and-answer database, a semantic feature vector corresponding to the question may be determined, a semantic feature vector of the information to be queried may be determined, and a semantic similarity between the information to be queried and the question may be determined according to the semantic feature vector corresponding to the question and the semantic feature vector of the information to be queried.
In some examples, the semantic feature vector corresponding to the question and the semantic feature vector of the information to be queried may be determined through a pre-trained semantic representation model.
The semantic Representation model in this example may be a knowledge Enhanced semantic Representation (ERNIE), a BERT (Bidirectional Encoder Representation from transformations) model, or other semantic Representation models capable of performing semantic Representation on a text, and the semantic Representation model used in an actual application may be selected according to an actual application requirement, which is not limited in this embodiment.
As another example, inputting the information to be queried and each question in the question-answer database into a text matching model, and correspondingly, determining semantic feature vectors of the information to be queried and each question through a feature layer of the text matching model; and determining semantic similarity between the information to be queried and each question in the question-answer database according to semantic similarity between the semantic feature vector of the information to be queried and the semantic feature vector of each question through a feature processing layer of the text matching model. Therefore, the semantic similarity between the information to be queried and each question in the question and answer data is quickly and accurately determined through the text matching model.
And step 302, selecting a target question matched with the information to be inquired from all the questions according to the semantic similarity.
It can be understood that, in different application scenarios, the implementation manner of selecting the target question matched with the information to be queried from the questions according to the semantic similarity is different, and the following exemplary descriptions are given:
as an example, a question with the highest semantic similarity may be selected from the questions in the question-and-answer database as a target question matched with the information to be queried.
As another example, a question with a semantic similarity greater than a preset similarity threshold may be obtained from the questions in the question-and-answer database according to the semantic similarity, and the obtained question may be used as a target question matched with the information to be queried.
The preset similarity threshold is a critical value of semantic similarity preset in the information inquiry device. For example, a preset similarity threshold may be set to 99%, or 95%, etc.
It can be understood that, in practical application, the value of the preset similarity threshold may be preset in the information query device according to a practical application requirement, and this embodiment is not particularly limited to this.
As another example, the questions in the question and answer data may be sorted according to the order of the semantic similarity from large to small to obtain a sorting result, and the question located at the top K bits may be selected from the sorting result as the target question matched with the information to be queried. Wherein K is an integer greater than 1.
In this example, the target question matched with the information to be queried is accurately determined from the questions in the question-and-answer database by combining semantic similarity between the information to be queried and the questions in the question-and-answer database.
In order to clearly understand the present application, the information query method of the embodiment is further described below with reference to fig. 4.
Fig. 4 is a flowchart illustrating an information query method according to an embodiment of the present application.
As shown in fig. 4, the information query method of this embodiment may include:
step 401, receiving information to be queried input by a user.
Wherein voice entry and text input are supported. That is, in some examples, the user may input the information to be queried by way of speech. In other examples, the user may enter the information to be queried by way of text.
Step 402, performing entity identification on the information to be queried to obtain an entity identification result.
In some examples, in the case of inputting the information to be queried in a text manner, the information to be queried may be input into a named entity recognition model trained in advance, so as to obtain a named entity recognition result corresponding to the information to be queried through the named entity recognition model.
In some examples, in the case that the information to be queried is input through a voice input mode, voice recognition is performed on the information to be queried to obtain a voice recognition result, and named entity recognition is performed on the voice recognition result through a pre-trained named entity recognition model to obtain a named entity recognition result.
In some scenarios, in order to enable the entity recognition model in this embodiment to accurately determine the named entities involved in the credit scenario, the named entity recognition model may be pre-trained in combination with the text corpus involved in the credit scenario and the corresponding named entities to obtain a pre-trained named entity recognition model.
Step 403, according to the result of the named entity identification, determining whether the information to be queried includes a named entity, if yes, executing step 404, otherwise, executing step 408.
Step 404 may query whether the named entity exists in the graph database, if so, perform step 405, otherwise perform step 408.
That is, in the case that the named entity identification result indicates that the information to be queried includes a named entity, it may be queried whether the named entity exists in the graph database, if the named entity exists in the graph database, step 405 is performed, and if the named entity does not exist in the graph database, step 408 is performed.
Step 405, obtaining entity information corresponding to the named entity from the graph database.
And step 406, acquiring all information related to the entity information from a preset information database according to the entity information.
Step 407, according to the entity type of the named entity, obtaining a corresponding information display template, filling all information related to the entity information into the information display module, and displaying the filled information display template.
Step 408, matching the plurality of questions in the question-answer database with the information to be queried through a text matching model, if the target questions are matched, executing step 409, and if the target questions are not matched, executing step 410.
In some examples, questions and corresponding answers involved in the credit scenario may be saved in the question-answer database.
And step 409, acquiring answer information corresponding to the target question from the question-answer database, and outputting the answer information.
That is, in the case where there is a target question matching the information to be queried in the question-and-answer database, answer information corresponding to the target question is acquired from the question-and-answer database.
And step 410, outputting prompt information, wherein the prompt information is used for prompting that no relevant information corresponding to the information to be queried exists.
In this example, the user can quickly and accurately obtain the query result corresponding to the information to be queried by inputting the information to be queried, so that the operation required by the user to obtain the information is reduced, and the efficiency of obtaining the information is improved.
Corresponding to the information query methods provided in the foregoing several embodiments, an embodiment of the present application further provides an information query device, and since the information query device provided in the embodiment of the present application corresponds to the information query methods provided in the foregoing several embodiments, the implementation manner of the information query method is also applicable to the information query device provided in the embodiment, and is not described in detail in the embodiment.
Fig. 5 is a schematic structural diagram of an information query device according to an embodiment of the present application.
As shown in fig. 5, the information query apparatus 500 may include a first obtaining module 501, a named entity identifying module 502, a querying module 503, a second obtaining module 504, a third obtaining module 505, and an output module 506, wherein:
a first obtaining module 501, configured to obtain information to be queried.
The named entity identifying module 502 is configured to perform named entity identification on the information to be queried to obtain a named entity identification result.
The querying module 503 is configured to query whether a named entity exists in a preset graph database when the named entity identification result indicates that the information to be queried includes the named entity.
The second obtaining module 504 is configured to obtain entity information corresponding to the named entity from the graph database when the named entity exists in the graph database.
A third obtaining module 505, configured to obtain all information related to the entity information from a preset information database according to the entity information.
And an output module 506, configured to output all information related to the entity information.
In an embodiment of the present application, the output module 506 is specifically configured to: determining an entity type of a named entity; acquiring an information display template corresponding to the entity type; and filling all the information into the information display template, and displaying the filled information display template.
In one embodiment of the present application, the apparatus may further include:
the fourth acquisition module is used for acquiring a target question matched with the information to be inquired from the question and answer database under the condition that the named entity identification result indicates that the information to be inquired does not contain the named entity or the named entity does not exist in the graph database;
the fifth acquisition module is used for acquiring answer information corresponding to the target question from the question-answer database;
the output module 506 is further configured to output answer information.
In an embodiment of the present application, the fifth obtaining module is specifically configured to: determining semantic similarity between the information to be queried and each question in a question-answer database; and selecting a target problem matched with the information to be inquired from all the problems according to the semantic similarity.
In an embodiment of the present application, the fifth obtaining module is specifically configured to: inputting information to be queried and each question in a question-answer database into a text matching model; determining semantic feature vectors of information to be queried and each problem through a feature layer of a text matching model; and determining semantic similarity between the information to be queried and each question in the question-answer database according to semantic similarity between the semantic feature vector of the information to be queried and the semantic feature vector of each question through a feature processing layer of the text matching model.
In an embodiment of the present application, the named entity identifying module 502 is specifically configured to: under the condition that the information to be inquired is voice, performing character recognition on the information to be inquired to obtain a character recognition result of the information to be inquired; and carrying out named entity recognition on the character recognition result to obtain a named entity recognition result.
In an embodiment of the present application, the named entity identifying module 502 is specifically configured to: and inputting the character recognition result into a pre-trained named entity recognition model to obtain a named entity recognition result.
The information query device in the embodiment of the application performs named entity identification on the acquired information to be queried to obtain a named entity identification result, queries whether a named entity exists in a preset graphic database or not under the condition that the named entity identification result indicates that the information to be queried includes the named entity, acquires entity information corresponding to the named entity from the graphic database under the condition that the named entity exists in the graphic database, acquires all information related to the entity information from the preset information database according to the entity information, and outputs all information related to the entity information. Therefore, all information related to entity information contained in the query information can be quickly and accurately provided in a relatively automatic mode, and the information acquisition efficiency is improved.
According to an embodiment of the present application, the present application also provides an electronic device.
Wherein, electronic equipment includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the information query method as set forth in any one of the foregoing embodiments.
As an example, fig. 6 is a schematic structural diagram of an electronic device 600 according to an exemplary embodiment of the present application, and as shown in fig. 6, the electronic device 600 may further include:
a memory 610 and a processor 620, and a bus 630 connecting the different components (including the memory 610 and the processor 620), wherein the memory 610 stores a computer program, and when the processor 620 executes the program, the information query method according to the embodiment of the present application is implemented.
Bus 630 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 600 typically includes a variety of electronic device readable media. Such media may be any available media that is accessible by electronic device 600 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 610 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 640 and/or cache memory 650. The server 600 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 660 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 630 by one or more data media interfaces. Memory 610 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 680 having a set (at least one) of program modules 670 may be stored, for example, in memory 610, such program modules 670 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 670 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 600 may also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 691, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 692. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 693. As shown, the network adapter 693 communicates with the other modules of the electronic device 600 over a bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 620 executes various functional applications and data processing by executing programs stored in the memory 610.
It should be noted that, for the implementation process and the technical principle of the electronic device of this embodiment, reference is made to the foregoing explanation of the information query method in the embodiment of the present application, and details are not described here again.
In an exemplary embodiment, a computer-readable storage medium including instructions, such as a memory including instructions, which are executable by a processor of an electronic device to perform the information query method set forth in any one of the above embodiments is also provided. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is further provided, which includes a computer program/instruction, and is characterized in that the computer program/instruction implements the information query method proposed in any one of the above embodiments when being executed by a processor.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An information query method, the method comprising:
acquiring information to be queried;
carrying out named entity identification on information to be queried to obtain a named entity identification result;
under the condition that the named entity identification result indicates that the information to be inquired contains the named entity, inquiring whether the named entity exists in a preset graph database or not;
under the condition that the named entity exists in the graphic database, acquiring entity information corresponding to the named entity from the graphic database;
acquiring all information related to the entity information from a preset information database according to the entity information;
and outputting all information related to the entity information.
2. The method of claim 1, wherein the outputting all information related to the entity information comprises:
determining an entity type of the named entity;
acquiring an information display template corresponding to the entity type;
and filling all the information into the information display template, and displaying the filled information display template.
3. The method of claim 1, wherein the method further comprises:
acquiring a target question matched with the information to be inquired from a question and answer database under the condition that the named entity identification result indicates that the information to be inquired does not contain a named entity or the named entity does not exist in the graph database;
acquiring answer information corresponding to the target question from the question-answer database;
and outputting the answer information.
4. The method of claim 3, wherein the obtaining the target question matched with the information to be queried from the question-and-answer database comprises:
determining semantic similarity between the information to be queried and each question in the question-answer database;
and selecting a target question matched with the information to be inquired from the questions according to the semantic similarity.
5. The method of claim 4, wherein the determining semantic similarity between the information to be queried and the questions in the question-and-answer database comprises:
inputting the information to be inquired and each question in the question-answer database into a text matching model;
determining semantic feature vectors of the information to be queried and each question through a feature layer of the text matching model;
and determining semantic similarity between the information to be queried and each question in the question-answer database according to semantic similarity between the semantic feature vector of the information to be queried and the semantic feature vector of each question through a feature processing layer of a text matching model.
6. The method according to any one of claims 1 to 5, wherein the conducting named entity recognition on the information to be queried to obtain a named entity recognition result comprises:
under the condition that the information to be inquired is voice, carrying out character recognition on the information to be inquired to obtain a character recognition result of the information to be inquired;
and carrying out named entity recognition on the character recognition result to obtain a named entity recognition result.
7. The method of claim 6, wherein the performing named entity recognition on the text recognition result to obtain the named entity recognition result comprises:
and inputting the character recognition result into a named entity recognition model trained in advance to obtain a named entity recognition result.
8. An information query apparatus, comprising:
the first acquisition module is used for acquiring information to be queried;
the named entity recognition module is used for carrying out named entity recognition on the information to be queried so as to obtain a named entity recognition result;
the query module is used for querying whether the named entity exists in a preset graphic database or not under the condition that the named entity identification result indicates that the information to be queried contains the named entity;
a second obtaining module, configured to obtain entity information corresponding to the named entity from the graph database when the named entity exists in the graph database;
a third obtaining module, configured to obtain all information related to the entity information from a preset information database according to the entity information;
and the output module is used for outputting all information related to the entity information.
9. An electronic device, comprising:
memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202211170281.6A 2022-09-23 2022-09-23 Information query method and device, electronic equipment and storage medium Pending CN115525804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211170281.6A CN115525804A (en) 2022-09-23 2022-09-23 Information query method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211170281.6A CN115525804A (en) 2022-09-23 2022-09-23 Information query method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115525804A true CN115525804A (en) 2022-12-27

Family

ID=84700032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211170281.6A Pending CN115525804A (en) 2022-09-23 2022-09-23 Information query method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115525804A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170161367A1 (en) * 2015-12-04 2017-06-08 Sony Corporation Electronic device, computer-implemented method and computer program
CN107220380A (en) * 2017-06-27 2017-09-29 北京百度网讯科技有限公司 Question and answer based on artificial intelligence recommend method, device and computer equipment
CN110674112A (en) * 2019-09-23 2020-01-10 北京百分点信息科技有限公司 Data query method and device and electronic equipment
CN110929016A (en) * 2019-12-10 2020-03-27 北京爱医生智慧医疗科技有限公司 Intelligent question and answer method and device based on knowledge graph
CN113326438A (en) * 2021-06-28 2021-08-31 北京百度网讯科技有限公司 Information query method and device, electronic equipment and storage medium
CN113806475A (en) * 2021-04-19 2021-12-17 京东科技控股股份有限公司 Information reply method and device, electronic equipment and storage medium
CN114647713A (en) * 2022-03-29 2022-06-21 招商银行股份有限公司 Knowledge graph question-answering method, device and storage medium based on virtual confrontation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170161367A1 (en) * 2015-12-04 2017-06-08 Sony Corporation Electronic device, computer-implemented method and computer program
CN107220380A (en) * 2017-06-27 2017-09-29 北京百度网讯科技有限公司 Question and answer based on artificial intelligence recommend method, device and computer equipment
CN110674112A (en) * 2019-09-23 2020-01-10 北京百分点信息科技有限公司 Data query method and device and electronic equipment
CN110929016A (en) * 2019-12-10 2020-03-27 北京爱医生智慧医疗科技有限公司 Intelligent question and answer method and device based on knowledge graph
CN113806475A (en) * 2021-04-19 2021-12-17 京东科技控股股份有限公司 Information reply method and device, electronic equipment and storage medium
CN113326438A (en) * 2021-06-28 2021-08-31 北京百度网讯科技有限公司 Information query method and device, electronic equipment and storage medium
CN114647713A (en) * 2022-03-29 2022-06-21 招商银行股份有限公司 Knowledge graph question-answering method, device and storage medium based on virtual confrontation

Similar Documents

Publication Publication Date Title
CN109947924B (en) Dialogue system training data construction method and device, electronic equipment and storage medium
US11238050B2 (en) Method and apparatus for determining response for user input data, and medium
CN113495900A (en) Method and device for acquiring structured query language sentences based on natural language
CN112966081A (en) Method, device, equipment and storage medium for processing question and answer information
CN114168841A (en) Content recommendation method and device
US20210294969A1 (en) Generation and population of new application document utilizing historical application documents
CN110209780B (en) Question template generation method and device, server and storage medium
CN115221037A (en) Interactive page testing method and device, computer equipment and program product
WO2020042164A1 (en) Artificial intelligence systems and methods based on hierarchical clustering
CN112464927B (en) Information extraction method, device and system
US20210390251A1 (en) Automatic generation of form application
CN116186219A (en) Man-machine dialogue interaction method, system and storage medium
CN115525804A (en) Information query method and device, electronic equipment and storage medium
CN113050933B (en) Brain graph data processing method, device, equipment and storage medium
CN115391514A (en) Question and answer sentence generation method and device, electronic equipment and storage medium
CN109933788B (en) Type determining method, device, equipment and medium
CN112506952A (en) Data inquiry device and data inquiry method
CN113434653A (en) Method, device and equipment for processing query statement and storage medium
CN112989050A (en) Table classification method, device, equipment and storage medium
CN111859985A (en) AI customer service model testing method, device, electronic equipment and storage medium
CN116579750B (en) RPA control data processing method and device based on artificial intelligence
CN116303102B (en) Test data generation method and device, electronic equipment and storage medium
US20240070242A1 (en) Systems and methods for facilitating client authentication
CN108932326B (en) Instance extension method, device, equipment and medium
CN116579329A (en) Data processing method and device and terminal equipment

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