Conversation interaction method and terminal equipment

By extracting and converting the time information in the request text into a preset format from the large model, the problem of inaccurate time information extraction from the large model is solved, and more accurate response information generation is achieved.

CN121234921APending Publication Date: 2025-12-30JUHAOKAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511403844.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

The slot extraction model based on large models has low accuracy in extracting time information in natural language, resulting in the generated response information failing to meet user needs.

Method used

The time information in the request text is extracted using a large-scale model, and the time information is separately judged for fuzzy semantics and converted into different preset time formats to ensure the accuracy and generalization of the generated response information.

Benefits of technology

It improves the accuracy and generalization of time information extraction, ensuring that the generated response information meets user needs and avoiding functional failures or logical errors caused by inputting past times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121234921A_ABST
    Figure CN121234921A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a dialogue interaction method and terminal equipment, and the method comprises the steps: inputting request information inputted by a user into a slot size model, and outputting slot position information of the current round; under the condition that the slot position information of the round comprises time information, if the time information is fuzzy semantic information, converting the time for receiving the request information into preset format time; if the time information is not the fuzzy semantic information, converting the time information into preset format time; updating the time information in the slot position information of the current round; and inputting the request information and the updated slot position information to a reply generation model to generate reply information. According to the embodiment of the invention, the time information in the request text is extracted only by using the slot extraction model, the fuzzy semantic judgment is independently carried out on the time information, and different judgment results are converted into different preset format time, so that the accuracy of time slot extraction can be improved, and the time slot extraction efficiency is improved. Therefore, the reply information generated based on the accurate time meets user requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of dialogue interaction technology, and in particular to a dialogue interaction method and terminal device. Background Technology

[0002] Slot extraction models are a core technology in Natural Language Understanding (NLU), aiming to identify semantic entities (i.e., slots) from user utterances and match them with predefined types to support accurate interaction in dialogue systems. Slot extraction originated from Named Entity Recognition (NER) and was initially implemented in limited domains (such as ticket booking and weather inquiries) using rule templates or statistical methods. With the popularization of task-oriented dialogue systems, traditional methods face bottlenecks such as weak generalization ability and high annotation costs. For example, rule templates require manual design and are difficult to cover diverse expressions, while statistical models rely on large-scale labeled data. The urgent need for flexibility and multi-task support in scenarios such as intelligent customer service robots has driven the development of slot extraction models based on large models.

[0003] While the slot extraction model based on a large model has improved its generalization ability overall, the accuracy of extracting time information by the large model is not high due to the diverse ways of expressing time in natural language. As a result, the response information generated based on the extracted time information cannot meet the user's needs. Summary of the Invention

[0004] Some embodiments of this application provide a dialogue interaction method and terminal device, which can extract the time text in the request text using only the slot model, then perform fuzzy semantic determination on the time text separately, and convert it into different preset time formats according to different determination results. This can improve the accuracy of time slot extraction, thereby ensuring that the reply information generated based on accurate time meets the user's needs.

[0005] Firstly, some embodiments of this application provide a dialogue interaction method, including:

[0006] Receive user input request information;

[0007] Input the request information into the slot-lifting model, and output the slot information corresponding to the request information in this round through the slot-lifting model;

[0008] If the slot information in this round includes time information, and the time information is fuzzy semantic information, the time of receiving the request information will be converted into a preset format time. The preset format time includes a time point or time period represented by a numerical value. Fuzzy semantic information includes time information that cannot be clearly converted into a time point or time period.

[0009] If the time information is not ambiguous semantic information, convert the time information into a preset format time.

[0010] The time information in the current slot information is updated based on a preset format.

[0011] The request information and the updated slot information for this round are input into the response generation model to generate response information corresponding to the request information.

[0012] The above technical solution has the following advantages or beneficial effects: by using only the large model to extract time information from the request information, and then separately judging the fuzzy semantics of the time information, and converting it into different preset time formats according to different judgment results, the accuracy and generalization of time information extraction can be improved, thereby ensuring that the reply information generated based on accurate time meets the user's needs.

[0013] In some embodiments, if the time information is not ambiguous semantic information, the step of converting the time information into a preset format time includes:

[0014] If the time information is not ambiguous semantic information, determine whether the time represented by the time information is earlier than the time when the request information was received;

[0015] If the time corresponding to the time information is earlier than the time when the request information is received, then preset information is added to the time information so that the time corresponding to the time information is later than the time when the request information is received.

[0016] Convert the time information after adding preset information to the preset time format.

[0017] The above technical solution has the following advantages or beneficial effects: by judging whether the time information is earlier than the time of receiving the request information, and automatically correcting the expired or past time, it ensures that the final generated time is always after the current moment, avoiding functional failure or logical error caused by inputting past time.

[0018] In some embodiments, the step of inputting request information into the slot allocation model, and then outputting the slot information corresponding to the request information for the current round through the slot allocation model, includes:

[0019] Retrieve historical conversation information, which includes the previous round's slot information and the most recent round's dialogue information;

[0020] Input the request information and historical session information into the slot allocation model, so that the slot allocation model can output the current round slot information corresponding to the request information and historical session information.

[0021] The above technical solution has the following advantages or beneficial effects: using the previous round's slot information and the most recent round's dialogue information as historical conversation information can reduce the difficulty for the model to understand complex information and significantly improve the model's slot extraction accuracy in dialogue scenarios. Using the previous round's slot information as context input also helps the model determine which slots have been filled and which need to be updated or retained, avoiding repeated extraction or loss of existing information, and ensuring the continuity and logical consistency of slot states in multi-round interactions.

[0022] In some embodiments, the step of inputting request information and historical session information into the slot allocation model, and outputting the current slot information corresponding to the request information and historical session information through the slot allocation model, includes:

[0023] Perform intent recognition on the request information to obtain the user's intent;

[0024] Input the request information and historical session information into the slot model corresponding to the user intent, so that the slot model can output the current slot information corresponding to the request information and historical session information.

[0025] The above technical solution has the following advantages or beneficial effects: Each slot-picking model specializes in a certain type of intent, and during training, it has learned the domain-specific slot structure, semantic patterns, and contextual dependencies. During inference, it can more accurately identify keywords, omitted expressions, and referential relationships related to the intent, reducing mispicking or omissions.

[0026] In some embodiments, the step of inputting request information and historical session information into the slot allocation model, and outputting the current slot information corresponding to the request information and historical session information through the slot allocation model, includes:

[0027] Perform intent recognition on the request information to obtain the user's intent;

[0028] The request information and historical session information are populated into the prompt word template corresponding to the user intent to obtain the prompt word;

[0029] Input the prompt words into the slot request model so that the slot information for the current round can be output by the slot request model, which will provide the request information and historical session information.

