Search

CN-121980000-A - Method and system for large-scale generation of interpretable question-answer pairs oriented to vertical field

CN121980000ACN 121980000 ACN121980000 ACN 121980000ACN-121980000-A

Abstract

The invention provides a method and a system for generating interpretable question-answer pairs in large scale for the vertical field, which relate to the technical field of data processing, and the method comprises the following steps of 1, constructing a cross-modal heterogeneous weather knowledge graph; heterogeneous graph neural network modeling is conducted on the cross-modal heterogeneous meteorological knowledge graph, embedded vectors of all nodes are learned, the knowledge graph with the embedded vectors of the nodes is obtained, semantic community division is conducted on the entity based on the embedded vectors, and the optimized knowledge graph is generated. According to the invention, through knowledge graph optimization, conical semantic space construction, structured evidence chain retrieval and pre-training large language model generation, the large-scale generation of interpretable weather question-answer pairs in the vertical field is realized, and the interpretability and the credibility of question-answer results are improved.

Inventors

  • CHEN YING
  • HUANG YOUJUN
  • YE FANGBIN
  • GAO LICHAO

Assignees

  • 厦门身份宝网络科技有限公司

Dates

Publication Date
20260505
Application Date
20260407

Claims (10)

  1. 1. The method for generating the interpretable question-answer pairs in large scale for the vertical field is characterized by comprising the following steps: Step 1, constructing a cross-modal heterogeneous weather knowledge graph, carrying out heterogeneous graph neural network modeling on the cross-modal heterogeneous weather knowledge graph, learning an embedded vector of each node to obtain a knowledge graph with the node embedded vector, and carrying out semantic community division on the entity based on the embedded vector to generate an optimized knowledge graph; Step 2, carrying out gradient field analysis on embedded vectors of all nodes in the optimized knowledge graph, determining semantic gradients of each node in different semantic community directions, and identifying abrupt nodes as semantic boundary anchor points; Step 3, simulating the propagation process of semantic information in a conical semantic space domain according to a thermal diffusion equation, generating a meteorological semantic diffusion equipotential surface radiating from a core area to the periphery, and establishing a semantic diffusion path lineage according to the hierarchical division of the meteorological semantic diffusion equipotential surface; step 4, mapping the user query request to a conical semantic space domain, calculating the space distance between a query request vector and each meteorological semantic diffusion equipotential surface, determining a diffusion path level to which the user query request belongs, retrieving entities matched with the diffusion path level from an optimized knowledge graph and related information among the entities, and constructing a structured evidence chain representing an inference path; and 5, fusing the structured evidence chain with the user query request, and inputting the fused structured evidence chain and the user query request into a pre-training large language model to generate an interpretable weather question-answer pair.
  2. 2. The method for generating the interpretable question-answer pairs in large scale for the vertical field according to claim 1, wherein the process of constructing the cross-modal heterogeneous meteorological knowledge graph is as follows: The method comprises the steps of carrying out multi-mode block processing on an original weather technical document to obtain a weather text block, a weather image block, a weather table block and a weather video key frame block, carrying out intra-mode information extraction on the weather text block, the weather image block, the weather table block and the weather video key frame block respectively, extracting relations between weather entities and weather entities from the weather text block, extracting visual relations between image weather entities and image entities from the weather image block, extracting table weather entities and table internal row-column relations from the weather table block, extracting spatial-temporal relations and dynamic evolution relations among video weather entities and video entities from the weather video key frame block, carrying out semantic alignment and cross-mode association on weather entities extracted from different modes, and constructing a cross-mode heterogeneous weather knowledge map.
  3. 3. The method for generating the interpretable question-answer pairs in the vertical domain according to claim 2, wherein the modeling of the heterogeneous graph neural network is performed on the cross-modal heterogeneous meteorological knowledge graph, the embedded vector of each node is learned, the knowledge graph with the embedded vector of the node is obtained, the semantic community division is performed on the entity based on the embedded vector, and the generation of the optimized knowledge graph comprises the following steps: The method comprises the steps of forming a cross-modal heterogeneous weather knowledge graph into an iso-graph containing multiple node types and multiple edge types, initializing a feature vector for each node, inputting the heterogeneous graph after initializing the feature vector into a heterogeneous graph semantic network, and aggregating neighbor node information of each node; In the aggregation process, the attention weight of each neighbor node to the center node under different relation types is calculated by using an attention mechanism, and the feature vectors of the neighbor nodes are weighted and aggregated according to the attention weight to obtain an aggregation feature; The method comprises the steps of integrating the feature vector of the aggregation feature and the feature vector of the central node, updating the integrated feature vector into an embedded vector of the central node in the current layer, obtaining a final embedded vector of each node integrated structure semantic after a plurality of layers of iterations, clustering the final embedded vectors, dividing the nodes with the embedded vector distance smaller than the clustering radius into the same semantic communities, labeling the semantic community identification of each node, and finally obtaining the optimized knowledge graph with the semantic community labels.
  4. 4. The method for scale generation of vertical-oriented interpretable question-answer pairs according to claim 3, wherein the step 2 comprises: Calculating a difference value between an embedded vector of a corresponding node and a central vector of an adjacent semantic community for each node in the optimized knowledge graph to obtain a difference value vector, taking the projection of the difference value vector in a preset direction as a semantic gradient of the corresponding node pointing to the semantic community adjacent to the corresponding node, wherein the adjacent semantic community refers to the semantic community to which the adjacent node connected by the corresponding node directly through an edge belongs; Traversing all nodes in the optimized knowledge graph, determining nodes, of which semantic gradient vectors simultaneously point to two or more different semantic communities and the gradient modulus length exceeds a preset threshold value, as semantic demarcation anchors, wherein the semantic demarcation anchors are positioned in a common boundary area of a plurality of semantic communities pointed by the semantic demarcation anchors; Calculating the geometric mean value of all node embedded vectors in the core entity group with the highest semantic association degree in the optimized knowledge graph to obtain base point coordinates; And taking nodes except the nodes in the core entity group and the semantic boundary anchor points in the optimized knowledge graph as common nodes, and distributing the common nodes to different level intervals of the conical skeleton according to the embedding distance from each common node to the base point so as to form conical semantic space domains which are distributed in a layered manner along the radial direction by taking the base point as the center and taking the top point as the boundary in the embedding space.
  5. 5. The method for scale generation of vertical field-oriented interpretable question-answer pairs according to claim 4, wherein the step of assigning the common nodes to different level intervals of the conical skeleton according to embedding distances from the common nodes to the base points comprises: Obtaining minimum distance values and maximum distance values in the embedding distance values of all the common nodes, equally dividing intervals from the minimum distance values to the maximum distance values according to the preset radial level number to obtain a plurality of continuous and mutually non-overlapping level distance intervals, wherein the lower limit value and the upper limit value of each level distance interval form a boundary threshold value of the level; Traversing each common node, comparing the embedded distance value of the common node with the boundary threshold value of each level distance interval, and distributing the common node to the radial level corresponding to the level distance interval to which the corresponding embedded distance value belongs.
  6. 6. The method for scale generation of the vertical field oriented interpretable question-answer pair of claim 5, wherein the step 3 includes: Setting a base point in a conical semantic space domain as a thermal diffusion source point, setting a thermal diffusion coefficient and a propagation time parameter by taking the embedding distance from each node in the conical semantic space domain to the base point as a space position variable, and solving a thermal diffusion equation to obtain a semantic information concentration value at any position in the conical semantic space domain; extracting space point sets with equal semantic information concentration values in a conical semantic space domain, and fitting the space point sets into continuous curved surfaces to serve as meteorological semantic diffusion equipotential surfaces; The concentration value range between the concentration boundaries is defined as the concentration coverage area of the corresponding levels, so that a semantic diffusion path lineage is established from the base point outwards through each diffusion level to the outermost weather semantic diffusion equipotential surface, wherein the semantic diffusion path lineage comprises a plurality of diffusion paths from the base point to the node covered by each diffusion level.
  7. 7. The method for scale generation of the vertical field oriented interpretable question-answer pair of claim 6, wherein the step 4 includes: the method comprises the steps of inputting a user query request to a pre-training language encoder for vectorization processing to obtain a query request vector corresponding to the user query request, projecting the query request vector into an embedded space of a conical semantic space domain to obtain a mapping coordinate of the query request vector in the conical semantic space domain; The space distance values of all the meteorological semantic diffusion equipotential surfaces are sequenced, the meteorological semantic diffusion equipotential surface corresponding to the minimum space distance value is selected as a target equipotential surface, and a diffusion path level corresponding to the target meteorological semantic diffusion equipotential surface in a semantic diffusion path lineage is determined as a diffusion path level of a user query request; And retrieving the entity nodes covered by the corresponding diffusion path hierarchy from the optimized knowledge graph according to the diffusion path hierarchy, sorting the entity nodes according to the original document sources of the entity nodes, organizing the associated edges according to semantic relation types, and forming a structured evidence chain containing the entity node sequence and the association relation path, wherein the entity nodes comprise text entities, image entities, table entities and video entities.
  8. 8. The method for scale generation of vertical-oriented interpretable question-answer pairs according to claim 7, wherein the step 5 comprises: traversing each entity node and each associated side in the structured evidence chain, converting each entity node into a first description sentence according to the entity type and the entity name, converting each associated side into a second description sentence according to the corresponding relation type and the connected head-tail entity, and splicing all the first description sentences and the second description sentences according to the appearance sequence of the entity nodes in the evidence chain to obtain a natural language evidence text corresponding to the structured evidence chain; splicing the natural language evidence text and the user query request according to a preset prompt word template, adding an evidence starting identifier before the natural language evidence text and an evidence ending identifier after the natural language evidence text, and adding a query starting identifier before the user query request to obtain a spliced text; The spliced text is used as an enhanced prompt word fused with evidence information, the enhanced prompt word is input into a pre-training large language model, semantic understanding and context modeling are carried out on the enhanced prompt word, a corresponding answer text is generated according to natural language evidence text in the enhanced prompt word, and an original reply text output by the pre-training large language model is obtained; Extracting answer text parts from original reply texts output by the pre-training large language model, extracting the original document positions of entity nodes referenced by each answer text fragment and the original document sources of associated edges from a structured evidence chain as evidence source labels, and storing the answer texts and the corresponding evidence source labels in an associated manner to generate interpretable weather question-answer pairs containing answer contents and the original document source labels corresponding to each answer content.
  9. 9. The method for scale generation of vertical field oriented interpretable question-answer pairs of claim 8, wherein the original document location comprises: The time stamp and spatial region of the video keyframe are also included for the video entity, and the region coordinates in the image are included for the image entity.
  10. 10. A vertical-domain-oriented interpretable question-answer pair scale generation system implementing the method of any one of claims 1 to 9, comprising: The system comprises a knowledge graph generation module, a judgment module and a judgment module, wherein the knowledge graph generation module is used for constructing a cross-modal heterogeneous meteorological knowledge graph, carrying out heterogeneous graph neural network modeling on the cross-modal heterogeneous meteorological knowledge graph, learning an embedded vector of each node to obtain a knowledge graph with the node embedded vector, and carrying out semantic community division on an entity based on the embedded vector to generate an optimized knowledge graph; The space domain construction module is used for carrying out gradient field analysis on embedded vectors of all nodes in the optimized knowledge graph, determining semantic gradients of each node in different semantic community directions, and identifying abrupt nodes as semantic boundary anchor points; The pedigree generation module is used for simulating the propagation process of semantic information in the conical semantic space domain according to a thermal diffusion equation, generating a meteorological semantic diffusion equipotential surface radiating from a core area to the periphery, and establishing a semantic diffusion path pedigree according to the hierarchical division of the meteorological semantic diffusion equipotential surface; The evidence chain acquisition module is used for mapping the user query request to a conical semantic space domain, calculating the space distance between the query request vector and each meteorological semantic diffusion equipotential surface, determining the diffusion path level to which the user query request belongs, retrieving the entity matched with the diffusion path level from the optimized knowledge graph and the associated information among the entities, and constructing a structured evidence chain representing the reasoning path; And the question-answer pair generation module is used for fusing the structured evidence chain with the user query request and inputting the fused structured evidence chain into the pre-training large language model to generate the interpretable weather question-answer pair.

