Natural language dialogue method and device, electronic equipment, medium and product

By constructing a conceptual feature set and a hierarchical dialogue generation framework, the limitations of traditional large models in open-domain dialogue scenarios are solved, realizing a more intelligent, human-like dialogue system and improving the semantic depth and emotional logic consistency of responses.

CN121958484APending Publication Date: 2026-05-01ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2026-01-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional large models struggle to flexibly respond to complex and ever-changing dialogue needs in open-domain dialogue scenarios. They lack a systematic model of the multi-layered cognitive structure of humans, resulting in limitations in the logical consistency, semantic coherence, and emotional adaptability of the generated content.

Method used

By inputting dialogue input content and preset prompt word templates into a preset large model, a set of conceptual features related to the dialogue input content is generated. The large model is then guided to generate language fragments through conceptual features of different conceptual dimensions, thus constructing a hierarchical dialogue generation framework that simulates the human systematic thinking pattern.

Benefits of technology

It significantly improves the semantic depth, emotional logic consistency, and flexible adaptability to diverse user needs of responses, solves the problems of mechanical and logically fragmented content generation in open-domain dialogue, and realizes a more intelligent and human-like dialogue system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958484A_ABST
    Figure CN121958484A_ABST
Patent Text Reader

Abstract

The invention discloses a natural language dialogue method and device, electronic equipment, a medium and a product, and relates to the technical field of artificial intelligence, the natural language dialogue method comprises the following steps: inputting dialogue input content and a preset cue word template into a preset large model; guiding the preset large model to generate a concept feature set related to the dialogue input content through the preset cue word template; and guiding the preset large model to generate each language segment through the concept features of different concept dimensions in the concept feature set, and determining reply content of the dialogue input content based on each language segment. According to the method, a hierarchical dialogue generation framework for guiding the preset large model to gradually think is generated, a systematic thinking mode of human is successfully simulated, the limitation of the large model in an open domain dialogue scene is broken through, and the dialogue reply quality is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Natural language dialogue methods, devices, electronic devices, media, and products Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more particularly to a natural language dialogue method, apparatus, electronic device, medium, and product. Background Technology

[0002] Driven by large language models, natural language processing (NLP) technologies have demonstrated outstanding performance in tasks such as language understanding, question answering, machine translation, and multi-turn dialogue. However, in open-domain tasks—such as everyday conversations and emotion-supporting interactions—existing AI systems (represented by large models) mostly adopt an end-to-end generative paradigm, that is, directly formulating strategies and generating responses based on perceptual input. This approach lacks systematic modeling of the multi-layered cognitive structure of humans, resulting in limitations in the logical consistency, semantic coherence, and emotional adaptability of the generated content, making it difficult to flexibly respond to complex and ever-changing dialogue needs.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a natural language dialogue method, device, electronic device, medium and product, which aims to solve the technical problem that traditional large models have limitations in open domain dialogue scenarios and are difficult to flexibly respond to complex and ever-changing dialogue needs.

[0005] To achieve the above objectives, this application proposes a natural language dialogue method, which includes: inputting dialogue input content and a preset prompt word template into a preset large model; guiding the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template; guiding the preset large model to generate various language fragments through conceptual features of different conceptual dimensions in the set of conceptual features; and determining the response content of the dialogue input content based on the various language fragments.

[0006] Optionally, the step of guiding the preset large model to generate language fragments using concept features of different concept dimensions in the concept feature set includes: for any target concept dimension involved in the concept feature set, guiding the preset large model to generate language fragments matching the target concept dimension using concept features in the concept feature set corresponding to the target concept dimension; based on the next target concept dimension, returning to the step of guiding the preset large model to generate language fragments matching the target concept dimension using concept features in the concept feature set corresponding to the target concept dimension; and obtaining each language fragment after traversing each target concept dimension involved in the concept feature set.

[0007] Optionally, the step of guiding the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template includes at least one of the following: guiding the preset large model to determine conceptual features related to the dialogue input content based on preset concept options through prompt word instructions in the preset prompt word template, so as to construct the set of conceptual features; guiding the preset large model to generate each target concept dimension through prompt word instructions in the preset prompt word template, and determining conceptual features related to the dialogue input content based on each target concept dimension, so as to obtain the set of conceptual features.