[0030] The above technical solution has the following advantages or beneficial effects: it only requires maintaining a single general prompting model, and can adapt to different intents by changing the prompt word template, significantly reducing the number of models and operational complexity, making it suitable for scenarios with diverse intent types and frequent addition of new intents. Furthermore, adding a new intent only requires designing a corresponding prompt word template, without the need to retrain or deploy a new model.

[0031] In some embodiments, if the time information is ambiguous semantic information, the step of converting the time of receiving the request information into a preset format time includes:

[0032] If the time information matches the preset keywords in the rule matching, the time of receiving the request information will be converted into a preset format time.

[0033] The above technical solution has the following advantages or beneficial effects: Using a pre-set keyword library for matching, the semantic type of time information can be quickly determined. Constructing a comprehensive fuzzy time keyword library, addressing the non-pre-set, colloquial, and ambiguous time expressions commonly used by users in daily conversations, better understands natural human expression habits and enhances the robustness and intuitiveness of semantic parsing.

[0034] In some embodiments, the step of updating the slot information for the current round based on a preset format time includes:

[0035] The preset format time is validated using regular expression matching methods;

[0036] If the verification is successful, the slot information for this round will be updated based on the preset format time.

[0037] The above technical solution has the following advantages or beneficial effects: only the preset time that has been strictly verified is used to update the slot information in this round, ensuring that the slot stores a valid time value, and the regular expression matching calculation overhead is small and the execution speed is fast.

[0038] In some embodiments, the step of training a large slot extraction model includes:

[0039] The basic model is trained using the direct preference optimization training method and training data to obtain the large model. The training data includes historical dialogue samples, positive examples, and negative examples.

[0040] The above technical solution has the following advantages or beneficial effects: the direct preference optimization training method results in more stable training and faster convergence. Historical dialogue samples provide rich contextual information, and combined with positive and negative example comparison training, the model can better distinguish between correct and incorrect slot information.

[0041] In some embodiments, the step of constructing training data includes:

[0042] Obtain candidate historical dialogue samples, which include at least one round of dialogue information;

[0043] If the number of dialogue rounds of the candidate historical dialogue sample is greater than the preset number of rounds, then obtain the slot information of the previous round and the dialogue information of the current round.

[0044] The slot information from the previous round and the dialogue information from the current round are identified as historical dialogue samples;

[0045] Obtain the slot information for this round of dialogue and identify this slot information as a positive example;

[0046] Modify the slot information for this round, and designate the modified slot information for this round as a negative example.

[0047] The above technical solution has the following advantages or beneficial effects: By using the above method, a complete set of historical dialogue information can be split into multiple historical dialogue samples composed of previous round slot information and current round dialogue information, which can avoid the problem of low accuracy after model training due to the increase of dialogue rounds and multiple changes in slot information.

[0048] Secondly, some embodiments of this application provide a terminal device, including:

[0049] The communication module is configured to establish a communication connection with the display device;

[0050] The processing module is configured as follows:

[0051] Receive user input request information;

[0052] Input the request information into the slot-lifting model, and output the slot information corresponding to the request information in this round through the slot-lifting model;

[0053] If the slot information in this round includes time information, and the time information is fuzzy semantic information, the time of receiving the request information will be converted into a preset format time. The preset format time includes a time point or time period represented by a numerical value. Fuzzy semantic information includes time information that cannot be clearly converted into a time point or time period.

[0054] If the time information is not ambiguous semantic information, convert the time information into a preset format time.

[0055] The time information in the current slot information is updated based on a preset format.

[0056] The request information and the updated slot information for this round are input into the response generation model to generate response information corresponding to the request information.

[0057] The above technical solution has the following advantages or beneficial effects: by using only the large-scale model to extract the time text from the request text, and then separately performing fuzzy semantic judgment on the time text, and converting it into different preset time formats according to different judgment results, the accuracy and generalization of time information extraction can be improved, thereby ensuring that the reply information generated based on accurate time meets the user's needs.

[0058] This application embodiment can, after receiving user-inputted request information, input the request information into a slot-feeding model, so that the slot-feeding model can output the current round slot information corresponding to the request information. If the current round slot information includes time information, and if the time information is fuzzy semantic information, the time of receiving the request information is converted into a preset format time. The preset format time includes a time point or time period represented by a numerical value; fuzzy semantic information includes time information that cannot be explicitly converted into a time point or time period. If the time information is not fuzzy semantic information, the time information is converted into a preset format time. The time information in the current round slot information is updated based on the preset format time, and then the request information and the updated current round slot information are input into a response generation model to generate response information corresponding to the request information. This application embodiment can extract the time information from the request information using only the slot-feeding model, then separately determine the fuzzy semantics of the time information, and convert it into different preset format times according to different determination results. This can improve the accuracy and generalization of time information extraction, thereby ensuring that the response information generated based on accurate time meets user needs. Attached Figure Description

[0059] 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, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a schematic diagram illustrating the operation scenarios between a display device and a server provided in some embodiments of this application;

[0061] Figure 2 This is a schematic diagram of the hardware configuration of a display device provided in some embodiments of this application;

[0062] Figure 3 A flowchart illustrating a dialogue interaction method provided in some embodiments of this application;

[0063] Figure 4 A flowchart illustrating a training data construction method provided in some embodiments of this application;

[0064] Figure 5 A flowchart illustrating a method for generating historical dialogue samples provided in some embodiments of this application;

[0065] Figure 6 A flowchart illustrating a method for outputting slot information in this round, provided for some embodiments of this application;

[0066] Figure 7A flowchart illustrating another method for outputting slot information in this round, provided in some embodiments of this application;

[0067] Figure 8 A flowchart illustrating a method for obtaining time slot information provided in some embodiments of this application;

[0068] Figure 9 A flowchart illustrating another dialogue interaction method provided in some embodiments of this application;

[0069] Figure 10 This is a timing diagram of a dialogue interaction method provided in some embodiments of this application. Detailed Implementation

[0070] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.

[0071] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0072] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0073] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0074] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0075] In this embodiment, the terminal device is a device that inputs programs and data to a computer or receives processing results from the computer via communication facilities. The terminal device is typically located in a convenient location where it can connect to a remote computer using communication facilities. It mainly consists of a communication interface control device and dedicated or selected input / output devices. For example, the terminal device may be a server 400 or a display device 200, etc.

[0076] In this embodiment, display device 200 generally refers to a device with screen display and data processing capabilities. For example, display device 200 includes, but is not limited to, smart TVs, mobile terminals, computers, monitors, advertising screens, wearable devices, virtual reality devices, augmented reality devices, etc.

