A highway tolling auxiliary question and answer method and system based on a knowledge graph

By constructing a knowledge graph-based highway toll collection auxiliary question-answering system, the problems of information loss and semantic alignment in intelligent question-answering systems when dealing with complex questions were solved, thereby improving the accuracy and speed of answer output.

CN120744141BActive Publication Date: 2026-01-06JIANGXI FANGXING SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511211926.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2026-01-06
Estimated Expiration
2045-08-28

AI Technical Summary

Technical Problem

Existing intelligent question-answering systems suffer from information gaps and semantic misalignment when dealing with complex and highly specialized questions, leading to reduced accuracy of answers.

Method used

This paper constructs a knowledge graph-based question-answering system for highway toll collection. By acquiring information related to highway toll collection, a domain knowledge graph is built and knowledge enhancement is performed. The system combines a large language model to perform complex analysis of the question text and output the answer. Different answer output methods are selected according to the difficulty of the question.

Benefits of technology

It improves the accuracy and speed of answer output, enhances the completeness and entity representation of the knowledge graph, and ensures the validity and accuracy of the answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744141B_ABST
    Figure CN120744141B_ABST
Patent Text Reader

Abstract

The application provides a highway tolling auxiliary question and answer method and system based on a knowledge graph, which comprises the following steps: constructing a highway tolling information dataset based on public information; constructing a domain knowledge graph; enhancing the domain knowledge graph; performing complex analysis on a question text; if the question text is a simple difficulty question, outputting a first answer of the question text based on the enhanced knowledge graph to output a target answer; if the question text is a medium difficulty question, outputting a second answer of the question text based on the enhanced knowledge graph to output a target answer; and if the question text is a complex difficulty question, outputting a third answer of the question text based on the enhanced knowledge graph to output a target answer. The application can improve the speed, effectiveness and accuracy of answer output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of assisted question answering, specifically relating to a knowledge graph-based assisted question answering method and system for highway toll collection. Background Technology

[0002] With the rapid development of the information age, the scale of data and knowledge is growing exponentially, making the storage, management, and retrieval of knowledge increasingly complex. Against this backdrop, the rapid advancement of artificial intelligence technology has brought unprecedented opportunities for the research and application of intelligent question-answering systems. Intelligent question-answering systems aim to understand users' natural language questions and provide accurate and efficient answers. At the same time, the advancement of artificial intelligence technology has provided new opportunities for the development of intelligent question-answering systems. However, with the growth of data, traditional question-answering systems still face many challenges when handling complex and highly specialized questions, including fragmented knowledge, inconsistent data structures, and low information retrieval efficiency, making it difficult to meet the needs for high-precision and in-depth information.

[0003] In addressing these challenges, knowledge graphs and large language models have gradually become the two core pillars of intelligent question-answering technology. Knowledge graphs organize and connect knowledge in a structured way, enabling question-answering systems to have stronger logical reasoning capabilities, thereby providing accurate and verifiable answers. Meanwhile, large language models, with their superior natural language understanding and generation capabilities, can parse complex contexts and generate coherent and fluent answers.

[0004] However, in the actual process of intelligent question answering, information loss and semantic misalignment can easily occur during data interaction. This can lead to significant deviations in the model's output answers, causing the actual output to not correspond to the target question or to produce counterfactual answers, thus greatly reducing the accuracy of the answers. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a knowledge graph-based method and system for assisting in toll collection on highways, which solves the technical problems in the prior art.

[0006] In a first aspect, the present invention provides the following technical solution: a knowledge graph-based method for assisting question answering in highway toll collection, comprising:

[0007] Obtain publicly available information related to highway tolls, and construct a highway toll information dataset based on the publicly available information;

[0008] A domain knowledge graph was constructed based on the aforementioned highway toll information dataset.

[0009] The domain knowledge graph is augmented to obtain an augmented knowledge graph;

[0010] Obtain user-submitted question text related to highway tolls, perform complex analysis on the question text, and output complex analysis results;

[0011] If the complexity analysis result indicates that the question text is of simple difficulty, then a first answer is output based on the enhanced knowledge graph to output the target answer. If the complexity analysis result indicates that the question text is of medium difficulty, then a second answer is output based on the enhanced knowledge graph to output the target answer. If the complexity analysis result indicates that the question text is of complex difficulty, then a third answer is output based on the enhanced knowledge graph to output the target answer.

[0012] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention constructs a domain knowledge graph based on a highway toll information dataset, which can effectively extract deep information from the data to highlight the professional background information and spatiotemporal constraint information of the knowledge graph. Then, the knowledge graph is enhanced to improve its completeness and entity representation, thereby improving the accuracy of the answer output. Finally, by determining the complexity of the question text and selecting different methods to output the answer, the speed of answer output can be improved, while the effectiveness and accuracy of the answer output can be enhanced.

[0013] Preferably, the step of constructing a highway toll information dataset based on the publicly available information includes:

[0014] The publicly available information is converted into text data, and punctuation marks, duplicate text, stop words, and irrelevant tags are removed from the text data to obtain clean text data;

[0015] The clean text data is segmented to obtain a segmented dataset. The segmented dataset is then labeled with time and space according to preset labeling rules to obtain a highway toll information dataset.

[0016] Preferably, the step of constructing a domain knowledge graph based on the highway toll information dataset includes:

[0017] The text words and corresponding annotation information in the highway toll information dataset are represented by word embedding to obtain text word embedding vectors and annotation embedding vectors respectively.

[0018] The text word embedding vectors are processed by combining attention mechanisms and bidirectional long short-term memory networks. The labeled embedding vector Semantic feature extraction is performed to obtain text features. With annotation features :

[0019] ; ;

[0020] In the formula, It is a bidirectional long short-term memory network. For attention mechanisms;

[0021] The text features and the annotation features are fused and decoded sequentially to obtain a set of sentence sequences;

[0022] The set of sentence sequences is input into the BERT model and the sentence vector sequence is determined by forward propagation. The sentence vector sequence is input into the bidirectional long short-term memory network. The forward and backward hidden states at each time step are concatenated to obtain the forward final state and the backward final state. The forward final state and the backward final state are connected to obtain the sentence sequence embedding representation.

[0023] The embedded representation of the sentence sequence is used as a classification feature of text relations to determine the probability of sentence relations, so as to output the probability of sentence relations, and the sentence relations are determined based on the magnitude of the probability of sentence relations.

[0024] Determine entity feature vectors based on the set of statement sequences. :

[0025] ;

