A dialogue method, device, storage medium and program product

By filtering historical dialogue content from the intelligent customer service system and using a large language model to infer user preference information, a model interaction context is constructed, which solves the problem of the context window limitation of the large language model and achieves accuracy and personalization of intelligent customer service responses.

CN122242747APending Publication Date: 2026-06-19BEIJING 58 INFORMATION TTECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING 58 INFORMATION TTECH CO LTD
Filing Date
2026-03-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing intelligent customer service systems suffer from limited context window length in large language models, making it impossible to match user preference information that is appropriate for the current conversation without consuming too much context resources. As a result, responses cannot accurately meet the user's current conversation needs.

Method used

By acquiring the current dialogue content and historical dialogue dataset between the intelligent customer service and the target user, semantically related target historical dialogue content is filtered out. A large language model is used to infer user preference information and construct a model interaction context to generate dialogue response content that is adapted to the user's preference information in the current round.

Benefits of technology

Without consuming excessive contextual resources, it improves the ability to follow large model instructions and the accuracy of intelligent customer service responses, ensuring that the response content matches the user's historical habits and the needs of the current conversation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122242747A_ABST
    Figure CN122242747A_ABST
Patent Text Reader

Abstract

This application provides a dialogue method, device, storage medium, and program product. In this method, the current dialogue content between an intelligent customer service representative and a target user, as well as the target user's corresponding historical dialogue dataset, can be obtained. Target historical dialogue content with semantic relevance to the current dialogue content is selected from the historical dialogue dataset. Using a large language model, user preference information is inferred based on the target historical dialogue content and the current dialogue content to obtain current user preference information adapted to the current dialogue content. This current user preference information is used as the model interaction context for constructing the current dialogue, thereby using the model interaction context to drive the large language model to generate dialogue response content adapted to the current user preference information. The dialogue response content is then output to the target user to complete the current dialogue. This approach reduces context resource consumption and improves the large model's instruction compliance capability and the accuracy of the intelligent customer service representative's responses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a dialogue method, device, storage medium, and program product. Background Technology

[0002] With the rapid iteration of large language model technology, intelligent customer service systems have been widely applied in numerous scenarios on internet platforms. Taking local life service platforms as an example, these platforms connect with a massive number of merchants through intelligent customer service, handling their needs across the entire process, including store operations, posting, promotional top-ups, and performance inquiries. The accuracy of the intelligent customer service responses directly determines the service experience for merchants.

[0003] However, in existing technologies, intelligent customer service typically incorporates users' historical dialogue content directly into the dialogue context window of a large model to achieve dialogue memory. However, the context window length of mainstream large language models has a fixed upper limit, and excessively long context content will reduce the instruction compliance ability of the large model. It is impossible to match user preference information that is suitable for the current dialogue to the large model without consuming too much context resources, resulting in the intelligent customer service's response not being able to accurately match the user's current dialogue needs. Summary of the Invention

[0004] This application provides a dialogue method, device, storage medium, and program product to reduce context resource consumption and improve the ability to follow large model instructions and the accuracy of intelligent customer service responses.

[0005] This application provides a dialogue method, comprising: acquiring the current dialogue content between an intelligent customer service representative and a target user, and a historical dialogue dataset corresponding to the target user; selecting target historical dialogue content from the historical dialogue dataset that has a semantic relationship with the current dialogue content; using a large language model, inferring user preference information based on the target historical dialogue content and the current dialogue content to obtain current user preference information adapted to the current dialogue content; using the current user preference information as the model interaction context for constructing the current dialogue, so as to use the model interaction context to drive the large language model to generate dialogue response content adapted to the current user preference information; and outputting the dialogue response content to the target user to complete the current dialogue.

[0006] Optionally, selecting target historical dialogue content that is semantically related to the current round of dialogue content from the historical dialogue dataset includes: assigning temporal weights to multiple historical dialogue contents in the historical dialogue dataset according to the order in which the dialogues occurred; ensuring that any historical dialogue content is negatively correlated with the time interval and temporal weight of the current round; semantically encoding the current round of dialogue content and the multiple historical dialogue contents to obtain a current round semantic vector and multiple historical semantic vectors; calculating the basic semantic similarity between the current round semantic vector and each of the historical semantic vectors, and fusing the basic semantic similarity with the temporal weight of the corresponding historical dialogue content to obtain a comprehensive correlation; identifying the user intent type of the current round of dialogue content, and adjusting a preset semantic correlation threshold based on the user intent type and the historical dialogue frequency of the target user; determining a target historical semantic vector from the multiple historical semantic vectors whose comprehensive correlation with the current round semantic vector is greater than the adjusted semantic correlation threshold, and using the historical dialogue content corresponding to the target historical semantic vector as the target historical dialogue content.

[0007] Optionally, using a large language model, user preference information is inferred based on the target historical dialogue content and the current round of dialogue content to obtain target user preference information adapted to the current round of dialogue content. This includes: constructing preference inference prompts; the preference inference prompts have constraint parameters used to constrain information weight allocation, inference orientation dimension, and output specifications during preference inference; inputting the preference inference prompts, the target historical dialogue content, and the current round of dialogue content into the large language model, and performing the following steps within the large language model: generating historical dialogue summary data corresponding to the target historical dialogue content; the historical dialogue summary data retains the user's core demands, historical preference features, and key interaction information in the target historical dialogue content; supplementing the historical dialogue summary data with the current round of dialogue content to obtain an incremental dialogue summary; and, guided by the preference inference prompts, inferring target user preference information adapted to the current round of dialogue content based on the incremental dialogue summary.

[0008] Optionally, guided by the preference inference prompts, target user preference information adapted to the current round of dialogue content is inferred based on the incremental dialogue summary, including: extracting target features from the incremental dialogue summary under the guidance of the preference inference prompts; the target features include the following sub-features: service interaction features, user expression features, and demand tendency features; identifying dialogue scenario tags corresponding to the current round of dialogue content and platform operation attribute tags corresponding to the target user based on the incremental dialogue summary; adjusting the constraint parameters of the preference inference prompts based on the dialogue scenario tags and platform operation attribute tags; and inferring target user preference information adapted to the current round of dialogue content based on the adjusted preference inference prompts and the target features.

