CN115544232A - Vehicle-mounted intelligent question answering and information recommending method and device - Google Patents

Vehicle-mounted intelligent question answering and information recommending method and device Download PDF

Info

Publication number
CN115544232A
CN115544232A CN202211241180.3A CN202211241180A CN115544232A CN 115544232 A CN115544232 A CN 115544232A CN 202211241180 A CN202211241180 A CN 202211241180A CN 115544232 A CN115544232 A CN 115544232A
Authority
CN
China
Prior art keywords
entity
entities
answer
information
user
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
CN202211241180.3A
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.)
Chongqing Changan New Energy Automobile Technology Co Ltd
Original Assignee
Chongqing Changan New Energy Automobile 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 Chongqing Changan New Energy Automobile Technology Co Ltd filed Critical Chongqing Changan New Energy Automobile Technology Co Ltd
Priority to CN202211241180.3A priority Critical patent/CN115544232A/en
Publication of CN115544232A publication Critical patent/CN115544232A/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/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/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries
    • 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/335Filtering based on additional data, e.g. user or group profiles
    • 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/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Abstract

The application relates to a vehicle-mounted intelligent question answering and information recommending method and device, wherein the method comprises the following steps: acquiring a question-answer sentence of a user; inputting the question-answer sentences into a preset real-name entity recognition model and a preset relation extraction model to obtain entities contained in the question-answer sentences and relations contained in the sentences; the method comprises the steps of linking entities to a pre-constructed knowledge graph, finding first-order neighbors of the entities, screening answer entities connected with the entities in a relation based on the first-order neighbors to obtain answer information, wherein the knowledge graph is constructed by the entities with the target types extracted from corpus data and the relations between the entities, and generating recommendation information pushed to a user according to the answer information. According to the embodiment of the application, intelligent question answering and information recommendation can be achieved through entities contained in sentences and relations contained in the sentences by means of the knowledge graph, so that more user question scenes can be responded, the information utilization rate is improved, and interaction with users and user experience are enhanced.

Description

