Text matching method and device, medium, program product and vehicle

CN116756299BActive Publication Date: 2026-09-25BEIJING CO WHEELS TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310542983.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2026-09-25
Estimated Expiration
2043-05-15

AI Technical Summary

Technical Problem

然而,随着人工智能的发展,智能问答系统应用越来越广泛,为了适应用户的需求,需要不断扩展标准问、拓展问的数量,导致上述方法在配置的标准问、拓展问的数量级较大的情况下,难以准确的从问题库中确定与用户问题最相近的问题,导致输出的答案存在误差

Benefits of technology

[0021]本申请实施例的文本匹配方法、装置、介质、程序产品以及车辆,能够获取待匹配文本;在知识图谱中确定与待匹配文本匹配的至少一个问题;确定与待匹配文本匹配的至少一个问题中,每个问题与待匹配文本的相似度;将与待匹配文本的相似度满足预设条件的问题确定为目标问题。由此,可以首先通过知识图谱确定与待匹配文本匹配的至少一个问题,然后再根据每个问题与待匹配文本的相似度,确定目标问题,从而可以从问题库中准确挑选出与待匹配文本匹配的目标问题,提高了文本匹配的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116756299B_ABST
    Figure CN116756299B_ABST
Patent Text Reader

Abstract

The application discloses a text matching method and device, a medium, a program product and a vehicle. The method comprises the following steps: obtaining a text to be matched; determining at least one question matched with the text to be matched in a knowledge graph; determining the similarity between each question and the text to be matched in the at least one question matched with the text to be matched; and determining a question that satisfies a preset condition in the similarity between the question and the text to be matched as a target question. Thus, the at least one question matched with the text to be matched can be determined through the knowledge graph first, and then the target question can be determined according to the similarity between each question and the text to be matched, so that the target question matched with the text to be matched can be accurately selected from a question library, and the accuracy of text matching is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and in particular relates to a text matching method, apparatus, medium, program product and vehicle. Background Technology

[0002] Intelligent question answering systems are a typical application in the field of natural language processing. After a user inputs a question, the intelligent question answering system processes the information and outputs the answer that is most similar to the user's question.

[0003] Currently, intelligent question-answering systems typically employ a method of configuring standard questions and extended questions, and then using coarse-ranking recall and fine-ranking similarity calculations to obtain the answer to the best similar question. However, with the development of artificial intelligence and the increasingly widespread application of intelligent question-answering systems, the number of standard and extended questions needs to be continuously expanded to meet user demands. This makes it difficult for the aforementioned methods to accurately identify the question most similar to the user's question from the question database when the number of configured standard and extended questions is large, resulting in errors in the output answer.

[0004] Therefore, existing intelligent question-answering systems suffer from low accuracy. Summary of the Invention

[0005] This application provides a text matching method, apparatus, medium, program product, and vehicle to improve the accuracy of text matching.

[0006] In a first aspect, embodiments of this application provide a text matching method, the method comprising:

[0007] Get the text to be matched;

[0008] Identify at least one question in a knowledge graph that matches the text to be matched, the knowledge graph including questions that match multiple texts to be matched;

[0009] Determine the similarity between each of the at least one question and the text to be matched;

[0010] Problems whose similarity to the text to be matched meets preset conditions are identified as target problems.

[0011] Secondly, embodiments of this application provide a text matching device, the device comprising:

[0012] The acquisition module is used to acquire the text to be matched;

[0013] The first determining module is used to determine at least one question in the knowledge graph that matches the text to be matched;

[0014] The second determining module is used to determine the similarity between each question and the text to be matched in the at least one question;

[0015] The third determining module is used to identify problems whose similarity to the text to be matched meets preset conditions as target problems.

[0016] Thirdly, embodiments of this application provide a text matching device, the device including: a processor and a memory storing program instructions;

[0017] When the processor executes the program instructions, it implements the method as described in the first aspect above.