[0026] In the formula, Indicates context, Indicating characteristic words Feature vectors in context Indicates the number of feature words in the context. A set of statement sequences For statement vector sequences, These are, respectively, statement sequence weights, statement vector weights, and context feature weights;

[0027] For the entity feature vector The similarity between entities is calculated pairwise, and entities with similarity greater than the similarity threshold are merged to obtain a standard entity vector.

[0028] Obtain the entity attributes from the standard entity vector, and visualize the entity attributes, standard entity vector, and statement relationships in the form of a knowledge graph to obtain a domain knowledge graph.

[0029] Preferably, the step of enhancing the domain knowledge graph to obtain an enhanced knowledge graph includes:

[0030] Obtain a template question, and embed the template question into the domain knowledge graph to obtain question embedding and entity embedding;

[0031] The problem embedding is mapped into the same complex space as the entity embedding to obtain the mapped problem embedding;

[0032] The entities in the domain knowledge graph other than those involved in the template question are selected as candidate entities, and a first score value is calculated for each candidate entity. :

[0033] ;

[0034] In the formula, , They represent the first Entity embedding in a complex space for The complex conjugate, For the first Embedding of mapping problems in complex spaces The number of complex spaces, is the real part of the complex number;

[0035] Based on the first score, the candidate entities are sorted in descending order, and the top few candidate entities are selected as candidate entities.

[0036] The question is embedded and mapped to the statement relations in the domain knowledge graph to obtain the question relation embedding. The relationship between the statements is encoded and embedded to obtain the relationship embedding. The final problem mapping relationship is determined based on the problem relationship embedding. :

[0037] ;

[0038] In the formula, For the first The embedding of the statement relationship corresponding to each candidate entity. As the filtering threshold, for The relationship that ranks first in the middle;

[0039] Based on the final problem mapping relationship Determine the enhancement of the knowledge graph.

[0040] Preferably, the mapping relationship based on the final problem... The steps to determine an augmented knowledge graph include:

[0041] Based on the final problem mapping relationship Calculate the second score :

[0042] ;

[0043] In the formula, For adjustable hyperparameters, for The Middle The embedding of the statement relationship corresponding to each candidate entity. This is the embedding of the shortest path from the entity to each candidate entity in the template problem;

[0044] Based on the second score, the candidate entities are sorted in descending order, and the top few candidate entities are selected as the target entities.

[0045] Evidence text related to the template question is extracted from the highway toll information dataset to obtain an evidence pool. Semantic parsing is performed on the evidence questions in the evidence pool to obtain an abstract concept evidence graph.

[0046] The template problem and the target entity are transformed into an abstract concept entity graph. The abstract concept evidence graph is fused with the same concept nodes in the abstract concept entity graph to obtain an abstract concept graph. The abstract concept graph is then fused into the domain knowledge graph to obtain an enhanced knowledge graph.

[0047] Preferably, the step of performing complex analysis on the problem text to output complex analysis results includes:

[0048] Dependency parsing is performed on the problem text to obtain the part-of-speech tag, word vector representation, and word dependency relation for each word;

[0049] The part-of-speech tags, word vector representations, and word dependency relations are converted into a graph structure, with word vector representations as nodes, word dependency relations as edges, and part-of-speech tags as node interpretations.

[0050] The nodes in the graph structure are input into a multi-layer CCN for update aggregation to obtain updated node feature representations. :

[0051] ;

[0052] In the formula, For activation function, For the graph structure, the first The set of neighboring nodes of a node. , The first Learnable weights and biases of layers For the first The updated node feature representation of the layer, These are the normalization coefficients;

[0053] Calculate and update node feature representation The maximum depth and span variance are used to represent the maximum depth, the span variance, and the updated node features. The process involves sequentially splicing, fully connected layer processing, and activation function processing to output the first complex score.

[0054] The question text is segmented and encoded to obtain a contextual representation. The sentence perplexity is calculated based on the contextual representation to obtain the sentence perplexity. The sentence perplexity is then normalized to obtain a second complexity score.

[0055] The first complex score and the second complex score are weighted and fused to obtain the final complex score;

[0056] If the final complexity score is less than the first scoring threshold, the question text is an easy difficulty question; if the final complexity score is not less than the first scoring threshold and is less than the second scoring threshold, the question text is a medium difficulty question; if the final complexity score is not less than the second scoring threshold, the question text is a complex difficulty question.

[0057] Preferably, the step of outputting a first answer to the question text based on the enhanced knowledge graph to output the target answer includes:

[0058] Entities and relations are extracted from the question text, and the extracted entities and relations are matched to obtain the original triples;

[0059] The original triples are quickly matched in the augmented knowledge graph to output the target triples;

[0060] The target triple is output as a grammatically correct and information-complete natural language sentence according to a preset statement template to obtain the target answer.

[0061] Preferably, the step of outputting a second answer to the question text based on the enhanced knowledge graph to output the target answer includes:

[0062] Obtain reference text, divide the reference text into several text blocks, and vectorize the text blocks and the triples in the enhanced knowledge graph to obtain text vectors and graph vectors respectively.

[0063] Extract the original triples from the question text and vectorize the original triples to obtain the original vector;

[0064] The text vector, the graph vector, and the original vector are fused into a prompt message, which is then input into a large language model to output the answer and obtain the target answer.

[0065] Preferably, the step of outputting a third answer to the question text based on the enhanced knowledge graph to output the target answer includes:

[0066] Obtain the answer output model and training dataset, extract the training question from the training dataset, extract the first triplet of the training question and extract the corresponding second triplet in the augmented knowledge graph, and combine the first triplet and the second triplet to obtain combined data;

[0067] The semantic features of the combined data are extracted using an attention mechanism to obtain combined features;

[0068] The combined data and the combined features are added to the dataset to be processed. The dataset to be processed is then input into the answer output model, and a bias score is calculated to obtain the bias score. :

[0069] ;

[0070] In the formula, This means that only the combined data from the dataset to be processed is input into the answer output model, and the answer output model then predicts the answer distribution.

[0071] Calculate the observations of the dataset to be processed under different attention levels. Counterfactual results :

[0072] ; ;

[0073] In the formula, For linear layers, These are the disturbances corresponding to the first and second attention, respectively.

[0074] Based on the observation results The aforementioned counterfactual results With the aforementioned bias score Calculate the model deviation value :

[0075] ;

[0076] In the formula, The number of data points in the dataset to be processed;

[0077] Based on the model deviation value Determine the loss function :

[0078] ;

[0079] In the formula, This represents the cross-entropy between the model output and the true answer. Model deviation value Cross-entropy between the attributes and the true answer;

[0080] The answer output model is optimized by minimizing the loss function to obtain an optimized model. The question text is then input into the optimized model to output the target answer.