[0009] Optionally, based on the adjusted preference inference prompts, target user preference information adapted to the current round of dialogue content is inferred according to the target features, including: performing dimensionality reduction and feature enhancement on the high-dimensional semantic features corresponding to each sub-feature in the target features, and performing cross-dimensional association operations between sub-features on the high-dimensional semantic features after dimensionality reduction and feature enhancement; constructing a feature association matrix based on the result of the cross-dimensional association operation to present the association relationship between the multiple sub-features in a structured manner; determining the potential preference association between the multiple sub-features according to the feature association matrix, and outputting a comprehensive feature vector after fusing the multiple sub-features based on the potential preference association; performing deep mapping on the comprehensive feature vector in combination with the constraint parameters of the adjusted preference inference prompts to obtain candidate user preference information adapted to the current round of dialogue content; and selecting user preference information matching the current dialogue scenario from the candidate user preference information according to the scenario constraint conditions corresponding to the scenario label, as the target user preference information.

[0010] Optionally, based on the scenario constraints corresponding to the scenario tags, user preference information matching the current dialogue scenario is selected from the candidate user preference information and used as the target user preference information. This includes: selecting user preference information matching the current dialogue scenario from the candidate user preference information based on the scenario constraints corresponding to the scenario tags; dividing the user preference information into long-term steady-state preference information and short-term dynamic preference information based on the timestamp information corresponding to the target historical dialogue content; and performing weighted fusion of the long-term steady-state preference information and the short-term dynamic preference information to obtain the target user preference information.

[0011] Optionally, based on the timestamp information corresponding to the target historical dialogue content, the user preference information is divided into long-term steady-state preference information and short-term dynamic preference information, including: based on the timestamp information corresponding to the target historical dialogue content, user preference information whose timestamps fall within a preset long-term preference time window and repeatedly appear in multiple rounds of historical dialogue is classified as long-term steady-state preference information; user preference information whose timestamps fall within a preset short-term preference time window is classified as short-term dynamic preference information.

[0012] This application also provides an electronic device, including: a memory and a processor; wherein the memory is used to: store one or more computer instructions; and the processor is used to execute the one or more computer instructions to: perform the steps in the dialogue method.

[0013] This application also provides a computer-readable storage medium that, when a computer program is executed by a processor, enables the processor to implement the steps in the dialogue method.

[0014] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, enable the processor to implement the steps in the dialogue method.

[0015] In this embodiment, the current dialogue content between the intelligent customer service representative and the target user, as well as the target user's corresponding historical dialogue dataset, can be obtained. Target historical dialogue content that has a semantic relationship with the current dialogue content is selected from the historical dialogue dataset. Using a large language model, user preference information is inferred based on the target historical dialogue content and the current dialogue content to obtain current user preference information that matches the current dialogue content. This current user preference information is used as the model interaction context for constructing the current dialogue, thereby using the model interaction context to drive the large language model to generate dialogue response content that matches the current user preference information. The dialogue response content is then output to the target user to complete the current dialogue. This approach reduces context resource consumption and improves the large model's instruction compliance capability and the accuracy of the intelligent customer service representative's responses. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a dialogue method provided in an exemplary embodiment of this application; Figure 2 A schematic diagram of an electronic device provided for an exemplary embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.

[0019] With the rapid iteration of large language model technology, intelligent customer service systems have been widely applied in numerous scenarios on internet platforms. Taking local life service platforms as an example, these platforms connect with a massive number of merchants through intelligent customer service, handling their needs across the entire process, including store operations, posting, promotional top-ups, and performance inquiries. The accuracy of the intelligent customer service responses directly determines the service experience for merchants.

[0020] However, in existing technologies, intelligent customer service typically incorporates users' historical dialogue content directly into the dialogue context window of a large model to achieve dialogue memory. However, the context window length of mainstream large language models has a fixed upper limit, and excessively long context content will reduce the instruction compliance ability of the large model. It is impossible to match user preference information that is suitable for the current dialogue to the large model without consuming too much context resources, resulting in the intelligent customer service's response not being able to accurately match the user's current dialogue needs.

[0021] To address the aforementioned technical problems, this application provides a technical solution in its embodiments. The technical solutions provided by each embodiment of this application are described in detail below with reference to the accompanying drawings.

[0022] Figure 1 This is a flowchart illustrating a dialogue method provided as an exemplary embodiment of this application. This dialogue method is applicable to any electronic device, such as a mobile phone or tablet computer, or any type of server; this embodiment does not impose any limitations. The dialogue method may include the following steps: Step 11: Obtain the content of the current round of dialogue between the intelligent customer service and the target user, as well as the historical dialogue dataset corresponding to the target user.

[0023] Step 12: Select target historical dialogue content from the historical dialogue dataset that has a semantic relationship with the content of the current round of dialogue.

[0024] Step 13: Using a large language model, infer user preference information based on the target's historical dialogue content and the current dialogue content to obtain user preference information for this round that is compatible with the current dialogue content.

[0025] Step 14: Use the user preference information of this round as the model interaction context for this round of dialogue construction, so as to use the model interaction context to drive the large language model to generate dialogue response content adapted to the user preference information of this round.

[0026] Step 15: Output the dialogue response to the target user to complete this round of dialogue.

[0027] In this embodiment, the content of this round of dialogue refers to the content generated by the current single dialogue interaction between the intelligent customer service and the target user. This may include the question initiated by the target user in this round, such as a text question or a question converted from speech to text, or the intelligent customer service's initial response to the question in this round. If the dialogue content is in audio format, the audio signal can be converted into text format first through a speech recognition module before further processing.

[0028] The target user's historical dialogue dataset refers to the dataset formed by all historical interactions between the target user and the intelligent customer service before the current dialogue. This dataset can be associated with the target user's unique identifier, such as a user ID (Identity Document / Identifier) ​​or device ID, to ensure that the historical dialogue content matches the target user. The historical dialogue dataset may include at least one of the following: the dialogue time of each historical round, the content of the user's questions, the content of the intelligent customer service's responses, and the user's interactive behaviors, such as whether a link in the response was clicked, whether a follow-up question was initiated, or the duration of the dialogue. This dataset can be updated in real time; that is, after each round of dialogue is completed, the content of that round of dialogue is added to the historical dialogue dataset to provide data support for subsequent rounds of dialogue. Electronic devices can read the target user's historical dialogue dataset through local storage or query and obtain the target user's historical dialogue dataset from a database via the network.