[0018] Fourthly, embodiments of this application provide a vehicle, the vehicle comprising: the text matching device of the second aspect or the text matching equipment of the third aspect described above.

[0019] Fifthly, embodiments of this application provide a storage medium, characterized in that the storage medium stores computer program instructions, which, when executed by a processor, implement the method described in the first aspect above.

[0020] In a sixth aspect, embodiments of this application provide a computer program product, characterized in that the computer program product includes computer program instructions, which, when executed by a processor, implement the method as described in the first aspect above.

[0021] The text matching method, apparatus, medium, program product, and vehicle of this application embodiment can acquire text to be matched; determine at least one question that matches the text to be matched in a knowledge graph; determine the similarity between each question and the text to be matched among the at least one question that matches the text to be matched; and determine the question whose similarity to the text to be matched meets a preset condition as the target question. Therefore, at least one question that matches the text to be matched can be determined first through a knowledge graph, and then the target question can be determined based on the similarity between each question and the text to be matched. This allows for accurate selection of the target question that matches the text to be matched from the question database, improving the accuracy of text matching. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating the text matching method provided in this application embodiment;

[0024] Figure 2A flowchart illustrating a text matching method provided in another embodiment of this application;

[0025] Figure 3 This is a schematic diagram of the structure of the text matching device provided in the embodiments of this application;

[0026] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0027] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0028] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0029] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms used in the embodiments of the present invention will be explained.

[0030] NLP (Natural Language Processing): Natural Language Processing primarily studies how computers analyze and process human language.

[0031] Transformer: A natural language processing model that supports the encoding and decoding of text semantics.

[0032] Vocabulary ID vector: refers to the vector composed of the vocabulary ID number of each word in the text after it has been segmented.

[0033] Interaction-based model: In text matching, a method is used to concatenate text pairs and input them into the same model, then use a classifier to predict whether they match.

[0034] Sentence vector: A vector used to represent the semantics of a sentence. Sentences with similar semantics have similar sentence vectors, which are usually the output of the model.

[0035] Transfer learning: In the field of artificial intelligence, it involves storing the knowledge learned by a model in one problem and applying it to a new problem to improve the model's ability to solve new problems.

[0036] Graph Question Answering (KBQA): A question answering system based on knowledge graph retrieval.

[0037] Fine-tuning refers to freezing some parameters and updating other parameters of the model during the training process.

[0038] Text Matching: Given a text A to be matched and a text set X, find the text in text set X that has the closest semantic similarity to text A.

[0039] Pre-training: Before training on downstream NLP tasks, model parameters (including word embeddings and model parameters) are pre-trained using a large-scale corpus based on a language model or other NLP tasks.

[0040] Knowledge Graph: A knowledge base composed of graph information such as entities, attributes, and edge relationships.

[0041] A standard question, also known as a standard problem, is a question whose textual description is formal or concise and unambiguous.

[0042] Extended questions, also known as extended problems, refer to the expansion of standard questions. They are different ways of describing standard questions, but in essence, the information to be expressed and the problem to be described are the same as those of standard questions. The answers to standard questions and their related extended questions are the same.

[0043] This application provides a data transmission method, apparatus, device, storage medium, and vehicle to solve the aforementioned technical problems.

[0044] The text matching method provided in the embodiments of this application will be introduced first below.

[0045] Figure 1 This is a flowchart illustrating the text matching method provided in an embodiment of this application. Figure 1 As shown, the method may include the following steps S101 to S104:

[0046] S101, Get the text to be matched.

[0047] S102, Identify at least one question that matches the text to be matched in a pre-created knowledge graph.

[0048] S103, determine the similarity between each question and the text to be matched in at least one question that matches the text to be matched.

[0049] S104, identify the problem whose similarity to the text to be matched meets the preset conditions as the target problem.

[0050] The specific implementation methods of the above steps will be described in detail below.