[0081] Secondly, the present invention provides the following technical solution: a highway toll collection auxiliary question-answering system based on knowledge graphs, the system comprising:

[0082] The module is used to acquire publicly available information related to highway tolls and construct a highway toll information dataset based on the publicly available information.

[0083] The graph module is used to construct a domain knowledge graph based on the highway toll information dataset.

[0084] An enhancement module is used to enhance the domain knowledge graph to obtain an enhanced knowledge graph;

[0085] The analysis module is used to obtain user-submitted question texts related to highway tolls, perform complex analysis on the question texts, and output complex analysis results.

[0086] The output module is configured to: if the complexity analysis result indicates that the question text is a simple difficulty question, then output a first answer based on the enhanced knowledge graph to output the target answer; if the complexity analysis result indicates that the question text is a medium difficulty question, then output a second answer based on the enhanced knowledge graph to output the target answer; and if the complexity analysis result indicates that the question text is a complex difficulty question, then output a third answer based on the enhanced knowledge graph to output the target answer.

[0087] Thirdly, the present invention provides the following technical solution: a computer, 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 knowledge graph-based highway toll collection auxiliary question answering method as described above.

[0088] Fourthly, the present invention provides the following technical solution: a storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the above-described knowledge graph-based highway toll collection auxiliary question answering method. Attached Figure Description

[0089] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art 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.

[0090] Figure 1 A flowchart illustrating the knowledge graph-based highway toll collection auxiliary question-answering method provided in Embodiment 1 of the present invention;

[0091] Figure 2 This is a structural block diagram of the knowledge graph-based highway toll collection auxiliary question-answering system provided in Embodiment 2 of the present invention;

[0092] Figure 3 This is a schematic diagram of the hardware structure of a computer provided for another embodiment of the present invention.

[0093] The embodiments of the present invention will be further described below with reference to the accompanying drawings. Detailed Implementation

[0094] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain embodiments of the present invention, and should not be construed as limiting the present invention.

[0095] Example 1

[0096] In Embodiment 1 of the present invention, as Figure 1 As shown, a knowledge graph-based question-answering method for highway toll collection includes:

[0097] S1. Obtain publicly available information related to highway tolls, and construct a highway toll information dataset based on the publicly available information;

[0098] Specifically, the publicly available information here refers to publicly disclosed information related to highway tolls, such as highway sections, distances, toll standards, toll collection times, etc.

[0099] Step S1 includes:

[0100] S11. Convert the disclosed information into text data, and remove punctuation marks, duplicate text, stop words and irrelevant tags from the text data to obtain clean text data;

[0101] Specifically, after converting public information into text data, there may be missing fields, duplicate information, or unrecognizable characters. Therefore, Python functions can be used to remove punctuation marks, duplicate text, stop words, and irrelevant tags from the text data to obtain clean text data.

[0102] S12. Perform word segmentation on the clean text data to obtain a word segmentation dataset. Perform time and space annotation on the word segmentation dataset according to preset annotation rules to obtain a highway toll information dataset.

[0103] Specifically, the time annotation here is mainly used to label the data in the word segmentation dataset according to time, such as the specific time taken to travel a section of highway, the opening and closing time of the highway, the toll collection time, etc. The spatial annotation is specifically used to label the location of the highway.

[0104] S2. Construct a domain knowledge graph based on the highway toll information dataset;

[0105] Step S2 includes:

[0106] S21. The text words and corresponding annotation information in the highway toll information dataset are represented by word embedding to obtain text word embedding vectors and annotation embedding vectors respectively.

[0107] Specifically, the word embedding representation here can be achieved using the BERT model.

[0108] S22. Combine the attention mechanism and the bidirectional long short-term memory network to process the text word embedding vectors respectively. The labeled embedding vector Semantic feature extraction is performed to obtain text features. With annotation features :

[0109] ; ;

[0110] In the formula, It is a bidirectional long short-term memory network. For attention mechanisms;

[0111] Specifically, in this step, an attention mechanism is added to the bidirectional long short-term memory network, which can effectively capture the semantic information of keywords in the sentence, that is, it can better focus on time entities and location entities in the text.

[0112] S23. The text features and the annotation features are fused and decoded sequentially to obtain a set of sentence sequences;

[0113] Specifically, the fusion process here can be implemented through the Transformer layer, and the encoding process here is specifically the CRF encoding process. During the decoding process, the label sequence with the highest score is selected as the optimal path for parsing, and then the entity of the corresponding type is extracted based on the label set.

[0114] S24. Input the set of sentence sequences into the BERT model and determine the sentence vector sequence through forward propagation. Input the sentence vector sequence into the bidirectional long short-term memory network. Concatenate the forward and backward hidden states at each time step to obtain the forward final state and the backward final state. Connect the forward final state and the backward final state to obtain the sentence sequence embedding representation.

[0115] Specifically, the BERT model here is a pre-trained model.

[0116] S25. The embedded representation of the sentence sequence is used as a classification feature of text relationship to determine the probability of sentence relationship, so as to output the probability of sentence relationship and determine the sentence relationship based on the magnitude of the probability of sentence relationship.

[0117] Specifically, the embedded representation of the sentence sequence is used as a classification feature of text relations. Then, it is input into a fully connected layer and a softmax classification layer to obtain the probability distribution of sentence relations, i.e., the sentence relation probability. The sentence relation with the highest probability is taken as the output sentence relation.

[0118] S26. Determine the entity feature vector based on the set of statement sequences. :

[0119] ;

[0120] In the formula, Indicates context, Indicating characteristic words Feature vectors in context Indicates the number of feature words in the context. A set of statement sequences For statement vector sequences, These are, respectively, statement sequence weights, statement vector weights, and context feature weights;

[0121] Specifically, the sum of the statement sequence weight, statement vector weight, and context feature weight is 1.

[0122] S27. For the entity feature vector The similarity between entities is calculated pairwise, and entities with similarity greater than the similarity threshold are merged to obtain a standard entity vector.

[0123] Specifically, in real-world situations, entities may be duplicated. Therefore, by merging entities with high similarity into one, a standard entity vector can be obtained.

[0124] S28. Obtain the entity attributes in the standard entity vector, and visualize the entity attributes, standard entity vector, and statement relationships in the form of a knowledge graph to obtain a domain knowledge graph.

[0125] Specifically, the extracted entity attributes, standard entity vectors, and statement relationships are visualized in the form of a graph. Concepts such as entities and attributes are represented as nodes, while relationships are represented as edges. This approach can better reflect the structure and logical relationships of knowledge, enabling effective information retrieval and knowledge reasoning.