[0029] After obtaining the current round of dialogue content and the historical dialogue dataset, target historical dialogue content that is semantically related to the current round of dialogue content can be selected from the historical dialogue dataset. This step aims to filter out content from historical dialogues that is helpful in understanding the target user's needs in this round and inferring user preferences, eliminate interference from irrelevant historical dialogues, reduce the complexity of subsequent data processing, and improve the accuracy of preference inference. Semantic relevance refers to the semantic correlation between historical dialogue content and the current round of dialogue content. Specifically, this can be manifested in the following ways: historical dialogues contain needs, preferences, or questions related to the user's questions in this round, or the service scenarios and interaction topics involved in historical dialogues are consistent with or similar to those in the current round of dialogue.

[0030] Optionally, one or more combined methods, such as semantic similarity calculation, intent recognition, and keyword matching, can be used to filter target historical dialogue content from the historical dialogue dataset. For example, firstly, keywords are extracted from the current round of dialogue content, such as core words in the user's questions, like "refund process," "product model," and "usage method." Then, the historical dialogue dataset is traversed to filter historical dialogue content containing the same or similar keywords. Simultaneously, an intent recognition model is used to determine the user's interaction intent in this round (such as consultation, complaint, or business processing), and content matching the intent of this round is filtered out. Figure 1 The historical dialogue content is then combined with the above filtering results to obtain the target historical dialogue content. This semantically related filtering method filters out historical content that is semantically irrelevant to the current dialogue, retaining only strongly related dialogue fragments. This significantly reduces the amount of content that needs to be processed by the model from the source, greatly reducing token (the smallest unit of text data processed by the model) usage, fundamentally alleviating the pressure on the context window limit, and avoiding the problem of long historical dialogues not being able to fit into the window.

[0031] In this embodiment, the large language model refers to an artificial intelligence model with the capabilities of natural language understanding, semantic reasoning, and contextual association. User preference information is used to describe the personalized information such as the target user's needs, communication habits, or focus during the dialogue interaction process. Specifically, it may include: the user's preference for service type (such as preferring concise and direct replies or detailed step-by-step instructions), preference for service content (such as focusing on product price, after-sales guarantee, or user experience), preference for communication style (such as formal, conversational, or concise), and preference for potential needs (such as the user having previously consulted on a certain type of product, and the potential need for further consultation on related products in this round).

[0032] In the process of using large language models to infer user preference information, the target's historical dialogue content and the current dialogue content can be used as inputs to the large language model. The large language model analyzes the semantic relationships and contextual logic between the two to uncover the target user's behavioral patterns and needs, and then infers the user's preference information for the current round of dialogue. For example, if in the target's historical dialogue, the user repeatedly requested concise step-by-step instructions from the intelligent customer service, and the user's question in this round is "How to process a refund," then the large language model can infer that the user's preference for this round is "needing concise and clear refund step-by-step instructions, without unnecessary redundant information." If in the historical dialogue, the user repeatedly focused on the product's after-sales warranty policy, and the user's question in this round is "What should I do if this product breaks down?" then the user's preference for this round is "focusing on understanding the after-sales repair process and warranty period."

[0033] Unlike the traditional approach of directly inputting the filtered historical dialogue text into the model's interaction context, this solution does not directly use the original dialogue text. Instead, it transforms it into user preference information strongly bound to the current dialogue round. Multiple, even dozens, of original dialogue texts are compressed into a few precise preference descriptions, reducing token consumption, solving the problem of excessively long contexts, and avoiding excessive consumption of context resources. What is injected into the model's interaction context is no longer redundant original dialogue, but effective user preference information for the current round. This does not dilute the core instructions of the large model; the model's attention will focus on the needs and preferences of the current dialogue round, thus significantly improving instruction compliance. When inferring preferences, both the content of the current dialogue round and the filtered target historical dialogue content are bound together. The final result is not a generalized set of all user preferences, but rather user preference information adapted to the current dialogue scenario, improving the accuracy of subsequent dialogue response generation.

[0034] In this embodiment, the model interaction context refers to the contextual information relied upon by the large language model when generating dialogue responses. This context provides personalized constraints to the large language model, ensuring that the generated responses align with the user's preferences in the current round, improving the relevance and personalization of the responses, and avoiding the generation of generic, undifferentiated responses. Compared to the traditional approach that uses only the content of the current round of dialogue as context, this embodiment incorporates the user's preference information into the model interaction context, enabling the large language model to more accurately capture the user's personalized needs and achieve more personalized dialogue responses.

[0035] Specifically, the user preference information of the current round can be combined with the content of the current round of dialogue to construct a complete model interaction context. Alternatively, the user preference information of the current round can be combined with the content of the current round of dialogue and the target historical dialogue content to construct a complete model interaction context. This model interaction context is then input into a large language model. Under the constraints of the context, the large language model can generate dialogue response content adapted to the user preference information of the current round. For example, if the user preference of the current round is "concise and direct step-by-step instructions," the response generated by the large language model will present the core steps in a concise, bullet-point format, avoiding redundant descriptions. If the user preference of the current round is "detailed instructions," the response will include specific operational details, precautions, etc. In this way, the user preference information of the current round can be used as a core component of the current round of dialogue context, replacing the redundant historical dialogue text. When generating responses, the large language model no longer needs to manually mine user preferences from massive amounts of historical dialogue; instead, it directly generates dialogue response content based on more accurate user preference information. This reduces the inference pressure on the large language model and avoids biases when the large language model extracts user preferences. The final generated dialogue responses are more aligned with the user's past habits and the core needs of the current conversation, avoiding overly generic or template-based responses.

[0036] Based on steps 11-15 above, user preference information that is fully adapted to the current dialogue can be matched to the large language model without consuming too much context resources or reducing the instruction compliance capability of the large language model, thereby improving the accuracy of intelligent customer service responses.

[0037] In some optional embodiments, step 12 of the foregoing embodiments, "selecting target historical dialogue content that has a semantic relationship with the content of the current round of dialogue from the historical dialogue dataset," can be implemented based on the following steps: Step 121: Assign temporal weights to multiple historical dialogues in the historical dialogue dataset according to the order in which the dialogues occurred; any historical dialogue content is negatively correlated with the time interval and temporal weight of the current round.

[0038] The time-series weight is used to characterize the timeliness of the reference value of historical dialogue content to the current round of dialogue. The shorter the time interval, the higher the time-series weight, and vice versa. Specifically, time-series weights can be allocated using linear decay, exponential decay, or other methods. For example, based on the time of the current round of dialogue, the time-series weight of historical dialogue content within the last 7 days is set to 0.8~1.0, the time-series weight within 7~30 days is set to 0.4~0.7, and the time-series weight beyond 30 days is set to 0~0.3. By using time-series weights to strengthen the priority of recent effective historical dialogues, the timeliness of the content is better aligned with the user's interaction needs.