[0008] Optionally, the step of guiding the preset large model to generate each target concept dimension through the prompt word instruction in the preset prompt word template includes: inputting the prompt word instruction into the preset large model to guide the preset large model to extract dialogue keywords from the dialogue input content; in the preset concept graph network, using the network nodes mapped by the dialogue keywords as the starting nodes for propagation with energy decay; after the energy decay propagation is completed, determining each target concept dimension according to the energy of each network node in the preset concept graph network, wherein the concept dimension of the network node with higher energy has a higher probability of being used as the target concept dimension.

[0009] Optionally, the step of using the network nodes mapped by the dialogue keywords as starting nodes for energy attenuation propagation in the preset concept graph network includes: for any one of the starting nodes, using the starting node as a propagation node, transferring energy to the neighboring network nodes of the propagation node, wherein the remaining energy of the propagation node is higher than the energy received by the neighboring network nodes; using the neighboring network nodes as new propagation nodes, and based on the new propagation nodes, returning to execute the step of transferring energy to the neighboring network nodes of the propagation node, until the preset propagation condition is reached.

[0010] Optionally, the step of determining each target concept dimension based on the energy of each network node in the preset concept graph network includes: statistically obtaining the cumulative energy of each concept dimension based on the attribution relationship between candidate network nodes propagating to energy in the preset concept graph network and concept dimensions; and selecting each target concept dimension based on the cumulative energy of each concept dimension, wherein the concept dimension with higher cumulative energy has a higher probability of being selected as a target concept dimension.

[0011] Furthermore, to achieve the above objectives, this application also proposes a natural language dialogue device, comprising: an input module for inputting dialogue input content and a preset prompt word template into a preset large model; a first generation module for guiding the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template; and a second generation module for guiding the preset large model to generate various language fragments through conceptual features of different conceptual dimensions in the set of conceptual features, and determining the response content of the dialogue input content based on the various language fragments.

[0012] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the natural language dialogue method as described above.

