Dialogue interaction method, system and readable storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GEER TECH CO LTD
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-07
AI Technical Summary
[0006]本申请的主要目的在于提供一种对话交互方法、系统及可读存储介质,旨在解决如何提升多NFC玩偶参与对话时的交互自然感
本申请实施例响应对话请求获取用户提问内容后,获取NFC读取设备识别的各NFC玩偶属性信息,并结合提问内容为每个NFC玩偶生成对应的回答内容,这一过程确保了不同NFC玩偶的回答能够与其自身角色属性及用户当前提问相匹配,避免了传统方案中单一固定回答无法体现多角色身份差异的问题,为提升交互自然感提供了内容基础。在此基础上,针对每个NFC玩偶所生成的回答内容,进一步根据其属性信息(如角色性格、说话风格等)对回答执行语义分割,得到多个语义相对独立的回答片段,并依序输出显示。这一操作打破了对话生成模型直接输出完整、连贯长文本的固定模式,使得每个玩偶的回答不再是生硬的一次性完整表述,而是被拆解为符合自然对话节奏的多个片段,模拟了人类交流中边说边想、语句递进的真实状态。尤其在多个具有不同属性的NFC玩偶共同参与对话的场景下,先为每个玩偶分别生成回答并各自分割成片段,再依序交替或依次输出各片段,能够有效避免多个玩偶同时输出完整回答所导致的输出混乱或用户等待感。用户实际感受到的是不同角色的发言以片段化方式轮流、递进地参与对话,而非多个独立且机械的完整回复,从而提升了多NFC玩偶参与对话时的交互自然感。
Smart Images