[0039] Step 122: Semantically encode the content of the current round of dialogue and multiple historical dialogues to obtain the semantic vector of the current round and multiple historical semantic vectors.

[0040] In other words, this step can convert the textual dialogue content into numerical vectors in a vector space through semantic encoding, thereby achieving a digital semantic representation of the dialogue content. Specifically, any pre-trained language model can be used to extract and encode features from the current dialogue content and each historical dialogue, outputting a dense semantic vector of fixed dimensions. This dense semantic vector can be used to represent the core semantics, intent, and contextual features of the dialogue content.

[0041] Step 123: Calculate the basic semantic similarity between the semantic vector of this round and each historical semantic vector, and integrate the basic semantic similarity with the temporal weight of the corresponding historical dialogue content to obtain the comprehensive relevance.

[0042] The basic semantic similarity can be calculated using methods such as cosine similarity, dot product, and Euclidean distance. The comprehensive relevance is obtained by multiplying or weighting the basic semantic similarity with the temporal weights of the corresponding historical dialogue content. This method retains the semantic relevance while weakening the influence of irrelevant historical dialogues in the distant past through temporal weights, resulting in a more accurate comprehensive relevance.

[0043] Step 124: Identify the user intent type of the current round of dialogue content, and adjust the preset semantic association threshold according to the user intent type and the target user's historical dialogue frequency.

[0044] Specifically, the intent recognition model can identify the type of user intent in this round, such as inquiry, processing, after-sales service, and complaint. Then, combined with the target user's historical conversation frequency, users are categorized, such as high-frequency interaction users, medium-frequency interaction users, and low-frequency new users. Thresholds are adjusted to adapt to different intent types and user types. For example, high-frequency users have ample historical data, so the threshold can be increased to filter highly relevant content; low-frequency new users have less historical data, so the threshold can be decreased to retain valid historical content, ensuring the flexibility of the filtering logic.

[0045] Step 125: Determine the target historical semantic vector from multiple historical semantic vectors whose comprehensive correlation with the semantic vector of the current round is greater than the adjusted semantic correlation threshold, and take the historical dialogue content corresponding to the target historical semantic vector as the target historical dialogue content.

[0046] Based on the adjusted dynamic threshold, the overall relevance of each historical dialogue can be filtered, retaining historical dialogue content that meets the overall relevance standard and has reference value for the current round of preference inference, while eliminating irrelevant or low-value historical data. This reduces the processing load of the subsequent large language model and avoids redundant data interfering with the accuracy of user preference inference.

[0047] Through steps 121-125 above, accurate and efficient filtering of historical dialogue content can be achieved, taking into account both the timeliness and semantic relevance of the dialogue sequence. By allocating temporal weights, semantic encoding, calculating comprehensive relevance, and adjusting dynamic thresholds, target historical dialogue content that is highly relevant to the current round of dialogue and has reference value can be accurately filtered out. Invalid and redundant data can be effectively eliminated, reducing the processing load of the subsequent large language model and improving the accuracy of subsequent user preference inference.

[0048] In some optional embodiments, step 13 in the aforementioned embodiments, "using a large language model to infer user preference information based on the target's historical dialogue content and the current dialogue content, and obtaining target user preference information that matches the current dialogue content," can be implemented based on the following steps: Step 131: Construct preference reasoning prompts; preference reasoning prompts have constraint parameters, which are used to constrain the information weight allocation, reasoning orientation dimension and output specification in the preference reasoning process.

[0049] Among them, preference inference prompts can provide standardized inference guidance for large language models. Constraint parameters can include at least one of the following: the weighted ratio of information from historical dialogues and current dialogues, the orientation dimension of preference inference, and the output format and field specifications. Constraint parameters can constrain the inference process and avoid problems such as inaccurate inference results caused by unconstrained inference.

[0050] Step 132: Input the preference inference prompts, target historical dialogue content, and current dialogue content into the large language model, and perform the following steps within the large language model.

[0051] Step 133: Generate historical dialogue summary data corresponding to the target historical dialogue content; the historical dialogue summary data retains the user's core demands, historical preference characteristics and key interaction information in the target historical dialogue content, and deletes non-critical content such as redundant expressions and invalid interactions, thereby reducing the processing load of the model.

[0052] Specifically, semantic understanding of the target historical dialogue content is performed using a large language model to generate historical dialogue summary data corresponding to the target historical dialogue content. The historical dialogue summary data retains the user's core demands, historical preference features, and key interaction information in the target historical dialogue content. Then, redundant dialogue expressions and irrelevant semantic content with no reference value are removed. Furthermore, the time sequence of the historical dialogue summary data is consistent with the occurrence time sequence of the original target historical dialogue content to obtain the historical dialogue summary data.

[0053] Step 134: Use the content of this round of dialogue to supplement the historical dialogue summary data to obtain an incremental dialogue summary.

[0054] Specifically, semantic parsing and intent recognition processing can be performed on the content of the current round of dialogue to obtain the user's real-time demands, core semantic features, and interaction intent information. The extracted information is then integrated into historical dialogue summary data to obtain an incremental dialogue summary. Optionally, during the process of integrating the extracted information into historical dialogue summary data, information in the historical dialogue summary data that conflicts with the content of the current round of dialogue can be corrected simultaneously, and newly added user demand information can be updated to generate an incremental dialogue summary that is chronologically coherent and integrates the entire context of the user's historical interactions with the real-time dialogue demands of the current round.

[0055] Step 135: Guided by preference inference prompts, infer target user preference information that matches the content of this round of dialogue based on incremental dialogue summaries.

[0056] Based on steps 131-135 above, by constructing preference inference prompts with constrained parameters, the large language model can be guided to generate historical dialogue summaries that retain core information, and supplemented with the content of the current dialogue to obtain incremental summaries, thereby inferring the target user's preferences. On the one hand, this improves the accuracy of preference inference and ensures that preference information fits the needs of the current dialogue; on the other hand, it reduces the processing load of the model.