[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the natural language dialogue method as described above.

[0014] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the natural language dialogue method as described above.

[0015] One or more technical solutions proposed in this application have at least the following technical effects: In the embodiments of this application, dialogue input content and preset prompt word templates are input into a preset large model; the preset prompt word templates guide the preset large model to generate a set of conceptual features related to the dialogue input content; the conceptual features of different conceptual dimensions in the set of conceptual features guide the preset large model to generate various language fragments, and the response content of the dialogue input content is determined based on the language fragments. That is, this application guides the preset large model through preset prompt word templates to construct a set of conceptual features including different conceptual dimensions. The conceptual dimensions involved in the set of conceptual features form a hierarchical dialogue generation framework that guides the preset large model to "think" step by step, successfully simulating the systematic thinking mode of humans. The dimensional features under each conceptual dimension are used to guide the preset large model to think about the specific language fragments generated in each step, and finally synthesize a coherent response. This process breaks the limitations of large models in open-domain dialogue scenarios, effectively solves the core problems of mechanical and logically fragmented content generation in open-domain dialogue, significantly improves the semantic depth of responses, emotional logical consistency, and flexible adaptability to diverse user needs, and provides a reliable path to achieve a more intelligent and human-like dialogue system. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 is a flowchart of the first embodiment of the natural language dialogue method of this application; Figure 2 is a flowchart of a scene in the natural language dialogue method of this application; Figure 3 is a flowchart of the second embodiment of the natural language dialogue method of this application; Figure 4 is a structural diagram of the natural language dialogue device in the natural language dialogue method of this application; Figure 5 is a structural diagram of the hardware operating environment involved in the natural language dialogue method in the embodiments of this application.

[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0022] Driven by large language models, natural language processing (NLP) technologies have demonstrated outstanding performance in tasks such as language understanding, question answering, machine translation, and multi-turn dialogue. However, in open-domain tasks—such as everyday conversations and emotional support interactions—existing AI systems (represented by large models) mostly adopt an end-to-end generative paradigm, directly formulating strategies and generating responses based on perceptual input. This approach lacks systematic modeling of the multi-layered cognitive structure of humans, resulting in deficiencies in emotional empathy, contextual relevance, and response effectiveness. For example, generated content often appears mechanical and rigid, failing to accurately match users' emotional needs; the lack of structured thought guidance mechanisms leads to insufficient logical coherence in responses; and the absence of a scenario-adaptive strategy support system limits their ability to flexibly respond to complex and ever-changing dialogue demands.

[0023] The main solution of this application embodiment is: inputting the dialogue input content and the preset prompt word template into the preset large model; guiding the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template; guiding the preset large model to generate various language fragments through the conceptual features of different conceptual dimensions in the set of conceptual features, and determining the response content of the dialogue input content based on each language fragment.

[0024] This application guides a pre-defined large-scale model using preset prompt templates, constructing a set of conceptual features across different conceptual dimensions. These conceptual dimensions form a hierarchical dialogue generation framework that guides the large-scale model to "think" step-by-step, successfully simulating human systematic thinking. The dimensional features under each conceptual dimension guide the large-scale model to consider each generated language fragment, ultimately synthesizing a coherent response. This process overcomes the limitations of large-scale models in open-domain dialogue scenarios, effectively solving the core problems of mechanical content generation and logical fragmentation in open-domain dialogue. It significantly improves the semantic depth, emotional and logical consistency of responses, and flexible adaptability to diverse user needs, providing a reliable path to achieving a more intelligent, human-like dialogue system.

[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication and program execution functions, such as a computer, cloud platform, PC, mobile phone, etc., or an electronic device capable of realizing the above functions.

[0026] Referring to Figure 1, a flowchart illustrating the first embodiment of the natural language dialogue method of this application is shown. In this embodiment, the natural language dialogue method includes steps S10-S30: Step S10, inputting dialogue input content and preset prompt word templates into a preset large model; it should be noted that in this embodiment, the above-mentioned natural language dialogue method can be applied to a server deploying the preset large model, or it can be applied to edge devices with the ability to call the preset large model, such as mobile phones and personal computers. Here, the preset large model refers to a large language model (e.g., LLM, Large Language Model).

[0027] For example, in practical applications, interaction with the user can take the form of a dialog window. For instance, the user can input voice or text in the dialog window, which is the dialog input content mentioned above.

[0028] The received dialogue input is concatenated with a preset prompt template and then input into a preset large model. The preset prompt template is primarily used to guide the preset large model to generate a response to the dialogue input through a step-by-step thinking process.

[0029] Step S20: Guide the pre-defined large model to generate a set of conceptual features related to the dialogue input content through a pre-defined prompt word template. For example, the pre-defined prompt word template may include text prompt word instructions to guide the large language model to think in a "layered" manner, allowing the model to automatically perform content reasoning according to a paradigm that moves from strategic concept decision-making to providing specific content answers based on concepts. Optionally, the list of selectable concepts may include pre-defined concept options, such as concept dimensions like strategy, emotion, and theme. Guided by the text prompt word instructions, the pre-defined large model can filter the dialogue input content and related concept dimensions from the list of selectable concepts, and generate corresponding conceptual features based on the selected concept dimensions to construct a set of conceptual features. Optionally, the text prompt word instructions can also guide the pre-defined large model to directly generate conceptual features related to the dialogue input content in a generative manner, thereby constructing a set of conceptual features. For example, the conceptual features in the set of conceptual features may be anger (emotion), empathy (strategy), and outdoor sports (theme), etc.

[0030] Step S30: Using the conceptual features of different conceptual dimensions in the conceptual feature set, guide the preset large model to generate various language fragments, and determine the response content of the dialogue input based on each language fragment.

[0031] For example, the concept feature set may include concept features of different concept dimensions. For instance, anger belongs to the concept dimension of emotion, outdoor sports belong to the concept dimension of theme, and a concept dimension may include one or more concept features. Concept features of different concept dimensions guide the preset large model to generate various language fragments. The language fragments correspond to the concept dimensions involved in the concept feature set; for example, a concept feature under one concept dimension can be used to guide the preset large model to generate a language fragment. Therefore, in this embodiment, the concept dimensions involved in the concept feature set form a framework guiding the preset large model to "think" step by step, while the dimensional features under each concept dimension are used to guide the preset large model to think about the specific language fragments generated at each step. After generating each language fragment, the language fragments can be spliced ​​together to form a response content output to the user, such as outputting the response content to the user in a dialog box.

[0032] For example, in one scenario, the received dialogue input is "I want to go bungee jumping, but my family doesn't agree, how annoying!" Correspondingly, the dialogue input can be concatenated with a preset prompt word template, and the concatenated result can be input into a preset large-scale model. Guided by the preset prompt word template, the large-scale language model can first generate a set of conceptual features with the conceptual features of the dialogue input, and use specific tokens to mark the conceptual features. For example, for the conceptual feature of "anger," the style of marking it with a specific token could be <anger>. Then, the marked conceptual features guide the preset large-scale model to generate language fragments. Similarly, based on the above example, the conceptual features generated by the preset large-scale model are anger, empathy, and outdoor sports, corresponding to the conceptual dimensions of emotion, strategy, and theme, respectively. Correspondingly, the final language fragments output by the preset large-scale model could be: <anger>How could they do this to you! <empathy>I understand your unhappiness so well, but your parents might just feel it's not very safe. <outdoor sports>Didn't you think hiking was fun recently? You could choose a safer sport to reassure your parents! These language fragments can then be concatenated into a response and output.

[0033] In this embodiment, the dialogue input content and a preset prompt word template are input into a preset large model. The preset prompt word template guides the preset large model to generate a set of conceptual features related to the dialogue input content. Through the conceptual features of different conceptual dimensions in the conceptual feature set, the preset large model is guided to generate various language fragments, and the response content to the dialogue input content is determined based on each language fragment. That is, this application guides the preset large model through the preset prompt word template to construct a set of conceptual features including different conceptual dimensions. The conceptual dimensions involved in the conceptual feature set form a hierarchical dialogue generation framework that guides the preset large model to gradually "think," successfully simulating the systematic thinking mode of humans. The dimensional features under each conceptual dimension are used to guide the preset large model to think about the specific language fragments generated at each step, and finally synthesize a coherent response. This process breaks the limitations of large models in open-domain dialogue scenarios, effectively solves the core problems of mechanical and logically fragmented content generation in open-domain dialogue, significantly improves the semantic depth, emotional logical consistency, and flexible adaptability to diverse user needs of the response, and provides a reliable path to achieve a more intelligent, human-like dialogue system.

[0034] In a feasible implementation, the step of guiding a pre-set large model to generate language fragments through concept features of different concept dimensions in the concept feature set includes steps S31 to S33: Step S31, for any target concept dimension involved in the concept feature set, the pre-set large model is guided to generate language fragments matching the target concept dimension through concept features in the concept feature set corresponding to the target concept dimension; Step S32, based on the next target concept dimension of the target concept dimension, the step of guiding the pre-set large model to generate language fragments matching the target concept dimension through concept features in the concept feature set corresponding to the target concept dimension is returned to execution; Step S33, after traversing each target concept dimension involved in the concept feature set, each language fragment is obtained.

[0035] It should be noted that in this embodiment, the generation of multiple language segments is usually involved, and the generation process of each language segment is roughly the same. Therefore, this section will use the generation process of one language segment as an example for explanation.

[0036] For example, the conceptual dimensions involved in the conceptual feature set are the target conceptual dimensions. For any target conceptual dimension involved in the conceptual feature set, a specific token can be used to mark the conceptual features in the conceptual feature set that correspond to that target conceptual dimension (i.e., the conceptual features belonging to that target conceptual dimension). For example, if the target conceptual dimension is emotion, the marked conceptual feature is <anger>. The marked conceptual features are input into a preset large model to guide the preset large model to generate language fragments that match the target conceptual dimension. For example, based on the above example, the language fragment matching emotion is <anger>How could you do this to me! After generating one language fragment, the next language fragment can be generated. That is, based on the next target conceptual dimension, the process returns to the step of guiding the preset large model to generate language fragments that match the target conceptual dimension through the conceptual features in the conceptual feature set that correspond to the target conceptual dimension, until all target conceptual dimensions involved in the conceptual feature set are traversed. Correspondingly, each target conceptual dimension corresponds to one language fragment, and finally, each language fragment is obtained. For example, the final language fragments could be: <anger>How could you do this to me! <empathy>I understand your unhappiness so well, but your parents may just feel unsafe. <Outdoor Sports> I thought hiking was a lot of fun a while ago! Maybe we could switch to a safer activity to put our parents' minds at ease! (Wait...)

[0037] Referring to Figure 2, a scenario flowchart of the natural language dialogue method in this application is shown. As shown, firstly, a concept-related prompt, i.e., a preset prompt word template, is constructed. The prompt can include concept dimensions, such as dialogue strategy, dialogue sentiment, and dialogue topic, as well as special markers: <>, ^^, ##, @@, [], and &&, etc., used to mark concept features. Further, the prompt is concatenated with the user's input question and input into the preset large model. Guided by the prompt, the preset large model can generate concepts (i.e., concept dimensions) marked with special tokens, and then progressively generate answer fragments (i.e., language fragments) corresponding to each concept dimension. The answer fragments are combined to form the final answer content, generating an EOS (End-of-Sequence) token indicating the end of the answer.

[0038] In one feasible implementation, the step of guiding a preset large model to generate a set of conceptual features related to the dialogue input content through a preset prompt word template includes at least one of steps S21 and S22: Step S21, guiding the preset large model to determine conceptual features related to the dialogue input content based on preset concept options through prompt word instructions in the preset prompt word template, so as to construct a set of conceptual features; Step S22, guiding the preset large model to generate each target concept dimension through prompt word instructions in the preset prompt word template, and determining conceptual features related to the dialogue input content based on each target concept dimension, so as to obtain a set of conceptual features.

[0039] It should be noted that there are at least two ways to generate a set of conceptual features related to the dialogue input: given and generative. In practical applications, different generation methods can be switched.

[0040] Optionally, for a given expression, in addition to prompt instructions, the preset prompt template can also include preset concept options. For example, the concatenation result of the preset prompt template and the dialogue input content can be ({c1, c2, ..., cn}, I, input), where c is the selectable concept dimension, n is the total number of concept dimensions, I is the prompt instruction, and input is the dialogue input content. The prompt instructions can guide the preset large model to determine the concept features related to the dialogue input content based on the preset concept options. For example, the prompt instructions can tell the preset large model to select target concept dimensions related to the dialogue input content from the preset concept options (e.g., the preset large model determines that preset concept options with a relevance to the dialogue input content greater than or equal to a preset threshold are the target concept dimensions). Based on this, the preset large model selects (or directly generates) the concept features of each target concept dimension to construct a concept feature set. For example, the preset prompt template can be further configured with concept feature options for each concept dimension. For instance, under the theme concept dimension, options such as sports, travel, art, music, technology, food, hobbies and crafts, entertainment, and animals can be set for filtering by the preset large model to obtain a set of concept features. Understandably, for given-form generation, since the preset large model only needs to select from a limited number of options, a relatively fast response speed can usually be achieved.

[0041] Optionally, for generative purposes, the prompt words in the preset prompt word template can guide the preset large model to directly generate each target concept dimension based on the dialogue input content, and trigger the generation of concept features related to the dialogue input content from each target concept dimension, thereby obtaining a set of concept features. For generative purposes, the native generation capabilities of the preset large model can be used.

[0042] Optionally, in a feasible implementation, a given-form approach can be used to construct the concept feature set. If it is impossible to select the target concept dimension (e.g., the relevance of the preset concept options to the dialogue input content is less than a preset threshold) or related concept features from the given preset concept options, a generative approach can be used. Accordingly, the prompt words can be a first prompt word and a second prompt word, respectively. The first prompt word corresponds to the given-form approach, and the second prompt word corresponds to the generative approach. That is, the first prompt word in the preset prompt word template guides the preset large model to determine the concept features related to the dialogue input content based on the preset concept options, thereby constructing the concept feature set. The second prompt word in the preset prompt word template guides the preset large model to generate each target concept dimension and determine the concept features related to the dialogue input content based on each target concept dimension, thereby obtaining the concept feature set.

[0043] It is understood that, in this embodiment, the two methods of generating concept feature sets can be dynamically switched to cope with different application scenarios, thereby ensuring the stability of the dialogue method of this application.

[0044] Referring to Figure 3, which is a flowchart of the second embodiment in this example. Contents in this embodiment that are the same as or similar to those in the above embodiments can be referred to the above description and will not be repeated hereafter. The steps of guiding the preset large model to generate each target concept dimension through prompt word instructions in the preset prompt word template include steps S210~S230: Step S210, inputting prompt word instructions into the preset large model to guide the preset large model to extract dialogue keywords from the dialogue input content; Step S220, in the preset concept graph network, using the network nodes mapped to the dialogue keywords as the starting nodes for energy attenuation propagation; Step S230, after the energy attenuation propagation is completed, determining each target concept dimension based on the energy of each network node in the preset concept graph network, wherein the higher the energy of the network node, the higher the probability that the concept dimension belongs to it will be used as the target concept dimension.

[0045] For example, in this embodiment, a pre-defined large model can be used as a keyword extraction engine. Correspondingly, prompt words can guide the pre-defined large model to extract dialogue keywords from the dialogue input content. For example, prompt words include multi-dimensional extraction requirements, such as: identifying explicitly mentioned entity concepts in the dialogue; analyzing implicit (or opposing) metaphors and emotional tendencies in the dialogue; guiding the model to infer the subject area involved in the dialogue; and indicating that the output format is a standardized list of conceptual terms.

[0046] Guided by prompts, the pre-defined large model can use its deep semantic understanding capabilities to encode and decode the text of the dialogue input, outputting a set of dialogue keywords that meet the requirements. These dialogue keywords can include terms that appear directly in the dialogue, as well as related concepts derived through reasoning.

[0047] It should be noted that the aforementioned preset concept graph network can be a knowledge graph constructed based on prior knowledge, serving as the foundational database for directly generating concept feature sets for the preset large model. The preset concept graph network can include network nodes and edges connecting these nodes. A network node can be a concept feature, while edges indicate the relationships between concept features. In this embodiment, energy propagation calculations will be performed on the concept graph network based on dialogue keywords.

[0048] For example, each extracted keyword is mapped to a corresponding network node in the concept graph network (e.g., matching network nodes that are the same as or similar to the dialogue keywords), and the mapped network node is used as the propagation starting point. An initial energy value is assigned to each starting node. The energy propagates from the starting node along the edges to surrounding network nodes in the concept graph network in multiple rounds of decay until a propagation termination condition is reached, such as reaching the maximum number of propagation rounds or the energy value at the end of the propagation being lower than a preset energy threshold. It should be noted that the energy from different propagation starting points may cover the same network node during the propagation process, thus creating energy superposition at that network node. Therefore, network nodes that are connected to all dialogue keywords usually have higher energy. It can be understood that through the energy propagation mechanism, semantic exploration from core concepts to peripheral concepts can be achieved. For example, starting from "learning plan," energy propagation may pass through intermediate concepts such as "executive function" and "cognitive load," ultimately activating concepts such as "prefrontal cortex development," thereby greatly expanding the semantic coverage.

[0049] For example, after the energy decay propagation ends, energy statistical analysis can be performed on each network node in the preset concept graph network. The final energy value of each network node is calculated; for instance, if a network node has been propagated multiple times, the energy from each propagation can be summed to obtain the final energy value of that network node. Then, according to the preset concept dimension classification system, each network node is mapped to the corresponding concept dimension. The total energy or average energy of the network nodes within each concept dimension is statistically analyzed to filter out target concept dimensions. For example, the higher the total energy or average energy of the nodes, the higher the probability that it is a target concept dimension; correspondingly, the higher the energy of a network node, the higher the probability that the concept dimension to which that network node belongs is a target concept dimension.

[0050] In a feasible implementation, in a preset concept graph network, the step of using the network nodes mapped by the dialogue keywords as the starting nodes for energy attenuation propagation includes steps S221 to S222: Step S221, for any one of the starting nodes, the starting node is used as the propagation node, and energy is transferred to the neighboring network nodes of the propagation node, wherein the remaining energy of the propagation node is higher than the energy received by the neighboring network nodes; Step S222, the neighboring network nodes are used as new propagation nodes, and the step of transferring energy to the neighboring network nodes of the propagation node is returned based on the new propagation nodes until the preset propagation condition is reached.

[0051] It should be noted that since the energy propagation process between network nodes is roughly the same, this embodiment will use one propagation process as an example for explanation.

[0052] For example, for any one of the starting nodes, this starting node is used as a propagation node, and energy is transferred to its neighboring network nodes. The rule for energy transfer is that when a propagation node transfers energy to its neighboring network nodes, the remaining energy of the propagation node must be higher than the energy received by the neighboring network nodes. For example, the neighboring network nodes of the propagation node can be determined based on the edges of the propagation node in a pre-defined concept graph network. For instance, all neighboring network nodes directly connected to the current propagation node can be retrieved from the pre-defined concept graph, forming a target node set N = {n1, n2, ..., n}. k For each adjacent network node n i Obtain the weight value w of the edge connecting it to the propagation node. i The weights of each edge can be the same or different. For example, they can all be fixed values ​​w, or the weights of the edges can be pre-set based on the semantic relationship type of the edges. Therefore, there are no specific restrictions on the specific weight values ​​here. The remaining energy of the propagating node must be higher than the energy received by the adjacent network nodes to ensure the unidirectional attenuation characteristic of energy transfer.

[0053] For example, after completing one energy propagation, the adjacent network nodes that have already propagated energy are then used as new propagation nodes. The process of transferring energy to the adjacent network nodes of the new propagation nodes is then repeated until a preset propagation condition is met, at which point the energy decays and propagation ends. This preset propagation condition could be that the energy received by the adjacent network nodes is less than a preset energy threshold, or that a preset propagation coefficient is reached. Additionally, a propagation termination flag can be set for the starting node to prevent energy from propagating cyclically back to it.

[0054] In a feasible implementation, the step of determining each target concept dimension based on the energy of each network node in the preset concept graph network includes steps S231 to S232: Step S231, based on the attribution relationship between candidate network nodes propagating to energy in the preset concept graph network and concept dimensions, the cumulative energy of each concept dimension is statistically obtained; Step S232, each target concept dimension is selected based on the cumulative energy of each concept dimension, wherein the concept dimension with higher cumulative energy has a higher probability of being selected as a target concept dimension.

[0055] For example, firstly, candidate network nodes are determined in a predefined concept graph network, where the network nodes that are propagated to energy are considered candidate network nodes. Furthermore, each network node can be configured with its associated concept dimension, i.e., the relationship between it and the concept dimension. And for each concept dimension D... i Collect candidate network nodes belonging to this dimension to form a node set N. i Calculate dimension D i Cumulative energy value: E_total(D i ) = Σ e j (for all n) j ∈ N i Then, based on the cumulative energy value of each concept dimension, the concept dimensions are sorted from largest to smallest, and the top-ranked concept dimensions are selected as the target concept dimensions. Furthermore, top-k or top-p methods can be used to filter target concept dimensions; that is, concept dimensions with higher cumulative energy have a higher probability of being selected as target concept dimensions.

[0056] Furthermore, after determining each target concept dimension, the concept features (i.e., concept features related to the dialogue input content) under each target concept dimension can also be determined based on the energy of network nodes. For example, for any target concept dimension, the one or more candidate network nodes with the highest energy belonging to that target concept dimension can be used as the concept features under that target concept dimension. Similarly, top-k or top-p methods can also be used to filter the concept features under that target concept dimension; no specific limitations are made here.

[0057] This application also provides a natural language dialogue device. Referring to FIG4, the natural language dialogue device includes: an input module 10, used to input dialogue input content and a preset prompt word template into a preset large model; a first generation module 20, used to guide the preset large model to generate a set of concept features related to the dialogue input content through the preset prompt word template; and a second generation module 30, used to guide the preset large model to generate various language fragments through concept features of different concept dimensions in the concept feature set, and to determine the response content of the dialogue input content based on each language fragment. The natural language dialogue device provided by this application can solve the technical problem that traditional large models have limitations in open domain dialogue scenarios and are difficult to flexibly respond to complex and ever-changing dialogue needs. Compared with the prior art, the beneficial effects of the natural language dialogue device provided by this application are the same as the beneficial effects of the natural language dialogue method provided in the above embodiments, and will not be repeated here.

[0058] Referring now to Figure 5, a schematic diagram of a suitable structure for implementing an electronic device according to embodiments of this application is shown. The electronic device shown in Figure 5 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0059] As shown in Figure 5, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0060] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0061] The electronic device provided in this application, employing the natural language dialogue method described in the above embodiments, can solve the technical problem that traditional large models have limitations in open-domain dialogue scenarios and are unable to flexibly respond to complex and ever-changing dialogue needs. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the natural language dialogue method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0062] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0063] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0064] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the natural language dialogue method in the above embodiments.