[0077] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a server, provided in some embodiments of this application. For example... Figure 1 The diagram shows that a user can operate the display device 200 via touch operation, a mobile terminal 300, and a control device 100. The control device 100 receives voice control commands or voice data input by the user and sends them to the display device 200, enabling the display device 200 to recognize and respond to the voice control commands or voice data. For example, the control device 100 can be a remote control or a gamepad. The mobile terminal 300 includes mobile phones, tablets, laptops, and smartwatches.

[0078] The mobile terminal 300 can function as a control device for human-computer interaction between the user and the display device 200. It can also function as a communication device for establishing a communication connection with the display device 200 and exchanging data. In some embodiments, the mobile terminal 300 can install software applications with the display device 200 to establish a connection and communicate via a network communication protocol, achieving one-to-one control operations and data communication. Alternatively, voice control commands or voice data received on the mobile terminal 300 can be transmitted to the display device 200 to control the display device 200.

[0079] In some embodiments, the mobile terminal 300 or other electronic devices may also simulate the functions of the control device 100 by running an application that controls the display device 200.

[0080] like Figure 1 The diagram also shows that the display device 200 communicates with the server 400 via various communication methods. This allows the display device 200 to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.

[0081] Display device 200 can provide broadcast television reception function, and can also be equipped with intelligent network television function that provides computer support, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.

[0082] Figure 2 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of display device 200.

[0083] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.

[0084] In some embodiments, detector 230 is used to acquire signals from the external environment or to interact with the outside world. For example, detector 230 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.

[0085] In some embodiments, the display 260 includes display function components for presenting images and driving components for driving image display. The display 260 is used to receive and display image signals output from the controller 250. For example, the display 260 can be used to display video content, image content, menu control interface components, and user control UI interfaces, etc.

[0086] In some embodiments, the communication device 220 is a component used to communicate with external devices or the communication module of the server 400 according to various communication protocol types. The display device 200 may have multiple communication devices 220 depending on the supported communication methods. For example, when the display device 200 supports wireless network communication, it may have a communication device 220 with WiFi functionality. When the display device 200 supports Bluetooth connection communication, it needs to have a communication device 220 with Bluetooth functionality.

[0087] The communication device 220 enables the display device 200 to communicate with external devices or the communication module of the server 400 via wireless or wired connections. Wired connections can connect the display device 200 to external devices using data cables, interfaces, or other components. Wireless connections can connect the display device 200 to external devices via wireless signals or wireless networks. The display device 200 can establish a direct connection with external devices or indirectly through gateways, routers, or other connection devices.

[0088] In this embodiment, the display device 200 can receive voice data or request text input by the user and send the voice data or request text to the server 400. The server 400 can recognize the voice data to obtain the request text. Then, it obtains historical session information and inputs the request text and historical session information into the slot generation model to obtain the current round of slot information. If the slot information includes a time slot, the slot generation model extracts the time information and does not need to convert the time format. If the time information is fuzzy semantic information, the time of receiving the request text or voice data is converted to a preset format time. If the time information is not fuzzy semantic information, the time information is converted to a preset format time. The time information of the current round of slot information is updated based on the preset format time. Then, the request text and the current round of slot information are input into the response generation model to generate response information corresponding to the request text, and the response information is sent to the display device 200. The display device 200 displays the response information.

[0089] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.

[0090] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0091] In some embodiments, a user can input user commands through a graphical user interface (GUI) displayed on a display 260, and the user input interface receives user input commands through the graphical user interface (GUI).

[0092] In some embodiments, the audio output device 270 can be a built-in speaker of the display device 200 or an external audio output device connected to the display device 200. For the external audio output device connected to the display device 200, the display device 200 may also be provided with an external audio output terminal, through which the audio output device can be connected to the display device 200 to output sound from the display device 200.

[0093] In some embodiments, the user input interface 280 can be used to receive instructions or voice data from user input.

[0094] Slot extraction models are a core technology in natural language understanding, aiming to identify semantic entities (i.e., slots) from user utterances and match them with predefined types to support accurate interaction in dialogue systems. Slot extraction originated from named entity recognition and was initially implemented in limited domains (such as ticket booking and weather inquiries) using rule templates or statistical methods. With the proliferation of task-oriented dialogue systems, traditional methods face bottlenecks such as weak generalization ability and high annotation costs. For example, rule templates require manual design and are difficult to cover diverse expressions, while statistical models rely on large-scale labeled data. The urgent need for flexibility and multi-task support in scenarios such as intelligent customer service robots has driven the development of slot extraction models based on large models.

[0095] While the slot extraction model based on a large model has improved its generalization ability overall, the accuracy of extracting time information by the large model is not high due to the diverse ways of expressing time in natural language. As a result, the response information generated based on the extracted time information cannot meet the user's needs.

[0096] To improve the accuracy of time information extraction and generate more accurate response information, this application provides a dialogue interaction method applicable to terminal devices. This application is suitable for task-oriented dialogues. Taking a server 400 as an example, the server 400 includes a communication module and a processing module. The communication module is configured to establish a communication connection with a display device 200. Figure 3 As shown, the processing module is configured to perform the following steps:

[0097] Step S301: Receive request information input by the user. The request information may include information in the form of text or voice.

[0098] In some embodiments, the implementation of receiving user-input request information may include: the sound collector of the display device 200 can collect ambient sound in real time and identify the collected ambient sound. If the identified ambient sound includes a voice wake-up word, a wake-up prompt tone can be played, and the voice data input by the user can be collected through the sound collector. The display device 200 can send the voice data to the server 400, where the server 400 identifies the voice data to obtain the request text.

[0099] In some embodiments, the implementation of the display device 200 establishing a Bluetooth connection with the control device 100 and receiving user input request information may further include: after detecting that the user presses the voice key on the control device 100, the display device 200 displays a prompt page to start collecting voice data, the control device 100 can collect the voice data input by the user and send the voice data to the display device 200 via Bluetooth connection, the display device 200 then sends the voice data to the server 400, and the server 400 recognizes the voice data to obtain the request text.

[0100] In some embodiments, the implementation of receiving user input request information may further include: In response to a user input instruction to open a dialog box page, the display device 200 controls the display to show the dialog box page, which includes a history dialog box and an input box. The history dialog box is used to display historical conversations, and the input box is used to display the current user input information. The system receives the request text entered by the user in the input box and sends the request text to the server 400. The dialog box page may be an intelligent customer service dialogue page, where intelligent customer service is used to handle services such as equipment installation and equipment warranty.

[0101] In some embodiments, the implementation of receiving user-input request information may further include: after the display device 200 responds to a user sending an audio call request or receives an audio call request from a peer, it establishes an audio call connection. During the audio call, after receiving voice data input by the user, the display device 200 sends the voice data to the server 400, where the server 400 recognizes the voice data to obtain the request text. The peer is an intelligent customer service system.