[0051] In this embodiment, at least one question that matches the text to be matched can be determined first through a knowledge graph, and then the target question can be determined based on the similarity between each question and the text to be matched. This allows for the accurate selection of the target question that matches the text to be matched from the question library, thereby improving the accuracy of text matching.

[0052] In S101, retrieve the text to be matched.

[0053] The text to be matched can be text data input by the user. For example, the text to be matched can be determined based on the user's input operations on the terminal device. The input operation can be manual input or voice input.

[0054] In S102, at least one question that matches the text to be matched is identified in the knowledge graph.

[0055] Knowledge graphs are graph-based data structures composed of nodes (points) and edges (edges). Each node represents an "entity," and each edge represents a "relationship" between entities. Essentially, a knowledge graph is a semantic network. Entities can be things in the real world, such as people, place names, companies, telephone numbers, and animals; relationships are used to express certain connections between different entities.

[0056] In this application, the knowledge graph can include questions that match multiple texts; that is, the knowledge graph pre-includes multiple questions that match different texts. Therefore, the matching question can be quickly determined from the knowledge graph based on the text to be matched.

[0057] In some embodiments, an entity can be a keyword in the text to be matched. A relation can be an association between keywords. For example, the association between the keyword "seat" and the keyword "front seat" is that "seat" contains "front seat". Therefore, in the knowledge graph, the "front seat" node is the next level node after the "seat" node. Assuming "seat" is a first-level node, then "front seat" is a second-level node.

[0058] In some embodiments, the following steps may be included before S102 above:

[0059] Identify multiple keywords and their relationships from basic data, which is data related to the target application area;

[0060] At least one hierarchical tree is generated based on multiple keywords and their relationships. The hierarchical tree includes at least one node, each node corresponds to a keyword, and each keyword is associated with N questions, where N is a natural number. The knowledge graph includes at least one hierarchical tree.

[0061] The basic data consists of relevant data collected based on prior information about the target application domain. Specific acquisition methods include using web crawling technology to scrape data from relevant websites, or obtaining data from publicly available publications. For example, in the automotive industry, basic data can be obtained from vehicle product manuals.

[0062] Here, the N questions associated with each keyword can be questions related to the keyword determined from a question-and-answer database, including standard questions and extended questions corresponding to the keyword. The questions in the question-and-answer database can include users' historical questions, keyword-related questions collected from the internet, and manually set keyword-related questions; this application does not impose any limitations. Optionally, after obtaining multiple keywords, corresponding standard questions, extended questions, and question answers can be set for each keyword.

[0063] Specifically, N keywords and their relationships are extracted from the basic data. A hierarchical tree is constructed based on the relationships between keywords, with each keyword as a node. The keywords of each node are associated with the corresponding questions, and a knowledge graph is constructed based on the hierarchical tree.

[0064] In this embodiment, a knowledge graph can be pre-constructed, including the hierarchical tree management relationship of each keyword and the question corresponding to each keyword. This allows the use of nodes and edges in the graph structure to organize keywords and corresponding questions, enabling accurate identification of the corresponding question through keywords and improving the accuracy of question matching.

[0065] In some embodiments, after obtaining multiple keywords from the basic data, the superordinate keywords of these multiple keywords can be abstracted based on the common attributes or features among several of the keywords. Then, a hierarchical tree can be constructed based on the N keywords and the obtained superordinate keywords.

[0066] In one example, a knowledge graph can be constructed using the following methods:

[0067] (1) Obtain keywords (entities) and the relationships between keywords from the basic data;

[0068] (2) Create standard questions related to keywords based on multiple dimensions, and generalize each standard question to obtain multiple extended questions. Each standard question corresponds to a different response.

[0069] (3) For some entities with the same type or attributes, their parent node, i.e. the keyword of the previous level, can be abstracted. For example, the keyword of the previous level of keywords such as "first row of seats" and "second row of seats" is "seat", and the keyword of the previous level of keywords such as "low beam headlights" and "high beam headlights" is "exterior lights".