[0126] S3. Perform knowledge enhancement on the domain knowledge graph to obtain an enhanced knowledge graph;

[0127] Step S3 includes:

[0128] S31. Obtain a template question, and embed the template question into the domain knowledge graph to obtain question embedding and entity embedding;

[0129] Specifically, the question embedding here reveals relational semantics. For template questions, the entities and questions within them can form triples with candidate entities in the domain knowledge graph.

[0130] S32. Map the problem embedding to the same complex space as the entity embedding to obtain the mapped problem embedding;

[0131] Specifically, by mapping to the complex space, the complex vectors used can retain the advantages of the dot product and have linear space and time complexity.

[0132] S33. Select the entities in the domain knowledge graph other than those involved in the template question as candidate entities, and calculate the first score value for each candidate entity. :

[0133] ;

[0134] In the formula, , They represent the first Entity embedding in a complex space for The complex conjugate, For the first Embedding of mapping problems in complex spaces The number of complex spaces, is the real part of the complex number.

[0135] S34. Arrange the candidate entities in descending order according to the first score value, and select the top few candidate entities as candidate entities;

[0136] Specifically, the number of candidate entities is much smaller than the number of entities to be selected.

[0137] S35. The question is embedded and mapped to the statement relations in the domain knowledge graph to obtain the question relation embedding. The relationship between the statements is encoded and embedded to obtain the relationship embedding. The final problem mapping relationship is determined based on the problem relationship embedding. :

[0138] ;

[0139] In the formula, For the first The embedding of the statement relationship corresponding to each candidate entity. As the filtering threshold, for The relationship that ranks first in the middle;

[0140] Specifically, in the above formula, relationships greater than or equal to the filtering threshold are selected from all relationships. If the relationship is less than the filtering threshold, only the top-ranked relationship is selected.

[0141] S36. Based on the final problem mapping relationship Determine the enhancement of the knowledge graph;

[0142] Step S36 includes:

[0143] S361. Based on the final problem mapping relationship Calculate the second score :

[0144] ;

[0145] In the formula, For adjustable hyperparameters, for The Middle The embedding of the statement relationship corresponding to each candidate entity. This is the embedding of the shortest path from an entity to each candidate entity in the template problem.

[0146] S362. Arrange the candidate entities in descending order according to the second score value, and select the top few candidate entities as the target entities.

[0147] S363. Extract evidence text related to the template question from the highway toll information dataset to obtain an evidence pool, and perform semantic parsing on the evidence questions in the evidence pool to obtain an abstract concept evidence graph.

[0148] In the process of determining the evidence pool, the interrogative words in the question are directly replaced with the target entity to obtain the statement. The target entity is then directly output. For each target entity under each question, several statements are generated. The text statements related to the statement are extracted one by one as evidence text. Then, with the help of many evidence texts, the top few evidence texts are selected and stored in the evidence pool. At the same time, the semantic structure of the evidence is represented by abstract concept nodes and relation edges. That is, the abstract concept evidence graph presents the semantics of the evidence in a graphical way, and the nodes are high-level abstractions of the corresponding text concepts.

[0149] S364. The template problem and the target entity are transformed into an abstract concept entity graph. The same concept nodes in the abstract concept evidence graph and the abstract concept entity graph are fused to obtain an abstract concept graph. The abstract concept graph is then fused into the domain knowledge graph to obtain an enhanced knowledge graph.

[0150] Specifically, for abstract concept entity graphs, merging identical nodes strengthens the coherence of evidence associations and clarifies the reasoning process between the problem and candidate entities.

[0151] S4. Obtain the question text related to highway tolls sent by the user, perform complex analysis on the question text, and output the complex analysis results;

[0152] Step S4 includes:

[0153] S41. Perform dependency parsing on the problem text to obtain the part-of-speech tag, word vector representation, and word dependency relation for each word;

[0154] Specifically, dependency parsing can be performed using natural language processing tools.

[0155] S42. Convert part-of-speech tags, word vector representations, and word dependency relations into a graph structure, using word vector representations as nodes, word dependency relations as edges, and part-of-speech tags as node interpretations.

[0156] S43. Input the nodes in the graph structure into a multi-layer CCN for update aggregation to obtain updated node feature representations. :

[0157] ;

[0158] In the formula, For activation function, For the graph structure, the first The set of neighboring nodes of a node. , The first Learnable weights and biases of layers For the first The updated node feature representation of the layer, These are the normalization coefficients;

[0159] Specifically, in this step, as the network layers are updated, a new representation is obtained by aggregating information with neighboring nodes, which is the updated node feature representation.

[0160] S44. Calculate and update node feature representations. The maximum depth and span variance are used to represent the maximum depth, the span variance, and the updated node features. The process involves sequentially splicing, fully connected layer processing, and activation function processing to output the first complex score.

[0161] Specifically, edge features are mapped to the latent space through linear transformation, mapping them to the same dimension as node features, so as to fuse node and edge information in the graph convolutional layer. The input node features are transformed and aggregated through a GCN layer to capture local syntactic structure information. Then, an attention mechanism is introduced to capture global syntactic relations and importance differences. The maximum depth and span variance of node features in the graph are calculated through linear layers as global features of the syntactic structure. The maximum depth and span variance are then used in conjunction with the updated node features. After concatenation, the data passes through a fully connected layer and an activation function, ultimately outputting the first complex score.

[0162] S45. The question text is segmented and encoded to obtain a contextual representation. The sentence perplexity is calculated based on the contextual representation to obtain the sentence perplexity. The sentence perplexity is normalized to obtain a second complexity score.

[0163] Specifically, the process begins with word segmentation using a word segmenter, followed by encoding in a Transformer layer to obtain a contextual representation. Then, the perplexity calculation process of the masked language model (MLM) is performed. The distribution of the vocabulary at the masked position is calculated using the BERT model to generate the overall sentence perplexity, which is then normalized to a second complexity score.

[0164] S46. The first complex score and the second complex score are weighted and fused to obtain the final complex score.

[0165] S47. If the final complexity score is less than the first scoring threshold, then the question text is an easy difficulty question; if the final complexity score is not less than the first scoring threshold and is less than the second scoring threshold, then the question text is a medium difficulty question; if the final complexity score is not less than the second scoring threshold, then the question text is a complex difficulty question.

[0166] S5. If the complexity analysis result indicates that the question text is a simple difficulty question, then a first answer is output based on the enhanced knowledge graph to output the target answer. If the complexity analysis result indicates that the question text is a medium difficulty question, then a second answer is output based on the enhanced knowledge graph to output the target answer. If the complexity analysis result indicates that the question text is a complex difficulty question, then a third answer is output based on the enhanced knowledge graph to output the target answer.