[0102] For user-inputted query information, whether it comes from telephone voice messages or text messages from the application, it ultimately needs to be normalized into request text. The request text needs to undergo a request preprocessing process, which mainly includes rewriting the request text and decomposing the request text, including but not limited to rewriting referential expressions in combination with context, and decomposing instructions to be more suitable for retrieval-augmented generation (RAG), etc.

[0103] After receiving the request text, the server (400) needs to rewrite and decompose it. The request text may contain synonyms, colloquialisms, omissions, inversions, etc., which can easily lead to misunderstandings if processed directly. Rewriting allows for the pre-defined colloquial expressions, making it easier to determine the precise user intent. The request text may contain multiple independent intents, which need to be decomposed into multiple executable tasks.

[0104] Step S302: Input the request information into the slot-lifting model, so that the slot information corresponding to the request information in this round can be output through the slot-lifting model.

[0105] In some embodiments, the step of inputting request information into a slot-raising model to output the current slot information corresponding to the request information through the slot-raising model includes: obtaining historical session information, and then inputting the request information and historical session information into the slot-raising model to output the current slot information corresponding to the request information and historical session information through the slot-raising model.

[0106] Integrating historical session information into context mainly involves all context information of the user's current conversation. This may involve determining changes in address information and installation time information in multiple rounds of interaction, all of which need to be obtained by integrating all session information.

[0107] In some embodiments, after obtaining the request text, the server 400 may determine whether the request text depends on context information. If the request text depends on context information, historical session information is obtained, and then the request text and historical session information are input into the slot allocation model to output the current slot information corresponding to the request text and historical session information. If the request text does not depend on context information, historical session information does not need to be obtained, and the request text is directly input into the slot allocation model to output the current slot information corresponding to the request text.

[0108] One implementation method for determining whether the request text depends on contextual information could be to determine whether the request text includes a pronoun, whether the request text omits a subject or predicate, or whether the request text is a follow-up question to the previous response, etc.

[0109] In some embodiments, historical session information includes conversations that occurred between the user and the system before the request information was received. For example, historical session information can be obtained through a session identifier.

[0110] In some embodiments, historical session information includes the previous round's slot information and the dialogue information from the most recent preset round. Each time a request is received or a response is generated, the previous round's slot information and the dialogue information from the most recent preset round are updated and saved. Upon receiving another request or generating another response, the previous round's slot information and the dialogue information from the most recent preset round can be directly retrieved. The dialogue information from the most recent preset round can be the dialogue information from the most recent round.

[0111] In some embodiments, the base model is trained using the Direct Preference Optimization (DPO) training method to obtain the large model.

[0112] The DPO training process includes:

[0113] a) Data collection mainly includes triplet data (x, y, z), where x is a historical dialogue sample, and y and z represent the better and worse responses (positive and negative examples) labeled by humans, respectively.

[0114] b) Initial strategy: Use a pre-trained language model (such as Qwen3 8B) as a reference strategy.

[0115] c) Optimization process: For each batch of data, calculate the policy probability ratio of y and z, substitute it into the loss function, and update the policy parameters through gradient descent.

[0116] In some embodiments, user dialogue data may consist of multiple rounds, with each round containing a question-and-answer pair. However, in actual interactions, the slot information extracted in the previous round often changes in the next. If the entire dialogue content is used as the training dataset, especially as the number of dialogue rounds increases, the slot extraction model will not perform well. For example, if all dialogue information is used to construct the dataset for training, the accuracy of the model after training will be low when multiple time changes are involved.

[0117] Training data construction is key to improving model performance. For example... Figure 4 As shown, an implementation method for constructing the training data may include the following steps:

[0118] Step S401: Obtain candidate historical dialogue samples.

[0119] The candidate historical dialogue samples include at least one round of dialogue information. These samples can be obtained from real user-system dialogue databases, high-quality dialogues written or annotated by professionals, or simulated dialogues automatically generated using large models.

[0120] Step S402: Determine whether the number of dialogue rounds in the candidate historical dialogue sample is greater than the preset number of rounds. For example, the preset number of rounds is 2 rounds.

[0121] If the number of dialogue rounds of the candidate historical dialogue sample is greater than the preset number of rounds, then step S403 is executed: obtain the slot information of the previous round and the dialogue information of the current round, and determine the slot information of the previous round and the dialogue information of the current round as historical dialogue samples.

[0122] If the number of dialogue rounds of the candidate historical dialogue sample is less than or equal to the preset number of rounds, then proceed to step S404: determine the original dialogue information as the historical dialogue sample.

[0123] In some embodiments, the method for generating historical dialogue samples can be as follows: Figure 5As shown, a set of candidate historical dialogue samples is input sequentially according to the dialogue rounds. For example, input them sequentially as the first round, the second round, ..., the Nth round. Then, it is determined whether the number of dialogue rounds is greater than 2. If the number of dialogue rounds is greater than 2, the slot information of the previous round and the current round of dialogue are obtained. If the number of dialogue rounds is less than or equal to 2, the original dialogue is retained. Then, the slot information is extracted using a slot extraction model, and the extracted slot information is manually verified to ensure the accuracy of the slot information in the current round. The slot information and dialogue information of the current round are updated and saved to the model training data. Then, it is determined whether the dialogue has ended. If the dialogue has ended, the construction of the historical dialogue samples is complete. If the dialogue has not ended, the set of candidate historical dialogue samples continues to be input according to the dialogue rounds.

[0124] For example, the candidate historical dialogue sample, i.e., the original dialogue information, is as follows:

[0125] {"role":"user",

[0126] "text":"Installing Air Conditioner",},