Vehicle-mounted intelligent question answering and information recommending method and device
Technical Field
The application relates to the technical field of intelligent vehicles, in particular to a vehicle-mounted intelligent question answering and information recommending method and device.
Background
With the wide application of the intelligent internet technology to automobiles, automobiles become more and more intelligent, and one important embodiment is that when a user drives and uses an automobile, dialogs such as question answering and car chatting become common automobile scenes, and various intelligent question answering systems play a supporting role, while the knowledge graph technology plays an important role in the intelligent question answering systems due to the structural characteristics and the high generalization of knowledge.
However, in the related art, the application of the knowledge graph in the intelligent question-answering system is not sufficient, and is represented by:
1. the method is mainly applied to a single-round question-answering scene, answers of single-round questions are mainly searched by means of image matching, application levels are shallow, organic expansion cannot be carried out according to user input and system answers in the question-answering process, and then relevant information is recommended, so that the knowledge utilization rate is low, and the use experience of a user is influenced.
2. In the related technology, most triples are manually extracted from the knowledge graph and the knowledge graph is further verified to be constructed, so that the construction efficiency of the knowledge graph is low, and the information surface which can be covered by the knowledge graph is narrow.
In summary, in the related art, the utilization rate of knowledge is not high, the construction efficiency of the knowledge graph is low, and the coverage information plane is narrow, so that the use experience of a user is influenced and needs to be improved.
Disclosure of Invention
The application provides a vehicle-mounted intelligent question answering and information recommending method and device, and aims to solve the technical problems that the utilization rate of knowledge is low, the construction efficiency of a knowledge map is low, the coverage information plane is narrow, and the use experience of a user is influenced in the related technology.
An embodiment of a first aspect of the present application provides a vehicle-mounted intelligent question answering and information recommending method, including the following steps: acquiring a question-answer sentence of a user; inputting the question-answer sentence into a preset real-name entity recognition model and a preset relation extraction model to obtain an entity contained in the question-answer sentence and a relation contained in the sentence; and linking the entity to a pre-constructed knowledge graph, finding first-order neighbors of the entity, screening answer entities connected with the entity in the relation based on the first-order neighbors to obtain answer information, wherein the knowledge graph is constructed by extracting the relation between the entity of the target type and the entity from corpus data, and generating recommendation information pushed to the user according to the answer information.
According to the technical means, the construction efficiency of the knowledge graph can be increased, the information utilization rate is improved, and the interaction with the user and the user experience are enhanced.
Optionally, in an embodiment of the application, before inputting the question-answer sentence into the preset real-name entity recognition model and the preset relation extraction model, the method further includes: collecting training corpus data; marking part of corpora in the corpus data to mark entity-relation-entity triples in the corpora and concept types corresponding to each entity, and training a real-name entity recognition model and a relation extraction model by using the part of corpora to obtain the preset real-name entity recognition model and the preset relation extraction model.
According to the technical means, the entity extraction of the corpus can be realized by constructing the real-name entity identification model and the relation extraction model, the entities in the corpus, the concept types of the entities and the relations among the entities can be automatically identified, and the entity-relation-entity triple is formed.
Optionally, in an embodiment of the present application, before linking the entity to the pre-constructed knowledge-graph, the method further includes: inputting part or all of the corpus data into the preset real-name entity recognition model and the preset relation extraction model, and recognizing entities in the corpus, concept types of the entities and relations among the entities; and constructing the knowledge graph based on the entities in the corpus, the concept types of the entities and the relationship among the entities.
According to the technical means, the knowledge graph can be constructed based on the entities in the corpus, the concept types of the entities and the relations among the entities, the word information contained in the knowledge graph entities and the category information of the knowledge graph can be fused into the vector representation of the entities, and the obtained entity vector has higher semantic expression capability.
Optionally, in an embodiment of the present application, the generating, according to the answer information, recommendation information to be pushed to the user includes: and taking the entity which is connected with the entity and has the connection relation which is not included in the sentence and the weight which is larger than a first preset threshold and smaller than a second preset threshold as the recommendation information, and returning the recommendation information to the user.
According to the technical means, the problem response or recommendation of a scene can be realized based on the connection relation.
Optionally, in an embodiment of the present application, the generating recommendation information to be pushed to the user according to the answer information includes: and taking the entity which is connected with the answer entity and has the connection relation which is not the relation contained in the sentence and the weight which is more than a third preset threshold value and less than a fourth preset threshold value as the recommendation information, and returning the recommendation information to the user.
According to the technical means, the problem response or recommendation of another scenario can be realized based on the connection relation.
Optionally, in an embodiment of the present application, the generating recommendation information to be pushed to the user according to the answer information includes: calculating a first cosine similarity between an entity in the knowledge graph and the entity; and recommending the entity with the first cosine similarity larger than a fifth preset threshold value to the user as the recommendation information.
According to the technical means, the problem response or recommendation of another scenario can be realized based on the connection relation.
Optionally, in an embodiment of the present application, the generating recommendation information to be pushed to the user according to the answer information includes: calculating second cosine similarity of the entities in the knowledge graph and the answer entities; and recommending the entity with the second similarity larger than a sixth preset threshold value to the user as the recommendation information.
According to the technical means, the problem response or recommendation of the four scenarios can be realized based on the connection relation so as to deal with the diversity of the user question scenarios.
An embodiment of a second aspect of the present application provides a vehicle-mounted intelligent question answering and information recommending device, including: the acquisition module is used for acquiring question and answer sentences of the user; the extraction module is used for inputting the question-answer sentences into a preset real-name entity identification model and a preset relation extraction model to obtain entities contained in the question-answer sentences and relations contained in the sentences; the answer module is used for linking the entities to a pre-constructed knowledge graph, finding first-order neighbors of the entities, screening answer entities connected with the entities in the relation based on the first-order neighbors to obtain answer information, wherein the knowledge graph is constructed by extracting the relation between the entities of the target type from corpus data and the entities, and generating recommendation information pushed to the user according to the answer information.
Optionally, in an embodiment of the present application, the method further includes: the acquisition module is used for acquiring training corpus data; and the labeling module is used for labeling part of the linguistic data in the training linguistic data so as to label entity-relation-entity triples in the linguistic data and concept types corresponding to each entity, and training a real-name entity recognition model and a relation extraction model by using the part of the linguistic data so as to obtain the preset real-name entity recognition model and the preset relation extraction model.
Optionally, in an embodiment of the present application, the method further includes: the recognition module is used for inputting part or all of the corpus in the training corpus data into the preset real-name entity recognition model and the preset relation extraction model, and recognizing entities in the corpus, concept types of the entities and relations among the entities; and the construction module is used for constructing the knowledge graph based on the entities in the corpus, the concept types of the entities and the relations among the entities.
Optionally, in an embodiment of the present application, the answer module includes: and the first recommending unit is used for returning the entity which is connected with the entity and has the connection relation which is not the relation contained in the sentence and the weight which is larger than a first preset threshold value and smaller than a second preset threshold value to the user as the recommending information.
Optionally, in an embodiment of the present application, the answer module includes: and the second recommending unit is used for returning the entity which is connected with the answer entity and has the connection relation which is not the relation contained in the sentence and the weight which is more than a third preset threshold value and less than a fourth preset threshold value to the user as the recommending information.
Optionally, in an embodiment of the present application, the answer module includes: the first calculation unit is used for calculating the first cosine similarity between the entity in the knowledge graph and the entity; and the third recommending unit is used for recommending the entity with the first cosine similarity larger than a fifth preset threshold value to the user as the recommending information.
Optionally, in an embodiment of the present application, the answer module includes: the second calculation unit is used for calculating second cosine similarity of the entity in the knowledge graph and the answer entity; and the fourth recommending unit is used for recommending the entity with the second similarity larger than a sixth preset threshold value to the user as the recommending information.
An embodiment of a third aspect of the present application provides a vehicle, comprising: the vehicle-mounted intelligent question answering and information recommending method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize the vehicle-mounted intelligent question answering and information recommending method according to the embodiment.
A fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the method for vehicle-mounted intelligent question answering and information recommendation is implemented.
The beneficial effects of the embodiment of the application are as follows:
(1) The embodiment of the application can automatically identify entities in the corpus, concept types of the entities and relations among the entities based on a real-name entity identification model and a relation extraction model, and form an entity-relation-entity triple;
(2) The knowledge graph can be constructed by extracting the relation between the entity of the target type and the entity based on the corpus data, so that the high-efficiency construction of the knowledge graph is realized, the word information contained in the knowledge graph entity and the category information of the knowledge graph can be fused into the vector representation of the entity, and the obtained entity vector has higher semantic expression capability;
(3) According to the method and the device, the questions of the user can be answered or the information can be recommended based on different connection relations, so that more user question scenarios can be dealt with, the information utilization rate is improved, and interaction with the user and user experience are enhanced.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a vehicle-mounted intelligent question answering and information recommending method according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a relationship between a concept level and an entity level of a vehicle-mounted intelligent question and answer and information recommendation method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a vehicle-mounted intelligent question answering and information recommending device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
10-a vehicle-mounted intelligent question answering and information recommending device; 100-an acquisition module, 200-an extraction module and 300-an answer module.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions 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.
The following describes a vehicle-mounted intelligent question answering and information recommending method and device according to an embodiment of the application with reference to the accompanying drawings. In the method, the entity concept type and the relationship type of the knowledge graph to be constructed can be determined from linguistic data, an algorithm model capable of automatically extracting specific types of entities and relationships among the entities from the linguistic data is trained, the trained algorithm model is used for automatically extracting the relationships among the entities and the specific types of the entities from a large amount of the linguistic data, so that the knowledge graph is constructed, the questions asked by the user are answered, information related to the user questions or answers is recommended, and therefore more user questions can be asked, the information utilization rate is improved, and interaction with the user and user experience are enhanced. Therefore, the technical problems that the utilization rate of knowledge is low, the construction efficiency of the knowledge graph is low, the coverage information plane is narrow, and the use experience of a user is influenced in the related technology are solved.
Specifically, fig. 1 is a schematic flow diagram of a vehicle-mounted intelligent question answering and information recommending method according to an embodiment of the present application.
As shown in fig. 1, the vehicle-mounted intelligent question answering and information recommending method includes the following steps:
in step S101, a question-answer sentence of the user is acquired.
In the actual implementation process, the question-answer sentences of the user may be voice questions or text inputs, and the embodiment of the application can convert the voice inputs or the text inputs of the user into the text state with the same standard, so that the question answers and the recommendation of related contents can be performed on the question-answer sentences of the user in the following process.
In step S102, the question-answer sentence is input into the preset real-name entity recognition model and the preset relationship extraction model, and the entity included in the question-answer sentence and the relationship included in the sentence are obtained.
As a possible implementation manner, the embodiment of the application may preset a real-name entity identification model and a preset relationship extraction model, and then input the obtained question-answer sentence of the user into the model to obtain an entity e contained in the sentence of the user and a relationship r contained in the sentence, so as to facilitate subsequent answer screening or recommendation information screening based on the inclusion relationship.
The embodiment of the application can judge the integral relation type of the sentence through a preset real-name entity identification model and a preset relation extraction model for the sentence with only one entity in the corpus, and judge the relation between every two entities for the sentence with two or more entities in the corpus.
It should be noted that the default real-name entity run-in and default relationship extraction model will be explained below.
Optionally, in an embodiment of the present application, before the inputting the question-answer sentence into the preset real-name entity recognition model and the preset relationship extraction model, the method further includes: collecting training corpus data; and marking part of corpora in the corpus data to mark entity-relation-entity triples in the corpora and concept types corresponding to each entity, and training a real-name entity recognition model and a relation extraction model by using the part of corpora to obtain a preset real-name entity recognition model and a preset relation extraction model.
Specifically, as shown in fig. 2, the embodiment of the present application may generalize concepts that will be often mentioned in the user interaction process, relationships between concepts, and attributes of the concepts from the collected corpora (including historical dialogue data, open dialogue corpus, automobile forum, automobile encyclopedia open data, and formed automobile corpus).
In the embodiment of the application, part of the corpus can be selected from the corpus to form training corpus data, for example, a BIEOS entity labeling method is adopted to label an entity-relationship-entity triple in the corpus and a concept type corresponding to each entity, so as to train a BERT-BILSTM-CRF real name entity recognition model and a BERT-based relationship (attribute) extraction model, so that the entities in the corpus, the concept types of the entities and the relationships among the entities can be automatically recognized, and the entity-relationship-entity triple is formed.
In step S103, the entity is linked to a pre-constructed knowledge graph, a first-order neighbor of the entity is found, and an answer entity connected to the entity in a relationship is screened out based on the first-order neighbor to obtain answer information, wherein the knowledge graph is constructed by extracting a relationship between the entity of the target type and the entity from the corpus data, and recommendation information pushed to the user is generated according to the answer information.
In the actual implementation process, the embodiment of the present application may link the entity obtained in the above step to the knowledge graph through an entity linking technology, find a first-order neighbor of the entity, that is, an entity directly connected to the entity, in the knowledge graph through a graph matching method, and screen out an entity or an attribute value e connected to an entity e in a user question sentence by a relationship or an attribute r from the first-order neighbor 1 And generating recommendation information pushed to the user according to the answer information as an answer to the user question.
It is noted that the construction of the knowledge-graph is set forth below.
Optionally, in an embodiment of the present application, before linking the entity to the pre-constructed knowledge-graph, the method further includes: inputting part or all of the corpus in the training corpus data into a preset real-name entity recognition model and a preset relation extraction model, and recognizing entities in the corpus, concept types of the entities and relations among the entities; and constructing a knowledge graph based on the entities in the corpus, the concept types of the entities and the relationship among the entities.
In some embodiments, the entities extracted by the preset real-name entity recognition model and the preset relationship extraction model, the concept types of the entities and the relationships among the entities can be screened to ensure the correctness of the entities and the relationships can be stored in the database to form the knowledge graph for intelligent question answering.
In the actual execution process, in order to realize information recommendation by using the knowledge graph and enable a user to obtain more related information so as to improve user experience, the embodiment of the application can obtain the semantic vector of each entity in the knowledge graph by using a knowledge graph embedding algorithm fusing word vectors and category information.
In a knowledge graph embedded algorithm TransE in the related art, when a vector of an entity in a knowledge graph is trained, a scoring function adopted by a triplet (h, r, t) is as follows:
Figure BDA0003884308570000061
wherein the content of the first and second substances,
Figure BDA0003884308570000062
for the head entity vectors in the triplet of knowledge-graph,
Figure BDA0003884308570000063
in the form of a relationship vector, the relationship vector,
Figure BDA0003884308570000064
the tail entity vector in the knowledge graph triple is represented, the vector distance of N =2 is Euclidean distance, the Manhattan distance is represented when N =1, and the vector is represented
Figure BDA0003884308570000065
The initialization method of (2) is random initialization.
In the related art, the loss function used may be:
Figure BDA0003884308570000071
wherein p' represents an artificially constructed negative triple corresponding to the correct triple p in the knowledge graph, and the construction method is that the head entity or the tail entity in the correct triple p is replaced by the randomly selected entity in the knowledge graph entity set according to the probability to form the negative triple which does not exist in the knowledge graph; l is the size of the triplet set P; gamma is a function of adjusting the overall difference between the positive and negative example tripletsHyper-parameters; [ x ] of] + To take a positive function, when x>When x is less than 0, the value is 0.
The embodiment of the application can improve the method for obtaining the entity vector representation in the knowledge graph by the TransE algorithm, and the specific improvement points are as follows:
1. embodiments of the present application may treat entities and relationships in a knowledge-graph as a weighted combination of word vectors for the words they contain, for a triplet (h, r, t), assume that the head entity h, the relationship r and the tail entity t contain m, n, p words, respectively, i.e. wh = { wh = 1 ,…,wh m }、wr={wr 1 ,…,wr n }、wt={wt 1 ,…,wt mp }, then the entity vector is
Figure BDA0003884308570000079
And a relation vector
Figure BDA00038843085700000710
Can be expressed as:
Figure BDA0003884308570000072
Figure BDA0003884308570000073
Figure BDA0003884308570000074
wherein the content of the first and second substances,
Figure BDA0003884308570000075
respectively represent words wh i 、wr i 、wt i The corresponding word vector, the |, represents a hadamard product-solving operation between two vectors,
Figure BDA00038843085700000711
are respectively the word wh i 、wr i 、wt i Corresponding toThe weight vector is a vector of weights that,
Figure BDA00038843085700000712
then it is the offset vector.
In the process, the words contained in the knowledge graph entity can be obtained by stopping using the words after being segmented by a jieba word segmentation tool, and the word vectors containing the words in the entity are obtained by training the obtained corpus through a word2vec algorithm.
2. The embodiment of the application can improve the loss function into:
Figure BDA0003884308570000076
wherein alpha and beta are hyperparameters dis 1 And dis 2 Respectively defining the average distance in the class and the average distance between the classes, and calculating the method as follows:
Figure BDA0003884308570000077
Figure BDA0003884308570000078
wherein N is type Representing the number of categories of the entities in the knowledge graph, namely counting all h and t in all the triples (h, r, t) to obtain the category statistical information of the entities, and expressing the category statistical information as the category statistical information
Figure BDA0003884308570000083
e ij Denotes the j entity under the i category, n i Represents the total number of entities in the ith category;
Figure BDA0003884308570000081
for the geometric center of the entity belonging to the ith class, the calculation formula is
Figure BDA0003884308570000082
Mean distance within class dis 1 Reflected is the average, dis, of the distances between the entities of each class to the geometric center of the entities of that class 1 The smaller the value is, the closer the distance of the entities in the same category on the vector space is, namely, the more compact the entities in the same category are; inter-class mean distance dis 2 Reflecting the average distance between different classes of centers, dis 2 The larger the value, the more distant the entities between the different classes are in general.
Through the two improvements, the word information and the category information of the knowledge graph contained in the knowledge graph entity can be fused into the vector representation of the entity, and the obtained entity vector has semantic expression capability.
Optionally, in an embodiment of the present application, generating recommendation information to be pushed to a user according to the answer information includes: and taking the entity which is connected with the entity and has the connection relation which is not contained in the sentence and the weight which is more than the first preset threshold value and less than the second preset threshold value as recommendation information, and returning the recommendation information to the user.
For example, in the embodiment of the present application, entities that are connected to the entity e in the question of the user but have a connection relation other than r and whose weights are greater than the first preset threshold and less than the second preset threshold may be returned to the user as recommendation information.
Wherein, the weight calculation can be calculated by counting the times of the entity appearing in the user historical question answers, and the entity with higher recommendation weight is associated with the entity in the user statement (first-order neighbor) and appears frequently; the reason for recommending the entity with the smaller weight is that the entity is directly connected with the entity in the user sentence but is not frequently appeared, so that the long tail effect can be avoided, and the result of unexpected inspiration brought to the user is returned.
It should be noted that the first preset threshold and the second preset threshold may be set by those skilled in the art according to practical situations, and are not limited herein.
Optionally, in an embodiment of the present application, generating recommendation information pushed to the user according to the answer information includes: and taking the entity which is connected with the answer entity and has the connection relation which is not included in the sentence and the weight which is more than the third preset threshold value and less than the fourth preset threshold value as recommendation information, and returning the recommendation information to the user.
In some embodiments, the embodiment of the present application may be related to the answer entity e in the question of the user 1 And the entities which are connected but not in the connection relation of r and have the weight more than the third preset threshold and less than the fourth preset threshold are used as recommendation information and returned to the user.
It should be noted that the third preset threshold and the fourth preset threshold may be set by those skilled in the art according to practical situations, and are not limited herein.
Optionally, in an embodiment of the present application, generating recommendation information to be pushed to a user according to the answer information includes: calculating the first cosine similarity between the entity in the knowledge graph and the entity; and recommending the entity with the first cosine similarity larger than a fifth preset threshold value to the user as recommendation information.
In other embodiments, the cosine similarity between the entity in the knowledge graph and the entity e in the question of the user may also be calculated, and the entity with the similarity greater than a fifth preset threshold (obtained by debugging, generally greater than 0.85 is needed to ensure the similarity) is recommended to the user.
It should be noted that the fifth preset threshold may be set by a person skilled in the art according to practical situations, and is not limited in particular here.
Optionally, in an embodiment of the present application, generating recommendation information pushed to the user according to the answer information includes: calculating the second cosine similarity between the entity in the knowledge graph and the answer entity; and recommending the entity with the second similarity larger than a sixth preset threshold value to the user as recommendation information.
Furthermore, the embodiment of the present application may further calculate the entity and the answer entity e in the knowledge graph 1 And recommending the entities with the similarity larger than a sixth preset threshold value to the user.
It should be noted that the sixth preset threshold may be set by a person skilled in the art according to practical situations, and is not limited in particular here.
When the recommendation is performed by the 4 methods, the entities obtained by different recommendation methods can be recommended to the user in a natural conversation mode by using different conversation templates according to the relation in the sentence, so that the information recommendation is prevented from being too harsh, the further behavior of the user on the recommended information can be recorded, the recommendation acceptance of the user is analyzed to be higher, the weight of each entity in the question and answer knowledge graph is improved, and the intelligence level of the embodiment is increased.
As shown in fig. 2, an embodiment of the invention explains the working principle of the vehicle-mounted intelligent question answering and information recommending method in the embodiment of the present application in detail.
For example, when the question of the user is "what functions can be realized by the reversing radar", the embodiment of the application can recognize the entity "reversing radar" of the part class in the user question through the preset real-name entity recognition model, recognize the relation "realization" in the user question through the preset relation extraction model, and further can easily obtain the answer "reversing radar can realize the functions of collision avoidance, warning, buzzing, and the like" of the user question through the query in the established knowledge graph.
In an actual implementation process, in the embodiment of the present application, the recommendation method 1 in the 4 recommendations may be used, that is, the entity which is connected to the entity and has a connection relation which is not included in a sentence and has a weight which is greater than a first preset threshold and smaller than a second preset threshold is used as recommendation information, and is returned to the user, and may be returned to triplet information formed by the user and other entities connected to the "reverse sensor", where the knowledge map includes "reverse sensor-installation position-rear bumper", "UNI-K vehicle model-including-reverse sensor", "reverse sensor-price-300 yuan", that is, the following information may be returned to the user, "reverse sensor is generally installed on rear bumper, UNI-K vehicle model also has a reverse sensor related function", or the user is asked in a questioning manner "does you want to know the installation position of reverse sensor? "do you want to know which vehicle models have reversing radars? ".
Through the recommendation method 2, an entity which is connected with the answer entity and has a connection relation which is not included in the sentence and a relation and a weight which are larger than a third preset threshold and smaller than a fourth preset threshold is used as recommendation information and is returned to the user, triple information which is formed by the user and other entities connected with the anti-collision early warning can be returned to the user, the knowledge graph has the millimeter wave radar, the implementation and the anti-collision early warning, the following information can be returned to the user, the anti-collision early warning can be implemented by the millimeter wave radar, or the user is asked in a questioning mode, do you want to know which parts can implement the anti-collision early warning? ".
Through the recommendation method 3, namely, the first cosine similarity between the entity in the knowledge graph and the entity is calculated, the entity with the first cosine similarity larger than a fifth preset threshold is recommended to the user as recommendation information, and the entities with the vector cosine similarity higher than that of the reversing radar, such as the laser radar and the rearview camera, are calculated, so that the user can be queried, is do you want to know the functions of the laser radar or the rearview camera? ".
Through the recommendation method 4, namely, the second cosine similarity between the entity in the knowledge graph and the answer entity is calculated, the entity with the second similarity larger than a sixth preset threshold is recommended to the user as recommendation information, and the entities with the vector cosine similarity higher than the anti-collision early warning are calculated to have emergency braking, blind spot detection and the like, so that the user can be asked, "do you want to know the functions of emergency braking, blind spot detection and the like? ".
For the questions of the user's daily entertainment category, the embodiment of the present application can complete the answer and recommendation through the above steps, for example, the user asks "Zhou Jielun," do you play the golden first of full city? "the entity in the sentence is singer entity" Zhou Jielun "and movie entity" having gold armor in city completely ", and the relationship in the sentence is" played ", and the 4 recommendation methods can be used to recommend relevant information to the user, so as to enhance the interaction with the user and the user experience.
According to the vehicle-mounted intelligent question answering and information recommending method provided by the embodiment of the application, the entity concept type and the relation type of the knowledge graph to be constructed can be determined from the corpus, the algorithm model capable of automatically extracting the specific type entity and the relation between the entities from the corpus is trained, the trained algorithm model is utilized to automatically extract the specific type entity and the relation between the entities from a large amount of corpus, so that the knowledge graph is constructed, the questions asked by the user are answered, and the information related to the user questions or answers is recommended, so that more user question asking scenes can be responded, the information utilization rate is improved, and the interaction with the user and the user experience are enhanced. Therefore, the technical problems that the utilization rate of knowledge is not high, the construction efficiency of the knowledge map is low, and the coverage information plane is narrow in the related technology, so that the use experience of a user is influenced are solved.
The following describes a vehicle-mounted intelligent question and answer and information recommendation device provided according to an embodiment of the application with reference to the accompanying drawings.
Fig. 3 is a block diagram of a vehicle-mounted intelligent question and answer and information recommendation device according to an embodiment of the application.
As shown in fig. 3, the in-vehicle intelligent question answering and information recommending apparatus 10 includes: an acquisition module 100, an extraction module 200 and an answer module 300.
Specifically, the obtaining module 100 is configured to obtain a question-answer sentence of the user.
The extracting module 200 is configured to input the question-answering sentence into the preset real-name entity identification model and the preset relationship extraction model, so as to obtain an entity included in the question-answering sentence and a relationship included in the sentence.
The answer module 300 is configured to link the entity to a pre-constructed knowledge graph, find a first-order neighbor of the entity, and screen out an answer entity connected with the entity in a relationship based on the first-order neighbor to obtain answer information, where the knowledge graph is constructed by extracting a relationship between the entity of the target type and the entity from the corpus data, and generate recommendation information to be pushed to the user according to the answer information.
Optionally, in an embodiment of the present application, the vehicle-mounted intelligent question-answering and information recommending apparatus 10 further includes: the device comprises a collection module and a labeling module.
The acquisition module is used for acquiring training corpus data.
And the labeling module is used for labeling part of corpora in the corpus data so as to label entity-relation-entity triples in the corpora and concept types corresponding to each entity, and training the real-name entity recognition model and the relation extraction model by using the part of corpora to obtain a preset real-name entity recognition model and a preset relation extraction model.
Optionally, in an embodiment of the present application, the vehicle-mounted intelligent question-answering and information recommending apparatus 10 further includes: an identification module and a construction module.
The recognition module is used for inputting part or all of the corpora in the training corpus data into the preset real-name entity recognition model and the preset relation extraction model, and recognizing the entities in the corpora, the concept types of the entities and the relations among the entities.
And the construction module is used for constructing the knowledge graph based on the entities in the corpus, the concept types of the entities and the relations among the entities.
Optionally, in an embodiment of the present application, the answer module 300 includes: a first recommending unit.
The first recommending unit is used for returning the entity which is connected with the entity and has the connection relation which is not included in the sentence and the weight which is larger than a first preset threshold and smaller than a second preset threshold to the user as recommending information.
Optionally, in an embodiment of the present application, the answer module 300 comprises: and a second recommending unit.
And the second recommending unit is used for returning the entity which is connected with the answer entity and has the connection relation which is not included in the sentence and the weight which is more than a third preset threshold and less than a fourth preset threshold to the user as the recommending information.
Optionally, in an embodiment of the present application, the answer module 300 includes: a first calculating unit and a third recommending unit.
The first calculating unit is used for calculating the first cosine similarity between the entity in the knowledge graph and the entity.
And the third recommending unit is used for recommending the entity with the first cosine similarity larger than the fifth preset threshold value to the user as the recommending information.
Optionally, in an embodiment of the present application, the answer module 300 includes: a second calculating unit and a fourth recommending unit.
The second calculating unit is used for calculating the second cosine similarity between the entity in the knowledge graph and the answer entity.
And the fourth recommending unit is used for recommending the entity with the second similarity larger than the sixth preset threshold value to the user as the recommending information.
It should be noted that the foregoing explanation of the embodiment of the vehicle-mounted intelligent question and answer and information recommendation method is also applicable to the vehicle-mounted intelligent question and answer and information recommendation device of the embodiment, and is not repeated here.
According to the vehicle-mounted intelligent question-answering and information recommending device provided by the embodiment of the application, the entity concept type and the relationship type of the knowledge graph to be constructed can be determined from the corpus, the algorithm model capable of automatically extracting the specific type entities and the relationships between the entities from the corpus is trained, the trained algorithm model is used for automatically extracting the specific type entities and the relationships between the entities from a large number of corpora, so that the knowledge graph is constructed, the questions provided by the user are answered, and the information related to the user questions or answers is recommended, so that more user question-asking scenes can be responded, the information utilization rate is improved, and the interaction with the user and the user experience are enhanced. Therefore, the technical problems that the utilization rate of knowledge is low, the construction efficiency of the knowledge graph is low, the coverage information plane is narrow, and the use experience of a user is influenced in the related technology are solved.
Fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application. The vehicle may include:
memory 401, processor 402, and computer programs stored on memory 401 and executable on processor 402.
The processor 402 implements the vehicle-mounted intelligent question answering and information recommending method provided in the above-described embodiment when executing the program.
Further, the vehicle further includes:
a communication interface 403 for communication between the memory 401 and the processor 402.
A memory 401 for storing computer programs executable on the processor 402.
Memory 401 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Alternatively, in practical implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 may complete communication with each other through an internal interface.
The processor 402 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
The present embodiment also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the above vehicle-mounted intelligent question-answering and information recommendation method.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or N executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or N wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer-readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A vehicle-mounted intelligent question answering and information recommending method is characterized by comprising the following steps:
acquiring a question-answer sentence of a user;
inputting the question-answer sentences into a preset real-name entity recognition model and a preset relation extraction model to obtain entities contained in the question-answer sentences and relations contained in the sentences;
and linking the entity to a pre-constructed knowledge graph, finding first-order neighbors of the entity, screening answer entities connected with the entity in the relation based on the first-order neighbors to obtain answer information, wherein the knowledge graph is constructed by extracting the relation between the entity of the target type and the entity from corpus data, and generating recommendation information pushed to the user according to the answer information.
2. The method according to claim 1, wherein before inputting the question-answer sentence to the preset real-name entity recognition model and the preset relationship extraction model, further comprising:
collecting training corpus data;
marking part of corpora in the corpus data to mark entity-relation-entity triples in the corpora and concept types corresponding to each entity, and training a real-name entity recognition model and a relation extraction model by using the part of corpora to obtain the preset real-name entity recognition model and the preset relation extraction model.
3. The method of claim 2, wherein linking the entity to the pre-constructed knowledge-graph further comprises, prior to:
inputting part or all of the corpus data into the preset real-name entity recognition model and the preset relation extraction model, and recognizing entities in the corpus, concept types of the entities and relations among the entities;
and constructing the knowledge graph based on the entities in the corpus, the concept types of the entities and the relationship among the entities.
4. The method of claim 1, wherein generating recommendation information to be pushed to the user according to the response information comprises:
and taking the entity which is connected with the entity and has the connection relation which is not included in the sentence and the weight which is larger than a first preset threshold and smaller than a second preset threshold as the recommendation information, and returning the recommendation information to the user.
5. The method of claim 1, wherein generating recommendation information to be pushed to the user according to the response information comprises:
and taking the entity which is connected with the answer entity and has the connection relation which is not the relation contained in the sentence and the weight which is more than a third preset threshold value and less than a fourth preset threshold value as the recommendation information, and returning the recommendation information to the user.
6. The method of claim 1, wherein generating recommendation information to be pushed to the user according to the answer information comprises:
calculating a first cosine similarity between an entity in the knowledge graph and the entity;
and recommending the entity with the first cosine similarity larger than a fifth preset threshold value to the user as the recommendation information.
7. The method of claim 1, wherein generating recommendation information to be pushed to the user according to the response information comprises:
calculating second cosine similarity of the entities in the knowledge graph and the answer entities;
and recommending the entity with the second similarity larger than a sixth preset threshold value to the user as the recommendation information.
8. The utility model provides a vehicle-mounted intelligence is asked for questions and is answered and information recommendation device which characterized in that includes:
the acquisition module is used for acquiring question and answer sentences of the user;
the extraction module is used for inputting the question-answer sentences into a preset real-name entity identification model and a preset relation extraction model to obtain entities contained in the question-answer sentences and relations contained in the sentences;
the answer module is used for linking the entities to a pre-constructed knowledge graph, finding first-order neighbors of the entities, screening answer entities connected with the entities in the relation based on the first-order neighbors to obtain answer information, wherein the knowledge graph is constructed by extracting the relation between the entities of the target type from corpus data and the entities, and generating recommendation information pushed to the user according to the answer information.
9. A vehicle, characterized by comprising: a memory, a processor and a computer program stored on the memory and operable on the processor, the processor executing the program to implement the vehicle-mounted intelligent question answering and information recommending method according to any one of claims 1-7.
10. A computer-readable storage medium on which a computer program is stored, the program being executed by a processor for implementing the in-vehicle smart question-answering and information recommending method according to any one of claims 1 to 7.
CN202211241180.3A 2022-10-11 2022-10-11 Vehicle-mounted intelligent question answering and information recommending method and device Pending CN115544232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211241180.3A CN115544232A (en) 2022-10-11 2022-10-11 Vehicle-mounted intelligent question answering and information recommending method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211241180.3A CN115544232A (en) 2022-10-11 2022-10-11 Vehicle-mounted intelligent question answering and information recommending method and device