[0167] The step of outputting a first answer to the question text based on the enhanced knowledge graph to output the target answer includes:

[0168] S511. Extract entities and relations from the problem text, and match the extracted entities and relations to obtain the original triples.

[0169] S512. The original triples are quickly matched in the enhanced knowledge graph to output the target triples;

[0170] Specifically, if the original triple cannot be matched in the augmented knowledge graph, the process proceeds to the step of outputting the second answer.

[0171] S513. Output the target triplet as a grammatically correct and information-complete natural language sentence according to the preset statement template to obtain the target answer;

[0172] Specifically, the input is the target triplet retrieved, and the output is a grammatically correct and information-complete natural language sentence. In this process, a predefined sentence template is used, entities and relations are dynamically inserted, a template is selected according to the relation type, and the entity list is converted into natural language to obtain the target answer.

[0173] The step of outputting a second answer to the question text based on the enhanced knowledge graph to output the target answer includes:

[0174] S521. Obtain reference text, divide the reference text into several text blocks, and vectorize the text blocks and the triples in the enhanced knowledge graph to obtain text vectors and graph vectors respectively.

[0175] S522. Extract the original triples of the question text and vectorize the original triples to obtain the original vector.

[0176] S523. The text vector, the graph vector, and the original vector are fused into a prompt message, and the prompt message is input into the large language model to output the answer, so as to obtain the target answer;

[0177] Specifically, Large Language Models (LLMs) are trained on large amounts of text data to generate natural and fluent language text. To adapt to domain-specific knowledge, the model is fine-tuned using relevant domain text data to generate more professional and relevant answers. The model needs to understand the context of the user's query and the retrieved information. By analyzing key entities, relationships, and their relationship with the retrieved information, it ensures that the generated answers are relevant to the question. The model effectively integrates retrieved prompts to ensure that the answers contain relevant entities, relationships, and other background information. Based on the input information, the model generates coherent natural language text. The generated answers not only need to answer the user's question but also need to conform to the grammar and semantic logic of the language, making the answers more natural.

[0178] The step of outputting a third answer to the question text based on the enhanced knowledge graph to output the target answer includes:

[0179] S531. Obtain the answer output model and training dataset, extract the training question from the training dataset, extract the first triplet of the training question and extract the corresponding second triplet in the augmented knowledge graph, and combine the first triplet and the second triplet to obtain combined data.

[0180] Specifically, the answer output model here is the LLM model.

[0181] S532. Extract the semantic features of the combined data through an attention mechanism to obtain combined features.

[0182] S533. Add the combined data and the combined features to the dataset to be processed, input the dataset to be processed into the answer output model and calculate the bias score to obtain the bias score. :

[0183] ;

[0184] In the formula, This means that only the combined data from the dataset to be processed is input into the answer output model, and the answer output model then predicts the answer distribution.

[0185] Specifically, attention is allocated to the corresponding samples to focus on the combined data, while ignoring the combined features to assess the bias effect of individual question branches on the model, and further, the score of bias on the answer distribution is obtained.

[0186] S534. Calculate the observation results of the dataset to be processed under different attention levels. Counterfactual results :

[0187] ; ;

[0188] In the formula, For linear layers, These are the disturbances corresponding to the first and second attention, respectively.

[0189] S535, Based on the observation results The aforementioned counterfactual results With the aforementioned bias score Calculate the model deviation value :

[0190] ;

[0191] In the formula, The number of data points in the dataset to be processed;

[0192] Specifically, by calculating model bias values, the participation of important combined features is increased to eliminate the impact of bias.

[0193] S536, Based on the model deviation value Determine the loss function :

[0194] ;

[0195] In the formula, This represents the cross-entropy between the model output and the true answer. Model deviation value Cross-entropy between the attributes and the true answer.

[0196] S537. The answer output model is optimized and trained by minimizing the loss function to obtain an optimized model. The question text is then input into the optimized model to output the target answer.

[0197] The knowledge graph-based question-answering method for highway toll collection provided in Embodiment 1 of this invention constructs a domain knowledge graph based on a highway toll information dataset. This effectively extracts deep information from the data, highlighting the professional background information and spatiotemporal constraints of the knowledge graph. The knowledge graph is then enhanced to improve its completeness and entity representation, thereby increasing the accuracy of the answer output. Finally, by determining the complexity of the question text and selecting different methods for answer output, the speed, effectiveness, and accuracy of answer output can be improved.

[0198] Example 2

[0199] like Figure 2 As shown, in Embodiment 2 of the present invention, a knowledge graph-based highway toll collection auxiliary question-answering system is provided, the system comprising:

[0200] Module 1 is used to acquire publicly available information related to highway tolls and construct a highway toll information dataset based on the publicly available information.

[0201] Graph module 2 is used to construct a domain knowledge graph based on the highway toll information dataset;

[0202] Enhancement module 3 is used to enhance the domain knowledge graph to obtain an enhanced knowledge graph;

[0203] Analysis module 4 is used to obtain user-submitted question text related to highway tolls, perform complex analysis on the question text, and output complex analysis results;

[0204] Output module 5 is configured to: if the complexity analysis result indicates that the question text is a simple difficulty question, then output a first answer based on the enhanced knowledge graph to output the target answer; if the complexity analysis result indicates that the question text is a medium difficulty question, then output a second answer based on the enhanced knowledge graph to output the target answer; if the complexity analysis result indicates that the question text is a complex difficulty question, then output a third answer based on the enhanced knowledge graph to output the target answer.

[0205] The construction module 1 includes:

[0206] The removal submodule is used to convert the public information into text data and remove punctuation marks, duplicate text, stop words and irrelevant tags from the text data to obtain clean text data;

[0207] The dataset submodule is used to perform word segmentation on the clean text data to obtain a word segmentation dataset, and to perform time and space annotation on the word segmentation dataset according to preset annotation rules to obtain a highway toll information dataset.

[0208] The atlas module 2 includes:

[0209] The embedding representation submodule is used to perform word embedding representation on the text words and corresponding annotation information in the highway toll information dataset, so as to obtain text word embedding vectors and annotation embedding vectors respectively.

[0210] The extraction submodule is used to combine the attention mechanism and the bidirectional long short-term memory network to process the text word embedding vectors respectively. The labeled embedding vector Semantic feature extraction is performed to obtain text features. With annotation features :

[0211] ; ;

[0212] In the formula, It is a bidirectional long short-term memory network. For attention mechanisms;