[0127] {"role":"assistant",

[0128] "text":"Understood. Please provide the specific installation address, including the province, city, and district / county levels, as well as the specific community or house number.},

[0129] {"role":"user",

[0130] "text":"No. xxx, xx Road, xx District, xx City",},

[0131] {"role":"assistant",

[0132] "text":"Then please provide your expected arrival time, for example, tomorrow morning,",},

[0133] {"role":"user",

[0134] "text":"Let's do it the afternoon after tomorrow",},

[0135] {"role":"assistant",

[0136] "text":"Okay, please confirm the following installation information. You have scheduled an air conditioner installation at: No. xx, xx Road, xx District, xx City. Your desired appointment time is: August 2nd, 2025, afternoon. Phone number: 123****4567. Is there anything wrong with the installation information?"

[0137] {"role":"user",

[0138] "text":"Oh, I forgot, I have something else planned for the day after tomorrow. Could you reschedule it for next Saturday?"

[0139] {"role":"assistant",

[0140] Sorry, next Saturday is fully booked. Can I reschedule you for next Sunday?

[0141] {"role":"user",

[0142] "text":"Okay then, how about next Sunday afternoon?",}

[0143] {"role":"assistant",

[0144] "text":"Okay, please confirm the following installation information. You have scheduled an air conditioner installation at: No. xxx, xx Road, xx District, xx City. Your desired appointment time is: August 10, 2025, afternoon. Phone number: 123****4567. Is there anything wrong with the installation information?"

[0145] {"role":"user",

[0146] "text":"No problem",}

[0147] The original dialogue information described above can be broken down into the following multiple historical dialogue samples using the above method.

[0148] Historical Dialogue Sample 1:

[0149] {"role":"user",

[0150] "text":"Installing Air Conditioner",},

[0151] {"role":"assistant",

[0152] "text":"Understood. Please provide the specific installation address, including the province, city, and district / county levels, as well as the specific community or house number.},

[0153] {"role":"user",

[0154] "text":"No. xxx, xx Road, xx District, xx City",},

[0155] {"role":"assistant",

[0156] "text":"Then please provide your expected arrival time, for example, tomorrow morning,",},

[0157] Historical Dialogue Sample 2:

[0158] {"role":"system",

[0159] "text":"###

Historical Slot Information

[0160] {"role":"user",

[0161] "text":"###

Recent User Input

[0162] {"role":"assistant",

[0163] "text":"###

Recent System Reply

[0164] Historical Dialogue Sample 3:

[0165] {"role":"system",

[0166] "text":"###

Historical Slot Information

[0167] {"role":"user","text":"###

Recent User Input

[0168] {"role":"assistant",

[0169] "text":"###

Recent System Reply

[0170] Historical Dialogue Sample 4:

[0171] {"role":"system",

[0172] "text":"###

Historical Slot Information

[0173] {"role":"user",

[0174] "text":"###

Recent User Input

[0175] {"role":"assistant",

[0176] "text":"###

Recent System Reply

[0177] Historical Dialogue Sample 5:

[0178] {"role":"system",

[0179] "text":"###

Historical Slot Information

[0180] "text":"###

Recent User Input

[0181] Step S405: Obtain the current slot information of the current round of dialogue information, and determine the current slot information as a positive example.

[0182] The current round slot information is obtained by inputting the current round's dialogue information and the previous round's slot information into the slot-raising model, outputting slot information, and obtaining it through manual verification. For example, if the current round slot information for historical dialogue sample 1 obtained through the slot-raising model and manual verification is: "Household air conditioner, No. xxx, xx Road, xx District, xx City", then "Household air conditioner, No. xxx, xx Road, xx District, xx City" is selected as a positive example (chosen) for historical dialogue sample 1.

[0183] Step S406: Modify the slot information for this round and determine the modified slot information for this round as a negative example.

[0184] For example, if the current slot information of historical dialogue sample 1 is: "Household air conditioner, No. xxx, xx Road, xx District, xx City", and the current slot information is changed to "Central air conditioner, No. xxx, xx Road, xx District, xx City", then "Central air conditioner, No. xxx, xx Road, xx District, xx City" will be identified as a negative example (rejected) of historical dialogue sample 1.

[0185] In this embodiment, a rapid iteration approach is adopted, in which positive and negative examples are constructed for each problem in each round of evaluation, which effectively improves the efficiency of data collection and the efficiency of model iteration training, and quickly aligns with the target task.

[0186] Traditional dialogue data construction has the following problems in slot extraction model training: (1) When the number of dialogue rounds increases, the accuracy of slot extraction by the model decreases, and the model is highly dependent on the ability to understand long texts. (2) When there are multiple negative intentions in the dialogue rounds, the accuracy of slot extraction by the model decreases. (3) When there are multiple scenarios in the dialogue rounds where the intention jumps out and then jumps back in, the accuracy of slot extraction by the model decreases.

[0187] The model training data construction proposed in this application simplifies complex multi-turn dialogue data. By constructing previous-turn slot information plus recent dialogue information (recent user input + recent system response), the complex, lengthy, and unstructured multi-turn dialogue history is transformed into a refined, structured input feature rich in key semantic information. This reduces the difficulty for the model to understand complex information and improves the model's inference speed. In cases with multiple negation intentions, the results corresponding to previous negation intentions can be directly obtained from the previous-turn slot information; only the negation intentions in the current turn's dialogue information need to be processed to obtain the current-turn slot information. In scenarios with multiple intention exits and re-entries, this application can retain historical slot information to prevent the loss of slot information due to intention exits and re-entries. This application embodiment can significantly improve the model's slot extraction accuracy in dialogue scenarios.

[0188] The original method inputs all dialogue information preceding the request text as prompts into the large slot-picking model, potentially exceeding 10,000 tokens. This lengthy input leads to low efficiency, high cost, and a response time of 2-3 seconds. This embodiment addresses this issue by using direct preference optimization to train a lightweight large model. Compared to the large-parameter model + prompts approach, the response time is reduced to approximately 0.8 seconds, and the prompt input is reduced to 600 tokens, thus resolving the problems of lengthy prompts, low efficiency, and high cost associated with the original slot-picking method.

[0189] In some embodiments, such as Figure 6 As shown, one implementation method for inputting request information and historical session information into the slot allocation model, and outputting the current slot information corresponding to the request information and historical session information through the slot allocation model, may include:

[0190] Step S601: Perform intent recognition on the request information to obtain the user intent.

[0191] In some embodiments, in a single-turn dialogue scenario, i.e. without relying on context, the request information is input into the intent recognition model so that the intent recognition model can output the user intent corresponding to the request information.

[0192] In some embodiments, in multi-turn dialogue scenarios, i.e., when context is required, request information and historical session information are input into the intent recognition model so that the intent recognition model can output the user intent corresponding to the request information and historical session information.

[0193] Step S602: Input the request information and historical session information into the slot model corresponding to the user intent, so as to output the current slot information corresponding to the request information and historical session information through the slot model.

[0194] Different slot request models are pre-trained for different user intents or task requirements. For example, for a device installation task, information on 10 slots closely related to device installation can be extracted. This slot information includes product information, address information, and time information. Then, the slot request model is trained using a direct preference optimization training method and historical dialogue samples related to device installation to make the model applicable to user intents related to device installation. After recognizing the user intent as device installation, the request text and historical conversation information are input into the slot request model, which outputs the slot information for the current round.

[0195] In some embodiments, such as Figure 7 As shown, one implementation method for inputting request information and historical session information into the slot allocation model, and outputting the current slot information corresponding to the request information and historical session information through the slot allocation model, may include:

[0196] Step S701: Perform intent recognition on the request information to obtain the user intent.

[0197] Step S702: Fill the request information and historical session information into the prompt word template corresponding to the user intent to obtain the prompt word.

[0198] Step S703: Input the prompt word into the slot model so that the slot model can output the current slot information corresponding to the request information and historical session information.

[0199] Cue word templates play a crucial role in natural language processing, especially when using large language models for task processing. Their core function is to organize raw input data and task instructions in a structured and standardized manner, guiding the model to accurately understand the task objective and generate expected output.

[0200] A large-scale slot extraction model is trained using a direct preference optimization training method and training data to make it suitable for slot extraction. Different prompt word templates are set for different user intentions or different task requirements. For example, for a device installation task, the prompt word template can describe the need to extract information on 10 slots closely related to device installation. After recognizing the user intention as device installation, the request information and historical session information are filled into the prompt word template to obtain prompt words. Then, the prompt words are input into the large-scale slot extraction model to output the slot information for this round.

[0201] For example, the prompt message used for scheduling equipment installation is as follows:

[0202] (1) Role Definition: Define the character, main tasks, and format requirements for input and output information for the slot extraction model. system_prompt="'

[0203] #Role

[0204] You are now a conversation content extractor.

[0205] #Task

[0206] Based on the user's latest input and historical dialogue content, and following the output example, extract the user's scheduled device installation information (product_info), installation address (address_info), installation time information (date_info), and extract the summary (user_info_summary).

[0207] User appointment installation information (product_info) includes:

[0208] -product_name: The name of the product category that the user needs to install.

[0209] -product_brand: The brand name that the user needs to install.

[0210] -pruduct_install_mode: The installation method selected by the user.

[0211] -product_num: The number of products the user needs to install.

[0212] ###User scheduled installation address information address_info includes:

[0213] -province: Includes the name of the province, autonomous region, municipality, or special administrative region.

[0214] -city: Includes the names of prefecture-level cities, autonomous prefectures, and leagues.

[0215] -county: Includes the names of municipal districts, county-level cities, autonomous counties, banners, autonomous banners, forest areas, and special zones.

[0216] -street: Includes the name of the township, ethnic township, town, and street.

[0217] -community: Includes detailed information such as village, hamlet, residential area, community, building, unit, and room number.

[0218] ### User scheduled installation time information (date_info) includes:

[0219] -book_desc

[0220] #limit

[0221] - Only output valid JSON format data, strictly follow the output example format, and do not output dialog information;

[0222] - Output example (the specific content is all hypothetical, XX is a pronoun, the actual output should be based on the content of the user's dialogue).

[0223] While training a large language model using DPO preference optimization can solve problems such as semantic generalization, multiple negations in multi-turn complex dialogues, and multiple intent jumps, its performance is not very good for highly generalized and complex user input. This is due to the illusion inherent in the large model itself. If the large model is asked to directly extract time information, such as when a user says "the afternoon of the day after tomorrow," the probability of the large model parsing incorrectly is very high. This is determined by the mechanism of the large model itself; it is not good at handling precise time, suffers from severe illusions, cannot predict extraction errors, and cannot establish post-processing mechanisms, resulting in a serious impact on business operations.

[0224] In this embodiment, the large slot extraction model does not directly convert the preset time format when extracting time slot information; instead, it directly extracts the text used to represent the time. For example, an existing large slot extraction model extracts the time field data as "September 10, 2025, morning." However, the large slot extraction model in this embodiment extracts the time field data as "tomorrow morning." The model extracts the user's original request information, effectively preventing the illusion of time extraction in large models, supporting various generalized user expressions, and delegating the conversion task to subsequent traditional (Natural Language Processing, NLP) smaller models.

[0225] In some embodiments, the slot information in this round is obtained by integrating the slot information extracted from the request information with the slot information in the previous round. If the type of the slot information in the previous round is different from the type of the slot information extracted from the request information, the slot information extracted from the request information is added to the slot information in the previous round to obtain the slot information in this round. If the type of the slot information in the previous round is different from the type of the slot information extracted from the request information, the slot information extracted from the request information replaces the slot information of the same type in the slot information in the previous round to obtain the slot information in this round.

[0226] In some embodiments, the current round of slot information is based on slot information extracted from the request information. After updating the current round of slot information based on a preset format time, integrated slot information can be obtained by integrating the current round of slot information with the previous round of slot information. Then, the request information and the integrated slot information are input into the response generation model to generate response information corresponding to the request information.

[0227] Step S303: Determine whether the slot information for this round includes time information.

[0228] The time information may include time text, which includes text describing the time other than the preset format time. The preset format time includes a point in time or a time period expressed numerically. For example, the time text may include tomorrow morning, Wednesday, the 20th, etc. The preset time format may include ['2025-09-09 17:30:00', '2025-09-09 23:59:59'].

[0229] If the slot information for this round does not include time information, then proceed to step S308: input the request information and the slot information for this round into the response generation model, so as to generate response information corresponding to the request information through the response generation model.

[0230] In the case where the current round of slot information does not include time information, it may be that there is no time slot in the current round of slot information, or that the time slot has been converted to a preset time format.

[0231] If the slot information in this round includes time information, then proceed to step S304: determine whether the time information is fuzzy semantic information.

[0232] The fuzzy semantic information includes time information that cannot be explicitly converted into a specific point in time or a period of time. Fuzzy semantic information can include expressions with vague time points such as "as soon as possible," "the sooner the better," "immediately," "right away," and "hurry up." The non-fuzzy semantic information includes time text that can be explicitly converted into a specific point in time or a period of time. Non-fuzzy semantic information can include tomorrow morning, next weekend, the morning after tomorrow, etc.

[0233] In some embodiments, one implementation of determining whether time information is fuzzy semantic information may include:

[0234] The system determines whether the time information matches preset keywords in the rule matching criteria. These preset keywords include words used to describe ambiguous time. If the time information matches the preset keywords, it is determined that the time information is ambiguous semantic information. If the time information does not match the preset keywords, it is determined that the time information is not ambiguous semantic information.

[0235] If the time information is ambiguous semantic information, execute step S305: convert the time of receiving the request information into a preset format time.

[0236] The implementation method for converting the time of receiving request information into a preset format time may include: obtaining the time of receiving the request information, and then converting it into a preset format time according to preset rules. The preset rules may involve using "-" to represent the year, month, and day, separating hours, minutes, and seconds with ":", and separating the date and time with spaces. The preset format time may be a time format defined by the International Organization for Standardization, Coordinated Universal Time (UTC), or a custom-defined time format.

[0237] For example, the time of obtaining the receiving request information is 9:00 AM on August 7, 2025, and the time of conversion to the preset format according to the preset rules is 00:09:00 on August 7, 2025.

[0238] If the time information is not ambiguous semantic information, proceed to step S306: convert the time information into a preset format time.

[0239] In some embodiments, an NLP mini-model is used to convert or map morning, forenoon, afternoon, and evening to 00:00-09:00, 09:00-12:00, 12:00-18:00, and 18:00-24:00, respectively. However, this time-time mapping cannot meet the requirements of the customer service project, and the NLP mini-model needs to be modified.

[0240] In some embodiments, the output logic mapping code of traditional NLP mini-models is modified to better meet the needs of customer service operations. Time text can be converted into preset time points, time periods, time ranges, and time cycles for subsequent business operations. An example of using mapping rules is as follows:

[0241] This morning: ['2025-07-31 00:00:00','2025-07-31 09:29:59'];

[0242] This morning: ['2025-07-31 09:30:00', '2025-07-31 12:29:59'];

[0243] This afternoon: ['2025-07-31 12:30:00', '2025-07-31 17:29:59'];

[0244] Tonight: ['2025-07-31 17:30:00','2025-07-31 23:59:59'];

[0245] July 31: ['2025-07-31 00:00:00', '2025-07-31 23:59:59'];

[0246] This weekend: ['2025-08-02 00:00:00','2025-08-03 23:59:59'];

[0247] Tomorrow morning: ['2025-08-01 00:06:00','2025-08-01 11:59:59'];

[0248] The day after tomorrow: ['2025-08-03 00:00:00','2025-08-03 23:59:59'];

[0249] Two years: {'year':2.0};

[0250] First Quarter: ['2025-01-01 00:00:00','2025-03-31 23:59:59'];

[0251] Spring Festival: ['2025-01-29 00:00:00','2025-01-29 23:59:59'];

[0252] May Day: ['2025-05-01 00:00:00','2025-05-01 23:59:59']

[0253] 16 months: {'month':16.0};

[0254] Each year: {'delta':{'year':1},'point':None}.

[0255] In this embodiment, to address users' generalized fuzzy semantic expressions, especially time points, the NLP mini-model is modified to output expressions of the time periods required for customer service, i.e., the time when the request information is received. For example, if a user expresses the installation time as "as soon as possible," "the sooner the better," "immediately," or "now," the time when the request information is received can be converted into a preset format time, which is then processed by the response generation model. The processing method can be to transfer the user to human customer service or output the nearest available time.

[0256] In some embodiments, if the time information is not ambiguous semantic information, it can also be determined whether the time corresponding to the time information is earlier than the time when the request information was received, i.e., whether the time information is a historical time. If the time corresponding to the time information is earlier than the time when the request information was received, preset information is added to the time information so that the time corresponding to the time information is later than the time when the request information was received, and then the time information after adding the preset information is converted to a preset format time. If the time corresponding to the time information is not earlier than the time when the request information was received, the time information is converted to a preset format time. The time when the request information was received may include the hour, day of the week, and date when the request information was received.

[0257] For example, if the time text is Wednesday, and the time the request message is received is Thursday (Thursday > Wednesday), meaning the time represented by the time text is earlier than the time the request message is received, then the word "Next" is added before the time text, "Wednesday" is adjusted to "Next Wednesday", and then "Next Wednesday" is converted to a preset format time. If the time text is Friday (Thursday < Friday), meaning the time represented by the time text is later than the time the request message is received, then "Friday" is converted to a preset format time.

[0258] For example, if the time text is the 20th, and the time the request information is received is the 21st, then the 21st > the 20th, meaning the time represented by the time text is earlier than the time the request information is received. In this case, the words "next month" are added before the time text, "20th" is changed to "next month 20th", and then "next month 20th" is converted to a preset format time. If the time text is the 26th (21st < 26th), meaning the time represented by the time text is later than the time the request information is received, then "26th" is converted to a preset format time.

[0259] In this application embodiment, the NLP mini-model is modified so that the definition of a relative time period in the customer service system refers to a time after the current time. For example, if the current time is Saturday, and the user expresses that it is Friday, then the NLP model should return next Friday, rather than returning the current Friday that has already passed. This application solution provides more accurate time extraction.

[0260] In some embodiments, if the time corresponding to the time information is earlier than the time when the request information was received, it is determined whether the time corresponding to the time information is the same day the request information was received. If the time corresponding to the time information is the same day the request information was received, the time when the request information was received is converted to a preset format time. If the time corresponding to the time information is not the same day the request information was received, preset information is added to the time information so that the time represented by the time information is later than the time when the request information was received, and then the time information after adding the preset text is converted to a preset format time.

[0261] For example, if the time text is "This morning (00:00-09:30)," and the time the request message is received is 10:00, then 10:00 > 09:30. This means the time represented by the time text is earlier than the time the request message is received, and the time represented by the time text is the same day the request message was received. In this case, the time of receiving the request message, 10:00, will be converted to a preset format time. If the time text is "Wednesday," and the current time is Thursday, then Thursday > Wednesday. This means the time represented by the time text is earlier than the time the request message is received, and the time represented by the time text is not the same day the request message was received. In this case, the word "Next" will be added before the time text, "Wednesday" will be changed to "Next Wednesday," and then "Next Wednesday" will be converted to a preset format time.

[0262] In some embodiments, after converting the time to a preset format, a regular expression matching method can be used to validate the preset format time. If the validation is successful, the slot information for this round is updated based on the preset format time. If the validation fails, step S304 is executed again, or an error message is generated.

[0263] The time extracted by the traditional NLP model in this embodiment needs to be verified before business use to ensure the accuracy of the business.

[0264] In some embodiments, the time slot information acquisition method may be as follows: Figure 8As shown. The large-scale model extracts time information from the request information, and then the small-scale NLP model performs the following operations: First, it determines whether the time information is fuzzy semantic information. If the time information is fuzzy semantic information, it obtains the time when the request information was received and converts it to a preset format. If the time information is not fuzzy semantic information, it determines whether the time information is a historical time. If the time information is not a historical time, it converts it to a preset format. If the time information is a historical time, it determines whether the time information is the current day the request information was received. If the time information is the current day the request information was received, it obtains the current day the request information was received and converts it to a preset format. If the time information is not the current day the request information was received, preset information is added to the time information, and then the time information with the added preset information is converted to a preset format. Finally, business validation is performed on the preset format time.

[0265] The embodiments of this application can improve the accuracy of time slot extraction from the original 78.4% to 96.2%, greatly enhancing the availability of the business and improving the overall user experience of customer service.

[0266] Step S307: Update the time information in the current slot information based on the preset format time.

[0267] Update the preset format time to the corresponding position in the time slot information. Then, integrate the previously extracted slot information and assign it to a global system variable.

[0268] Step S308: Input the request information and the slot information of this round into the response generation model, so as to generate response information corresponding to the request information through the response generation model.

[0269] In some embodiments, the flowchart of the dialogue interaction method can be as follows: Figure 9 As shown, the system receives user input request information, rewrites and breaks down the request information, and then integrates historical session information, including the previous slot information and the most recent dialogue information. Intent recognition is performed on the request information to obtain the user intent, and then the request information and historical session information are input into the corresponding slot-raising model. The slot-raising model can extract product information and address information, and then validate the product information and address information. The slot-raising model can extract time information, and then use a smaller NLP model to convert the time information into a preset format time, and then validate the preset format time. Finally, the slot information is integrated, and the request information and slot information are input into the response generation model to generate response information.

[0270] In some embodiments, the sequence diagram of the dialogue interaction method can be as follows: Figure 10As shown. Server 400 includes an intent recognition module, a slot suggestion module, a time conversion module, and a response generation module. After receiving the user's input request information, display device 200 sends the request information to the intent recognition module. The intent recognition module can identify the user's intent in the request information, obtain the user's intent, and send the request information to the slot suggestion module corresponding to the user's intent. The slot suggestion module obtains historical session information, including the previous round slot information and the most recent round dialogue information. Then, it inputs the request information and historical session information into the slot suggestion model to obtain the current round slot information. If the current round slot information includes time information, the time information is sent to the time conversion module.

[0271] The time conversion module first determines whether the time information is fuzzy semantic information. If it is, it obtains the time of receiving the request information and converts it to a preset format. If it is not fuzzy, it checks whether the time represented by the time information is earlier than the time of receiving the request information. If it is, it adds preset information to the time information so that the time represented by the time information is later than the time of receiving the request information, and then converts the time information with the added preset information to the preset format. If the time represented by the time information is not earlier than the time of receiving the request information, it converts the time information to the preset format. The preset format time is then verified and sent to the slot suggestion module. The slot suggestion module updates the current slot information based on the preset format time, and then sends the request information and the updated slot information to the response generation module.

[0272] The response generation module inputs the request information and the updated slot information for this round into the response generation model, generates response information, and sends the response information to the display device 200. The display device 200 displays the response information.

[0273] This application proposes a method based on the fusion of a large language model and a small NLP model to achieve accurate extraction of time slots. This effectively avoids the weaknesses of the large language model in understanding time and the shortcomings of the small NLP model in understanding language generalization, reducing time misjudgments and thus effectively improving the overall slot recognition accuracy. Dialogue data construction mainly includes system role definition, dialogue history, output positive examples, and output negative examples, effectively improving the large language model's understanding of question-and-answer dialogues and increasing the accuracy of slot information extraction.

[0274] Some embodiments of this application also provide a computer-readable storage medium that can store a program. When the computer storage medium is configured in a display device or server, the program, when executed, can include the program steps involved in the dialogue interaction method in the above embodiments. The computer storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0275] This application provides an electronic device, which includes a processor and a memory for storing processor-executable instructions. The processor is configured to read executable instructions from the memory and execute the instructions to implement the dialogue interaction method described in the above embodiments.

[0276] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A conversational interaction method, characterized by, The method comprises the following steps: receiving request information of user input; inputting the request information into a slot big model to output the current slot information corresponding to the request information through the slot big model; if the time information is fuzzy semantic information, converting the time of receiving the request information into a preset format time, the preset format time including a numerical value representing a time point or a time period, and the fuzzy semantic information including time information that cannot be explicitly converted into a time point or a time period; if the time information is not the fuzzy semantic information, converting the time information into the preset format time; updating the time information in the current slot information based on the preset format time; inputting the request information and the updated current slot information into a reply generation model to generate reply information corresponding to the request information through the reply generation model.

2. The method of claim 1, wherein, If the time information is not the fuzzy semantic information, the step of converting the time information into the preset format time comprises: if the time information is not the fuzzy semantic information, determining whether the time corresponding to the time information is earlier than the time of receiving the request information; if the time corresponding to the time information is earlier than the time of receiving the request information, adding preset information to the time information to make the time corresponding to the time information later than the time of receiving the request information; converting the time information after adding the preset information into the preset format time.

3. The method of claim 1, wherein, The step of inputting the request information into the slot big model to output the current slot information corresponding to the request information through the slot big model comprises: obtaining historical session information, the historical session information including last slot information and the latest round of dialogue information; inputting the request information and the historical session information into the slot big model to output the current slot information corresponding to the request information and the historical session information through the slot big model.

4. The method of claim 3, wherein, The step of inputting the request information and the historical session information into the slot big model to output the current slot information corresponding to the request information and the historical session information through the slot big model comprises: performing intent recognition on the request information to obtain a user intent; inputting the request information and the historical session information into the slot big model corresponding to the user intent to output the current slot information corresponding to the request information and the historical session information through the slot big model.

5. The method of claim 3, wherein, The step of inputting the request information and the historical session information into the slot big model to output the current slot information corresponding to the request information and the historical session information through the slot big model comprises: performing intent recognition on the request information to obtain a user intent; filling the request information and the historical session information into a prompt word template corresponding to the user intent to obtain a prompt word; inputting the prompt word into the slot big model to output the current slot information corresponding to the request information and the historical session information through the slot big model.

6. The method of claim 1, wherein, If the time information is fuzzy semantic information, the step of converting the time of receiving the request information into a preset format time comprises: If the time information matches a preset keyword in rule matching, the time of receiving the request information is converted into a preset format time.

7. The method of claim 1, wherein, The step of updating the time information in the current slot information based on the preset format time comprises: The preset format time is verified by using a regular matching method. If the verification is successful, the time information in the current slot information is updated based on the preset format time.

8. The method of claim 3, wherein, The step of training the slot extraction large model comprises: A basic model is trained by using a direct preference optimization training method and training data to obtain a slot extraction large model, and the training data comprises historical dialogue samples, positive examples and negative examples.

9. The method of claim 8, wherein, The step of constructing the training data comprises: A candidate historical dialogue sample is obtained, and the candidate historical dialogue sample comprises at least one round of dialogue information. If the dialogue round of the candidate historical dialogue sample is greater than a preset round, last slot information and current dialogue information are obtained. The last slot information and the current dialogue information are determined as a historical dialogue sample. Current slot information of the current dialogue information is obtained, and the current slot information is determined as the positive example. The current slot information is changed, and the changed current slot information is determined as the negative example.

10. A terminal device, comprising: Comprise: A communication module configured to establish a communication connection with a display device; A processing module configured to: receive user input request information; input the request information into a slot extraction large model to output current slot information corresponding to the request information through the slot extraction large model; if the current slot information includes time information, and the time information is fuzzy semantic information, convert the time of receiving the request information into a preset format time, the preset format time comprises a time point or a time period represented by a numerical value, and the fuzzy semantic information comprises time information that cannot be explicitly converted into a time point or a time period; if the time information is not the fuzzy semantic information, convert the time information into the preset format time; update the time information in the current slot information based on the preset format time; input the request information and the updated current slot information into a reply generation model to generate reply information corresponding to the request information through the reply generation model.