[0070] (4) Construct a hierarchical tree based on the keywords obtained above and the relationships between the keywords, and construct a knowledge graph based on the obtained hierarchical tree.

[0071] In some embodiments, during the construction of a knowledge graph, after obtaining multiple keywords based on the basic data, the attributes of each keyword can also be obtained based on the context data of the keywords in the basic data. Therefore, when constructing a hierarchical tree, the keywords of each node in the hierarchical tree can also include attributes. Based on this, during the subsequent question matching process, the nodes in the hierarchical tree can be quickly determined based on the keywords and the attributes of the keywords.

[0072] In some embodiments, determining at least one question matching the text to be matched in the knowledge graph in S102 above may include the following steps:

[0073] Extract target keywords from the text to be matched;

[0074] Identify the questions in the knowledge graph that are associated with the target keywords, and obtain at least one question that matches the text to be matched.

[0075] Extracting target keywords from the text to be matched can involve keyword recognition of the text and extracting keywords from the text. For example, if the text to be matched is "how to open the voice input function", the keyword "voice input" can be extracted.

[0076] Specifically, in this embodiment, the target keywords can first be extracted from the text to be matched. Based on the target keywords, the node corresponding to the target keywords is determined from the knowledge graph, and then the N questions associated with the keywords of that node are obtained. That is, based on the target keywords in the text to be matched, the corresponding node is located from the knowledge graph, and the questions corresponding to the keywords of that node are obtained.

[0077] In S103, the similarity between each question and the text to be matched is determined in at least one question.

[0078] Specifically, the similarity between each question and the text to be matched can be calculated. Various methods can be used to calculate similarity, such as cosine similarity, high-dimensional space approximate nearest neighbor algorithms, etc.

[0079] In some embodiments, S103 above may include the following steps:

[0080] Each question in at least one question is concatenated with the text to be matched to obtain at least one concatenated text.

[0081] Input at least one concatenated text into a deep learning model to obtain the similarity between each question and the text to be matched.

[0082] Specifically, a text matching model can be trained using a neural network. By inputting the text to be matched and each question into the text matching model, the similarity between each question and the text to be matched can be obtained.

[0083] In one example, determining the similarity between each question and the text to be matched in at least one question may specifically include the following steps:

[0084] (1) The user's text to be matched is concatenated with each extended question in the extended question set obtained by the graph inference module to obtain N concatenated texts. Here, N is the number of extended questions in the extended question set, and [CLS] is the text to be matched, [SEP] is the extended question, and [SEP] is the input text format to the deep learning model. This deep learning model includes, but is not limited to, pre-trained models such as RNN-based Bi-LSTM and Transformer-based BERT. Since Transformer-based models perform better, BERT and its derivative models are typically used in practical applications.

[0085] (2) After obtaining N text pair similarity vectors through the deep learning model, sort the similarity from high to low and return the extension question with the highest similarity and its similarity.

[0086] In S104, the problem whose similarity to the text to be matched meets the preset conditions is identified as the target problem.

[0087] In some embodiments, S104 above may include the following steps:

[0088] Among at least one question that matches the text to be matched, the question with the highest similarity score to the text to be matched is identified as the first question;

[0089] If the similarity between the first question and the text to be matched is greater than a preset threshold, the first question is identified as the target question.

[0090] The preset threshold can be set according to the actual situation.

[0091] Specifically, after identifying at least one question that matches the text to be matched, it is necessary to determine the target question with the highest matching degree from these at least one questions. Therefore, the questions can be sorted according to their similarity to the text to be matched, and the question with the highest similarity can be identified as the first question. If the similarity of the first question is greater than a preset threshold, then the question is considered to have the highest matching degree and is identified as the target question.

[0092] In this embodiment of the application, it is possible to obtain the text that matches the text to be matched.

[0093] In some embodiments, after the target question is determined, the answer to the target question is output.

[0094] In some embodiments, the above S104 may further include the following steps:

[0095] If the similarity between the first question and the text to be matched is not greater than a preset threshold, determine the keyword of the next level node in the knowledge graph corresponding to the target keyword;

[0096] Among the questions associated with the keywords of the previous level node, the questions whose similarity to the text to be matched meets the preset conditions are identified as the target questions.

[0097] Specifically, since the knowledge graph cannot guarantee the completeness of each keyword and the questions associated with the keyword during the construction process, if the similarity between the first question and the text to be matched is not greater than the preset threshold, it means that the similarity between the questions associated with a certain keyword and the text to be matched is lower than the preset threshold. In this case, the questions associated with the keyword of the node at the next higher level (i.e., the parent node) can be determined, and the target question whose similarity meets the preset condition can be determined from the questions associated with the keyword of the node at the next higher level.

[0098] In this embodiment, the keyword association questions of the parent node in the knowledge graph can include the keyword association questions of all child nodes of the parent node. Therefore, if the target keyword in the text to be matched does not meet the preset conditions in the knowledge graph association questions, the keyword association questions of the parent node of the node corresponding to the target keyword can be obtained, thereby expanding the scope of question matching and improving the accuracy of question matching.

[0099] In some embodiments, determining the target question from the questions that associate keywords of the parent-level node with text that meet a preset similarity condition can include the following steps:

[0100] Replace the target keyword in the text to be matched with the keyword of the parent node to obtain the second text;

[0101] In determining the keyword associations of the parent node, the similarity between each question and the second text;

[0102] Among the questions that associate keywords with the previous level node, the question with the highest similarity to the second text and a similarity greater than a preset threshold is identified as the target question.

[0103] Specifically, in order to further improve the accuracy of question matching, after determining the keywords of the upper-level node and obtaining the questions associated with those keywords, it is first necessary to replace the target keywords in the text to be matched with the keywords of the upper-level node. Based on the replaced text, i.e., the second text, the similarity between each question associated with the keywords of the upper-level node and the second text is calculated. The question with the highest similarity and a similarity greater than a preset threshold is determined as the target question.

[0104] In this embodiment, by expanding the scope of question matching to the parent node of the target keyword, the keyword of the parent node is replaced with the keyword in the text to be matched, and the similarity is calculated, which can further improve the accuracy of question matching.

[0105] In one example, such as Figure 2 As shown, the above question matching method can be applied to a graph question answering system, which includes a graph reasoning module and a text matching module, specifically including the following steps:

[0106] 1. Input the text to be matched into the keyword extraction module, and obtain the keywords in the text to be matched submitted by the user.

[0107] The text to be matched is the text input by the user into this graph-based question-answering system. Keywords in the user's text can be obtained by tagging entities using a business vocabulary or by using a keyword extraction model trained using deep learning methods.

[0108] 2. Graph Reasoning Module.

[0109] A knowledge graph is constructed by using the keyword entities obtained from the basic data, the relationships between keyword entities, and the standard and extended questions associated with keyword entities. This leads to a graph reasoning module, which includes a graph database that stores the standard and extended questions associated with the keyword entities in the knowledge graph.

[0110] Therefore, after the user inputs the text to be matched and obtains the keywords in the text, the normalized result of the keyword (keyword entity) can be sent to the graph inference module. After graph query, the set of all question-answer pairs corresponding to the keyword, i.e., the extended question set, is obtained. When there are no relevant question-answer pairs for the keyword, the set of all question-answer pairs of its parent node will be returned through graph inference.

[0111] (1) Send the keywords and possible keyword contexts, such as keyword position and other tag attributes, into the graph reasoning module.

[0112] (2) The graph reasoning module queries and locates the keyword position based on the keyword name and its attribute tags, and queries the graph database based on the keyword position to obtain all the edge relationships of the keyword. It then forms a set of the extended questions in the existing relationships and returns them.

[0113] (3) If the queried keyword has no related edges, return the set of question-answer pairs connected to its parent node. Replace the keywords in the user's text with the keywords of its parent node.