[0065] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0066] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0067] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: input dialogue input content and a preset prompt word template into a preset large model; guide the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template; guide the preset large model to generate various language fragments through conceptual features of different conceptual dimensions in the set of conceptual features, and determine the response content of the dialogue input content based on each language fragment.

[0068] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0069] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0070] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0071] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described natural language dialogue method. This addresses the technical problem that traditional large-scale models have limitations in open-domain dialogue scenarios and struggle to flexibly respond to complex and ever-changing dialogue needs. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the natural language dialogue method provided in the above embodiments, and will not be elaborated upon here.

[0072] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the natural language dialogue method as described above.

[0073] The computer program product provided in this application can solve the technical problem that traditional large models have limitations in open-domain dialogue scenarios and are unable to flexibly respond to complex and ever-changing dialogue needs. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the natural language dialogue method provided in the above embodiments, and will not be repeated here.

[0074] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A natural language dialogue method, characterized in that, The natural language dialogue method includes: inputting dialogue input content and a preset prompt word template into a preset large model; guiding the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template; guiding the preset large model to generate various language fragments through conceptual features of different conceptual dimensions in the set of conceptual features; and determining the response content of the dialogue input content based on the various language fragments.

2. The natural language dialogue method as described in claim 1, characterized in that, The step of guiding the preset large model to generate language fragments using concept features of different concept dimensions in the concept feature set includes: for any target concept dimension involved in the concept feature set, guiding the preset large model to generate language fragments matching the target concept dimension using concept features in the concept feature set corresponding to the target concept dimension; based on the next target concept dimension, returning to the step of guiding the preset large model to generate language fragments matching the target concept dimension using concept features in the concept feature set corresponding to the target concept dimension; and obtaining each language fragment after traversing each target concept dimension involved in the concept feature set.