Figure CN122527280A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of near-field communication technology, and in particular to a dialogue interaction method, system, and readable storage medium. Background Technology
[0002] Near Field Communication (NFC) technology has been widely used for rapid identification and interaction between electronic devices and physical objects. By embedding NFC tags in physical objects such as toys and cards, devices can read their identification information and trigger corresponding digital content output, providing users with a personalized interactive experience. In multi-person or multi-role dialogue scenarios, users often want multiple characters with different identities to participate in the conversation to enhance the vividness and realism of the interaction.
[0003] For dialogue interaction with NFC dolls, a dialogue generation model can usually directly output a complete answer. That is, when a user initiates a dialogue request and the NFC doll is recognized, the model directly generates and outputs a complete answer based on the user's question.
[0004] However, this fixed, complete answer output pattern makes the overall dialogue process stiff and mechanical, lacking a natural feel. Therefore, how to improve the naturalness of interaction when multiple NFC dolls participate in a dialogue has become an urgent technical problem to be solved.
[0005] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention
[0006] The main purpose of this application is to provide a dialogue interaction method, system, and readable storage medium, which aims to solve how to improve the naturalness of interaction when multiple NFC dolls participate in a dialogue.
[0007] To achieve the above objectives, this application provides a dialogue interaction method applied to a dialogue interaction system, the dialogue interaction system including at least one near-field communication reading device, the dialogue interaction method comprising the following steps: In response to a dialogue request, obtain the user's question content; The system acquires the attribute information of the NFC doll identified by the near-field communication reading device, and generates the corresponding answer content for each NFC doll based on the attribute information and the question content. For each of the NFC dolls, semantic segmentation is performed on the response content based on the attribute information of the NFC doll to obtain multiple response fragments; The answer segments are displayed sequentially.
[0008] In one embodiment, the step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content includes: Calculate the content relevance between each attribute and the question content; For each NFC doll, if the content relevance corresponding to the NFC doll is greater than or equal to a preset threshold, then the answer content corresponding to the NFC doll is generated based on the attribute information of the NFC doll and the question content. If the relevance of the content corresponding to the NFC doll is less than a preset threshold, then it is determined that the NFC doll will not respond to the current dialogue.
[0009] In one embodiment, the step of generating the answer content corresponding to the NFC doll based on the attribute information of the NFC doll and the question content includes: Obtain the external knowledge base associated with the NFC doll; Based on the external knowledge base, the attribute information of the NFC doll, and the question content, the corresponding answer content for the NFC doll is generated.
[0010] In one embodiment, the attribute information includes character personality, and the step of sequentially outputting and displaying each of the answer fragments includes: For each NFC doll, the corresponding output speed parameter is obtained based on the character personality of the NFC doll; Each of the NFC doll's response segments is output sequentially according to the output speed parameters, with each response segment displayed as an independent dialog box.
[0011] In one embodiment, the step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content includes: For each NFC doll, a preset large language model corresponding to the NFC doll is invoked, and the corresponding answer content for the NFC doll is generated based on the attribute information and the question content.
[0012] In one embodiment, the step of performing semantic segmentation on the response content corresponding to each NFC doll based on the attribute information of the NFC doll to obtain multiple response fragments includes: For each NFC doll, after the preset large language model generates the corresponding answer content for the NFC doll, semantic segmentation is performed on the answer content based on the attribute information of the NFC doll to obtain multiple answer fragments; The generation, semantic segmentation, and content output of the responses of each NFC doll are performed in parallel.
[0013] In one embodiment, after the step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content, the method further includes: Determine whether there are any contradictions among the various answers provided; If a contradiction exists, a corresponding explanation will be generated for the contradictory answer. After each of the aforementioned answer segments has finished being displayed, the explanation content will be displayed.
[0014] In one embodiment, after the step of sequentially outputting and displaying each of the answer fragments, the method further includes: In response to an audio output request for a target response segment, the target response segment is converted into an audio signal; The NFC doll corresponding to the target answer fragment is identified as the target NFC doll, and the location information of the target NFC doll is obtained; Based on the location information and the preset listener position, the audio signal is spatially rendered to obtain a spatial audio signal; Play the spatial audio signal.
[0015] In addition, to achieve the above objectives, this application also provides a dialogue interaction system, which includes a terminal device and at least one near-field communication reading device connected in communication. The near-field communication reading device is used to identify NFC dolls within the reading area; The terminal device is used to execute the steps of the dialogue interaction method described above.
[0016] In addition, to achieve the above objectives, this application also provides a readable storage medium, which is a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps of the dialogue interaction method described above.
[0017] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the dialogue interaction method described above.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: In this embodiment, after responding to a dialogue request and obtaining the user's question, the system acquires the attribute information of each NFC doll identified by the NFC reading device. Based on the question, it generates corresponding answers for each NFC doll. This process ensures that the answers of different NFC dolls match their own role attributes and the user's current question, avoiding the problem in traditional solutions where a single fixed answer cannot reflect the differences between multiple roles, thus providing a content foundation for improving the naturalness of the interaction. Furthermore, for the answers generated for each NFC doll, semantic segmentation is performed based on its attribute information (such as personality and speaking style), resulting in multiple semantically independent answer fragments, which are then output and displayed sequentially. This operation breaks the fixed pattern of dialogue generation models directly outputting complete, coherent long texts. Instead of a rigid, one-time complete statement, each doll's answer is broken down into multiple fragments that conform to the rhythm of natural dialogue, simulating the realistic state of human communication where one speaks and thinks simultaneously, with sentences progressing progressively. Especially in scenarios where multiple NFC dolls with different attributes participate in a dialogue, generating a separate response for each doll and dividing it into segments, then outputting these segments sequentially or alternately, effectively avoids the output chaos or user waiting caused by multiple dolls simultaneously providing complete responses. Users actually experience different characters' statements participating in the dialogue in a fragmented, progressive manner, rather than multiple independent and mechanical complete replies, thus enhancing the naturalness of the interaction when multiple NFC dolls participate in a dialogue. Attached Figure Description
[0019] 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.
[0020] 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, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating the first embodiment of the dialogue interaction method of this application; Figure 2 This is a schematic diagram of the relevance calculation process involved in one embodiment of the dialogue interaction method of this application; Figure 3 This is a schematic diagram of the response content generation process according to an embodiment of the dialogue interaction method of this application; Figure 4 This is a schematic diagram of the system architecture of the dialogue interaction system in the embodiments of this application; Figure 5 This is a schematic diagram of the device structure of the near-field communication reading device in the embodiments of this application.
[0022] 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
[0023] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] It should be noted that the execution subject of each embodiment of the dialogue interaction method of this application can be a terminal device capable of realizing the above functions, such as AR (Augmented Reality) headset, VR (Virtual Reality) headset, mobile phone, computer, tablet, etc. The embodiments of the dialogue interaction method of this application do not impose specific limitations on this.
[0025] Based on this, this application proposes a dialogue interaction method according to a first embodiment. In this embodiment, the dialogue interaction method is applied to a dialogue interaction system, which includes at least one near-field communication reading device, as shown below. Figure 1 As shown, the dialogue interaction method includes the following steps S10~S30: Step S10: In response to the dialogue request, obtain the user's question content; Near field communication reading devices can be NFC card readers, handheld data collectors, vehicle-mounted NFC modules, etc. This embodiment does not impose specific limitations on them. For example, the following uses NFC card readers as near field communication reading devices for illustration.
[0026] In this interactive dialogue system, the NFC reader communicates with the terminal device, allowing users to initiate dialogue requests through the interactive interface on the terminal device. The terminal device can be an AR headset, VR headset, mobile phone, computer, or tablet, and provides text input boxes, voice input buttons, or virtual dialogue buttons.
[0027] In response to the dialogue request, the terminal device obtains the user's input question. If the user inputs text, the terminal device directly extracts the text information from the input box; if the user inputs voice, the terminal device calls the built-in or cloud-based voice recognition module to convert the user's voice into text format in real time.
[0028] To further improve the accuracy of subsequent processing, the terminal device can also preprocess the acquired query content, such as removing invalid characters, performing word segmentation, semantic cleaning, or intent recognition, so as to better match the attribute information of the NFC doll in subsequent steps.
[0029] Step S20: Obtain the attribute information of the NFC doll identified by the near-field communication reading device, and generate the answer content corresponding to each NFC doll based on the attribute information and the question content. When a user places an NFC-enabled toy within the effective sensing range of an NFC reader, the reader can read the tag identifier stored in the toy's built-in NFC tag via the Near Field Communication protocol. This tag identifier is a unique identification code for each NFC toy, such as a string of numerical IDs (Identifiers) or UUIDs (Universally Unique Identifiers).
[0030] The NFC reader can send the read tag identifier to the terminal device. After receiving the tag identifier, the terminal device queries the corresponding attribute information in a local database or cloud server based on the identifier. The attribute information is used to describe the character characteristics of the NFC doll, and may specifically include: character name (such as "Dr. Bear"), personality type (such as "lively and cheerful", "calm and wise", "obsessive-compulsive"), speaking style (such as "likes to use metaphors", "concise"), and preset tone preference or speaking speed rhythm, etc.
[0031] After obtaining the attribute information of one or more NFC dolls, the user's question and the attribute information of each doll are input into a pre-trained dialogue generation model (which can run locally on the terminal or in the cloud).
[0032] The model generates an independent response for each NFC doll, which is relevant to the user's question and consistent with the doll's character setting. It should be noted that if multiple NFC dolls are identified simultaneously, the terminal device can use batch inference or parallel generation methods to generate the complete response text for each doll sequentially or in parallel.
[0033] Step S30: For the answer content corresponding to each NFC doll, perform semantic segmentation on the answer content based on the attribute information of the NFC doll to obtain multiple answer fragments; For each generated NFC doll's complete response, semantic segmentation is further performed based on the doll's attribute information. The character's personality, speaking style, and preset pause preferences recorded in the attribute information will serve as the main basis for segmentation.
[0034] In practice, the terminal device first performs dependency parsing on the response text, or performs preliminary segmentation based on punctuation marks (periods, question marks, exclamation marks, semicolons, etc.). Then, it combines the rhythmic features in the attribute information: for example, if the attribute information indicates a "lively and cheerful" personality, it tends to segment long sentences into shorter segments to simulate a fast, jumpy speaking style; if the personality is "calm and wise," it retains slightly longer segments to reflect a steady and coherent expression. After segmentation, the segmented clauses or phrases are combined into several semantically complete and appropriately sized response segments.
[0035] As an optional enhancement, interjections simulating natural pauses, such as "um," "that," and "haha," can be inserted at the segmentation points based on the interjection preferences in the attribute information to enhance the realism of the dialogue and the personality of the characters. The response content corresponding to each NFC doll is divided into two or more segments and arranged and marked according to the original semantic order.
[0036] Step S40: Output and display each of the aforementioned answer segments in sequence.
[0037] The system displays all the response fragments from different NFC dolls sequentially on their user interfaces according to a preset output strategy. The preset output strategy can be flexibly set according to the role priority or recognition order in the attribute information: for example, all fragments can be output sequentially according to the order in which the NFC dolls are recognized; or the fragments can be output alternately according to their granularity, that is, the first fragment of doll A can be output first, then the first fragment of doll B can be output, and then the second fragment of doll A can be output, thus simulating the effect of multiple roles taking turns speaking and responding naturally.
[0038] When each segment is displayed on the terminal device screen, it can be presented in the form of a speech bubble, and the corresponding doll character name can be marked above or inside the bubble (such as "Dr. Bear says:"). Character portraits can also be used to enhance recognizability. A fixed time interval (such as 0.3 to 0.8 seconds) can be set between adjacent segments, or the interval can be adaptively adjusted according to the length of the segment content and the speech rate preference in the attribute information.
[0039] In addition, it can also support users to manually trigger the display of the next segment, such as by tapping the screen, using voice commands (such as "continue"), or using gestures in the headset to present subsequent segments in sequence, thereby further enhancing the sense of participation and control in the interaction.
[0040] If the terminal device is an AR or VR headset, the answer segments can also be superimposed on the real or virtual scene in the form of virtual subtitles or floating dialog boxes, and move with the user's perspective to enhance the immersive experience.
[0041] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. Based on this, the step of generating the answer content corresponding to each NFC doll according to the attribute information and the question content includes: Step A10: Calculate the content relevance between each attribute information and the question content; After obtaining the attribute information of each NFC doll and the user's question, the content relevance between each attribute and the question is first calculated. This relevance is used to measure the degree of matching between the current doll's character characteristics and the user's question.
[0042] In practical implementation, semantic similarity calculation methods from natural language processing can be used. For example, key fields in attribute information such as role name, personality tags, and speaking style can be vectorized into text vectors (e.g., using Sentence-BERT or TF-IDF weighted word vectors) and the question content, respectively. Then, the cosine similarity or dot product similarity between the two can be calculated to obtain a relevance score between 0 and 1. As another implementation method, it can also be based on predefined keyword matching rules: if the question content contains words that are strongly related to a certain doll's attributes (e.g., the question "Little Bear, what's in the forest?" matches the doll "Dr. Little Bear"), then a higher relevance score is assigned.
[0043] Step A20: For each NFC doll, if the content relevance corresponding to the NFC doll is greater than or equal to a preset threshold, then the answer content corresponding to the NFC doll is generated based on the attribute information of the NFC doll and the question content. For each NFC doll, the calculated content relevance score is compared with a preset threshold. This preset threshold can be a fixed value set by default (e.g., 0.6), or it can be flexibly adjusted by the user according to the dialogue scenario, or dynamically set according to the role importance of different dolls.
[0044] If the relevance of the content corresponding to a certain NFC doll is greater than or equal to a preset threshold, it means that the doll has a sufficiently high degree of matching with the user's current question and is suitable to participate in this round of dialogue. In this case, based on the attribute information of the NFC doll (such as character name, personality, and speaking style) and the user's question, the dialogue generation model is invoked to generate the corresponding answer content for the doll.
[0045] Step A30: If the content relevance corresponding to the NFC doll is less than a preset threshold, then it is determined that the NFC doll does not respond to this round of dialogue.
[0046] If the relevance of the content corresponding to an NFC doll is less than a preset threshold, it indicates that the doll has a low match with the user's current question. Forcing an answer might result in an irrelevant response or disrupt the flow of the conversation. Therefore, the terminal device determines that the NFC doll will not respond to this round of dialogue.
[0047] In practice, "non-response" can manifest as follows: the doll does not generate any response content in the current dialogue round, and there will be no response fragments belonging to the doll in subsequent steps. The terminal device can further record the doll's silent state and not display it on the interactive interface, or inform the user through a non-intrusive prompt (such as briefly dimming the doll's corresponding avatar) that the character is not participating in the current response. In addition, the doll can be retained in the identified list, waiting to respond to subsequent questions with higher relevance.
[0048] By introducing a content relevance judgment mechanism, before generating the response content for each NFC doll, the semantic matching degree between the attribute information of each doll and the user's question is calculated. Only when the relevance reaches a preset threshold is a response generated for that doll; otherwise, the doll does not participate in the current round of dialogue. This process effectively avoids NFC dolls that are irrelevant or have low relevance to the current question forcibly generating responses, thus preventing situations that affect the quality of the dialogue, such as irrelevant answers or significant deviations between the character's speech and the user's intent. Compared to the traditional method where all identified dolls unconditionally generate complete responses, this makes dialogues involving multiple characters less mechanical and chaotic. Each speaking doll is relevant to the user's current question, and the user experiences more targeted and expected character responses. This selective response strategy based on content relevance improves the naturalness and intelligence of multi-NFC doll dialogue interaction from the source, reducing dialogue breaks or awkwardness caused by irrelevant characters forcibly inserting themselves.
[0049] In one possible implementation, the step of generating the answer content corresponding to the NFC doll based on the attribute information of the NFC doll and the question content includes: Step B10: Obtain the external knowledge base associated with the NFC doll; After determining that an answer has been generated for a specific NFC doll, the terminal device further obtains an external knowledge base associated with that NFC doll. This external knowledge base can be a pre-built set of structured or unstructured knowledge, such as encyclopedic knowledge, backstory, frequently asked questions, geographical information, and scientific common sense related to the doll character.
[0050] In practice, the terminal device can retrieve the corresponding knowledge base index from local storage or a cloud server based on the role category in the NFC doll's tag identification or attribute information (e.g., "Dr. Bear" belongs to the natural science category, and "Pirate Captain" belongs to the adventure story category). Each NFC doll can be independently associated with its own dedicated knowledge base, or multiple dolls can share different knowledge entries in the same knowledge base. The external knowledge base can be in the format of a text corpus, a knowledge graph (e.g., entity-relation-attribute triples), or a set of question-and-answer pairs in key-value pair format.
[0051] Step B20: Based on the external knowledge base, the attribute information of the NFC doll, and the question content, generate the answer content corresponding to the NFC doll.
[0052] The relevant content from the external knowledge base, the attribute information of the NFC doll, and the user's question are all input into the dialogue generation model to generate the corresponding answer for the NFC doll.
[0053] In practice, relevant knowledge points can be retrieved from an external knowledge base based on the question content. For example, vector retrieval or keyword matching can be used to extract one or more pieces of knowledge text most relevant to the question. Then, these knowledge texts are combined or merged with the NFC doll's attribute information (character name, personality, speaking style) and the user's original question content to form an enhanced model input.
[0054] Dialogue generation models (such as generative models based on the Transformer architecture) use this enhanced input to generate answers that both fit the character's persona and incorporate external real-world or pre-defined knowledge. For example, if a user asks, "How are black holes formed?", after associating the "Dr. Bear" doll with its corresponding astronomical knowledge base, the model can generate a scientific explanation in Dr. Bear's voice, rather than a general statement. If no relevant information is found in the external knowledge base, the model can degenerate into generating a general answer based solely on attribute information and the question's content.
[0055] By introducing external knowledge bases, the generated answers are richer, more accurate, and have educational or entertainment value.
[0056] In one possible implementation, the attribute information includes character traits, and the step of sequentially outputting and displaying each of the answer fragments includes: Step C10: For each NFC doll, obtain the corresponding output speed parameter based on the character personality of the NFC doll; Before sequentially displaying each response segment, the terminal device first obtains the corresponding output speed parameters for each NFC doll based on the personality traits contained in its attribute information. The personality traits describe the doll's behavioral style in the dialogue, such as "lively and cheerful," "calm and reserved," "impatient," or "slow-paced."
[0057] In practice, the terminal device can have a pre-set mapping table between personality and output speed. For example, if the character's personality is "lively and cheerful" or "impatient," the corresponding output speed parameter is set to faster (e.g., automatically switching to the next segment after 0.2 seconds between each segment); if the character's personality is "calm and reserved" or "slow-paced," it is set to slower (e.g., 0.8 seconds between each segment). Alternatively, the output speed parameter can be directly customized by the user or dynamically adjusted according to the dialogue scenario. For example, the user can manually set the global output speed or set it individually for different dolls.
[0058] Step C20: Output each of the NFC doll's response segments one by one according to the output speed parameters, wherein each response segment is displayed in the form of an independent dialog box.
[0059] Based on the acquired output speed parameters, each answer segment corresponding to the NFC doll is output one by one. Each answer segment is displayed as an independent dialog box on the user interface, and the appearance of the dialog box (such as bubble color, border shape, and font size) can be further differentiated according to the doll's character personality to enhance character recognition.
[0060] In practice, when a doll with a faster output speed parameter speaks, the pauses between adjacent response segments are shorter, simulating a fast-paced, leaping dialogue rhythm. Conversely, when a doll with a slower output speed parameter speaks, the pauses are longer, reflecting a more deliberate, word-by-word expression. If multiple dolls speak sequentially in the same round of dialogue, the terminal device independently controls the output rhythm of each segment according to its own speed parameter, without interference. Each segment is displayed with the doll's character name and / or avatar above or inside the dialog box, allowing the user to clearly identify the current speaker.
[0061] Furthermore, the terminal device can also support user manual intervention in the output rhythm. For example, tapping the screen can immediately display the next segment, ignoring the remaining pause time, further enhancing the flexibility and engagement of the interaction. By differentiating the output speed based on the character's personality, the dialogue becomes more vivid and lifelike, avoiding the monotony of all characters outputting segments at the same mechanical rhythm.
[0062] In one possible implementation, the step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content includes: Step D10: For each NFC doll, call the preset large language model corresponding to the NFC doll, and generate the corresponding answer content for the NFC doll based on the attribute information and the question content.
[0063] In practice, each NFC doll can be pre-associated with a unique large language model. This pre-associated large language model can be a lightweight model deployed locally on the terminal, or a general large model running in the cloud (such as the GPT series, Doubao, Wenxin Yiyan, etc.). The terminal device calls it through a network API (Application Programming Interface).
[0064] Before invoking the model, the terminal device structures and encapsulates the NFC doll's attribute information (including character name, personality, speaking style, etc.) and the user's question to form the model input. For example, a dialogue template containing system character prompts and the user's question is constructed: "You are a {character name}, with a personality of {character personality}. Please answer the user's question using {speaking style}: {question content}". This template serves as the input context for the large language model, guiding the model to generate responses that conform to the doll's settings.
[0065] Terminal devices can flexibly choose the model invocation method according to the actual application scenario. If real-time requirements are high and network conditions permit, the cloud-based large model should be used first to obtain higher quality answers; if privacy or offline use is required, the local model should be invoked.
[0066] Furthermore, different NFC dolls can use different large language models. For example, science-related dolls can use a knowledge-enhanced model, while entertainment dolls can use a creative generative model, thus achieving differentiated response styles. After generation, the terminal device obtains the complete response text for each doll, which is then used in subsequent semantic segmentation steps.
[0067] In one possible implementation, the step of performing semantic segmentation on the response content corresponding to each NFC doll based on the attribute information of the NFC doll to obtain multiple response fragments includes: Step E10: For each NFC doll, after the preset large language model generates the corresponding answer content for the NFC doll, semantic segmentation is performed on the answer content based on the attribute information of the NFC doll to obtain multiple answer fragments. The generation, semantic segmentation, and content output of the responses of each NFC doll are performed in parallel.
[0068] When multiple NFC dolls are present, the three stages of generating the response content, semantic segmentation, and content output for each doll are executed in parallel to improve the overall response efficiency and smoothness of interaction.
[0069] In practical implementation, each NFC doll can be assigned an independent processing thread or asynchronous task. Each thread executes in a pipeline sequence of "generation → segmentation → output," but different threads can run concurrently. For example, while the first doll's response is being generated, the generation task for the second doll can start simultaneously without waiting for the first to complete. Similarly, for a doll that has already been generated, its semantic segmentation task can be executed immediately in its corresponding thread without affecting the generation or segmentation progress of other dolls. During the output phase, the response fragments of each doll are presented sequentially on the interface according to a preset output strategy (such as alternating output, priority output, or immediate output). However, because each stage executes in parallel, the user does not need to wait for all dolls to complete generation and segmentation before seeing the output content, thus significantly shortening the waiting time from the dialogue request to the appearance of the first response fragment.
[0070] As a further optimization of parallel execution, the parallel computing power of multi-core processors or GPUs can be utilized to simultaneously call multiple large language model instances for answer generation; semantic segmentation, as a lightweight operation, can be executed immediately after generation, introducing almost no additional latency. The output display thread dynamically retrieves the next segment to be displayed from the ready queue based on the ready status of each doll segment, achieving a streaming interactive effect of "generating, segmenting, and outputting simultaneously".
[0071] Furthermore, parallel execution supports different large language models or different segmentation strategies for different dolls, with each processing unit operating independently and without blocking the others. Through this parallel design, even when multiple NFC dolls are identified simultaneously, the system can still maintain a low-latency, high-response interactive experience, avoiding the user's waiting experience caused by serial processing, and further enhancing the naturalness and real-time performance in multi-role dialogue scenarios.
[0072] Based on the first and / or second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to the first and second embodiments described above can be referred to the above description and will not be repeated hereafter. On this basis, after the step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content, the method further includes: Step F10: Determine whether there are any contradictions among the stated answers; After generating the corresponding answer for each NFC doll based on its attribute information and the user's question, the system further determines whether there are any contradictions between the answers. A contradiction refers to a situation where the answers from different NFC dolls conflict or are inconsistent in their factual statements, logical relationships, or viewpoints.
[0073] In practical implementation, contradiction detection methods from natural language processing can be used. For example, the responses of any two dolls can be encoded into text and input into a pre-trained contradiction recognition model (such as an implication / contradiction classifier based on BERT), and the output can determine whether the two responses are contradictory and the type of contradiction (factual contradiction, logical contradiction, or opposing viewpoints).
[0074] As another approach, verification can be performed based on an external knowledge base or common sense graph: if two answers simultaneously assert a fact but reach opposite conclusions (e.g., one says "penguins can fly," while the other says "penguins cannot fly"), then it is determined that there is a contradiction.
[0075] Iterate through all pairs of responses and record all detected contradictory pairs and their specific contradictory content.
[0076] Step F20: If a contradiction exists, generate corresponding explanation content for the contradictory answer content; If contradictions are identified among the responses, corresponding explanations are generated for each contradictory response. These explanations are used to explain the contradictions and their possible causes to the user, helping them understand the differences in perspectives from multiple viewpoints.
[0077] In practice, the terminal device summarizes all detected contradictions and their points of contention, and calls a preset large language model or a dedicated explanation generation module to generate a natural language explanation based on the contradictions. For example, if the device detects that the toy "Dr. Bear" says "the moon itself emits light," while the toy "Teacher Owl" says "the moon reflects sunlight," the explanation could be: "Dr. Bear and Teacher Owl have given different explanations for the moon's light emission principle. In fact, the moon itself does not emit light, but reflects sunlight. Teacher Owl's answer is more in line with scientific facts." If the contradiction stems from differences in the characters' viewpoints (e.g., one likes sunny days, the other likes rainy days), the explanation could emphasize that this is a difference in subjective preferences between the different characters. The explanation could also include the names of the toy involved in the contradiction for the user to trace back.
[0078] Step F30: After the output display of each of the aforementioned answer segments has ended, the explanation content is output and displayed.
[0079] The explanation is displayed after all the NFC dolls' responses have been fully presented. The display method can be similar to the response segments, or even a separate dialog box. The dialog box can use neutral or highlighted colors to attract the user's attention. If the explanation is lengthy, it can be displayed in segments or can be expanded by the user.
[0080] By placing the explanation after the complete dialogue flow, interruptive information is avoided during character speech, maintaining the coherence and immersion of multi-character dialogue. At the same time, providing clarification of contradictions or additional explanations after the dialogue ends helps improve users' understanding and trust in the dialogue content, which is especially suitable for scenarios such as education and popular science that require accurate information delivery.
[0081] In one possible implementation, after the step of sequentially outputting and displaying each of the answer fragments, the method further includes: Step G10: In response to an audio output request for the target response segment, the target response segment is converted into an audio signal; After the terminal device sequentially displays each answer segment, the user can request audio output for any of the displayed answer segments. For example, the user can click or long-press the dialog box corresponding to the answer segment and select the "Read Aloud" or "Voice Broadcast" option; or specify the target answer segment via voice command (such as "Read aloud what Dr. Bear said"). In response to the request, the terminal device converts the text content of the target answer segment into an audio signal.
[0082] In practice, a built-in or cloud-based Text-to-Speech (TTS) module can be used. The TTS module selects an appropriate voice style (such as lively, calm, or childlike) based on the personality or preset voice parameters of the NFC doll to which the target response belongs, synthesizing the text into a natural and fluent audio signal. If the terminal device has pre-recorded a dedicated voice library for each doll, the corresponding voice can be directly matched to enhance character recognition.
[0083] Step G20: Identify the NFC doll corresponding to the target answer fragment as the target NFC doll and obtain the location information of the target NFC doll; Based on the NFC doll identifier associated with the target response fragment, the doll is identified as the target NFC doll, and its current location information is obtained. The location information can be three-dimensional spatial coordinates (such as x, y, z values relative to the terminal device or NFC reader) or polar coordinates (azimuth, pitch, distance).
[0084] In specific implementations, location information can be acquired in several ways: If the NFC reader supports ranging or Angle of Arrival (AoA) positioning technology based on Received Signal Strength Indicator (RSSI), the terminal device can obtain the estimated position of the doll relative to the reader; if the system is equipped with an Ultra Wide Band (UWB) or Bluetooth angle of arrival module, higher accuracy location data can be obtained; in AR / VR scenarios, users can place the NFC doll at a specific location in the real environment, and the terminal device can track the coordinates of the doll's placement point in real time using a camera or spatial positioning sensor. If real-time location cannot be obtained, the terminal device can also use a default location (such as 1 meter directly in front of the terminal device) or prompt the user to manually specify a location.
[0085] Step G30: Based on the location information and the preset listener position, perform spatial audio rendering on the audio signal to obtain a spatial audio signal; Based on the acquired target NFC doll location information and the preset listener position, the generated audio signal is spatially rendered to obtain a spatial audio signal. The preset listener position is usually the position of the terminal device itself or the center position of the user's head, which can be obtained in real time through the six degrees of freedom tracking system of the head-mounted display in AR / VR headsets.
[0086] In practice, spatial audio rendering employs head-related transfer function (HRT) technology. First, the azimuth, pitch, and distance of the target doll relative to the listener are calculated. Then, based on these spatial parameters, the original audio signal is filtered and amplified to simulate the effect of sound propagating from a specific direction to both ears. If the listener's position changes over time (e.g., the user turns their head or moves), the terminal device dynamically updates the rendering parameters to ensure the sound direction aligns with the visual scene. In AR / VR environments, distance attenuation and early reflections can be further simulated to enhance immersion.
[0087] Step G40: Play the spatial audio signal.
[0088] The terminal device plays the generated spatial audio signal through its audio output unit (such as a built-in speaker, headphone jack, or Bluetooth headset). The sound heard by the user appears to be coming from the actual location of the target NFC doll, thus providing a more immersive auditory experience.
[0089] In practice, if the terminal device is a mobile phone or tablet, it can play binaural audio processed by HRTF through stereo speakers, and users can obtain a sense of direction by wearing ordinary headphones; if it is an AR / VR headset, it is generally recommended to use in-ear or over-ear headphones to obtain the best spatial positioning effect.
[0090] During playback, the terminal device allows users to adjust the volume, pause, or stop playback. Furthermore, if a user continuously requests audio output for multiple response segments from different locations, the terminal device can render and play them sequentially, with the audio of each segment emanating from the direction of its corresponding doll's position, further enhancing the immersive interactive experience of the multi-character spatial distribution.
[0091] Furthermore, embodiments of this application also propose a dialogue interaction system, referring to... Figure 4 As shown, the dialogue interaction system includes a terminal device with communication connection and at least one near-field communication reading device; The near-field communication reading device is used to identify NFC dolls within the reading area; The terminal device is used to execute the steps of the dialogue interaction method described above.
[0092] refer to Figure 5 This diagram illustrates a structure suitable for implementing near-field communication (NFC) reading devices according to embodiments of this application. The NFC reading devices in these embodiments may include, but are not limited to, NFC card readers. Figure 5 The near-field communication reading device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments in this application. Figure 5 As shown, the near-field communication reading device may include: The NFC read / write module 1001 includes an NFC antenna and its associated radio frequency circuitry, used to generate a radio frequency field to wake up NFC tags within the reading area and receive response signals returned by the tags. The module also incorporates an anti-collision processing unit, used to sequentially acquire the identification information of each tag when multiple tags respond simultaneously, thus avoiding signal conflicts.
[0093] The main control module 1002 can be used as a localized implementation of the aforementioned control unit. It typically uses a microcontroller or embedded processor as the core of the device's operation and is used to execute various logical processes in the aforementioned dialogue interaction method, including determining the target transmission power based on the number of acquired tags, coordinating the collaborative work of various modules, and processing communication protocols.
[0094] The storage module 1003 may include volatile memory (such as RAM) and non-volatile memory (such as Flash). The RAM is used to temporarily store the temporary tag set acquired in each scan, the current signal strength value of each tag, and intermediate data during the calculation process; the Flash is used to persistently store the most recently reported set of active tags, preset threshold parameters, and firmware programs required for device operation.
[0095] The communication module 1004 is used to realize data interaction with the terminal device. It supports at least one of wired or wireless communication methods such as Bluetooth, Wi-Fi, USB or serial port, and is responsible for sending the set of tags that the main control module needs to report to the terminal device after making a decision.
[0096] The power supply module 1005 is used to provide a stable operating voltage for all components of the device. It can be powered by a battery or an external power source to ensure continuous operation of the device in continuous scanning scenarios.
[0097] Although the figures show near-field communication readout devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0098] The dialogue interaction system provided in this application, employing the dialogue interaction method described in the above embodiments, can solve the problem of improving the naturalness of interaction when multiple NFC dolls participate in a dialogue. Compared with the prior art, the beneficial effects of the dialogue interaction system provided in this application are the same as those of the dialogue interaction method provided in the above embodiments, and other technical features of this dialogue interaction system are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0099] 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.
[0100] The above description is merely a specific embodiment 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.
[0101] In addition, to achieve the above objectives, embodiments of this application also provide a 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 dialogue interaction method in the above embodiments.
[0102] The computer-readable storage medium provided in this application embodiment 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 with 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 fibers, 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.
[0103] The aforementioned computer-readable storage medium may be included in the head-mounted device; or it may exist independently and not assembled into the head-mounted device.
[0104] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by a head-mounted device, cause the head-mounted device to perform the process steps of any embodiment of the aforementioned dialogue interaction method.
[0105] 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).
[0106] 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.
[0107] 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 modules themselves.
[0108] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described dialogue interaction method, which can solve the problem of how to improve the naturalness of interaction when multiple NFC dolls participate in dialogue. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the dialogue interaction method provided in the above embodiments, and will not be repeated here.
[0109] Furthermore, embodiments of this application also propose a computer program product, including a computer program that, when executed by a processor, implements the steps of the dialogue interaction method described above.
[0110] The specific implementation of the computer program product in this application is basically the same as the embodiments of the above-described dialogue interaction method, and will not be repeated here.
[0111] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0112] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0113] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software sensor. This computer software sensor is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a head-mounted device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0114] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A dialogue interaction method, characterized in that, The method is applied to a dialogue interaction system, which includes at least one near-field communication reading device, and the dialogue interaction method includes the following steps: In response to a dialogue request, obtain the user's question content; The system acquires the attribute information of the NFC doll identified by the near-field communication reading device, and generates the corresponding answer content for each NFC doll based on the attribute information and the question content. For each of the NFC dolls, semantic segmentation is performed on the response content based on the attribute information of the NFC doll to obtain multiple response fragments; The answer segments are displayed sequentially.
2. The dialogue interaction method as described in claim 1, characterized in that, The step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content includes: Calculate the content relevance between each attribute and the question content; For each NFC doll, if the content relevance corresponding to the NFC doll is greater than or equal to a preset threshold, then the answer content corresponding to the NFC doll is generated based on the attribute information of the NFC doll and the question content. If the relevance of the content corresponding to the NFC doll is less than a preset threshold, then it is determined that the NFC doll will not respond to the current dialogue.
3. The dialogue interaction method as described in claim 2, characterized in that, The step of generating the corresponding answer content for the NFC doll based on the attribute information of the NFC doll and the question content includes: Obtain the external knowledge base associated with the NFC doll; Based on the external knowledge base, the attribute information of the NFC doll, and the question content, the corresponding answer content for the NFC doll is generated.
4. The dialogue interaction method as described in claim 1, characterized in that, The attribute information includes character personality, and the step of sequentially outputting and displaying each of the answer fragments includes: For each NFC doll, the corresponding output speed parameter is obtained based on the character personality of the NFC doll; Each of the NFC doll's response segments is output sequentially according to the output speed parameters, with each response segment displayed as an independent dialog box.
5. The dialogue interaction method as described in claim 1, characterized in that, The step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content includes: For each NFC doll, a preset large language model corresponding to the NFC doll is invoked, and the corresponding answer content for the NFC doll is generated based on the attribute information and the question content.
6. The dialogue interaction method as described in claim 5, characterized in that, The step of performing semantic segmentation on the response content corresponding to each NFC doll, based on the attribute information of the NFC doll, to obtain multiple response fragments includes: For each NFC doll, after the preset large language model generates the corresponding answer content for the NFC doll, semantic segmentation is performed on the answer content based on the attribute information of the NFC doll to obtain multiple answer fragments; The generation, semantic segmentation, and content output of the responses of each NFC doll are performed in parallel.
7. The dialogue interaction method according to any one of claims 1 to 6, characterized in that, After the step of generating the answer content corresponding to each NFC doll based on the attribute information and the question content, the method further includes: Determine whether there are any contradictions among the various answers provided; If a contradiction exists, a corresponding explanation will be generated for the contradictory answer. After each of the aforementioned answer segments has finished being displayed, the explanation content will be displayed.
8. The dialogue interaction method according to any one of claims 1 to 6, characterized in that, After the step of sequentially outputting and displaying each of the answer fragments, the method further includes: In response to an audio output request for a target response segment, the target response segment is converted into an audio signal; The NFC doll corresponding to the target answer fragment is identified as the target NFC doll, and the location information of the target NFC doll is obtained; Based on the location information and the preset listener position, the audio signal is spatially rendered to obtain a spatial audio signal; Play the spatial audio signal.
9. A dialogue interaction system, the dialogue interaction system comprising a terminal device and at least one near-field communication reading device connected in communication; The near-field communication reading device is used to identify NFC dolls within the reading area; The terminal device is used to perform the steps of the dialogue interaction method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a device control program, which, when executed by a processor, implements the steps of the dialogue interaction method as described in any one of claims 1 to 8.