[0114] 3. Text Matching Module

[0115] The user's text to be matched is combined with each of the extended questions in the extended question set to obtain multiple text pairs. Each text pair is then input into a deep learning model to obtain the similarity of each text pair.

[0116] The text matching module can be used to identify the extended question with the highest similarity to the text to be matched.

[0117] 4. Output the answer to the extended question with the highest similarity.

[0118] If the similarity of the extended question is greater than the preset similarity threshold, the corresponding response to the extended question will be returned to the user; if the similarity of the extended question is lower than the preset similarity threshold, no result will be returned.

[0119] In this embodiment, by fusing prior knowledge from the knowledge graph into a deep learning-based text similarity model, the recall and accuracy of text matching can be improved, thus enhancing the user experience. Furthermore, through the graph database of the knowledge graph, support can be provided for keywords not covered in the knowledge graph through the inheritance relationship between parent and child nodes, returning relevant answers from parent nodes that do not support the keywords, thereby reducing the strong reliance on manually configured question-answer pairs to some extent.

[0120] Based on the text matching method provided in the above embodiments, this application also provides specific implementations of a text matching device. Please refer to the following embodiments.

[0121] First see Figure 3 The text matching device 300 provided in this application embodiment may include the following modules:

[0122] Module 301 is used to obtain the text to be matched;

[0123] The first determining module 302 is used to determine at least one question that matches the text to be matched in a pre-created knowledge graph, the knowledge graph including questions that match multiple texts;

[0124] The second determining module 303 is used to determine the similarity between each question and the text to be matched in at least one question that matches the text to be matched.

[0125] The third determining module 304 is used to determine the problem whose similarity to the text to be matched meets the preset conditions as the target problem.

[0126] The text matching apparatus provided in this application can acquire the text to be matched; determine at least one question that matches the text in a pre-created knowledge graph; determine the similarity between each question and the text in the at least one question that matches the text; and determine the question whose similarity to the text meets a preset condition as the target question. Therefore, at least one question that matches the text can be determined first through the knowledge graph, and then the target question can be determined based on the similarity between each question and the text. This allows for accurate selection of the target question that matches the text from the question database, improving the accuracy of text matching.

[0127] In some embodiments, the text matching device 200 described above may further include:

[0128] The fourth determination module is used to determine multiple keywords, keyword attributes, and the relationships between keywords from the basic data, which is data related to the target application area.

[0129] The first generation module is used to generate at least one hierarchical tree based on multiple keywords and relationships. The hierarchical tree includes at least one node, each node corresponds to a keyword, and each keyword is associated with N questions, where N is a natural number. The knowledge graph includes the at least one hierarchical tree.

[0130] In some embodiments, the first determining module 302 includes:

[0131] Extraction unit, used to extract target keywords from the text to be matched;

[0132] The first determining unit is used to identify at least one question in the knowledge graph that is associated with the target keyword and matches the text to be matched.

[0133] In some embodiments, the third determining module 304 includes:

[0134] The second determining unit is used to determine the question with the highest similarity value to the text to be matched among at least one question that matches the text to be matched as the first question;

[0135] The third determining unit is used to determine the first question as the target question if the similarity between the first question and the text to be matched is greater than a preset threshold.

[0136] In some embodiments, the third determining module 304 further includes:

[0137] The fourth determining unit is used to determine the keyword of the next-level node of the corresponding node in the knowledge graph when the similarity between the first question and the text to be matched is not greater than a preset threshold.

[0138] The fifth determining unit is used to identify the target question from the questions associated with the keywords of the previous level node that meet the preset conditions for similarity with the text to be matched.

[0139] In some embodiments, the fifth determining unit described above is specifically used for:

[0140] Replace the target keyword in the text to be matched with the keyword of the parent node to obtain the second text;

[0141] In determining the keyword associations of the parent node, the similarity between each question and the second text;