[0057] This application does not limit the specific implementation of step 135 above. In an exemplary embodiment, target features of incremental dialogue summaries can be extracted under the guidance of preference inference prompts. The target features include the following sub-features: service interaction features, user expression features, and demand tendency features. Among them, service interaction features can be used to characterize users' preferences for service types and interaction methods; user expression features can be used to characterize users' language style, expression habits, and information receiving preferences; and demand tendency features can be used to characterize users' core needs and focus.

[0058] Based on the incremental dialogue summary, the dialogue scenario tags corresponding to the content of this round of dialogue, as well as the platform operation attribute tags corresponding to the target user, are identified. For example, the dialogue scenario tags may include at least one of recharge consultation, Q&A on promotion effect, post operation operation, and platform function consultation, and the platform operation attribute tags may include at least one of the target user's service industry type, membership level, and historical promotion behavior data.

[0059] Based on dialogue scenario tags and platform operation attribute tags, the constraint parameters of preference inference prompts are adjusted to make the inference rules adapt to the current scenario and user attributes.

[0060] Subsequently, based on the adjusted preference inference prompts, target user preference information adapted to the content of this round of dialogue can be inferred according to the target features. This application embodiment does not limit the specific implementation method of "inferring target user preference information adapted to the content of this round of dialogue based on target features." In an exemplary embodiment, it can be implemented based on the following steps U1-U5: Step U1: Perform dimensionality reduction and feature enhancement on the high-dimensional semantic features corresponding to each sub-feature in the target feature, and perform cross-dimensional association operations between sub-features on the high-dimensional semantic features after dimensionality reduction and feature enhancement.

[0061] The target features are the service interaction features, user expression features, and demand tendency features extracted above. Each sub-feature is a high-dimensional dense semantic feature output by a large language model. Dimensionality reduction can be performed using any method such as PCA (Principal Component Analysis) or a lightweight autoencoder to map the high-dimensional semantic features of each sub-feature to a low-dimensional feature space of uniform dimension, eliminating redundant noise and invalid dimensions in the features and reducing the computational cost of subsequent operations. Feature enhancement can be performed using any method such as multi-head attention mechanisms or gated linear units to amplify the weights of feature dimensions that match the core semantics of the current dialogue, reduce the weights of noisy features irrelevant to the current dialogue, and strengthen the effective information in each sub-feature that is valuable for preference inference in the current round.

[0062] Specifically, cross-dimensional association operations can be performed on each sub-feature after dimensionality reduction and feature enhancement. Cross-dimensional association operations include, but are not limited to, at least one of the following methods: mutual information calculation between sub-features, cross-attention weight calculation, Pearson correlation coefficient calculation, and feature cross-fusion operation. The degree of semantic association between different sub-features can be quantified through association operations to explore the implicit association between sub-features. For example, the association between "preferring concise and short sentences" in user expression features and "rejecting redundant process descriptions" in service interaction features.

[0063] Step U2: Based on the results of cross-dimensional association operations, construct a feature association matrix to present the relationships between multiple sub-features in a structured manner. This step aims to transform unstructured association operation results into structured data, solving the problems of unstandardized processing of relationships between sub-features and difficulty in uncovering potential associations.

[0064] Specifically, the feature association matrix can be a two-dimensional square matrix, where the row and column vectors correspond to the sub-features in the target features, and the element values ​​are the association degree values ​​obtained by the operation of step U1 for the corresponding two sub-features. During the construction process, the association degree values ​​output by the cross-dimensional association operation (i.e., the results of the cross-dimensional association operation) are subjected to Min-Max normalization processing, mapping all association degree values ​​to the standardized range of 0-1, eliminating the differences in numerical magnitude caused by different association operation methods. Min-Max normalization processing is used to scale the data to a specific range by performing a linear transformation on the original data, mapping the data to between the specified minimum and maximum values.

[0065] For example, when the target feature includes three types of sub-features: service interaction features, user expression features, and demand tendency features, a 3×3 feature association matrix is ​​constructed. The element value in the i-th row and j-th column of the matrix corresponds to the normalized association degree value between the i-th sub-feature and the j-th sub-feature, thereby representing the pairwise association relationship between the sub-features in a more complete and structured way.

[0066] Step U3: Determine the latent preference associations between multiple sub-features based on the feature association matrix, and output a comprehensive feature vector after fusing multiple sub-features based on these latent preference associations. This step aims to mine users' implicit latent preferences, achieve the fusion of multi-dimensional sub-features, and solve the problems that a single sub-feature cannot fully represent users' full-dimensional preferences and that preference inference can only cover users' explicit needs.

[0067] Among them, latent preference associations refer to implicit user preferences that cannot be identified through a single sub-feature and need to be mined through the association of multiple sub-features. For example, by exploring the strong association between the service interaction feature "initiating after-sales consultations multiple times" and the demand preference feature "paying attention to product warranty period," a latent preference association of "users have a high priority demand for product after-sales service" can be mined. Specifically, deep feature learning can be performed on the feature association matrix through any method such as GCN (Graph Convolution Neural Networks), matrix singular value decomposition, or density clustering algorithms to extract strong association combinations between sub-features. Based on the strong association combinations between sub-features, the latent preference associations and their strengths among multiple sub-features can be determined.

[0068] Subsequently, based on the strength of the latent preference associations, corresponding association weight coefficients can be generated for each sub-feature; the higher the association strength, the larger the weight coefficient of the corresponding sub-feature. Further, based on the generated association weight coefficients, the feature vectors of each sub-feature, after dimensionality reduction and enhancement, can be weighted and fused to obtain a comprehensive feature vector. The comprehensive feature vector not only fully preserves the core explicit feature information of each sub-feature but also incorporates the latent preference associations between sub-features, thus making it more accurate.

[0069] Step U4: Combining the constraint parameters of the adjusted preference inference prompts, perform deep mapping on the comprehensive feature vector to obtain candidate user preference information that matches the content of this round of dialogue. This step aims to solve the problems of unconstrained preference inference output and deviation from preset inference rules through prompt constraints.

[0070] The constraint parameters for the adjusted preference inference prompts are dynamically adjusted based on the current dialogue scenario tags and user platform operation attribute tags, including but not limited to at least one of the following: information weight allocation parameters, inference orientation dimension parameters, and output format specification parameters. Deep mapping can be achieved through a fully connected mapping layer or a multilayer perceptron in a large language model, mapping the comprehensive feature vector to a preference representation space that conforms to the constraint parameter specifications.