[0213] The sequence submodule is used to fuse and decode the text features and the annotation features in sequence to obtain a set of sentence sequences;

[0214] The propagation submodule is used to input the set of sentence sequences into the BERT model and determine the sentence vector sequence through forward propagation. The sentence vector sequence is then input into the bidirectional long short-term memory network. The forward and backward hidden states at each time step are concatenated to obtain the forward final state and the backward final state. The forward final state and the backward final state are then connected to obtain the sentence sequence embedding representation.

[0215] The probability submodule is used to determine the probability of the statement relationship by embedding the statement sequence as a classification feature of the text relationship, so as to output the statement relationship probability and determine the statement relationship based on the magnitude of the statement relationship probability;

[0216] The entity feature submodule is used to determine entity feature vectors based on the set of statement sequences. :

[0217] ;

[0218] In the formula, Indicates context, Indicating characteristic words Feature vectors in context Indicates the number of feature words in the context. A set of statement sequences For statement vector sequences, These are, respectively, statement sequence weights, statement vector weights, and context feature weights;

[0219] The merging submodule is used to process the entity feature vector. The similarity between entities is calculated pairwise, and entities with similarity greater than the similarity threshold are merged to obtain a standard entity vector.

[0220] The visualization submodule is used to obtain entity attributes from the standard entity vector, and visualize the entity attributes, standard entity vector, and statement relationships in the form of a knowledge graph to obtain a domain knowledge graph.

[0221] The enhancement module 3 includes:

[0222] An embedding encoding submodule is used to obtain a template question and embed the template question with the domain knowledge graph to obtain question embedding and entity embedding.

[0223] A spatial submodule is used to map the problem embedding into the same complex space as the entity embedding to obtain the mapped problem embedding;

[0224] The candidate submodule is used to select entities in the domain knowledge graph other than those involved in the template question as candidate entities, and calculate a first score value for each candidate entity. :

[0225] ;

[0226] In the formula, , They represent the first Entity embedding in a complex space for The complex conjugate, For the first Embedding of mapping problems in complex spaces The number of complex spaces, is the real part of the complex number;

[0227] The sorting submodule is used to sort the candidate entities in descending order according to the first score value, and select the first few candidate entities as candidate entities.

[0228] The mapping submodule is used to embed the question into statement relationships in the domain knowledge graph to obtain question relationship embeddings. The relationship between the statements is encoded and embedded to obtain the relationship embedding. The final problem mapping relationship is determined based on the problem relationship embedding. :

[0229] ;

[0230] In the formula, For the first The embedding of the statement relationship corresponding to each candidate entity. As the filtering threshold, for The relationship that ranks first in the middle;

[0231] Enhancement submodule, used to base on the final problem mapping relationship Determine the enhancement of the knowledge graph.

[0232] The enhancement submodule includes:

[0233] Scoring unit, used to score based on the final problem mapping relationship Calculate the second score :

[0234] ;

[0235] In the formula, For adjustable hyperparameters, for The Middle The embedding of the statement relationship corresponding to each candidate entity. This is the embedding of the shortest path from the entity to each candidate entity in the template problem;

[0236] The sorting unit is used to sort the candidate entities in descending order according to the second score value, and select the first few candidate entities as the target entities;

[0237] An evidence unit is used to extract evidence text related to the template question from the highway toll information dataset to obtain an evidence pool, and to perform semantic parsing on the evidence questions in the evidence pool to obtain an abstract concept evidence graph.

[0238] An abstraction unit is used to transform the template problem and the target entity into an abstract concept entity graph, merge the abstract concept evidence graph with the same concept nodes in the abstract concept entity graph to obtain an abstract concept graph, and merge the abstract concept graph into the domain knowledge graph to obtain an enhanced knowledge graph.

[0239] The analysis module 4 includes:

[0240] The parsing submodule is used to perform dependency parsing on the question text to obtain the part-of-speech tag, word vector representation, and word dependency relation for each word;

[0241] The node submodule is used to convert part-of-speech tags, word vector representations, and word dependency relations into a graph structure, using word vector representations as nodes, word dependency relations as edges, and part-of-speech tags as node interpretations;

[0242] The aggregation submodule is used to input the nodes in the graph structure into a multi-layer CCN for update aggregation to obtain updated node feature representations. :

[0243] ;

[0244] In the formula, For activation function, For the graph structure, the first The set of neighboring nodes of a node. , The first Learnable weights and biases of layers For the first The updated node feature representation of the layer, These are the normalization coefficients;

[0245] The splicing submodule is used to calculate and update the feature representation of nodes. The maximum depth and span variance are used to represent the maximum depth, the span variance, and the updated node features. The process involves sequentially splicing, fully connected layer processing, and activation function processing to output the first complex score.

[0246] The representation submodule is used to perform word segmentation and encoding on the question text to obtain a context representation, calculate the sentence perplexity based on the context representation to obtain the sentence perplexity, and normalize the sentence perplexity to obtain a second complexity score.

[0247] The fusion submodule is used to perform a weighted fusion of the first complex score and the second complex score to obtain the final complex score;

[0248] The complex output submodule is configured to determine the problem text as an easy problem if the final complex score is less than a first score threshold, as a medium problem if the final complex score is not less than the first score threshold and less than a second score threshold, and as a complex problem if the final complex score is not less than the second score threshold.

[0249] The output module 5 includes:

[0250] The first extraction submodule is used to extract entities and relations from the question text, and to match the extracted entities and relations to obtain the original triples.

[0251] The matching submodule is used to quickly match the original triples in the enhanced knowledge graph to output the target triples;

[0252] The first output submodule is used to output a grammatically correct and information-complete natural language sentence from the target triple according to a preset statement template, so as to obtain the target answer.

[0253] The output module 5 includes:

[0254] The reference submodule is used to obtain reference text, divide the reference text into several text blocks, and vectorize the text blocks and the triples in the enhanced knowledge graph to obtain text vectors and graph vectors respectively.

[0255] The second extraction submodule is used to extract the original triples of the question text and vectorize the original triples to obtain the original vector;

[0256] The prompting submodule is used to fuse the text vector, the graph vector, and the original vector into prompting information, and input the prompting information into the large language model to output the answer in order to obtain the target answer.

[0257] The output module 5 includes:

[0258] The triplet submodule is used to obtain the answer output model and training dataset, extract the training question from the training dataset, extract the first triplet of the training question and extract the corresponding second triplet in the augmented knowledge graph, and combine the first triplet and the second triplet to obtain combined data.

[0259] The feature combination submodule is used to extract semantic features from the combined data through an attention mechanism to obtain combined features;