3. The natural language dialogue method as described in claim 1, characterized in that, The step of guiding the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template includes at least one of the following: guiding the preset large model to determine the conceptual features related to the dialogue input content based on preset concept options through prompt word instructions in the preset prompt word template, so as to construct the set of conceptual features; The preset prompt word template guides the preset large model to generate each target concept dimension, and determines the concept features related to the dialogue input content based on each target concept dimension, so as to obtain the concept feature set.

4. The natural language dialogue method as described in claim 3, characterized in that, The step of guiding the preset large model to generate each target concept dimension through the prompt word instructions in the preset prompt word template includes: inputting the prompt word instructions into the preset large model to guide the preset large model to extract dialogue keywords from the dialogue input content; in the preset concept graph network, using the network nodes mapped by the dialogue keywords as the starting nodes for propagation with energy decay; after the energy decay propagation is completed, determining each target concept dimension according to the energy of each network node in the preset concept graph network, wherein the higher the energy of the network node, the higher the probability that the concept dimension belongs to it is used as the target concept dimension.

5. The natural language dialogue method as described in claim 4, characterized in that, The step of using the network nodes mapped by the dialogue keywords as starting nodes for energy attenuation propagation in the preset concept graph network includes: for any one of the starting nodes, using the starting node as a propagation node, transferring energy to the neighboring network nodes of the propagation node, wherein the remaining energy of the propagation node is higher than the energy received by the neighboring network nodes; using the neighboring network nodes as new propagation nodes, and based on the new propagation nodes, returning to execute the step of transferring energy to the neighboring network nodes of the propagation node, until the preset propagation condition is reached.