[0071] Specifically, the constraint parameters can first be converted into corresponding weight mapping matrices. These matrices amplify the weights of the core dimensions specified by the constraint parameters and reduce the weights of non-directional dimensions. Then, the comprehensive feature vector can be input into the feature mapping layer of the large language model. The weight mapping matrix performs linear and non-linear deep mapping on the comprehensive feature vector, outputting candidate user preference information. This candidate user preference information not only conforms to the constraint parameter specifications but also covers both explicit and latent user preferences and is adapted to the core semantics of the current dialogue round, thus being more accurate. Optionally, the candidate user preference information can be output in a structured item format, including the semantic content of each preference item, its corresponding weight coefficient, and the applicable scenario range.

[0072] Step U5: Based on the scene constraints corresponding to the scene tags, filter out the user preference information that matches the current dialogue scene from the candidate user preference information and use it as the target user preference information.

[0073] The scenario tags are the dialogue scenario tags corresponding to the content of this round of dialogue, including but not limited to consultation scenarios, business processing scenarios, after-sales rights protection scenarios, and complaint scenarios. Each scenario tag has corresponding scenario constraints, which are the core focus dimensions, priority ranking rules, and invalid preference filtering rules under that scenario. For example, the constraint for after-sales rights protection scenarios is to prioritize retaining preference information related to after-sales processes, compensation rules, and rights protection timeliness, and to filter out non-matching preference information related to product function consultation; the constraint for consultation scenarios is to prioritize retaining preference information related to information detail, expression style, and content dimensions.

[0074] Specifically, the corresponding scenario constraints can be retrieved first based on the scenario tags of the current round of dialogue; then, based on the scenario constraints, the scenario matching degree of each item in the candidate user preference information is scored, and the matching degree score is positively correlated with the fit between the preference item and the current scenario; finally, preference items with matching degree higher than the preset scenario matching threshold are selected and combined to form the final target user preference information, and redundant preference items that are irrelevant to the current dialogue scenario or have insufficient matching degree are eliminated, so as to ensure that the output target user preference information can accurately drive the large language model to generate personalized dialogue responses that are highly adapted to the current scenario and user needs.

[0075] Based on steps U1-U5 above, by dimensionality reduction and enhancement of each sub-feature of the target feature and cross-dimensional association operations, a feature association matrix is ​​constructed to mine potential preferences, which can achieve deep fusion of multi-dimensional features. Then, by combining the preference inference prompt word constraints for deep mapping, candidate preferences are generated, and further filtering is performed based on scenario constraints. This can effectively improve the accuracy of user preference inference, ensure that preference information is highly adapted to the dialogue scenario, reduce the computational cost of the model, and make preference inference more efficient and controllable, and more in line with user interaction needs.

[0076] To further address the current issues of inability to distinguish between long-term user preferences and short-term temporary needs, lack of temporal attributes of preference information, and the inability to simultaneously ensure consistency in multi-turn dialogue responses and adaptability to real-time needs, the aforementioned step U5, "based on the adjusted preference inference prompts, inferring target user preference information that is compatible with the content of the current round of dialogue according to the target features," can be implemented based on the following steps H1-H3: Step H1: Based on the scenario constraints corresponding to the scenario tags, filter out the user preference information that matches the current dialogue scenario from the candidate user preference information.

[0077] First, based on the scenario tags of the current dialogue, pre-set corresponding scenario constraints are retrieved. Then, for each preference item in the candidate user preference information, the matching degree between each preference item and the scenario tag is calculated. The matching degree is positively correlated with the fit between the preference item and the core needs of the scenario. Finally, preference items with a matching degree higher than the pre-set scenario matching threshold are selected to form user preference information that matches the current dialogue scenario.

[0078] Step H2: Based on the timestamp information corresponding to the target historical dialogue content, user preference information is divided into long-term steady-state preference information and short-term dynamic preference information. Specifically, based on the timestamp information corresponding to the target historical dialogue content, user preference information whose timestamps fall within a preset long-term preference time window and repeatedly appear in multiple rounds of historical dialogue is classified as long-term steady-state preference information; user preference information whose timestamps fall within a preset short-term preference time window is classified as short-term dynamic preference information.

[0079] Step H3: Weighted fusion of long-term steady-state preference information and short-term dynamic preference information to obtain target user preference information. The weighted fusion can be performed using any method, such as weighted summation, and this embodiment is not limited to any particular method. Through a dynamic weighting mechanism, the priority of long-term inherent user preferences and short-term real-time needs can be balanced, achieving the fusion of preference information while ensuring consistency across multiple rounds of dialogue and adaptability to the needs of the current round.

[0080] Specifically, the weight information of long-term steady-state preference information and short-term dynamic preference information can be obtained. The weight information can be freely set according to actual needs, and this embodiment does not impose any restrictions on it. Then, the long-term steady-state preference information and short-term dynamic preference information can be weighted and summed using their respective weight information. In this process, the long-term steady-state preference information and short-term dynamic preference information can be semantically encoded separately. Based on the respective weight information of the long-term steady-state preference information and short-term dynamic preference information, the semantic information of the long-term steady-state preference information and short-term dynamic preference information is weighted and summed to obtain a fused feature vector. After decoding the fused feature vector, structured target user preference information is obtained.

[0081] For example, the preset long-term preference time window is 30-180 days, the short-term preference time window is within 30 days, the preset repetition frequency threshold is ≥3 rounds, and the target users are intelligent customer service interaction users of e-commerce platforms. The user preference information obtained after filtering in step H1 is as follows: ① Preference for conversational and concise replies, with the corresponding historical dialogue timestamps distributed within the last 6 months and repeated in 10 rounds of historical dialogue; ② Priority attention to product after-sales warranty policies, with corresponding timestamps covering the last 4 months and repeated in 7 rounds of historical dialogue; ③ Attention to the material safety standards of a certain maternal and infant product, with corresponding timestamps in 2 rounds of dialogue within the last 15 days; ④ Request for detailed step-by-step explanation of the refund process, with corresponding timestamps in 1 round of dialogue within the last 5 days. According to the classification rules, items ① and ② simultaneously meet the requirements of long-term time window and repetition frequency, and are classified as long-term steady-state preference information; the timestamps of items ③ and ④ fall within the short-term time window and are classified as short-term dynamic preference information.

[0082] Through steps H1-H3, we can ensure that preference information is highly adapted to the current dialogue scenario, accurately distinguish between users' long-term and short-term needs, balance dialogue consistency and real-time performance, improve the accuracy of preference inference, and reduce interference from redundant information.