[0142] Among the questions that associate keywords with the previous level node, the question with the highest similarity to the second text and a similarity greater than a preset threshold is identified as the target question.

[0143] In some embodiments, the second determining module 303 includes:

[0144] A concatenation unit is used to concatenate each question in at least one question with the text to be matched to obtain at least one concatenated text.

[0145] The computation unit is used to input at least one concatenated text into a deep learning model to obtain the similarity between each question and the text to be matched.

[0146] The embodiments described above in this application are capable of acquiring the text to be matched; determining at least one question matching the text in a pre-created knowledge graph; determining the similarity between each question and the text in the at least one question matching the text; and identifying the question whose similarity to the text meets a preset condition as the target question. Thus, at least one question matching the text can be determined first through the knowledge graph, and then the target question can be determined based on the similarity between each question and the text, thereby accurately selecting the target question matching the text from the question database and improving the accuracy of text matching.

[0147] Figure 3 Each module / unit in the illustrated device has the ability to implement Figure 1 or Figure 2 The functions of each step in the process and their corresponding technical effects are described briefly and will not be elaborated here.

[0148] Based on the text matching device provided in the above embodiments, this application also provides a vehicle, which includes the above-described text matching device, and the text matching device is used to implement the text matching method provided in the above embodiments.

[0149] Based on the text matching method provided in the above embodiments, this application also provides specific implementation methods for electronic devices. Please refer to the following embodiments.

[0150] Figure 4 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.

[0151] The electronic device may include a processor 401 and a memory 402 storing computer program instructions.

[0152] Specifically, the processor 401 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0153] Memory 402 may include mass storage for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magneto-particle dual disk, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 402 may include removable or non-removable (or fixed) media, or memory 402 may be non-volatile solid-state memory. Memory 402 may be internal or external to the integrated gateway disaster recovery device.

[0154] In one instance, memory 402 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0155] Memory 402 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to any embodiment of this disclosure.

[0156] The processor 401 reads and executes computer program instructions stored in the memory 402 to achieve... Figure 1 The method / steps S101 to S104 in the illustrated embodiment achieve the following: Figure 1 The technical effects achieved by executing the methods / steps shown in the examples are not elaborated here for the sake of brevity.

[0157] In one example, the electronic device may also include a communication interface 403 and a bus 410. For example, Figure 4 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.

[0158] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0159] Bus 410 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Width Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 410 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0160] Based on the data processing device provided in the above embodiments, this application also provides a vehicle, the vehicle including: the above data processing device, the data processing device being used to implement the text matching method provided in the above embodiments.

[0161] Furthermore, in conjunction with the text matching methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the text matching methods in the above embodiments.

[0162] In summary, the text matching method, apparatus, vehicle equipment, and computer storage medium of this application embodiment are capable of acquiring the text to be matched; determining at least one question matching the text in a knowledge graph; determining the similarity between each question and the text in the at least one question matching the text; and identifying the question whose similarity to the text meets a preset condition as the target question. Therefore, at least one question matching the text can be determined first through a knowledge graph, and then the target question can be determined based on the similarity between each question and the text, thereby accurately selecting the target question matching the text from the question database and improving the accuracy of text matching.

[0163] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0164] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0165] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0166] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable text matching device to create a machine such that these instructions, executed via the processor of the computer or other programmable text matching device, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0167] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A text matching method, characterized in that, The method includes: Get the text to be matched; Identify at least one question that matches the text to be matched in a pre-built knowledge graph, the knowledge graph including questions that match multiple texts; Determine the similarity between each of the at least one question and the text to be matched; Problems whose similarity to the text to be matched meets preset conditions are identified as target problems; The steps for constructing the knowledge graph include: Multiple keywords, the attributes of the keywords, and the relationships between the keywords are determined from the basic data, which is data related to the target application domain; Based on the attributes of the keywords, determine the superior keywords of multiple keywords with the same attributes; At least one hierarchical tree is generated based on the multiple keywords, the higher-level keywords, and the association relationships. The hierarchical tree includes at least one node, each node corresponds to a keyword, and each keyword is associated with N questions, where N is a natural number. The N questions include standard questions and extended questions related to the keyword. The knowledge graph includes the at least one hierarchical tree. The step of identifying the problem whose similarity to the text to be matched meets a preset condition as the target problem includes: If the similarity between the first question, which has the highest similarity to the text to be matched, and the similarity to the first question is not greater than a preset threshold, the keyword of the next level node of the node corresponding to the target keyword in the knowledge graph is determined. The target keyword in the text to be matched is replaced with the keyword of the parent node to obtain the second text; Based on the second text, the matching question, similarity, and target question are redefined.