[0260] The bias submodule is used to add the combined data and the combined features to the dataset to be processed, input the dataset to be processed into the answer output model, and calculate the bias score to obtain the bias score. :

[0261] ;

[0262] In the formula, This means that only the combined data from the dataset to be processed is input into the answer output model, and the answer output model then predicts the answer distribution.

[0263] The attention interference submodule is used to calculate the observation results of the dataset to be processed under different attention levels. Counterfactual results :

[0264] ; ;

[0265] In the formula, For linear layers, These are the disturbances corresponding to the first and second attention, respectively.

[0266] The deviation submodule is used to base the observation results on... The aforementioned counterfactual results With the aforementioned bias score Calculate the model deviation value :

[0267] ;

[0268] In the formula, The number of data points in the dataset to be processed;

[0269] Loss submodule, used to base on the model bias value Determine the loss function :

[0270] ;

[0271] In the formula, This represents the cross-entropy between the model output and the true answer. Model deviation value Cross-entropy between the attributes and the true answer;

[0272] The second output submodule is used to optimize and train the answer output model by minimizing the loss function to obtain an optimized model, and input the question text into the optimized model to output the target answer.

[0273] In other embodiments of the present invention, the present invention provides the following technical solution: a computer, including a memory 102, a processor 101, and a computer program stored on the memory 102 and executable on the processor 101, wherein the processor 101 executes the computer program to implement the knowledge graph-based highway toll collection auxiliary question answering method as described above.

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

[0275] The memory 102 may include a large-capacity memory for data or instructions. For example, and not limitingly, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include removable or non-removable (or fixed) media. Where appropriate, the memory 102 may be internal or external to a data processing device. In a particular embodiment, the memory 102 is non-volatile memory. In a particular embodiment, the memory 102 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random Access Memory (FPMDRAM), Extended Data Out Dynamic Random Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0276] The memory 102 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101.

[0277] The processor 101 reads and executes the computer program instructions stored in the memory 102 to implement the above-mentioned knowledge graph-based highway toll collection auxiliary question answering method.

[0278] In some embodiments, the computer may further include a communication interface 103 and a bus 100. For example, Figure 3 As shown, the processor 101, memory 102, and communication interface 103 are connected through bus 100 and complete communication with each other.

[0279] The communication interface 103 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of the present invention. The communication interface 103 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.

[0280] Bus 100 includes hardware, software, or both, that couples components of a computer device together. Bus 100 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although specific buses are described and illustrated in the embodiments of the present invention, the present invention is contemplated by any suitable bus or interconnect.

[0281] The computer can execute the knowledge graph-based highway toll collection auxiliary question-answering method of the present invention based on the knowledge graph-based highway toll collection auxiliary question-answering system, thereby realizing knowledge graph-based highway toll collection auxiliary question-answering.

[0282] In some further embodiments of the present invention, in conjunction with the above-described knowledge graph-based highway toll collection auxiliary question answering method, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-described knowledge graph-based highway toll collection auxiliary question answering method.

[0283] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0284] More specific examples of readable media (a non-exhaustive list) include: electrical connections (electronic devices) with one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0285] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0286] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0287] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A highway tolling auxiliary question and answer method based on a knowledge graph, characterized in that, The method comprises the following steps: acquiring public information related to highway tolls, and constructing a highway toll information dataset based on the public information; constructing a domain knowledge graph based on the highway toll information dataset; performing knowledge enhancement on the domain knowledge graph to obtain an enhanced knowledge graph; acquiring question text related to highway tolls issued by a user, and performing complex analysis on the question text to output a complex analysis result; if the complex analysis result is that the question text is a simple difficulty question, performing first answer output on the question text based on the enhanced knowledge graph to output a target answer, if the complex analysis result is that the question text is a medium difficulty question, performing second answer output on the question text based on the enhanced knowledge graph to output a target answer, and if the complex analysis result is that the question text is a complex difficulty question, performing third answer output on the question text based on the enhanced knowledge graph to output a target answer; the step of performing first answer output on the question text based on the enhanced knowledge graph to output a target answer comprises: performing entity and relationship extraction from the question text, matching the extracted entities and relationships to obtain original triples; performing fast matching of the original triples in the enhanced knowledge graph to output target triples; outputting a natural language sentence that conforms to grammar and is information complete according to a preset sentence template to obtain a target answer; the step of performing second answer output on the question text based on the enhanced knowledge graph to output a target answer comprises: acquiring reference text, segmenting the reference text into several text blocks, and performing vectorization processing on the text blocks and triples in the enhanced knowledge graph respectively to obtain text vectors and graph vectors; extracting original triples of the question text and performing vectorization on the original triples to obtain original vectors; fusing the text vectors, graph vectors and original vectors into prompt information, inputting the prompt information into a large language model to output an answer to obtain a target answer; the step of performing third answer output on the question text based on the enhanced knowledge graph to output a target answer comprises: acquiring an answer output model and a training dataset, extracting training questions in the training dataset, extracting first triples of the training questions and corresponding second triples in the enhanced knowledge graph, combining the first triples and the second triples to obtain combined data; extracting semantic features of the combined data through an attention mechanism to obtain combined features; adding the combined data and the combined features to a set of data to be processed, inputting the set of data to be processed into the answer output model and performing a bias score calculation to obtain a bias score : ; In the formula, represents only inputting the combined data in the data set to be processed into the answer output model, and outputting the answer distribution predicted by the answer output model; computing observations of the data set under different attentions with counterfactual outcomes : ; ; In the formula, is a linear layer, are the interference corresponding to the first attention and the second attention, respectively; based on the observations , the counterfactual outcome with the bias score computing model bias values : ; In the formula, is the number of data of the data set to be processed; based on the model bias value determining a loss function : ; wherein, denotes the cross-entropy between the model output and the true answer, is the model bias value the cross-entropy between the model output and the true answer attribute; optimizing and training the answer output model by minimizing the loss function to obtain an optimized model, inputting the question text into the optimized model to output a target answer.

