Intelligent question and answer method and device, equipment and medium
By semantic vectorizing and constructing dynamic knowledge graphs from multi-source corpora, the problem of low accuracy in intelligent question answering for group enterprises in existing technologies has been solved, achieving accurate user question matching and answering, and improving the efficiency of enterprise compliance management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MERCHANTS FINANCE HLDG CO LTD
- Filing Date
- 2025-12-18
- Publication Date
- 2026-05-08
AI Technical Summary
Existing intelligent question-answering technologies struggle to differentiate between institutional differences between departments within a group, and are unable to respond to the complex needs of group enterprises in the context of supply chain compliance upgrades and business diversification, resulting in low accuracy rates for intelligent question-answering.
By semantically vectorizing multi-source corpus data, a dynamic knowledge graph is constructed. Highly similar corpus data is selected for entity recognition and relation extraction. The knowledge graph is dynamically updated, and multiple knowledge base queries are combined to achieve accurate matching and question answering for user questions.
It improves the efficiency and quality of intelligent Q&A for group-type enterprises, ensures the timeliness and relevance of knowledge, comprehensively captures users' explicit and potential needs, and provides accurate, comprehensive and dynamically adapted Q&A results.
Smart Images

Figure CN121996751A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an intelligent question-answering method, apparatus, device, and medium. Background Technology
[0002] As enterprises enter a more advanced stage of digital transformation, the deep application of artificial intelligence technology in the field of institutional management has become a key path to improve the effectiveness of compliance management. In the management practices of group enterprises, intelligent question-and-answer systems for institutional management, as the core carrier of compliance management, still face multiple technical bottlenecks.
[0003] Existing intelligent question-answering technologies are mostly question-answering systems based on large natural language models. They fail to distinguish the institutional differences between departments within a group, are unable to respond to hierarchical needs, and are ill-suited to the complex needs of group enterprises in the context of supply chain compliance upgrades and business diversification. As a result, the accuracy of intelligent question-answering for users is relatively low. Summary of the Invention
[0004] This invention provides an intelligent question-answering method, apparatus, device, and medium to solve the technical problem of low accuracy when users perform intelligent question-answering.
[0005] Firstly, an intelligent question-answering method is provided, including: Semantic vectorization is performed on the pre-collected multi-source corpus data to obtain multiple semantic vectors; Analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out multiple semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each of the filtered semantic vectors in the multi-source corpus data as the target corpus data; Entity recognition and relation extraction are performed on the target corpus data to obtain entities of a preset type and semantic relationships between entities of the preset type. An initial association network is constructed based on the entities of the preset type and the semantic relationships. The initial association network is dynamically updated based on a preset update strategy to obtain a dynamic knowledge graph. Calculate the correlation degree between the entities in the user question and the business intent entities in the dynamic knowledge graph, and filter out one or more business intent entities with a correlation degree greater than a preset correlation threshold as the initial candidate intents corresponding to the user question; Extract the syntactic entities corresponding to the subject, verb, and object in the user question, match the syntactic entities with the business intent entities corresponding to the initial candidate intents to obtain a matching score, and select the business intent entity with the largest matching score as the target intent. Based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, the potential intent corresponding to the user question is identified, and the potential intent and the target intent are merged into the question-answering intent corresponding to the user question. The system queries multiple pre-defined knowledge bases for information that matches the user's question-and-answer intent to obtain the answer to the user's question.
[0006] Secondly, an intelligent question-answering device is provided, comprising: The semantic vectorization module is used to perform semantic vectorization on pre-collected multi-source corpus data to obtain multiple semantic vectors. The multi-source corpus data filtering module is used to analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out the semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each filtered semantic vector in the multi-source corpus data as the target corpus data. The dynamic knowledge graph construction module is used to perform entity recognition and relation extraction on the target corpus data to obtain entities of preset types and semantic associations between entities of preset types. An initial association network is constructed based on the entities of preset types and the semantic associations, and the initial association network is dynamically updated based on a preset update strategy to obtain a dynamic knowledge graph. The initial candidate intent filtering module is used to calculate the correlation between entities in the user question and business intent entities in the dynamic knowledge graph, and filter out one or more business intent entities whose correlation is greater than a preset correlation threshold as the initial candidate intents corresponding to the user question. The target intent determination module is used to extract the grammatical entities corresponding to the subject, verb, and object in the user question, match the grammatical entities with the business intent entities corresponding to the initial candidate intents to obtain a matching degree value, and select the business intent entity with the largest matching degree value as the target intent. The question-and-answer intent determination module is used to identify the potential intent corresponding to the user question based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, and to merge the potential intent and the target intent into the question-and-answer intent corresponding to the user question. The question-and-answer result generation module is used to query information that matches the question-and-answer intent in multiple preset knowledge bases to obtain the answer to the user's question.
[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described intelligent question-answering method.
[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described intelligent question-answering method.
[0009] In this invention, semantic vectors and similarity filtering are used to achieve precise corpus focusing; the construction and updating of dynamic knowledge graphs overcome the limitations of static knowledge association ambiguity and delayed updates, ensuring the timeliness and relevance of knowledge; hierarchical identification from initial candidate intent to target intent to potential intent comprehensively captures users' explicit and potential demands, avoiding intent omissions; combining multiple database queries and integrating multiple knowledge base resources solves the limitations of single database queries, achieving accuracy, comprehensiveness, and dynamic adaptability of question-and-answer results, effectively improving the efficiency and quality of intelligent question-and-answer for group enterprises, and providing strong technical support for compliance management. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of an application environment for the intelligent question-answering method in one embodiment of the present invention; Figure 2 This is a flowchart illustrating an intelligent question-answering method according to an embodiment of the present invention; Figure 3 yes Figure 2 A flowchart illustrating a specific implementation method of step S1; Figure 4 This is a schematic diagram of the structure of an intelligent question-and-answer device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 6 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] The intelligent question-answering method provided in this invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The server can use the client to perform semantic vectorization processing on pre-collected multi-source corpus data. By comparing the similarity between the semantic vectors and the vectors corresponding to the user's question, target corpus data is selected. Entities and semantic relationships are extracted from the target corpus to construct an initial association network, which is then dynamically updated into a dynamic knowledge graph according to a preset strategy. The user's question is matched with entities in the graph to obtain the association degree, initial candidate intents are selected, and then the target candidate intent and corresponding target intent are determined by combining the grammatical entities in the graph. At the same time, the potential intent of the question is identified, and finally the question-and-answer intent is clarified. Finally, the intent is collaboratively queried in multiple preset knowledge bases to obtain the question-and-answer result and feed it back to the client. Semantic filtering achieves precise corpus focus, dynamic knowledge graphs solve the problems of vague associations and lagging updates in static knowledge, hierarchical intent identification takes into account both explicit and implicit user needs, and multi-base resources are integrated for querying, effectively improving the efficiency and quality of intelligent question-and-answer for enterprise systems and providing technical support for compliance management. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0014] Please see Figure 2 As shown, Figure 2 A flowchart illustrating the intelligent question-answering method provided in this embodiment of the invention includes the following steps: S1. Semantically vectorize the pre-collected multi-source corpus data to obtain multiple semantic vectors.
[0015] In this embodiment of the invention, the multi-source corpus data is business-related text data generated in a certain business scenario, such as various system-related text data involved in the compliance management process of a certain group, covering internal regulations texts of the group headquarters, subsidiaries and various positions, industry-related external regulations texts and corresponding hierarchical tag data.
[0016] In detail, the Quartz scheduling tool of Java Spring (every morning) is used to collect internal regulations texts, automatically loading general policies of a group headquarters, specific policies of subsidiaries, and manually supplemented job operation manuals (such as cashier reconciliation processes and procurement guidelines). Internal regulations texts can be submitted via web forms (supporting doc / docx / pdf formats), ensuring the corpus covers the three-level hierarchy of "headquarters-subsidiary-job". External regulations texts of a group are collected by calling industry database APIs, including compliance texts in areas such as social security, taxation, and bidding. These external regulations texts contain structured fields such as document number, effective date, and clause content. For industry standards without APIs (such as the "Enterprise Adoption Specifications" issued by industry associations), a PDF parsing tool (pdfplumber) is used to extract the text, and the accuracy of the text format is manually verified. Hierarchical tag data of the group is collected, that is, each segment of corpus is labeled with a three-dimensional tag of "organization-business line-job" (such as "subsidiary A-finance-cashier" and "headquarters-human resources-attendance management"). The tags and corpus are classified based on user attribute classification logic to ensure a one-to-one correspondence between tags and corpus.
[0017] In this embodiment of the invention, semantic vector refers to the conversion of textual corpus data into a vector form that can be recognized and calculated by a computer.
[0018] In this embodiment of the invention, reference is made to Figure 3 As shown, the process of semantically vectorizing the pre-collected multi-source corpus data yields multiple semantic vectors, including: S31. Identify the file type of the multi-source corpus data, and perform field splitting on the multi-source corpus data based on the file type to obtain the field content; S32. Perform word segmentation on the multi-source corpus data according to the content of the field to obtain the segmented words corresponding to the multi-source corpus data; S33. Update the segmented words based on the preset update strategy, and convert the updated segmented words into semantic vectors one by one.
[0019] In detail, the file types of the multi-source corpus data include common text formats such as Word documents and PDF documents. For Word files, the python-docx library is used to extract paragraph content and split it by "chapter-clause" (e.g., Chapter 3, Clause 2). For PDF files, pdfplumber is used to extract text and coordinates and merge them into natural paragraphs based on coordinate consistency. All text is finally saved to content.csv, with fields including "corpus ID, level label, and text content".
[0020] Specifically, jieba fine-grained word segmentation is used, combined with a mutual information algorithm (threshold ≥ 0.6) to extract proprietary terms such as "standard adoption" and "reverse verification exceptions." Word frequency is statistically analyzed to generate a "Group-Specific Terminology Dictionary." New terms are added weekly through manual review to ensure coverage of company-specific expressions. The update strategy is a rule system that ensures the timeliness and completeness of the Group-Specific Terminology Dictionary, including regular updates and dynamic supplementation mechanisms. Following the terminology update strategy, the acquired terminology content is updated, and newly approved terms are added to the terminology content, resulting in updated word segmentation words. Based on the Sentence-BERT pre-trained model, the updated word segmentation words are processed to generate multiple 768-dimensional semantic vectors.
[0021] Furthermore, through field splitting, terminology segmentation, and vector transformation, the preprocessing and standardization of multi-source corpus data were completed, transforming the originally messy text data into structured, computable semantic vectors. These semantic vectors contain the core semantic information and group-specific features of the corpus, providing a data foundation for similarity analysis and corpus selection.
[0022] S2. Analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out multiple semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each filtered vector in the multi-source corpus data as the target corpus data.
[0023] In this embodiment of the invention, the similarity refers to the cosine similarity between multiple semantic vectors and the vector corresponding to the user's question, which is used to measure the degree of semantic association between the two.
[0024] In detail, by calculating the cosine similarity between the user question vector and multiple corpus vectors, target corpus data with a similarity of at least 0.7 can be selected, reducing the computational load of subsequent models. A similarity threshold of 0.7 is set, and corpus data with similarities at or above this threshold are selected as target corpus data. For example, if the similarity between a corpus vector and the user question vector is 0.75, then that corpus is included in the target corpus data; if the similarity is 0.65, it is discarded. The target corpus data is a set of corpus data with a high semantic relevance to the user question after similarity screening. This quantitative similarity screening solves the problems of fuzzy corpus matching and weak relevance, accurately focusing on corpus data related to the user question and improving the efficiency of subsequent knowledge extraction and intent recognition.
[0025] Specifically, the selected target corpus data undergoes deduplication, removing duplicate or highly similar entries to ensure the uniqueness and validity of the target corpus data. For example, if two corpora have identical content but different corpus IDs, one of them is retained, avoiding interference from redundant data in subsequent processing and further improving data processing efficiency and accuracy.
[0026] Furthermore, by similarity analysis and filtering, target corpus data was obtained, achieving precise filtering and scope focusing of the corpus data. Compared with the original multi-source corpus data, the target corpus data has a stronger correlation with user questions and more concentrated core information, providing a high-quality data source for extracting entity and semantic relationships. Only based on the filtered target corpus data can the initial association network be constructed more efficiently and accurately.
[0027] S3. Perform entity recognition and relation extraction on the target corpus data to obtain entities of a preset type and semantic relationships between entities of the preset type. Construct an initial association network based on the entities of the preset type and the semantic relationships, and dynamically update the initial association network based on a preset update strategy to obtain a dynamic knowledge graph.
[0028] In this embodiment of the invention, an entity refers to a core element in the target corpus data that carries key information. Preset types include external regulations, internal regulations, responsible departments, and business scenarios. Semantic relationships are the logical connections between entities, including relationships based on, revisions, jurisdiction, and scenarios.
[0029] In detail, entities include external regulatory clauses (attributes: regulatory document number, effective date, level of validity, clause content), internal regulatory clauses (attributes: system number, hierarchical label, chapter number, effective / expiration date), responsible departments (attributes: department code, person in charge, contact information), and business scenarios (attributes: scenario name, associated clause ID, applicable position). Semantic relationships include basis relationships: internal regulatory clauses → basis → external regulatory clauses (with cited clause number), revision relationships: new version of internal regulatory clauses → revised from → old version of internal regulatory clauses (with revision date), jurisdiction relationships: responsible department → jurisdiction → internal regulatory clauses (with departmental responsibility description), and scenario relationships: business scenario → associated → internal / external regulatory clauses (with scenario description). Pre-defined types of entities and semantic relationships can be extracted from the target corpus data using natural language processing algorithms.
[0030] In this embodiment of the invention, the initial association network is a preliminary network structure built based on entities and semantic associations of a preset type, used to present the basic associations between entities.
[0031] In this embodiment of the invention, constructing an initial association network based on the entities of the preset type and the semantic association relationship includes: Identify the entity type and the relationship type of the semantic association; Entities with the same entity type and relation type are associated with semantic associations to obtain association paths, and a target network of entities of the same type and semantic associations is constructed based on the association paths. Identify path association nodes in the semantic association relationship, and connect the target network into an initial association network based on the path association nodes.
[0032] In detail, entity type refers to the classification and definition of entities. External regulations, internal regulations, responsible departments, and business scenarios are the main types of entities. Relationship type refers to the classification and definition of semantic associations. Basis relationship, revision relationship, jurisdiction relationship, and scenario relationship are the main types of semantic associations. Entities with the same entity type and semantic association are associated. For example, all entities belonging to the internal regulations-basis-external regulations category are associated with the relationship to construct a basis relationship target network; entities belonging to the responsible department-jurisdiction-internal regulations category are associated with the relationship to construct a jurisdiction relationship target network. Each target network focuses on a core association logic, solving the problem of network structure confusion caused by the mixing of different types of associations, and making the network hierarchy clearer.
[0033] Specifically, path-related nodes are common entities that exist between different target networks. By identifying these nodes, connections between different target networks can be achieved. For example, an entity containing a certain internal regulation clause exists in both the basis relationship target network and the jurisdiction relationship target network; this entity is a path-related node. Using path-related nodes as links, various independent target networks are connected and integrated to form an initial association network covering various entities and relationships within a group, thus constructing a comprehensive and unified initial association network.
[0034] Furthermore, using the Neo4j graph database, preprocessed entity and relation data are imported in batches via Cypher statements (e.g., CREATE(n: Internal Regulation Clause {System Number: 'ZG-2024-001', Hierarchical Label: 'Subsidiary A-Finance-Cashier'})`), establishing an initial association network of "External Regulation-Internal Regulation-Department-Scenario", which contains 15,000+ entity nodes and 28,000+ relation edges.
[0035] In this embodiment of the invention, the dynamic knowledge graph is a knowledge network that can reflect institutional relationships in real time, formed by dynamically maintaining and updating the initial association network through an update strategy.
[0036] In this embodiment of the invention, the step of dynamically updating the initial association network based on a preset update strategy to obtain a dynamic knowledge graph includes: Extract the timed update strategy and the triggered update strategy from the update strategy; Scheduled tasks are based on the timed update strategy, and entity attributes in the initial association network are updated synchronously according to the positioning task. Based on the aforementioned trigger update strategy, the system monitors text content change events corresponding to entities and semantic relationships in the initial association network. When a monitored text content change event is associated with an entity and semantic relationship in the initial association network, the system triggers a real-time update task for the initial association network. The graph relationships in the initial association network are updated according to the real-time update task; A dynamic knowledge graph is generated based on the updated entity attributes and graph relationships.
[0037] In detail, the scheduled update strategy is a rule for executing updates at fixed time intervals, while the triggered update strategy is a rule for triggering updates based on specific events. By parsing the preset update strategy document, key information such as the time cycle of scheduled updates, execution process, event types that trigger updates, and priority judgment criteria are clarified. Based on the scheduled update strategy, scheduled tasks are set using the Quartz scheduling tool, such as automatically executing update tasks at 2:00 AM every day. When the scheduled task is executed, newly added or revised internal and external regulations are synchronized, and the attributes of corresponding entities in the initial association network are updated. For example, invalid internal regulation clauses are marked as invalid, and attributes such as the effective date of newly added external regulation clauses are added. Based on the triggered update strategy, compliance crawlers and API interfaces are used to monitor in real time for text content change events corresponding to entities and semantic relationships in the initial association network. Text content change events refer to changes in the external text content corresponding to existing entities and their semantic relationships (e.g., revision of a regulatory clause). Once such a change is detected, the system will determine in real time whether the change event is related to existing content in the knowledge graph (e.g., whether the revised clause is the basis for a core entity in the graph). When a text content change event is detected and found to be related to entities and semantic relationships in the initial association network, a real-time update task is immediately triggered to synchronously correct or supplement relevant information in the knowledge graph. For example, based on the external-internal rule relationship in the institutional knowledge graph, the graph relationships in the initial association network are updated, such as generating an association path of external rule change → associated internal rule revision. This enables rapid response to key change events, solves the problem of untimely updates to internal rule relationships after external rule changes, and reduces compliance risks.
[0038] Specifically, by integrating the regularly updated entity attributes and the triggered updated graph relationships, the initial association network is comprehensively updated to form a dynamic knowledge graph. This dynamic knowledge graph can reflect changes in entity attributes and adjustments in relationships between entities in real time, such as displaying the status of expired regulations and the relationships of newly added regulations. This step completes the transformation from the initial association network to a dynamic knowledge graph, solving the problem of the initial association network being static and unable to adapt to dynamic changes in regulations, and providing real-time and accurate knowledge support for subsequent intent recognition and question-answering queries.
[0039] Furthermore, there may be missing relationships in semantic associations. Therefore, relationship completion is required. Specifically, the TransE algorithm is used to predict the missing internal rule-external rule basis relationship. The training batch is set to 128, the learning rate is 0.001, and the iteration is 200 rounds. The potential relationship is completed by minimizing the L2 distance of "internal rule vector + relation vector - external rule vector". After completion, the manual verification pass rate is ≥90%.
[0040] Furthermore, by extracting entity-semantic relationships to construct an initial association network, and then using a dynamic update strategy to form a dynamic knowledge graph, the scattered corpus data is transformed into a structured and dynamic knowledge network. This knowledge graph integrates the core information and association logic of the group's systems, providing a rich and accurate knowledge foundation for matching user questions with intent entities. Only based on the dynamic knowledge graph can accurate matching of user questions with entities be achieved, thereby accurately identifying user intent.
[0041] S4. Calculate the correlation between the entities in the user question and the business intent entities in the dynamic knowledge graph, and select one or more business intent entities with a correlation greater than a preset correlation threshold as the initial candidate intents corresponding to the user question.
[0042] In this embodiment of the invention, the relevance is the similarity between the entity vector in the user question and the entity vector of the business intent, which is used to measure the degree of relevance between the user question and the business intent entity.
[0043] In this embodiment of the invention, calculating the correlation degree between entities in the user question and business intent entities in the dynamic knowledge graph includes: Identify the user attributes of the target user and convert the user attributes into an attribute vector; The user questions are segmented into words, and the segmented user questions are converted into question keyword vectors. The attribute vector and the question keyword vector are fused to obtain a fused vector; The business intent entity is converted into an entity vector, and the correlation between the fused vector and the entity vector is analyzed.
[0044] In detail, user attributes are the three-dimensional feature information of the target user's organization: "Organization-Business Line-Position," for example, Subsidiary A - Finance - Cashier. The "Organization-Business Line-Position" attributes of the user are obtained through the group's Single Sign-On (SSO) system, and an attribute vector (U=0.4·Org+0.3·Dept+0.3·Post) is constructed (the weight of Org for subsidiary users is increased to 0.5). For user questions (such as "How does a cashier reimburse?"), the pkuseg tool is used for word segmentation to extract keywords such as "cashier" and "reimbursement." These keywords are then converted into question keyword vectors using a Sentence-BERT pre-trained model, with the vector dimensions consistent with the attribute vectors. For example, after word segmentation of the user question "How does a cashier reimburse?", the keywords "cashier" and "reimbursement" are obtained and converted into corresponding question keyword vectors.
[0045] Specifically, the attribute vector and the question keyword vector are merged according to a preset weight ratio to generate a fused vector. During the fusion process, it is ensured that the weight allocation of the two vectors is reasonable, reflecting both the hierarchical characteristics of user attributes and highlighting the core semantics of the question keywords. For example, the attribute vector has a weight ratio of 0.4, and the question keyword vector has a weight ratio of 0.6; the fused vector is obtained by superimposing the vectors.
[0046] Furthermore, business intent entities are structured abstractions of users' core demands within specific business scenarios. They are core nodes in the knowledge graph representing users' explicit or potential demands during business interactions. These entities correspond to specific, actionable business demands (rather than generalized needs) and are bound to entities such as job positions, business scenarios, and business rules through semantic relationships (e.g., mapping, attribution). Their attributes are dynamically adjusted as business rules are updated and user interaction data changes. For example, in financial reconciliation scenarios, these might include reconciliation deadline inquiries, reconciliation permission confirmation, and overdue reconciliation handling consultations; in auto insurance scenarios, they might include vehicle damage insurance quote consultations, claims processing time inquiries, and coverage adjustment applications. By matching business intent entities in the dynamic knowledge graph, such as "job position" and "business scenario" entities, candidate intents with a correlation score ≥ 0.6 (e.g., "reconciliation process inquiry") are selected. Based on the logistic regression model, the input is "user attribute vector + question keyword vector", and the output is an intent matching probability of 0-1. A threshold of 0.6 is set to filter low-relevance intents (such as "procurement process query"). The training data consists of 50,000+ labeled samples (positive samples are successful matching cases, and negative samples are attribute mismatch cases). The validation set accuracy is ≥88%.
[0047] Furthermore, by performing multi-dimensional vector matching between user questions and business intent entities in the dynamic knowledge graph, initial candidate intents were selected, achieving a preliminary association between user questions and the core information of the group's policies. The initial candidate intents clarified the general direction of the user questions and provided a scope for the accurate identification of target candidate intents. Only based on the initial candidate intents can the related paths be queried more efficiently in the dynamic knowledge graph to determine the target clause corresponding to the user question.
[0048] S5. Extract the grammatical entities corresponding to the subject, verb, and object in the user question, match the grammatical entities with the business intent entities corresponding to the initial candidate intents to obtain a matching degree value, and select the business intent entity with the largest matching degree value as the target intent.
[0049] In this embodiment of the invention, the grammatical body is the core element of the subject-verb-object structure of the user question, including the subject, verb, and object.
[0050] In this embodiment of the invention, extracting the grammatical entities corresponding to the subject, verb, and object in the user question includes: Syntactic analysis is performed on the user question to obtain the subject-verb-object structure in the user question; Identify the first entity corresponding to the subject, the second entity corresponding to the predicate, and the third entity corresponding to the object in the subject-verb-object structure; The first entity, the second entity, and the third entity are used as syntactic entities in the user question.
[0051] In detail, syntactic analysis tools in natural language processing are used to extract the subject-verb-object structure of user questions. For example, in the user question "How should the cashier of subsidiary A handle reconciliation business?", the subject is "cashier of subsidiary A", the verb is "handle", and the object is "reconciliation business". Among them, "cashier of subsidiary A", "handle", and "reconciliation business" are the grammatical entities in the user question.
[0052] Specifically, using grammatical entities as query keywords, the system searches for the business intent entities corresponding to the initial candidate intents within the dynamic knowledge graph. For example, using "Subsidiary A Cashier" and "Reconciliation Business" as keywords, the query retrieves the association path "Subsidiary A Cashier (Position) → Association → Reconciliation Scenario → Association → Internal Regulation Clause C," and the corresponding internal regulation clause C is the business intent entity. If multiple association paths exist, the clauses corresponding to all paths are retrieved as a set of candidate intent entities. The candidate intent entities are sorted based on a user attribute matching rule, with candidate intent entities having a higher matching degree between user attributes and clause level tags ranking higher, resulting in a sorted candidate list. A preset sorting order of the top 3 is set, and the top 3 intent entities in the sorted candidate list are selected as the target intent entity set. For example, among the candidate intent entities of a user in Subsidiary A, those labeled with the "Subsidiary A - Finance - Cashier" hierarchical tag are prioritized. The top 3 are selected to form the target intent entity set. This means that for multi-path results (such as reconciliation clauses between Subsidiary A and Subsidiary B), they are sorted by "user attribute matching degree" (Subsidiary A users are prioritized for matching Subsidiary A clauses), and the intent entities corresponding to the top 3 paths are retained. The cosine similarity algorithm is used to calculate the matching degree between the user's question vector and each intent entity vector in the target intent entity set. The clause with the highest matching degree is selected as the target intent, ensuring that the matching degree between the intent entity and the user's intent after fine-tuning is ≥0.8. For example, if the similarity between intent entity C in the target intent entity set and the user's question is 0.85, higher than other clauses, then the intent corresponding to intent entity C is selected as the target intent, ensuring accurate understanding of the user's core needs. The target candidate intent is the intent with the highest similarity between the user's question and the target intent entity set.
[0053] Furthermore, the target intent is the most direct institutional basis corresponding to the user's question. That is, with the support of a dynamic knowledge graph, the target intent that has been screened and has the highest semantic matching degree with the user's question is taken as the core guide. Combined with the user's three-dimensional hierarchical attributes of "organization-business line-position", the entity and semantic relationship associated with the target intent are traced in the knowledge graph to locate the corresponding specific institutional clause. This clause not only accurately matches the user's core demands reflected by the target intent, but also adapts to the applicable rules of the system at the user's level. In the end, a clear institutional basis that can directly respond to the core needs of the user's question is formed.
[0054] Furthermore, based on the initial candidate intent, the target intent is accurately identified through grammatical entity parsing, related path querying, clause sorting and filtering, and similarity comparison, thus achieving precise positioning of the user's core needs. This provides a core foundation for the identification of potential intents; only by clarifying the initial candidate intent can we query related information in the knowledge graph around that intent and uncover the user's potential intents.
[0055] S6. Identify the potential intent corresponding to the user question based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, and merge the potential intent and the target intent into the question-answering intent corresponding to the user question.
[0056] In this embodiment of the invention, latent intent refers to potential needs that are not directly stated in the user's question but are related to the core needs. For example, when a user inquires about the reconciliation process, there is an implicit need for reconciliation time limits and overdue processing rules.
[0057] In this embodiment of the invention, identifying the potential intent corresponding to the user question based on the contextual logic of the plurality of initial candidate intents in the dynamic knowledge graph includes: Query entity data associated with the initial candidate intent in the dynamic knowledge graph; Analyze the type of association between the entity data and the initial candidate intent; Based on the association type and the context logic, supplementary information corresponding to the user question is extracted from the dynamic knowledge graph. The supplementary information is combined with the intent answer corresponding to the initial candidate intent to obtain the potential intent corresponding to the user question.
[0058] In detail, based on the initial candidate intent, related entity data is retrieved from the dynamic knowledge graph. For example, if the initial candidate intent is "reimbursement process query," then the knowledge graph will query entity data related to "reimbursement process," such as "reimbursement deadline," "overdue processing," and "application materials." This knowledge graph-based association retrieval solves the problem of lacking direction in potential intent mining and provides a data source for subsequent supplementary information extraction. The types of associations between the retrieved entity data and the initial candidate intent are analyzed, including scenario associations and basis associations. For example, "reimbursement deadline" and "reimbursement process" are scenario associations, as are "overdue processing rules" and "reimbursement process." By determining the types of associations, the logic of the association between entity data and the initial candidate intent is clarified, solving the problem of chaotic information filtering and ensuring that the extracted supplementary information is highly relevant to the core needs.
[0059] Specifically, for queries related to "reconciliation deadlines," the system automatically links to "reconciliation clauses → association → overdue processing clauses" in the knowledge graph, supplementing with potential intents such as "overdue processing procedures" and "penalty rules." Based on the type of association, corresponding supplementary information is extracted from the dynamic knowledge graph. For example, based on scenario associations, supplementary information such as "reconciliation deadline is 3 working days" and "overdue unreconciled transactions require an explanation to the finance department" is extracted. Supplementary information must accurately correspond to potential intents to ensure a complete understanding of user needs. Contextual expansion results are organized in the form of "intent answer + related supplementary information," such as "reconciliation deadline is 3 working days (core), overdue unreconciled transactions require an explanation to the finance department (related information)," ensuring coverage of potential user needs. This involves combining supplementary information with the intent answer corresponding to the initial candidate intent. The intent answer is the direct response to the initial candidate intent, such as "the reconciliation process is: submit application materials → financial review → approval → complete reconciliation." The combined information forms a complete requirement statement that includes both the initial and potential intents. For example, "The reimbursement process is: submit application materials → financial review → approval → completion of reimbursement (intention answer). The reimbursement period is 3 working days. If reimbursement is not completed within the time limit, an explanation must be submitted to the finance department (supplementary information)." This complete requirement statement represents the question-and-answer intent corresponding to the user's question. By integrating the user's explicit and potential intents, the problem of incomplete question-and-answer intents is solved, ensuring a comprehensive response to user needs.
[0060] Furthermore, by mining the user's potential intent and integrating the intent answer with supplementary information, a complete question-and-answer intent is formed. This intent comprehensively reflects the user's true needs and provides a clear search direction for cross-database collaborative queries. Only based on the complete question-and-answer intent can relevant information be accurately retrieved from the preset knowledge base, resulting in comprehensive and accurate question-and-answer results.
[0061] S7. Search for information matching the question-and-answer intent in multiple preset knowledge bases to obtain the answer to the user's question.
[0062] In this embodiment of the invention, the knowledge base is a comprehensive knowledge base system comprising an internal regulations database, an external regulations database, and an external knowledge base. The internal regulations database uses an Elasticsearch cluster (3-node redundancy), storing internal regulations text hierarchically according to "headquarters → subsidiary → position." Each data entry includes "regulation number, hierarchical tag, chapter content, and effective date," and a "hierarchical tag + keyword" combined index is established to support fast retrieval by hierarchy. The external regulations database is stored based on MongoDB, with fields including "regulation document number, clause content, effective date, and associated internal regulation ID." A "document number + effective date" index is established to support queries by time range (e.g., "tax regulations effective in 2024"). The external knowledge base uses a modular JSON format, defining standardized metadata (e.g., '{"external ID": "BG-001", "applicable institution": "acquired subsidiary B", "effective date": "2024-01-01", "text content": "..."}'), enabling "plug-and-play" use of acquired subsidiary regulations. The question-and-answer result is the final answer obtained by integrating and sorting the information of the target document set.
[0063] In this embodiment of the invention, the step of querying information matching the question-and-answer intent in multiple preset knowledge bases to obtain the answer to the user's question includes: The query routing weights of the multiple knowledge bases are determined based on the question-and-answer intent and preset user attributes. Based on the query routing weights, the retrieval operations for the question-and-answer intent are performed in parallel across multiple knowledge bases to obtain a set of retrieval results. Calculate the similarity between each search result in the search result set and the question intent, and perform a preliminary sorting of each search result in the search result set according to the similarity in descending order; Filter out multiple search results that meet the preset hierarchical tag conditions after preliminary sorting; The multiple search results are sorted using a preset sorting algorithm, and the sorted search results are integrated into the answer to the user's question.
[0064] In detail, the query routing weights for each knowledge base are determined based on the core needs of the question-and-answer intent and user attributes. For example, when a subsidiary user queries questions related to "attendance," the weight for the internal regulations knowledge base is set to 0.7, the external regulations knowledge base to 0.2, and the external plugin knowledge base to 0.1; when a headquarters audit staff member queries questions related to "compliance audit," the weight for the external regulations knowledge base is set to 0.5, the internal regulations knowledge base to 0.4, and the external plugin knowledge base to 0.1. These rules can be manually adjusted through the management backend, supporting personalized routing weight configuration by "organization-business line." Based on the query routing weights, retrieval operations are performed in parallel across each knowledge base. The BM25 algorithm is used to retrieve the Top 20 relevant documents from the internal regulations knowledge base, external regulations knowledge base, and external plugin knowledge base, forming a set of search results. The search results set is initially sorted based on the similarity between the documents and the question-and-answer intent, retaining documents with higher similarity. Based on preset hierarchical tags, the search results in the initially sorted search result set are filtered, and search results containing the user's "organization-business line-position" hierarchical tags are retained first. For example, the search results for user A of subsidiary A will be filtered to include the search results labeled with the "subsidiary A" hierarchical tag.
[0065] Specifically, an improved MMR algorithm is used to perform the final ranking of the retrieval results. The algorithm formula is as follows: .in, For search results The final sorting score, This is the cosine similarity calculation function. For the search results, For user question text, For user attribute vectors, For other search results recalled in the same batch, ensure that the ranking of the hierarchical knowledge is improved by 3-5 places. Calculate the ranking score of each search result using this algorithm, and sort them from highest to lowest score to obtain the ranked search results. Integrate the ranked document information, organize the question-and-answer results according to the template of "intent knowledge + supplementary knowledge," and label the source library and clause ID of each knowledge item. For example, "Subsidiary A's cashier reimbursement process: A 'Reimbursement Application Form' must be submitted (Internal Regulation Library, Clause ID: ZG-2024-005), the reimbursement time limit is 3 working days (Internal Regulation Library, Clause ID: ZG-2024-006), and an explanation must be submitted to the finance department if the reimbursement is not completed within the time limit (Internal Regulation Library, Clause ID: ZG-2024-007)."
[0066] Furthermore, when the confidence level of a single knowledge base retrieval is less than 0.7 (e.g., the internal regulations library does not have the clause "Adoption of standards by the acquired subsidiary B"), cross-library collaboration is automatically triggered. Complementary knowledge is searched through the knowledge graph's relationship of "external library clauses → basis → internal regulations library clauses". It is integrated according to the "intended knowledge + supplementary knowledge" template, such as "Adoption process for the acquired subsidiary B: A 'Adoption Application Form' (external library) must be submitted, and the review must be conducted in accordance with Chapter 3 of the headquarters' 'Adoption Management Measures' (internal regulations library)". In addition, each piece of knowledge content will be marked with the source library and clause ID, allowing users to trace the source and view the original text.
[0067] As can be seen, the above solution achieves precise corpus focusing through semantic vector and similarity filtering; it overcomes the limitations of static knowledge association ambiguity and delayed updates through the construction and updating of dynamic knowledge graphs, ensuring the timeliness and relevance of knowledge; it comprehensively captures users' explicit and implicit demands through hierarchical identification from initial candidate intent, target intent to potential intent, avoiding intent omission; and it integrates multiple knowledge base queries and resources, solving the limitations of single-base queries, and achieving the accuracy, comprehensiveness, and dynamic adaptability of question-and-answer results. This effectively improves the efficiency and quality of intelligent question-and-answer for group-type enterprises, providing strong technical support for compliance management.
[0068] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0069] In one embodiment, an intelligent question-answering device 100 is provided, which corresponds one-to-one with the intelligent question-answering methods described in the above embodiments. For example... Figure 4 As shown, the intelligent question-answering device 100 includes a semantic vectorization module 101, a multi-source corpus data filtering module 102, a dynamic knowledge graph construction module 103, an initial candidate intent filtering module 104, a target intent determination module 105, a question-answering intent determination module 106, and a question-answering result generation module 107. Detailed descriptions of each functional module are as follows: The semantic vectorization module 101 is used to perform semantic vectorization on the multi-source corpus data of the pre-collected target set to obtain multiple semantic vectors; The multi-source corpus data filtering module 102 is used to analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out multiple semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each filtered semantic vector in the multi-source corpus data as the target corpus data. The dynamic knowledge graph construction module 103 is used to perform entity recognition and relation extraction on the target corpus data to obtain entities of a preset type and semantic associations between entities of the preset type. An initial association network is constructed based on the entities of the preset type and the semantic associations, and the initial association network is dynamically updated based on a preset update strategy to obtain a dynamic knowledge graph. The initial candidate intent filtering module 104 is used to calculate the correlation between entities in the user question and business intent entities in the dynamic knowledge graph, and filter out one or more business intent entities whose correlation is greater than a preset correlation threshold as the initial candidate intents corresponding to the user question. The target intent determination module 105 is used to extract the grammatical entities corresponding to the subject, verb, and object in the user question, match the grammatical entities with the business intent entities corresponding to the initial candidate intents to obtain a matching degree value, and select the business intent entity with the largest matching degree value as the target intent. The question-and-answer intent determination module 106 is used to identify the potential intent corresponding to the user question based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, and to merge the potential intent and the target intent into the question-and-answer intent corresponding to the user question. The question-and-answer result generation module 107 is used to query information that matches the question-and-answer intent in multiple preset knowledge bases to obtain the answer to the user's question.
[0070] In one embodiment, the semantic vectorization module 101, when performing semantic vectorization on pre-collected multi-source corpus data to obtain multiple semantic vectors, is used for: Identify the file type of the multi-source corpus data, and perform field splitting on the multi-source corpus data based on the file type to obtain the field content; The multi-source corpus data is segmented according to the content of the field to obtain the segmented words corresponding to the multi-source corpus data; The segmented words are updated based on a preset update strategy, and the updated segmented words are converted into semantic vectors one by one.
[0071] In one embodiment, the dynamic knowledge graph construction module 103, when constructing an initial association network based on the entities of the preset type and the semantic association relationship, is used to: Identify the entity type of the entity and the relationship type of the semantic association; Entities with the same entity type and relation type are associated with semantic associations to obtain association paths, and a target network of entities of the same type and semantic associations is constructed based on the association paths. Identify path association nodes in the semantic association relationship, and connect the target network into an initial association network based on the path association nodes.
[0072] In one embodiment, the dynamic knowledge graph construction module 103, when performing dynamic updates on the initial association network based on a preset update strategy to obtain a dynamic knowledge graph, is further configured to: Extract the timed update strategy and the triggered update strategy from the update strategy; Scheduled tasks are based on the timed update strategy, and entity attributes in the initial association network are updated synchronously according to the positioning task. Based on the aforementioned trigger update strategy, the system monitors text content change events corresponding to entities and semantic relationships in the initial association network. When a monitored text content change event is associated with an entity and semantic relationship in the initial association network, the system triggers a real-time update task for the initial association network. The graph relationships in the initial association network are updated according to the real-time update task; A dynamic knowledge graph is generated based on the updated entity attributes and graph relationships.
[0073] In one embodiment, the target intent determination module 105, when performing the extraction of the grammatical entities corresponding to the subject, verb, and object in the user question, is used to: Syntactic analysis is performed on the user question to obtain the subject-verb-object structure in the user question; Identify the first entity corresponding to the subject, the second entity corresponding to the predicate, and the third entity corresponding to the object in the subject-verb-object structure; The first entity, the second entity, and the third entity are used as syntactic entities in the user question.
[0074] In one embodiment, the question-answering intent determination module 106, when performing the task of identifying the potential intent corresponding to the user question based on the contextual logic in the dynamic knowledge graph according to the initial candidate intent, is configured to: Query entity data associated with the initial candidate intent in the dynamic knowledge graph; Analyze the type of association between the entity data and the initial candidate intent; Based on the association type and the context logic, supplementary information corresponding to the user question is extracted from the dynamic knowledge graph. The supplementary information is combined with the intent answer corresponding to the initial candidate intent to obtain the potential intent corresponding to the user question.
[0075] In one embodiment, the question-and-answer result generation module 107, when performing a query in multiple preset knowledge bases to obtain the answer to the user's question, is configured to: The query routing weights of the multiple knowledge bases are determined based on the question-and-answer intent and preset user attributes. Based on the query routing weights, the retrieval operations for the question-and-answer intent are performed in parallel across multiple knowledge bases to obtain a set of retrieval results. Calculate the similarity between each search result in the search result set and the question intent, and perform a preliminary sorting of each search result in the search result set according to the similarity in descending order; Filter out multiple search results that meet the preset hierarchical tag conditions after preliminary sorting; The multiple search results are sorted using a preset sorting algorithm, and the sorted search results are integrated into the answer to the user's question.
[0076] This invention provides an intelligent question-answering device that achieves precise corpus focusing through semantic vector and similarity filtering; it overcomes the limitations of static knowledge association ambiguity and delayed updates by constructing and updating a dynamic knowledge graph, ensuring the timeliness and relevance of knowledge; through hierarchical identification from initial candidate intent to target intent to potential intent, it comprehensively captures users' explicit and potential demands, avoiding intent omissions; and by combining multiple database queries and integrating multiple knowledge base resources, it solves the limitations of single-database queries, achieving accuracy, comprehensiveness, and dynamic adaptability of question-answering results, effectively improving the efficiency and quality of intelligent question-answering for group enterprises, and providing strong technical support for compliance management.
[0077] For specific limitations regarding the intelligent question-answering device, please refer to the limitations of the intelligent question-answering method above, which will not be repeated here. Each module in the aforementioned intelligent question-answering device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0078] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a smart question-answering method on the server side.
[0079] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a smart question-answering method on the client side.
[0080] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Semantic vectorization is performed on the pre-collected multi-source corpus data to obtain multiple semantic vectors; Analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out multiple semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each of the filtered semantic vectors in the multi-source corpus data as the target corpus data; Entity recognition and relation extraction are performed on the target corpus data to obtain entities of a preset type and semantic relationships between entities of the preset type. An initial association network is constructed based on the entities of the preset type and the semantic relationships. The initial association network is dynamically updated based on a preset update strategy to obtain a dynamic knowledge graph. Calculate the correlation degree between the entities in the user question and the business intent entities in the dynamic knowledge graph, and select one or more business intent entities whose correlation degree is greater than a preset correlation threshold as the initial candidate intents corresponding to the user question. Extract the syntactic entities corresponding to the subject, verb, and object in the user question, match the syntactic entities with the business intent entities corresponding to the initial candidate intents to obtain a matching score, and select the business intent entity with the largest matching score as the target intent. Based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, the potential intent corresponding to the user question is identified, and the potential intent and the target intent are merged into the question-answering intent corresponding to the user question. The system queries multiple pre-defined knowledge bases for information that matches the user's question-and-answer intent to obtain the answer to the user's question.
[0081] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Semantic vectorization is performed on the pre-collected multi-source corpus data to obtain multiple semantic vectors; Analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out multiple semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each of the filtered semantic vectors in the multi-source corpus data as the target corpus data; Entity recognition and relation extraction are performed on the target corpus data to obtain entities of a preset type and semantic relationships between entities of the preset type. An initial association network is constructed based on the entities of the preset type and the semantic relationships. The initial association network is dynamically updated based on a preset update strategy to obtain a dynamic knowledge graph. Calculate the correlation degree between the entities in the user question and the business intent entities in the dynamic knowledge graph, and select one or more business intent entities whose correlation degree is greater than a preset correlation threshold as the initial candidate intents corresponding to the user question. Extract the syntactic entities corresponding to the subject, verb, and object in the user question, match the syntactic entities with the business intent entities corresponding to the initial candidate intents to obtain a matching score, and select the business intent entity with the largest matching score as the target intent. Based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, the potential intent corresponding to the user question is identified, and the potential intent and the target intent are fused together to form the question-and-answer intent corresponding to the user question. The system queries multiple pre-defined knowledge bases for information that matches the user's question-and-answer intent to obtain the answer to the user's question.
[0082] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0083] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0085] It should be noted that if any software tools or components not belonging to our company appear in the embodiments of this application, they are merely for illustrative purposes and do not represent actual use.
[0086] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. An intelligent question-answering method, characterized in that, include: Semantic vectorization is performed on the pre-collected multi-source corpus data to obtain multiple semantic vectors; Analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out multiple semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each of the filtered semantic vectors in the multi-source corpus data as the target corpus data; Entity recognition and relation extraction are performed on the target corpus data to obtain entities of a preset type and semantic relationships between entities of the preset type. An initial association network is constructed based on the entities of the preset type and the semantic relationships. The initial association network is dynamically updated based on a preset update strategy to obtain a dynamic knowledge graph. Calculate the correlation degree between the entities in the user question and the business intent entities in the dynamic knowledge graph, and select one or more business intent entities with a correlation degree greater than a preset correlation threshold as the initial candidate intents corresponding to the user question; Extract the syntactic entities corresponding to the subject, verb, and object in the user question, match the syntactic entities with the business intent entities corresponding to the initial candidate intents to obtain a matching score, and select the business intent entity with the largest matching score as the target intent. Based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, the potential intent corresponding to the user question is identified, and the potential intent and the target intent are merged into the question-answering intent corresponding to the user question. The system queries multiple pre-defined knowledge bases for information that matches the user's question-and-answer intent to obtain the answer to the user's question.
2. The intelligent question-answering method as described in claim 1, characterized in that, The process of semantically vectorizing the pre-collected multi-source corpus data yields multiple semantic vectors, including: Identify the file type of the multi-source corpus data, and perform field splitting on the multi-source corpus data based on the file type to obtain the field content; The multi-source corpus data is segmented according to the content of the field to obtain the segmented words corresponding to the multi-source corpus data; The segmented words are updated based on a preset update strategy, and the updated segmented words are converted into semantic vectors one by one.
3. The intelligent question-answering method as described in claim 1, characterized in that, The step of constructing an initial association network based on the entities of the preset type and the semantic association relationship includes: Identify the entity type of the entity and the relationship type of the semantic association; Entities with the same entity type and relation type are associated with semantic associations to obtain association paths, and a target network of entities of the same type and semantic associations is constructed based on the association paths. Identify path association nodes in the semantic association relationship, and connect the target network into an initial association network based on the path association nodes.
4. The intelligent question-answering method as described in claim 1, characterized in that, The dynamic updating of the initial association network based on a preset update strategy to obtain a dynamic knowledge graph includes: Extract the timed update strategy and the triggered update strategy from the update strategy; Scheduled tasks are based on the timed update strategy, and entity attributes in the initial association network are updated synchronously according to the positioning task. Based on the aforementioned trigger update strategy, the system monitors text content change events corresponding to entities and semantic relationships in the initial association network. When a monitored text content change event is associated with an entity and semantic relationship in the initial association network, the system triggers a real-time update task for the initial association network. The graph relationships in the initial association network are updated according to the real-time update task; A dynamic knowledge graph is generated based on the updated entity attributes and graph relationships.
5. The intelligent question-answering method as described in claim 1, characterized in that, The extraction of the syntactic entities corresponding to the subject, verb, and object in the user question includes: Syntactic analysis is performed on the user question to obtain the subject-verb-object structure in the user question; Identify the first entity corresponding to the subject, the second entity corresponding to the predicate, and the third entity corresponding to the object in the subject-verb-object structure; The first entity, the second entity, and the third entity are used as syntactic entities in the user question.
6. The intelligent question-answering method as described in claim 1, characterized in that, The step of identifying the potential intent corresponding to the user question based on the contextual logic in the dynamic knowledge graph according to the initial candidate intent includes: Query entity data associated with the initial candidate intent in the dynamic knowledge graph; Analyze the type of association between the entity data and the initial candidate intent; Based on the association type and the context logic, supplementary information corresponding to the user question is extracted from the dynamic knowledge graph. The supplementary information is combined with the intent answer corresponding to the initial candidate intent to obtain the potential intent corresponding to the user question.
7. The intelligent question-answering method as described in claim 1, characterized in that, The step of querying information matching the question-and-answer intent in multiple preset knowledge bases to obtain the answer to the user's question includes: The query routing weights of the multiple knowledge bases are determined based on the question-and-answer intent and preset user attributes. Based on the query routing weights, the retrieval operations for the question-and-answer intent are performed in parallel across multiple knowledge bases to obtain a set of retrieval results. Calculate the similarity between each search result in the search result set and the question intent, and perform a preliminary sorting of each search result in the search result set according to the similarity in descending order; Filter out multiple search results that meet the preset hierarchical tag conditions after preliminary sorting; The multiple search results are sorted using a preset sorting algorithm, and the sorted search results are integrated into the answer to the user's question.
8. An intelligent question-and-answer device, characterized in that, include: The semantic vectorization module is used to perform semantic vectorization on pre-collected multi-source corpus data to obtain multiple semantic vectors. The multi-source corpus data filtering module is used to analyze the similarity between the multiple semantic vectors and the vectors corresponding to the pre-acquired user questions, filter out multiple semantic vectors whose similarity meets the preset filtering conditions, and determine the corpus data corresponding to each filtered semantic vector in the multi-source corpus data as the target corpus data. The dynamic knowledge graph construction module is used to perform entity recognition and relation extraction on the target corpus data to obtain entities of preset types and semantic associations between entities of preset types. An initial association network is constructed based on the entities of preset types and the semantic associations, and the initial association network is dynamically updated based on a preset update strategy to obtain a dynamic knowledge graph. The initial candidate intent filtering module is used to calculate the correlation between entities in the user question and business intent entities in the dynamic knowledge graph, and filter out one or more business intent entities whose correlation is greater than a preset correlation threshold as the initial candidate intents corresponding to the user question. The target intent determination module is used to extract the grammatical entities corresponding to the subject, verb, and object in the user question, match the grammatical entities with the business intent entities corresponding to the initial candidate intents to obtain a matching degree value, and select the business intent entity with the largest matching degree value as the target intent. The question-and-answer intent determination module is used to identify the potential intent corresponding to the user question based on the contextual logic of the initial candidate intent in the dynamic knowledge graph, and to merge the potential intent and the target intent into the question-and-answer intent corresponding to the user question. The question-and-answer result generation module is used to query information that matches the question-and-answer intent in multiple preset knowledge bases to obtain the answer to the user's question.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the intelligent question-answering method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the intelligent question-answering method as described in any one of claims 1 to 7.