2. The method according to claim 1, characterized in that, The step of determining at least one question in the knowledge graph that matches the text to be matched includes: Extract target keywords from the text to be matched; The questions in the knowledge graph associated with the target keyword are identified as at least one question that matches the text to be matched.

3. The method according to any one of claims 1 to 2, characterized in that, The step of identifying the problem whose similarity to the text to be matched meets a preset condition as the target problem includes: Among at least one question that matches the text to be matched, the question with the highest similarity value to the text to be matched is determined as the first question; If the similarity between the first question and the text to be matched is greater than a preset threshold, the first question is identified as the target question.

4. The method according to claim 1, characterized in that, The process of redetermining the matching question, similarity, and target question based on the second text includes: In determining the keyword associations of the previous level node, the similarity between each question and the second text; Among the questions associated with the keywords of the previous level node, the question with the highest similarity to the second text and a similarity greater than a preset threshold is identified as the target question.

5. The method according to claim 1, characterized in that, Determining the similarity between each of the at least one question and the text to be matched includes: Each question in the at least one question is concatenated with the text to be matched to obtain at least one concatenated text; The at least one concatenated text is input into a deep learning model to obtain the similarity between each question and the text to be matched.

6. A text matching device, characterized in that, The device includes: The acquisition module is used to acquire the text to be matched. A first determining module is used to determine at least one question in a knowledge graph that matches the text to be matched, the knowledge graph including questions that match multiple texts to be matched; The second determining module is used to determine the similarity between each question and the text to be matched in the at least one question; The third determining module is used to determine the problems whose similarity to the text to be matched meets the preset conditions as target problems; The steps for constructing the knowledge graph include: Multiple keywords, the attributes of the keywords, and the relationships between the keywords are determined from the basic data, which is data related to the target application domain; Based on the attributes of the keywords, determine the superior keywords of multiple keywords with the same attributes; At least one hierarchical tree is generated based on the multiple keywords, the higher-level keywords, and the association relationships. The hierarchical tree includes at least one node, each node corresponds to a keyword, and each keyword is associated with N questions, where N is a natural number. The N questions include standard questions and extended questions related to the keyword. The knowledge graph includes the at least one hierarchical tree. The third determining module is further configured to determine the keyword of the next-level node of the node corresponding to the target keyword in the knowledge graph, provided that the similarity of the first question with the highest similarity to the target text is not greater than a preset threshold among at least one question that matches the target text. The target keyword in the text to be matched is replaced with the keyword of the parent node to obtain the second text; Based on the second text, the matching question, similarity, and target question are redefined.

7. A storage medium, characterized in that, The storage medium stores computer program instructions, which, when executed by a processor, implement the method as described in any one of claims 1-5.

8. A computer program product, characterized in that, The computer program product includes computer program instructions that, when executed by a processor, implement the method of any one of claims 1-5.

9. A vehicle, characterized in that, The vehicles include: The text matching device as described in claim 6.

Citation Information

Patent Citations

  • Question and answer matching method, training method of text matching model and related equipment

    CN113342958A

  • Answer determination method and device and storage medium

    CN114328854A

  • Intelligent question and answer method, system and device and computer readable storage medium

    CN114756663A