Railway natural language large model multi-round dialogue optimization method
By acquiring keywords and historical information from the railway multi-turn dialogue system and supplementing intent with railway question-and-answer knowledge graphs, the problem of misunderstanding intent caused by ambiguous user expressions was solved, thus achieving accuracy and coherence in multi-turn dialogues in the railway field and improving interactive experience and service efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHUOHUANG RAILWAY DEV
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional railway multi-turn dialogue systems struggle to accurately understand user intent when user statements are complex, ambiguous, or omniscient, and lack dialogue coherence, resulting in inaccurate or incomplete responses.
By extracting keywords from the question description, combining historical dialogue information and the railway Q&A knowledge graph, the initial inquiry intent is supplemented, the target inquiry intent is generated, and finally a professional and accurate response is generated.
It improves the accuracy of intent recognition, ensures that responses conform to professional rules and actual business data in the railway industry, avoids multiple rounds of dialogue skipping topics, and improves the interactive experience and service efficiency.
Smart Images

Figure CN122309666A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a multi-turn dialogue optimization method based on a large-scale natural language model for railways. Background Technology
[0002] With the development of railway informatization and artificial intelligence technologies, multi-turn dialogue technology based on natural language processing has emerged. This technology has the ability to realize information query and service through text or voice interaction, and can dynamically generate responses based on user input, thus leading to the processing methods of traditional multi-turn dialogue systems that are currently widely used in the railway field.
[0003] Traditional technologies rely primarily on preset rules and keyword matching to interpret user intent, which cannot guarantee the professionalism and accuracy of the dialogue and urgently needs to be addressed. Summary of the Invention
[0004] Therefore, it is necessary to provide a multi-turn dialogue optimization method based on a large railway natural language model that can improve the accuracy and professionalism of dialogue, addressing the aforementioned technical issues.
[0005] Firstly, this application provides a multi-turn dialogue optimization method based on a large-scale natural language model for railways, including:
[0006] Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0007] Based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent corresponding to the current question; the initial query intent includes at least one intent word;
[0008] Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0009] Based on the target inquiry intent, generate a question response corresponding to the current question.
[0010] In one embodiment, the initial inquiry intent includes intent category information and intent semantic information; correspondingly, based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question, the initial inquiry intent corresponding to the current question is determined, including:
[0011] Based on the attribute information of each keyword in the current problem description, determine the intent category information corresponding to the current problem;
[0012] Based on the historical descriptions of the historical questions corresponding to the current question, determine the contextual information corresponding to the current question;
[0013] Based on the attribute information of each keyword, the intent category information corresponding to the current question, and the contextual information, determine the semantic information of the intent corresponding to the current question.
[0014] In one embodiment, the attribute information includes at least one of part-of-speech information and entity type information; correspondingly, based on the attribute information of each keyword in the current question description information, the intent category information corresponding to the current question is determined, including:
[0015] Based on the part-of-speech information of each keyword in the current problem description, select target keywords from the keywords;
[0016] Based on the entity type information of the target keywords, determine the intent category information corresponding to the current question.
[0017] In one embodiment, the contextual information includes historical keywords, historical intent categories, and contextual information; correspondingly, based on the attribute information of each keyword, the intent category information corresponding to the current question, and the contextual information, the semantic information of the intent corresponding to the current question is determined, including:
[0018] Based on the attribute information of each keyword and the attribute information of historical keywords, determine the context vector corresponding to the current question; and,
[0019] Generate the target intent category based on the intent category information corresponding to the current question and the historical intent categories;
[0020] By inputting the context vector, target intent category, and contextual information into the intent understanding model, the semantic information of the intent corresponding to the current question can be obtained.
[0021] In one embodiment, based on the association information between nodes in the railway question-and-answer knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent, including:
[0022] Obtain the first associated node information for each keyword in the railway question-and-answer knowledge graph; and,
[0023] Obtain the second associated node information of each intent word in the railway question-and-answer knowledge graph;
[0024] Based on the information from the first and second associated nodes, the initial query intent is supplemented to obtain the target query intent.
[0025] In one embodiment, after obtaining the target's inquiry intent, the method further includes:
[0026] Obtain the scoring data of the target inquiry intent by the intent classification model;
[0027] Accordingly, based on the target inquiry intent, a question response corresponding to the current question is generated, including:
[0028] If the scoring data meets the preset requirements, a question response corresponding to the current question is generated based on the target inquiry intent.
[0029] Secondly, this application also provides a multi-turn dialogue optimization device based on a large-scale railway natural language model, including:
[0030] The word extraction module is used to obtain the problem description information corresponding to the current problem and extract different keywords from the problem description information;
[0031] The first intent determination module is used to determine the initial query intent corresponding to the current question based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question; the initial query intent includes at least one intent word;
[0032] The second intent determination module is used to supplement the initial query intent based on the association information between nodes in the railway question-answering knowledge graph, according to each keyword and at least one intent word, to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0033] The response generation module is used to generate a response to the current question based on the target inquiry intent.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0035] Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0036] Based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent corresponding to the current question; the initial query intent includes at least one intent word;
[0037] Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0038] Based on the target inquiry intent, generate a question response corresponding to the current question.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0040] Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0041] Based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent corresponding to the current question; the initial query intent includes at least one intent word;
[0042] Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0043] Based on the target inquiry intent, generate a question response corresponding to the current question.
[0044] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0045] Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0046] Based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent corresponding to the current question; the initial query intent includes at least one intent word;
[0047] Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0048] Based on the target inquiry intent, generate a question response corresponding to the current question.
[0049] The aforementioned multi-turn dialogue optimization method based on a large-scale railway natural language model obtains the question description information corresponding to the current question and extracts different keywords from the question description information; based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question, the initial query intent corresponding to the current question is determined; the initial query intent includes at least one intent word; based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; based on the target query intent, the question response corresponding to the current question is generated. This process involves both analyzing the user's current needs by combining historical dialogue context to effectively address the problem of misunderstanding intentions caused by ambiguous or omitting user expressions in railway scenarios, thereby improving the accuracy of intent recognition; and supplementing professional information by relying on railway knowledge graphs to refine user intent, ensuring that responses align with railway industry professional rules and actual business data, thus addressing the weakness of existing systems in professional processing capabilities; and simultaneously implementing contextual logic throughout the process to avoid skipping topics in multiple rounds of dialogue, improving dialogue coherence, and ultimately achieving accurate, professional, and relevant responses in multi-round dialogues within the railway sector, significantly optimizing the interactive experience and service efficiency in scenarios such as railway customer service inquiries and station information queries. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a flowchart illustrating a multi-turn dialogue optimization method based on a large-scale natural language model for railways, as shown in one embodiment.
[0052] Figure 2 This is a flowchart illustrating the initial inquiry intent determination step in one embodiment;
[0053] Figure 3 This is a flowchart illustrating the steps for determining the target query intent in one embodiment;
[0054] Figure 4 This is a flowchart illustrating a multi-turn dialogue optimization method based on a large-scale natural language model for railways, as described in another embodiment.
[0055] Figure 5 This is a structural block diagram of a multi-turn dialogue optimization device based on a large-scale natural language model for railways, as shown in one embodiment.
[0056] Figure 6This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0058] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0059] Before introducing the embodiments of this application, it should be noted that in railway-related natural language communication scenarios, such as railway customer service inquiries and station information queries, currently used multi-turn dialogue systems still have many problems. On the one hand, current dialogue systems struggle to accurately understand the complex, ambiguous, or omitted information uttered by users in railway scenarios. For example, if a user asks, "Are there still high-speed train tickets to Beijing tomorrow?", the system may not be able to accurately determine which day "tomorrow" refers to, nor can it grasp the user's unspoken needs regarding seat type, specific train number, etc.
[0060] On the other hand, during back-and-forth conversations, the system struggles to connect the context effectively, easily jumping to different topics or misunderstanding the user's true thoughts. For example, if a user first asks, "What trains are there from Shanghai to Guangzhou?" and then asks, "What about the earliest train?", the current system may not be able to connect the latter question with the former, leading to inaccurate or incomplete answers.
[0061] In one exemplary embodiment, such as Figure 1 As shown, a multi-turn dialogue optimization method based on a large-scale natural language model for railways is provided. Taking the application of this method to a computer as an example, the method includes the following steps:
[0062] S110: Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information.
[0063] The problem description information can be a textual expression of the railway-related question that the user wants to inquire about or query, based on natural language. It is the direct linguistic carrier of the user's needs. For example, the problem description information could be "Are there still high-speed train tickets to Beijing tomorrow?"
[0064] The keywords in the problem description information can be words that can represent the core needs of users. They are the core elements of subsequent intent analysis and information matching. It is understood that the keywords generally do not include function words or modal words that have no actual semantic meaning.
[0065] In one alternative implementation, natural language text input by the user through channels such as railway customer service terminals or station inquiry systems can be received as problem description information for the current problem, such as "Are there still high-speed train tickets to Beijing tomorrow?" or "Which is the earliest bullet train from Shanghai to Guangzhou?", and the received text is used as problem description information.
[0066] Optionally, users can input text in many ways, such as text input or suggestion input, and this application does not impose any limitations on this.
[0067] In one alternative implementation, the problem description information can be processed using a deep learning-based BERT-CRF model. For example, word segmentation can be performed first to break down the entire natural language sentence into independent words; then, words with railway-related semantics can be selected using part-of-speech tagging and named entity recognition technologies as different extracted keywords; the extracted keywords can be preliminarily sorted to remove duplicate words and form a keyword set for the current problem.
[0068] S120. Based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question, determine the initial inquiry intent corresponding to the current question.
[0069] The initial inquiry intent includes at least one intent word. An intent word is a vocabulary that characterizes the core meaning of the initial inquiry intent; it is a condensed expression of the intent, such as "query," "purchase ticket," "change ticket," or "inquire." The initial inquiry intent can be a preliminary summary of the user's desired railway-related needs, identified by combining current keyword features and historical dialogue information; it is a preliminary overview of the user's core demands.
[0070] The attribute information of keywords can be information used to describe the characteristics of keywords, and the core includes part-of-speech information (such as nouns, verbs, adjectives, etc.) and entity type information (such as station entity, train number entity, ticketing entity, time entity, etc.).
[0071] Among them, historical questions are interactive questions that users asked before entering the current question. The historical description information of historical questions can be natural language descriptions of all railway-related questions raised by the user before the current question in multi-turn dialogues, which is the basis for constructing the dialogue context.
[0072] In one optional implementation, the attribute information of each keyword obtained in S110 can be extracted, the entity type of each keyword can be determined by the named entity recognition result of the BERT-CRF model, and the part-of-speech tagging result can be determined; the historical description information corresponding to the current question can be retrieved from the dialogue context database, and the core content of the historical dialogue, the railway entities mentioned by the user, and the previous inquiry tendency can be extracted; a Transformer-based intent classification model can be adopted, taking the attribute information of the current keyword and the historical description information as input, and the model can initially identify the user's demand direction by learning the intent classification rules in the railway field; combined with the model output results, at least one intent word can be extracted and integrated to form the initial inquiry intent of the current question. For example, from "Are there still high-speed rail tickets to Beijing tomorrow?", the initial inquiry intent can be initially determined to be "inquiry (high-speed rail ticket availability)", and the intent word is "inquiry".
[0073] S130: Based on the association information between nodes in the railway question-and-answer knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent.
[0074] Among them, the railway question-and-answer knowledge graph is a pre-constructed knowledge base that integrates all information in the railway field in the form of a graph structure. It represents various types of information in the railway field and the relationships between information through nodes and edges, and is the core carrier of railway professional knowledge.
[0075] For example, the nodes in the railway question-and-answer knowledge graph include railway domain nodes and intent nodes; railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes, and can also be extended to line nodes, seat class nodes, etc.
[0076] The system includes the following nodes: Station Node: Represents station-related information, with attributes including station name, geographical location, number of stops, and affiliated railway line. Train Number Node: Represents train number-related information, with attributes including train number, origin station, destination station, departure time, travel time, fare, and seat class. Ticketing Rule Node: Represents railway ticketing-related rules, with attributes including rules for remaining ticket availability, refunds and ticket changes, student ticket purchases, and rules for restricted sales sections. Intent Node: Represents various user queries and intents within a railway context, with attributes including intent name, corresponding operation, and associated railway-related nodes, such as "Train Number Inquiry" and "Remaining Ticket Inquiry" nodes.
[0077] Among them, the association information between nodes is the information represented by the edges connecting different nodes in the knowledge graph, reflecting the logical and association relationships between nodes. For example, the association information between the "Beijing South Railway Station" node and the "G101" node is "stopping"; the association information between the "remaining ticket query" intent node and the "train number node" and "ticketing rules node" is "needs to be called".
[0078] In one optional implementation, a railway question-and-answer knowledge graph can be pre-constructed, integrating all information in the railway field, including stations, train numbers, ticketing rules, and operating routes. Attributes of railway field nodes and intent nodes are defined, and the relationships between nodes are organized and labeled to form a structured railway knowledge system. Further, each keyword in S110 and at least one intent word in S120 are precisely matched with nodes in the railway question-and-answer knowledge graph to find the corresponding target node. All associated nodes and their relationships are retrieved from the knowledge graph, and railway professional information related to the initial query intent is extracted. Further, the extracted professional information is added to the initial query intent to refine the details and eliminate ambiguity, forming the target query intent. For example, if the initial query intent is "query (high-speed rail tickets available)," combined with the associated node information of the keywords "tomorrow," "Beijing," and "high-speed rail," the target query intent can be obtained as "query the number of available high-speed rail tickets and seat types for each train from the current departure point to Beijing tomorrow."
[0079] S140, Based on the target inquiry intent, generate the question response corresponding to the current question.
[0080] In one optional implementation, the target query intent obtained in S130 can be input into a pre-trained railway natural language model. This model is a dedicated large-scale model built on the Transformer architecture and pre-trained with railway domain data, having learned the language rules, professional knowledge, and semantic logic of the railway domain. The model combines the target query intent with the corresponding precise information, such as train number, remaining tickets, and ticketing rules, from the railway question-and-answer knowledge graph. The model organizes the retrieved professional information into fluent and easy-to-understand text content according to the expression habits of natural language, generating a preliminary question response. The preliminary generated response undergoes basic formatting and semantic verification to ensure that there are no obvious grammatical errors or missing information, forming the final question response.
[0081] In another alternative implementation, the scoring data of the target inquiry intent by the intent classification model can be obtained; accordingly, if the scoring data meets the preset requirements, the question response corresponding to the current question can be generated based on the target inquiry intent.
[0082] The scoring data can be obtained by inputting the target inquiry intent into an intent classification model. The model scores the clarity and completeness of the target inquiry intent, obtaining a scoring result s(I). The intent confidence (i.e., the scoring data) is then calculated using a formula, where n is the number of all possible intent categories in the railway scenario. The formula can be as follows:
[0083] ;
[0084] In the formula, P(I) can be the confidence level of the target query intent; S(I) is the score of intent I by the intent classification model; and n is the number of all possible intent categories.
[0085] The preset requirement can be a pre-set reliability threshold. Accordingly, if the rating data exceeds the preset reliability threshold, a question response corresponding to the current question is generated based on the target inquiry intent.
[0086] In the aforementioned multi-turn dialogue optimization method based on a large-scale railway natural language model, the following steps are taken: First, obtain the question description information corresponding to the current question and extract different keywords from it. Then, based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent for the current question. The initial query intent includes at least one intent word. Based on the association information between nodes in the railway question-answering knowledge graph, supplement the initial query intent according to each keyword and at least one intent word to obtain the target query intent. Finally, based on the target query intent, generate the question response corresponding to the current question. This process involves both analyzing the user's current needs by combining historical dialogue context to effectively address the problem of misunderstanding intentions caused by ambiguous or omitting user expressions in railway scenarios, thereby improving the accuracy of intent recognition; and supplementing professional information by relying on railway knowledge graphs to refine user intent, ensuring that responses align with railway industry professional rules and actual business data, thus addressing the weakness of existing systems in professional processing capabilities; and simultaneously implementing contextual logic throughout the process to avoid skipping topics in multiple rounds of dialogue, improving dialogue coherence, and ultimately achieving accurate, professional, and relevant responses in multi-round dialogues within the railway sector, significantly optimizing the interactive experience and service efficiency in scenarios such as railway customer service inquiries and station information queries.
[0087] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the initial inquiry intent includes intent category information and intent semantic information; in this case, the process of determining the initial inquiry intent corresponding to the current question based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question is refined.
[0088] See Figure 2 The initial inquiry intent determination steps shown include:
[0089] S210, Based on the attribute information of each keyword in the current problem description information, determine the intent category information corresponding to the current problem.
[0090] Among them, intent category information can be understood as a standardized classification of user inquiry intent in the railway scenario. It is a macro-definition of the direction of user needs, covering all common consultation, inquiry and processing needs in the railway field, such as train schedule inquiry, ticket availability inquiry, ticketing rule consultation, station information inquiry, ticket refund and change consultation, etc.
[0091] In one optional implementation, the attribute information includes at least one of part-of-speech information and entity type information; accordingly, target keywords can be filtered from the keywords based on the part-of-speech information of each keyword in the current question description information; and the intent category information corresponding to the current question can be determined based on the entity type information of the target keywords.
[0092] For example, the attribute information of each keyword in S110 is extracted, the core of which includes part-of-speech information and entity type information; the keywords are filtered based on the part-of-speech information, removing function words without actual meaning such as adverbs, prepositions, and modal particles, and retaining target keywords that can represent the core needs such as nouns, verbs, and adjectives; the entity type information of the target keywords is analyzed to identify the entity category of the railway domain to which they belong, such as station entity, train number entity, ticketing entity, time entity, etc.; the entity type combination of the target keywords is matched with the railway intent category library in the intent classification model based on Transformer. The model outputs the intent category information corresponding to the current question according to the pre-trained intent classification rules of the railway domain. For example, if the target keywords are "high-speed rail", "remaining tickets", and "tomorrow", the matched intent category information is "remaining tickets query".
[0093] S220, Determine the contextual information corresponding to the current problem based on the historical description information of the historical problems corresponding to the current problem.
[0094] Among them, contextual information can be information extracted from historical descriptive information that can represent the current dialogue background. It is the core of realizing the context connection of multi-turn dialogue, and the core includes historical keywords, historical intention categories and contextual information.
[0095] For example, all historical description information corresponding to the current question can be retrieved from the dialogue context database; using the same BERT-CRF model as S110, the historical description information is segmented, part-of-speech tagging and named entity recognition are performed to extract historical keywords and determine their attribute information; using the same intent classification model as S210, the historical description information is used to identify intent categories and obtain historical intent categories; the historical description information is semantically parsed to extract the core content related to the current question and form context information; the historical keywords, historical intent categories and context information are integrated to form complete context information of the current question and stored in a temporary context database to support subsequent intent semantic analysis.
[0096] S230, Based on the attribute information of each keyword, the intent category information corresponding to the current question, and the contextual information, determine the intent semantic information corresponding to the current question.
[0097] Among them, the semantic information of intent can be a refined semantic interpretation of the intent category information. It is a detailed representation of the user's real needs in a specific context and based on specific keywords. It can clarify the specific direction and detailed requirements of the intent and together with the intent category information, it constitutes the initial inquiry intent.
[0098] In one optional implementation, the contextual information includes historical keywords, historical intent categories, and contextual information; accordingly, the contextual vector corresponding to the current question can be determined based on the attribute information of each keyword and the attribute information of historical keywords; and, the target intent category can be generated based on the intent category information corresponding to the current question and the historical intent categories; the contextual vector, the target intent category, and the contextual information are input into the intent understanding model to obtain the intent semantic information corresponding to the current question.
[0099] Historical keywords can be core terms with railway-related semantics extracted from historical descriptive information. Historical intent categories can be categories of the user's previous inquiry intents identified from historical descriptive information. Contextual information can be core content related to the current question in historical dialogues, such as the user's previously mentioned departure point, destination, travel time, and train preferences.
[0100] For example, the context vector can be determined as follows: a Bi-LSTM network is used as the context encoder. The attribute information of the current keyword and the attribute information of the historical keywords obtained in S220 are concatenated and input into the context encoder. The encoder generates a context vector that can represent the current dialogue scene by learning and encoding the context keyword features. This vector contains the context features of multi-turn dialogue and is the core carrier of context connection.
[0101] For example, the target intent category can be generated as follows: the current question intent category information obtained in S210 and the historical intent category obtained in S220 are merged, the intent evolution trend of the user's multi-turn dialogue is analyzed, the current intent category is corrected, improved and refined, and the target intent category is generated to ensure the continuity between the intent category and the historical dialogue. For example, if the historical intent category is "Shanghai to Guangzhou train schedule query", the current intent category is "earliest train schedule query", and the merged target intent category is "Shanghai to Guangzhou earliest train schedule query".
[0102] For example, the intention semantic information can be obtained as follows: a dedicated intention understanding model is built, which is trained on dialogue data in the railway field and has the ability to parse intention semantics; the context vector, the target intention category and the context information obtained from S220 are used as inputs and fed into the intention understanding model; the intention understanding model outputs a refined interpretation of the user's real needs through semantic parsing and logical reasoning, that is, the intention semantic information of the current question, such as the intention semantic information being "to query the detailed information of the earliest departure time among all trains from Shanghai to Guangzhou".
[0103] In the above embodiments, a layered parsing approach is used to accurately uncover core user needs. First, the intent category is determined based on keyword attributes to quickly pinpoint the user's need direction. Then, contextual information is determined by combining historical dialogues to achieve effective contextual connection. Finally, keyword attributes, intent categories, and contextual information are integrated to deduce the semantic meaning of the intent, completing a refined interpretation of the user's needs. This approach not only solves the problem of incomplete intent understanding caused by relying solely on the current input but also effectively avoids interpretation biases caused by contextual disconnects in multi-turn dialogues. It significantly improves the accuracy and relevance of user inquiry intent recognition in railway scenarios, laying a solid foundation for subsequent accurate response generation.
[0104] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the initial query intent is supplemented based on the association information between nodes in the railway question-and-answer knowledge graph, according to each keyword and at least one intent word, to obtain a refined target query intent.
[0105] See Figure 3 The steps for determining the target inquiry intent shown include:
[0106] S310: Obtain the first associated node information of each keyword in the railway question-and-answer knowledge graph.
[0107] Among them, the first associated node information can be the attribute information of all nodes directly and indirectly associated with the nodes that match the keywords of the current question in the railway question-and-answer knowledge graph, as well as the association information between the keyword matching node and these associated nodes.
[0108] In one optional implementation, the keywords extracted in S110 can be precisely matched with nodes in the railway question-and-answer knowledge graph to find the original matching node corresponding to each keyword. For example, the keyword "Beijing" is matched with "Beijing Station" and "Beijing South Station" in the station node, and the keyword "high-speed rail" is matched with the "high-speed rail train number" category node in the train number node. The direct related nodes (first-level association) and indirect related nodes (second-level and above association) of each original matching node are retrieved from the railway question-and-answer knowledge graph. For example, the direct related nodes of "Beijing South Station" include the number of stops and the line to which it belongs, and the related nodes of the number of stops include the departure time, ticket price, and remaining tickets. The complete attribute information of all related nodes and the association information between the original matching node and each related node are extracted and integrated to form the first related node information of each keyword. The first related node information of all keywords is summarized and duplicate information is removed to form the first related node information set of the current question keyword.
[0109] S320, obtain the second associated node information of each intent word in the railway question-and-answer knowledge graph.
[0110] The second associated node information can be the attribute information of all nodes in the railway question-and-answer knowledge graph that are directly or indirectly associated with the intent node that matches the intent word in the initial query intent, as well as the association information between the intent word matching node and these associated nodes.
[0111] In one optional implementation, the intent words extracted in S120 can be precisely matched with intent nodes in the railway question-and-answer knowledge graph to find the original matching intent node corresponding to each intent word. For example, the intent word "query" is matched with intent nodes such as "train number query" and "remaining ticket query". The direct and indirect related nodes of each original matching intent node are retrieved from the railway question-and-answer knowledge graph. The related nodes of the intent node are mainly railway domain nodes. For example, the related nodes of the intent node "remaining ticket query" include train number nodes, ticketing rule nodes, and seat class nodes. The complete attribute information of all related nodes and the association information between the original matching intent node and each related node are extracted. This information is integrated to form the second related node information of each intent word. The second related node information of all intent words is summarized, and duplicate information is removed to form the second related node information set of the current question intent word.
[0112] S330, based on the information of the first associated node and the information of the second associated node, the initial query intent is supplemented to obtain the target query intent.
[0113] In one optional implementation, the first set of associated node information in S310 and the second set of associated node information in S320 can be merged to extract core information related to the initial query intent in S120, including detailed attributes of entities in the railway field, logical relationships between nodes, and professional rules of the railway industry. The merged associated node information is analyzed to identify missing details and ambiguities in the initial query intent, such as the initial query intent not specifying the departure point, travel time, or train type. The missing details are added to the initial query intent, ambiguities are eliminated, and the expression of the intent is standardized and improved in conjunction with railway professional rules. All the supplemented and improved information is integrated to form a target query intent that can completely and accurately represent the user's real needs, ensuring that the target query intent is detailed, clear, and conforms to the information query logic of the railway field.
[0114] In the above embodiments, relying on the railway question-and-answer knowledge graph, the associated node information corresponding to keywords and intent words is retrieved respectively. The two types of information are integrated to supplement and improve the initial inquiry intent, effectively filling the information gaps in the initial intent, eliminating semantic ambiguity, making the target inquiry intent more in line with the professional rules and actual business logic of the railway industry, accurately restoring the user's real needs, and providing a complete and reliable intent basis for generating accurate and professional question responses in the future.
[0115] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the multi-turn dialogue optimization method based on a large railway natural language model provided by this application is described in detail.
[0116] See Figure 4 The multi-turn dialogue optimization method based on a large-scale natural language model for railways, as shown, includes:
[0117] S401, Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0118] S402, Based on the part-of-speech information of each keyword in the current problem description information, select target keywords from the keywords;
[0119] S403, Based on the entity type information of the target keyword, determine the intent category information corresponding to the current question;
[0120] S404, Determine the contextual information corresponding to the current problem based on the historical description information of the historical problems corresponding to the current problem;
[0121] S405, Based on the attribute information of each keyword and the attribute information of historical keywords, determine the context vector corresponding to the current question; and,
[0122] S406, Generate the target intent category based on the intent category information corresponding to the current question and the historical intent categories;
[0123] S407, input the context vector, target intent category and context information into the intent understanding model to obtain the intent semantic information corresponding to the current question;
[0124] S408, obtain the first associated node information of each keyword in the railway question-and-answer knowledge graph; and...
[0125] S409, Obtain the second association node information of each intent word in the railway question-and-answer knowledge graph;
[0126] S410, based on the first associated node information and the second associated node information, supplement the initial query intent to obtain the target query intent;
[0127] The nodes in the railway question-and-answer knowledge graph include railway domain nodes and intent nodes; railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes.
[0128] S411, Obtain the scoring data of the intent classification model on the target inquiry intent;
[0129] S412, if the scoring data meets the preset requirements, generate a question response corresponding to the current question based on the target inquiry intent.
[0130] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0131] Based on the same inventive concept, this application also provides a device for optimizing multi-turn dialogue based on a large-scale railway natural language model to implement the aforementioned optimization method. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the device for optimizing multi-turn dialogue based on a large-scale railway natural language model provided below can be found in the limitations of the optimization method based on a large-scale railway natural language model described above, and will not be repeated here.
[0132] In one exemplary embodiment, such as Figure 5 As shown, a multi-turn dialogue optimization device based on a large-scale natural language model for railways is provided, including: a word extraction module 510, a first intent determination module 520, a second intent determination module 530, and a response generation module 540, wherein:
[0133] The word extraction module 510 is used to obtain the problem description information corresponding to the current problem and extract different keywords from the problem description information;
[0134] The first intent determination module 520 is used to determine the initial inquiry intent corresponding to the current question based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question; the initial inquiry intent includes at least one intent word;
[0135] The second intent determination module 530 is used to supplement the initial query intent based on the association information between nodes in the railway question-and-answer knowledge graph, according to each keyword and at least one intent word, to obtain the target query intent; the nodes in the railway question-and-answer knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0136] The response generation module 540 is used to generate a response to the current question based on the target inquiry intent.
[0137] In one embodiment, the initial inquiry intent includes intent category information and intent semantic information; correspondingly, the first intent determination module 520 includes a first determination unit, used to determine the intent category information corresponding to the current question based on the attribute information of each keyword in the current question description information; a second determination unit, used to determine the context information corresponding to the current question based on the historical description information of the historical questions corresponding to the current question; and a third determination unit, used to determine the intent semantic information corresponding to the current question based on the attribute information of each keyword, the intent category information corresponding to the current question, and the context information.
[0138] In one embodiment, the attribute information includes at least one of part-of-speech information and entity type information; correspondingly, the first determining unit includes a word selection subunit, used to filter target keywords from the keywords according to the part-of-speech information of each keyword in the current question description information; the first determining subunit is used to determine the intent category information corresponding to the current question according to the entity type information of the target keywords.
[0139] In one embodiment, the contextual information includes historical keywords, historical intent categories, and contextual information; correspondingly, the second determining unit includes a second determining subunit, used to determine the context vector corresponding to the current question based on the attribute information of each keyword and the attribute information of historical keywords; and a category generation subunit, used to generate a target intent category based on the intent category information corresponding to the current question and the historical intent categories; and a third determining subunit, used to input the context vector, the target intent category, and the contextual information into the intent understanding model to obtain the intent semantic information corresponding to the current question.
[0140] In one embodiment, the second intent determination module 530 includes a first acquisition unit for acquiring first association node information of each keyword in the railway question-and-answer knowledge graph; a second acquisition unit for acquiring second association node information of each intent word in the railway question-and-answer knowledge graph; and a fourth determination unit for supplementing the initial query intent based on the first association node information and the second association node information to obtain the target query intent.
[0141] In one embodiment, the multi-turn dialogue optimization device based on the railway natural language big data model further includes a scoring acquisition module, used to acquire scoring data of the target inquiry intent by the intent classification model; correspondingly, a response generation module is used to generate a question response corresponding to the current question based on the target inquiry intent when the scoring data meets the preset requirements.
[0142] The modules in the aforementioned multi-turn dialogue optimization device based on a large-scale natural language model for railways can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0143] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a multi-turn dialogue optimization method based on a large-scale railway natural language model. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0144] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0145] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0146] Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0147] Based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent corresponding to the current question; the initial query intent includes at least one intent word;
[0148] Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0149] Based on the target inquiry intent, generate a question response corresponding to the current question.
[0150] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0151] Based on the attribute information of each keyword in the current problem description, determine the intent category information corresponding to the current problem;
[0152] Based on the historical descriptions of the historical questions corresponding to the current question, determine the contextual information corresponding to the current question;
[0153] Based on the attribute information of each keyword, the intent category information corresponding to the current question, and the contextual information, determine the semantic information of the intent corresponding to the current question.
[0154] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0155] Based on the part-of-speech information of each keyword in the current problem description, select target keywords from the keywords;
[0156] Based on the entity type information of the target keywords, determine the intent category information corresponding to the current question.
[0157] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0158] Based on the attribute information of each keyword and the attribute information of historical keywords, determine the context vector corresponding to the current question; and,
[0159] Generate the target intent category based on the intent category information corresponding to the current question and the historical intent categories;
[0160] By inputting the context vector, target intent category, and contextual information into the intent understanding model, the semantic information of the intent corresponding to the current question can be obtained.
[0161] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0162] Obtain the first associated node information for each keyword in the railway question-and-answer knowledge graph; and,
[0163] Obtain the second associated node information of each intent word in the railway question-and-answer knowledge graph;
[0164] Based on the information from the first and second associated nodes, the initial query intent is supplemented to obtain the target query intent.
[0165] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0166] Obtain the scoring data of the target inquiry intent by the intent classification model;
[0167] If the scoring data meets the preset requirements, a question response corresponding to the current question is generated based on the target inquiry intent.
[0168] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0169] Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0170] Based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent corresponding to the current question; the initial query intent includes at least one intent word;
[0171] Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0172] Based on the target inquiry intent, generate a question response corresponding to the current question.
[0173] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0174] Based on the attribute information of each keyword in the current problem description, determine the intent category information corresponding to the current problem;
[0175] Based on the historical descriptions of the historical questions corresponding to the current question, determine the contextual information corresponding to the current question;
[0176] Based on the attribute information of each keyword, the intent category information corresponding to the current question, and the contextual information, determine the semantic information of the intent corresponding to the current question.
[0177] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0178] Based on the part-of-speech information of each keyword in the current problem description, select target keywords from the keywords;
[0179] Based on the entity type information of the target keywords, determine the intent category information corresponding to the current question.
[0180] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0181] Based on the attribute information of each keyword and the attribute information of historical keywords, determine the context vector corresponding to the current question; and,
[0182] Generate the target intent category based on the intent category information corresponding to the current question and the historical intent categories;
[0183] By inputting the context vector, target intent category, and contextual information into the intent understanding model, the semantic information of the intent corresponding to the current question can be obtained.
[0184] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0185] Obtain the first associated node information for each keyword in the railway question-and-answer knowledge graph; and,
[0186] Obtain the second associated node information of each intent word in the railway question-and-answer knowledge graph;
[0187] Based on the information from the first and second associated nodes, the initial query intent is supplemented to obtain the target query intent.
[0188] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0189] Obtain the scoring data of the target inquiry intent by the intent classification model;
[0190] If the scoring data meets the preset requirements, a question response corresponding to the current question is generated based on the target inquiry intent.
[0191] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0192] Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information;
[0193] Based on the attribute information of each keyword in the current question description and the historical description information of the corresponding historical questions, determine the initial query intent corresponding to the current question; the initial query intent includes at least one intent word;
[0194] Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to each keyword and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes;
[0195] Based on the target inquiry intent, generate a question response corresponding to the current question.
[0196] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0197] Based on the attribute information of each keyword in the current problem description, determine the intent category information corresponding to the current problem;
[0198] Based on the historical descriptions of the historical questions corresponding to the current question, determine the contextual information corresponding to the current question;
[0199] Based on the attribute information of each keyword, the intent category information corresponding to the current question, and the contextual information, determine the semantic information of the intent corresponding to the current question.
[0200] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0201] Based on the part-of-speech information of each keyword in the current problem description, select target keywords from the keywords;
[0202] Based on the entity type information of the target keywords, determine the intent category information corresponding to the current question.
[0203] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0204] Based on the attribute information of each keyword and the attribute information of historical keywords, determine the context vector corresponding to the current question; and,
[0205] Generate the target intent category based on the intent category information corresponding to the current question and the historical intent categories;
[0206] By inputting the context vector, target intent category, and contextual information into the intent understanding model, the semantic information of the intent corresponding to the current question can be obtained.
[0207] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0208] Obtain the first associated node information for each keyword in the railway question-and-answer knowledge graph; and,
[0209] Obtain the second associated node information of each intent word in the railway question-and-answer knowledge graph;
[0210] Based on the information from the first and second associated nodes, the initial query intent is supplemented to obtain the target query intent.
[0211] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0212] Obtain the scoring data of the target inquiry intent by the intent classification model;
[0213] If the scoring data meets the preset requirements, a question response corresponding to the current question is generated based on the target inquiry intent.
[0214] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0215] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0216] 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 application.
[0217] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A multi-turn dialogue optimization method based on a large-scale natural language model for railways, characterized in that, The method includes: Obtain the problem description information corresponding to the current problem, and extract different keywords from the problem description information; Based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question, the initial inquiry intent corresponding to the current question is determined; the initial inquiry intent includes at least one intent word; Based on the association information between nodes in the railway question-answering knowledge graph, the initial query intent is supplemented according to the keywords and at least one intent word to obtain the target query intent; the nodes in the railway question-answering knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes; Based on the target inquiry intent, a question response corresponding to the current question is generated.
2. The method according to claim 1, characterized in that, The initial inquiry intent includes intent category information and intent semantic information; correspondingly, determining the initial inquiry intent corresponding to the current question based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question includes: Based on the attribute information of each keyword in the current problem description information, determine the intent category information corresponding to the current problem; Based on the historical description information of the historical questions corresponding to the current question, determine the contextual information corresponding to the current question; Based on the attribute information of each keyword, the intent category information corresponding to the current question, and the context information, the intent semantic information corresponding to the current question is determined.
3. The method according to claim 2, characterized in that, The attribute information includes at least one of part-of-speech information and entity type information; correspondingly, determining the intent category information corresponding to the current question based on the attribute information of each keyword in the current question description information includes: Based on the part-of-speech information of each keyword in the current problem description information, target keywords are selected from the keywords; Based on the entity type information of the target keyword, determine the intent category information corresponding to the current question.
4. The method according to claim 2, characterized in that, The contextual information includes historical keywords, historical intent categories, and contextual information; correspondingly, determining the semantic information of the intent corresponding to the current question based on the attribute information of each keyword, the intent category information corresponding to the current question, and the contextual information includes: Based on the attribute information of each keyword and the attribute information of the historical keywords, determine the context vector corresponding to the current question; and, Based on the intent category information corresponding to the current question and the historical intent categories, a target intent category is generated; The context vector, the target intent category, and the context information are input into the intent understanding model to obtain the intent semantic information corresponding to the current question.
5. The method according to any one of claims 1-4, characterized in that, The method involves supplementing the initial query intent based on the association information between nodes in the railway question-and-answer knowledge graph, according to the keywords and at least one intent word, to obtain the target query intent, including: Obtain the first associated node information of each keyword in the railway question-and-answer knowledge graph; and, Obtain the second associated node information of each of the aforementioned intent words in the railway question-and-answer knowledge graph; Based on the first associated node information and the second associated node information, the initial inquiry intent is supplemented to obtain the target inquiry intent.
6. The method according to any one of claims 1-4, characterized in that, After obtaining the target's inquiry intent, the method further includes: Obtain the scoring data of the target inquiry intent by the intent classification model; Accordingly, generating a question response corresponding to the current question based on the target inquiry intent includes: If the scoring data meets the preset requirements, a question response corresponding to the current question is generated based on the target inquiry intent.
7. A multi-turn dialogue optimization device based on a large-scale natural language model for railways, characterized in that, The device includes: The word extraction module is used to obtain the problem description information corresponding to the current problem and extract different keywords from the problem description information; The first intent determination module is used to determine the initial inquiry intent corresponding to the current question based on the attribute information of each keyword in the current question description information and the historical description information of the historical questions corresponding to the current question; the initial inquiry intent includes at least one intent word; The second intent determination module is used to supplement the initial query intent based on the association information between nodes in the railway question-and-answer knowledge graph, according to the keywords and the at least one intent word, to obtain the target query intent; the nodes in the railway question-and-answer knowledge graph include railway domain nodes and intent nodes; the railway domain nodes include at least one of station nodes, train number nodes, and ticketing rule nodes; The response generation module is used to generate a response to the current question based on the target inquiry intent.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.