Description

Method and system for large-scale generation of interpretable question-answer pairs oriented to vertical field Technical Field The invention relates to the technical field of data processing, in particular to a method and a system for generating an interpretable question-answer pair in a large scale for the vertical field. Background In the field of weather service, how to generate question-answer pairs with interpretation paths on a large scale based on a professional knowledge base is a research direction for improving the interpretability of an intelligent question-answer system. The existing method can be further optimized in a way of organizing the retrieved fragmented entity information into a coherent interpretation chain when dealing with complex problems involving multi-hop reasoning. Taking typhoon forecast consultation scene as an example, when a fisher in a coastal area inquires whether typhoons suddenly turn before logging in through a mobile phone terminal, and whether the typhoons are related to the change of the subtropical high voltage, the existing question-answering system can search typhoons, subtropical high-voltage entities, time nodes when the turning occurs and respective attribute descriptions based on weather knowledge maps. However, in practical application, when the retrieved entities and the relationship fragments are organized into a section which can embody the explanatory question and answer of the complete causal chain, the processing effect of the existing method has room for improvement. In particular, to answer the above-mentioned problems, a complete reasoning chain from "secondary high attenuation" to "guiding airflow change" to "typhoon path shift" needs to be presented in ideal cases, while in the existing method, due to matching and relation extraction focusing on text entities, for multi-modal information widely existing in meteorological documents, such as satellite cloud image key frames showing high-pressure morphological evolution, weather image areas describing flow field distribution change, and the like, most of the multi-modal information is only processed as auxiliary information, visual entities and spatial relations therein cannot be subjected to deep semantic alignment and joint reasoning with text entities, and due to limited attention on semantic distribution rules and cross-modal radiation propagation paths between core concepts and peripheral phenomena in meteorological knowledge, intermediate key links, namely how the high-pressure morphological change affects particularly peripheral flow field distribution, flow field adjustment and how to act on typhoon movement trend, sometimes are difficult to be naturally organized into answer contents, so that the generated questions still have space for improving consistency and link integrity of the display reasoning process, especially when specific areas in the images need to be cited or specific moments are used as supporting evidence that the existing structure is not presented on the existing structure links. Disclosure of Invention The invention provides a method and a system for large-scale generation of interpretable question-answer pairs oriented to the vertical field, which can position knowledge content highly related to inquiry and quickly construct a structured basis chain with complete logic. In order to solve the technical problems, the technical scheme of the invention is as follows: in a first aspect, a method for generating an interpretable question-answer pair in a scale for a vertical domain, the method comprising: Step 1, constructing a cross-modal heterogeneous weather knowledge graph, carrying out heterogeneous graph neural network modeling on the cross-modal heterogeneous weather knowledge graph, learning an embedded vector of each node to obtain a knowledge graph with the node embedded vector, and carrying out semantic community division on the entity based on the embedded vector to generate an optimized knowledge graph; Step 2, carrying out gradient field analysis on embedded vectors of all nodes in the optimized knowledge graph, determining semantic gradients of each node in different semantic community directions, and identifying abrupt nodes as semantic boundary anchor points; Step 3, simulating the propagation process of semantic information in a conical semantic space domain according to a thermal diffusion equation, generating a meteorological semantic diffusion equipotential surface radiating from a core area to the periphery, and establishing a semantic diffusion path lineage according to the hierarchical division of the meteorological semantic diffusion equipotential surface; step 4, mapping the user query request to a conical semantic space domain, calculating the space distance between a query request vector and each meteorological semantic diffusion equipotential surface, determining a diffusion path level to which the user query request belongs, retrieving entities matc