6. The natural language dialogue method as described in claim 4, characterized in that, The step of determining each target concept dimension based on the energy of each network node in the preset concept graph network includes: statistically obtaining the cumulative energy of each concept dimension based on the attribution relationship between candidate network nodes propagating to energy in the preset concept graph network and concept dimensions; and filtering out each target concept dimension based on the cumulative energy of each concept dimension, wherein the concept dimension with higher cumulative energy has a higher probability of being filtered as a target concept dimension.

7. A natural language dialogue device, characterized in that, The natural language dialogue device includes: an input module for inputting dialogue input content and a preset prompt word template into a preset large model; a first generation module for guiding the preset large model to generate a set of conceptual features related to the dialogue input content through the preset prompt word template; and a second generation module for guiding the preset large model to generate various language fragments through conceptual features of different conceptual dimensions in the set of conceptual features, and determining the response content of the dialogue input content based on the various language fragments.

8. An electronic device, characterized in that, The electronic device includes: a processor, a memory, and a natural language dialogue program stored in the memory and executable on the processor, wherein the natural language dialogue program, when executed, implements the steps of the natural language dialogue method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a natural language dialogue program, which, when executed, implements the steps of the natural language dialogue method as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a natural language dialogue program, which, when executed by a processor, implements the steps of the natural language dialogue method as described in any one of claims 1-6.