[0083] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 11 to 15 can be device A; or the execution subject of steps 11 to 12 can be device A, and the execution subject of steps 13 to 15 can be device B; and so on.

[0084] Furthermore, some processes described in the above embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 12, 13, etc., are merely used to distinguish different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.

[0085] It should be noted that the terms "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.

[0086] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. This electronic device is applicable to the dialogue method provided in the foregoing embodiments, such as... Figure 2 As shown, the electronic device may include: a memory 201, a processor 202, and a communication component 203.

[0087] Memory 201 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0088] In some exemplary embodiments, processor 202, coupled to memory 201, is configured to execute a computer program in memory 201 for: acquiring the current round of dialogue content between the intelligent customer service representative and a target user, and a historical dialogue dataset corresponding to the target user; selecting target historical dialogue content from the historical dialogue dataset that has a semantic association with the current round of dialogue content; using a large language model, inferring user preference information based on the target historical dialogue content and the current round of dialogue content to obtain current round user preference information adapted to the current round of dialogue content; using the current round user preference information as the model interaction context for constructing the current round of dialogue, so as to use the model interaction context to drive the large language model to generate dialogue response content adapted to the current round user preference information; and outputting the dialogue response content to the target user to complete the current round of dialogue.

[0089] Optionally, when the processor 202 selects target historical dialogue content that is semantically related to the current round of dialogue content from the historical dialogue dataset, it specifically performs the following steps: assigning temporal weights to multiple historical dialogue contents in the historical dialogue dataset according to the order in which the dialogues occurred; ensuring that any historical dialogue content is negatively correlated with the time interval and temporal weight of the current round; semantically encoding the current round of dialogue content and the multiple historical dialogue contents to obtain a current round semantic vector and multiple historical semantic vectors; calculating the basic semantic similarity between the current round semantic vector and each of the historical semantic vectors, and fusing the basic semantic similarity with the temporal weight of the corresponding historical dialogue content to obtain a comprehensive correlation; identifying the user intent type of the current round of dialogue content, and adjusting a preset semantic correlation threshold based on the user intent type and the historical dialogue frequency of the target user; determining a target historical semantic vector from the multiple historical semantic vectors whose comprehensive correlation with the current round semantic vector is greater than the adjusted semantic correlation threshold, and using the historical dialogue content corresponding to the target historical semantic vector as the target historical dialogue content.

[0090] Optionally, when the processor 202 uses a large language model to infer user preference information based on the target historical dialogue content and the current dialogue content, and obtains target user preference information that matches the current dialogue content, it specifically performs the following steps: constructing preference inference prompts; the preference inference prompts have constraint parameters used to constrain the information weight allocation, inference orientation dimension, and output specification during the preference inference process; inputting the preference inference prompts, the target historical dialogue content, and the current dialogue content into the large language model, and performing the following steps within the large language model: generating historical dialogue summary data corresponding to the target historical dialogue content; the historical dialogue summary data retains the user's core demands, historical preference features, and key interaction information in the target historical dialogue content; supplementing the historical dialogue summary data with the current dialogue content to obtain an incremental dialogue summary; and, guided by the preference inference prompts, inferring target user preference information that matches the current dialogue content based on the incremental dialogue summary.

[0091] Optionally, when the processor 202, guided by the preference inference prompts, infers target user preference information adapted to the current round of dialogue content based on the incremental dialogue summary, it specifically performs the following steps: Under the guidance of the preference inference prompts, extracting target features from the incremental dialogue summary; the target features include multiple sub-features: service interaction features, user expression features, and demand tendency features; identifying dialogue scenario tags corresponding to the current round of dialogue content and platform operation attribute tags corresponding to the target user based on the incremental dialogue summary; adjusting the constraint parameters of the preference inference prompts based on the dialogue scenario tags and platform operation attribute tags; and inferring target user preference information adapted to the current round of dialogue content based on the adjusted preference inference prompts and the target features.

[0092] Optionally, when the processor 202 infers target user preference information that matches the current round of dialogue content based on the adjusted preference inference prompts and the target features, it specifically performs the following: dimensionality reduction and feature enhancement on the high-dimensional semantic features corresponding to each sub-feature in the target features, and performs cross-dimensional association operations between sub-features on the high-dimensional semantic features after dimensionality reduction and feature enhancement; constructs a feature association matrix based on the result of the cross-dimensional association operations to structurally present the association relationships between the multiple sub-features; determines the potential preference associations between the multiple sub-features based on the feature association matrix, and outputs a comprehensive feature vector after fusing the multiple sub-features based on the potential preference associations; performs deep mapping on the comprehensive feature vector in conjunction with the constraint parameters of the adjusted preference inference prompts to obtain candidate user preference information that matches the current round of dialogue content; and selects user preference information that matches the current dialogue scenario from the candidate user preference information based on the scenario constraints corresponding to the scenario tags, as the target user preference information.

[0093] Optionally, when the processor 202 selects user preference information matching the current dialogue scenario from the candidate user preference information based on the scenario constraints corresponding to the scenario label, and uses it as the target user preference information, the specific steps are as follows: selecting user preference information matching the current dialogue scenario from the candidate user preference information based on the scenario constraints corresponding to the scenario label; dividing the user preference information into long-term steady-state preference information and short-term dynamic preference information based on the timestamp information corresponding to the target historical dialogue content; and performing weighted fusion of the long-term steady-state preference information and the short-term dynamic preference information to obtain the target user preference information.

[0094] Optionally, when the processor 202 divides the user preference information into long-term steady-state preference information and short-term dynamic preference information based on the timestamp information corresponding to the target historical dialogue content, it is specifically used to: classify user preference information whose timestamps fall within a preset long-term preference time window and repeatedly appear in multiple rounds of historical dialogue as long-term steady-state preference information; and classify user preference information whose timestamps fall within a preset short-term preference time window as short-term dynamic preference information.

[0095] This application also provides a computer-readable storage medium that, when executed by a processor, enables the processor to implement the steps in the dialogue method.

[0096] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, enable the processor to implement the steps in the dialogue method.