2. The knowledge graph-based expressway tolling auxiliary question and answer method according to claim 1, characterized in that, the step of constructing a highway toll information dataset based on the public information comprises: converting the public information into text data, and removing punctuation, repeated text, stop words and irrelevant labels in the text data to obtain clean text data; The clean text data is subjected to word segmentation processing to obtain a word segmentation data set, and the word segmentation data set is subjected to time and space labeling according to a preset labeling rule to obtain a highway toll information data set. 3.The knowledge graph based expressway tolling auxiliary question and answer method according to claim 1, characterized in that, The step of constructing the field knowledge graph based on the highway toll information data set comprises: The text words and corresponding labeling information in the highway toll information data set are subjected to word embedding representation respectively to obtain text word embedding vectors and labeling embedding vectors respectively; combined with an attention mechanism and a bidirectional long short-term memory network to perform semantic feature extraction on the text word embedding vectors , the labeled embedding vectors to obtain text features and labeled features : ; ; In the formula, is a bidirectional long short-term memory network, is an attention mechanism; The text features and the labeling features are sequentially fused and decoded to obtain a sentence sequence set; The sentence sequence set is input into a BERT model and a sentence vector sequence is determined by means of forward propagation, the sentence vector sequence is input into the bidirectional long short-term memory network, the forward and reverse hidden states at each time are spliced to obtain forward final states and reverse final states, and the forward final states and the reverse final states are connected to obtain sentence sequence embedding representation; The sentence sequence embedding representation is taken as a classification feature of a text relationship to determine a sentence relationship probability, and the sentence relationship is output based on the size of the sentence relationship probability; determining an entity feature vector based on the set of sentence sequences : ; wherein, denotes a context, denotes a feature word a feature vector in the context, denotes the number of feature words in the context, is a set of sentence sequences, is a sequence of sentence vectors, are respectively a sentence sequence weight, a sentence vector weight, a context feature weight; similarity calculation is performed between each two of the entity feature vectors , and entities with similarity greater than a similarity threshold are merged to obtain a standard entity vector; An entity attribute in the standard entity vector is obtained, the entity attribute, the standard entity vector and the sentence relationship are visualized in the form of a knowledge graph to obtain a field knowledge graph.

4. The knowledge graph-based expressway tolling auxiliary question and answer method according to claim 1, characterized in that, The step of performing knowledge enhancement on the field knowledge graph to obtain an enhanced knowledge graph comprises: A template question is obtained, the template question and the field knowledge graph are embedded and encoded to obtain question embedding and entity embedding; The question embedding is mapped to the same complex space as the entity embedding to obtain a mapped question embedding; remaining entities in the domain knowledge graph except for the entities involved in the template question as candidate entities, and calculating a first score value of each of the candidate entities : ; wherein, , represent an entity embedding in a complex space, is a complex conjugate of is a mapping problem embedding in a complex space, is a number of complex spaces, is a real part of a complex number;​​​ A plurality of the candidate entities are arranged in descending order according to the first score value, and the first plurality of candidate entities are selected as candidate entities; embedding the question into a sentence relation in the domain knowledge graph to obtain a question relation embedding encoding the sentence relation to obtain a relation embedding determining a final question mapping relation based on the question relation embedding : ; In the formula, is the embedding of the i-th candidate entity pair corresponding to the sentence relation, is the screening threshold, is the screening threshold, is the screening threshold, the first ranked relation. based on the final problem mapping relationship determining an enhanced knowledge graph.

5. The knowledge graph-based expressway tolling auxiliary question and answer method according to claim 4, characterized in that, The final problem mapping relationship is determined based on the final problem mapping relationship The step of determining the enhanced knowledge graph comprises: based on the final problem mapping relationship computing a second score value : ; In the formula, For adjustable hyperparameters, for The Middle The embedding of the statement relationship corresponding to each candidate entity. This is the embedding of the shortest path from the entity to each candidate entity in the template problem; A plurality of the candidate entities are arranged in descending order according to the second score value, and the first plurality of candidate entities are selected as target entities; Evidence text related to the template question is extracted from the highway toll information data set to obtain an evidence pool, and evidence questions in the evidence pool are subjected to semantic analysis to obtain an abstract concept evidence graph; The template question and the target entity are converted into an abstract concept entity graph, the same concept nodes in the abstract concept evidence graph and the abstract concept entity graph are fused to obtain an abstract concept graph, and the abstract concept graph is fused into the field knowledge graph to obtain an enhanced knowledge graph. 6.The expressway toll fee knowledge graph-based auxiliary question and answer method according to claim 1, characterized in that, The step of performing complex analysis on the question text to output a complex analysis result comprises: The question text is subjected to dependency syntax analysis to obtain part-of-speech tags, word vector representations and word dependency relationships of each word; The part-of-speech tags, word vector representations and word dependency relationships are converted into a graph structure, the word vector representations are taken as nodes, the word dependency relationships are taken as edges, and the part-of-speech tags are taken as node explanations; inputting the nodes in the graph structure into a multi-layer CCN for updated aggregation to obtain updated node feature representations : ; wherein, is an activation function, is a set of neighbor nodes of the th node in the graph structure, , are the learnable weights and biases of the th layer, respectively, is the updated node feature representation of the th layer, is a normalization coefficient; Computing an updated node feature representation a maximum depth and a span variance, the maximum depth, the span variance, and the updated node feature representation are sequentially concatenated, fully connected layer processed, and activation function processed to output a first complex score; The question text is segmented and coded to obtain context representation, sentence perplexity is calculated based on the context representation to obtain sentence perplexity, and the sentence perplexity is normalized to obtain a second complexity score; The first complexity score and the second complexity score are weighted and fused to obtain a final complexity score; If the final complexity score is less than a first score threshold, the question text is a simple difficulty question, the final complexity score is not less than the first score threshold and less than a second score threshold, the question text is a medium difficulty question, and the final complexity score is not less than the second score threshold, the question text is a complex difficulty question.

7. A highway tolling auxiliary question and answer system based on a knowledge graph, the system adopts the highway tolling auxiliary question and answer method based on a knowledge graph according to claim 1, characterized in that, The system comprises: A construction module configured to obtain public information related to highway tolling, and construct a highway tolling information dataset based on the public information; A graph module configured to construct a domain knowledge graph based on the highway tolling information dataset; An enhancement module configured to perform knowledge enhancement on the domain knowledge graph to obtain an enhanced knowledge graph; An analysis module configured to obtain question text related to highway tolling issued by a user, and perform complexity analysis on the question text to output a complexity analysis result; An output module configured to, if the complexity analysis result is that the question text is a simple difficulty question, output a target answer based on the enhanced knowledge graph and first answer output of the question text, if the complexity analysis result is that the question text is a medium difficulty question, output a target answer based on the enhanced knowledge graph and second answer output of the question text, and if the complexity analysis result is that the question text is a complex difficulty question, output a target answer based on the enhanced knowledge graph and third answer output of the question text.

Citation Information

Patent Citations

  • Device fault intelligent question-answering method based on large model enhancement

    CN120086341A

  • Wind power fault diagnosis operation and maintenance method based on multi-source data and knowledge retrieval enhancement

    CN120297410A