Publications (1)

Publication Number Publication Date
CN115544232A true CN115544232A (en) 2022-12-30

Family

ID=84734469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211241180.3A Pending CN115544232A (en) 2022-10-11 2022-10-11 Vehicle-mounted intelligent question answering and information recommending method and device

Country Status (1)

Country Link
CN (1) CN115544232A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093693A (en) * 2023-08-23 2023-11-21 北京深维智信科技有限公司 Intelligent question-answering method based on NLP

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093693A (en) * 2023-08-23 2023-11-21 北京深维智信科技有限公司 Intelligent question-answering method based on NLP
CN117093693B (en) * 2023-08-23 2024-05-07 北京深维智信科技有限公司 Intelligent question-answering method based on NLP

Similar Documents

Publication Publication Date Title
CN109918560B (en) Question and answer method and device based on search engine
CN110427461B (en) Intelligent question and answer information processing method, electronic equipment and computer readable storage medium
CN113762309B (en) Object matching method, device and equipment
CN110309277A (en) Human-computer dialogue semanteme parsing method and system
CN115440221B (en) Vehicle-mounted intelligent voice interaction method and system based on cloud computing
CN110580516A (en) interaction method and device based on intelligent robot
CN115544232A (en) Vehicle-mounted intelligent question answering and information recommending method and device
CN114168768A (en) Image retrieval method and related equipment
CN114332893A (en) Table structure identification method and device, computer equipment and storage medium
CN112016493A (en) Image description method and device, electronic equipment and storage medium
CN116597405A (en) Image tag relation model training method and device for vehicle-mounted image
CN108829896A (en) Return information feedback method and device
CN116976341A (en) Entity identification method, entity identification device, electronic equipment, storage medium and program product
CN114580715A (en) Pedestrian trajectory prediction method based on generation of confrontation network and long-short term memory model
CN111681670B (en) Information identification method, device, electronic equipment and storage medium
CN113380253A (en) Voice recognition system, device and medium based on cloud computing and edge computing
CN112906367A (en) Information extraction structure, labeling method and identification method of consumer text
CN116664873B (en) Image information processing method, device and storage medium
CN115269809B (en) Method and device for training intention recognition model and method and device for recognizing intention
CN116612466B (en) Content identification method, device, equipment and medium based on artificial intelligence
CN114385903B (en) Application account identification method and device, electronic equipment and readable storage medium
CN117235234B (en) Object information acquisition method, device, computer equipment and storage medium
US20230097860A1 (en) Device and computer implemented method for explainable scene clustering
US20230274555A1 (en) Systems and methods for video captioning safety-critical events from video data
CN114926480A (en) Method, device and equipment for training image segmentation model 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