[0097] In this embodiment, the current dialogue content between the intelligent customer service representative and the target user, as well as the target user's corresponding historical dialogue dataset, can be obtained. Target historical dialogue content that has a semantic relationship with the current dialogue content is selected from the historical dialogue dataset. Using a large language model, user preference information is inferred based on the target historical dialogue content and the current dialogue content to obtain current user preference information that matches the current dialogue content. This current user preference information is used as the model interaction context for constructing the current dialogue, thereby using the model interaction context to drive the large language model to generate dialogue response content that matches the current user preference information. The dialogue response content is then output to the target user to complete the current dialogue. This approach reduces context resource consumption and improves the large model's instruction compliance capability and the accuracy of the intelligent customer service representative's responses.

[0098] Furthermore, such as Figure 2 As shown, the electronic device also includes other components such as a display 204, a power supply component 205, and an audio component 206. Figure 2 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 2 The components shown.

[0099] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0100] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0101] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0102] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.

[0103] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0104] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.

[0105] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0106] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0107] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0108] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.

[0109] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0110] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0111] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. 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 apparatus that includes that element.

[0112] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A dialogue method, characterized by include: Obtain the current conversation content between the intelligent customer service and the target user, as well as the historical conversation dataset corresponding to the target user; Select target historical dialogue content that has a semantic relationship with the content of the current round of dialogue from the historical dialogue dataset; Using a large language model, based on the target historical dialogue content and the current dialogue content, user preference information is inferred to obtain the current user preference information that is adapted to the current dialogue content; The user preference information of this round is used as the model interaction context for the current round of dialogue, so as to drive the large language model to generate dialogue response content adapted to the user preference information of this round using the model interaction context; The dialogue response is output to the target user to complete this round of dialogue.

2. The method of claim 1, wherein, Select target historical dialogue content from the historical dialogue dataset that has a semantic relationship with the content of the current round of dialogue, including: The historical dialogue content in the historical dialogue dataset is assigned a time-series weight according to the order in which the dialogues occur; any historical dialogue content is negatively correlated with the time interval and time-series weight of the current round. Semantic encoding is performed on the current round of dialogue content and the multiple historical dialogue contents to obtain the current round semantic vector and multiple historical semantic vectors; Calculate the basic semantic similarity between the semantic vector of the current round and each of the historical semantic vectors, and fuse the basic semantic similarity with the temporal weight of the corresponding historical dialogue content to obtain the comprehensive correlation degree; Identify the user intent type of the current round of dialogue content, and adjust the preset semantic association threshold according to the user intent type and the target user's historical dialogue frequency; From the plurality of historical semantic vectors, a target historical semantic vector is determined whose comprehensive correlation with the semantic vector of the current round is greater than the adjusted semantic correlation threshold, and the historical dialogue content corresponding to the target historical semantic vector is taken as the target historical dialogue content.

3. The method of claim 1, wherein, Using a large language model, based on the target's historical dialogue content and the current dialogue content, user preference information is inferred to obtain target user preference information that matches the current dialogue content, including: Construct preference reasoning prompts; the preference reasoning prompts have constraint parameters, which are used to constrain the information weight allocation, reasoning orientation dimension and output specification in the preference reasoning process; The preference inference prompts, the target historical dialogue content, and the current dialogue content are input into the large language model, and the following steps are performed within the large language model: Generate historical dialogue summary data corresponding to the target historical dialogue content; the historical dialogue summary data retains the user's core demands, historical preference characteristics, and key interaction information in the target historical dialogue content. The historical dialogue summary data is supplemented using the content of the current round of dialogue to obtain an incremental dialogue summary; Guided by the preference inference prompts, target user preference information that matches the content of the current round of dialogue is inferred based on the incremental dialogue summary.

4. The method according to claim 3, characterized in that, Guided by the preference inference prompts, and based on the incremental dialogue summary, target user preference information adapted to the content of the current dialogue round is inferred, including: Guided by the preference inference prompts, the target features of the incremental dialogue summary are extracted; the target features include the following sub-features: service interaction features, user expression features, and demand tendency features; Based on the incremental dialogue summary, identify the dialogue scenario tags corresponding to the content of the current round of dialogue, as well as the platform operation attribute tags corresponding to the target user; Based on the dialogue scenario tags and platform operation attribute tags, adjust the constraint parameters of the preference inference prompts; Based on the adjusted preference inference prompts, and according to the target features, target user preference information that matches the content of the current round of dialogue is inferred.

5. The method according to claim 4, characterized in that, Based on the adjusted preference inference prompts, and according to the target features, target user preference information adapted to the content of the current round of dialogue is inferred, including: Dimensionality reduction and feature enhancement are performed on the high-dimensional semantic features corresponding to each sub-feature in the target feature, and cross-dimensional association operations are performed between the sub-features on the high-dimensional semantic features after dimensionality reduction and feature enhancement. Based on the results of the cross-dimensional association operation, a feature association matrix is ​​constructed to present the association relationship between the multiple sub-features in a structured manner; The potential preference associations among the multiple sub-features are determined based on the feature association matrix, and a comprehensive feature vector after fusing the multiple sub-features is output based on the potential preference associations. By combining the constraint parameters of the adjusted preference inference prompts, a deep mapping is performed on the comprehensive feature vector to obtain candidate user preference information that matches the content of the current round of dialogue; Based on the scenario constraints corresponding to the scenario tags, user preference information that matches the current dialogue scenario is selected from the candidate user preference information and used as the target user preference information.

6. The method according to claim 5, characterized in that, Based on the scene constraints corresponding to the scene tags, user preference information matching the current dialogue scene is filtered from the candidate user preference information and used as the target user preference information, including: Based on the scene constraints corresponding to the scene tags, filter out user preference information that matches the current dialogue scene from the candidate user preference information; Based on the timestamp information corresponding to the target historical dialogue content, the user preference information is divided into long-term steady-state preference information and short-term dynamic preference information. The long-term steady-state preference information and the short-term dynamic preference information are weighted and fused to obtain the target user preference information.

7. The method according to claim 6, characterized in that, Based on the timestamp information corresponding to the target historical dialogue content, the user preference information is divided into long-term steady-state preference information and short-term dynamic preference information, including: Based on the timestamp information corresponding to the target historical dialogue content, user preference information whose timestamps fall within the preset long-term preference time window and repeatedly appear in multiple rounds of historical dialogue is classified as long-term steady-state preference information. User preference information whose timestamps fall within a preset short-term preference time window is classified as short-term dynamic preference information.

8. An electronic device, characterized in that, include: A memory and a processor; wherein the memory is configured to: store one or more computer instructions; and the processor is configured to execute the one or more computer instructions to: perform the steps of the method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of the method according to any one of claims 1-7.

10. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1-7.