A method and system for generating AI digital employee dialogue based on deep learning
By analyzing user conversation texts through deep learning, extracting personalized needs and calculating feature dispersion coefficients, adaptive reply texts are generated. This solves the shortcomings of traditional AI digital employees in understanding and consistency of personalized needs, and improves the pertinence of replies and user experience.
Patent Information
- Application Number
- CN202511042748.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-28
AI Technical Summary
Traditional AI digital employees find it difficult to effectively extract and understand user personal information when processing user personalized needs, resulting in insufficient pertinence and consistency in responses. In particular, the accuracy of intent recognition and knowledge base matching capabilities need to be improved in multi-round dialogue scenarios.
Through deep learning methods, the user's current and historical conversation texts are analyzed, the semantic information of personalized needs is extracted, the user's personality feature distribution state parameters and central reference value are calculated, the variation direction is determined, the feature dispersion coefficient is calculated and the personality response adjustment coefficient is generated, and the reply text is generated by combining the knowledge base information and role-based personality information.
It improves AI digital employees’ understanding of user personality traits and the targeting of their responses, maintains consistency in conversations, and enhances user experience.
Smart Images

Figure CN120542441B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for generating AI digital employee dialogues based on deep learning. Background Art
[0002] As AI digital employees are increasingly used in customer service, traditional technologies (such as systems based on sequence-to-sequence models or simple pre-trained language models) face technical challenges in handling user interactions:
[0003] When users mention personalized needs (such as a long-distance runner asking about smartwatch features), traditional systems struggle to effectively extract and deeply understand the user's personal information from the conversation, which, to some extent, affects the relevance of responses.
[0004] In multi-round dialogue scenarios, there is room for optimization in the use of historical information, which may lead to insufficient consistency in response content. In the face of complex or ambiguous user queries, the accuracy of intent recognition and knowledge base matching capabilities of traditional technologies also need to be improved.
[0005] In the existing technology, some studies have attempted to introduce user role information to achieve personality expression, but there is still room for improvement in the research on the perception and understanding mechanism of user personality. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide an AI digital employee dialogue generation method and system based on deep learning, so as to realize dynamic perception and quantitative analysis of user personality characteristics, and generate adaptive reply content accordingly.
[0007] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0008] In a first aspect, a method for generating AI digital employee dialogue based on deep learning is provided, the method comprising:
[0009] Step 1: Obtain and analyze the user's current conversation text and its associated historical conversation texts, extract semantic information representing the user's personalized needs, and output the identification results;
[0010] Step 2: categorize the user personality description information in the identification result according to predefined personalized categories, and output user personality information items with category labels;
[0011] Step 3, calculating the user personality characteristic distribution state parameter and the central reference value of the user personality characteristic distribution state parameter based on the user personality information item with the category label;
[0012] Step 4: determining two variation directions of the user's personality characteristic distribution state parameters, calculating the characteristic dispersion coefficient based on the variation directions, and converting the characteristic dispersion coefficient into a personality response adjustment coefficient according to a preset dispersion-response relationship;
[0013] Step 5: Combine the user's current conversation text and historical conversation text, the user's personal information items with category labels, the personal response adjustment coefficient, and the AI digital employee's preset knowledge base information and its own role-based personal information to generate a reply text for the user.
[0014] Furthermore, the user's current conversation text and its associated historical conversation text are obtained and analyzed, semantic information representing the user's personalized needs is extracted, and identification results are output, including:
[0015] Obtain the user's current conversation text, retrieve historical conversation text associated with the user, analyze the words, phrases, and contextual relationships in the current and historical conversation texts, and identify demand information related to the user's interests, preferences, lifestyle, or professional attributes;
[0016] If the demand information is recognized, the user personality description information including the demand information is output as the identification result; if the demand information is not recognized, the identification result indicating that there is no personalized information is output.
[0017] Furthermore, the user personality description information in the identification result is classified according to the predefined personalized categories, and the user personality information items with category labels are output, including:
[0018] Receive the identification result. If the identification result contains user personality description information, match the user personality description information with predefined interest preference categories, life habit categories, and occupation attribute categories, and output user personality information items with interest preference, life habit or occupation attribute tags.
[0019] Furthermore, based on the user personality information items with category labels, the user personality characteristic distribution state parameters and the central reference value of the user personality characteristic distribution state parameters are calculated, including:
[0020] Receive user personal information items with category tags, and count the number of information items with interest preference tags, the number of information items with lifestyle tags, and the number of information items with occupation attribute tags;
[0021] Convert the number of interest preferences, the number of living habits, and the number of occupational attributes into corresponding numerical values to obtain the interest preference dimension value, the living habit dimension value, and the occupational attribute dimension value;
[0022] Combining the interest preference dimension value, the living habit dimension value and the occupation attribute dimension value to form the user personality characteristic distribution state parameter;
[0023] Calculate the weighted average of the interest preference dimension value, life habit dimension value, and occupation attribute dimension value as the central reference value of the user's personality characteristic distribution state parameter.
[0024] Furthermore, two variation directions of the user's personality characteristic distribution state parameters are determined, and based on the variation directions, the characteristic dispersion coefficient is calculated. Then, according to a preset dispersion-response relationship, the characteristic dispersion coefficient is converted into a personality response adjustment coefficient, including:
[0025] Receiving a user personality characteristic distribution state parameter and a central reference value, wherein the user personality characteristic distribution state parameter is composed of an interest preference dimension value, a living habit dimension value, and an occupation attribute dimension value to form a feature vector;
[0026] Calculate the difference vector based on the eigenvector and the central reference value vector, and calculate the correlation statistics of the changes in different dimensions based on the difference vector; determine the two variation directions of the eigenvector based on the correlation statistics;
[0027] Extract the eigenvalues corresponding to the two variation directions, and calculate the ratio of the maximum value to the minimum value of the two eigenvalues as the characteristic dispersion coefficient;
[0028] According to the preset discreteness-response relationship, the characteristic discreteness coefficient is mapped to the corresponding personality response adjustment coefficient; the discreteness-response relationship defines the numerical mapping relationship between the characteristic discreteness coefficient and the personality response adjustment coefficient, which is used to dynamically adjust the influence weight of the user's personality information item when generating a reply.
[0029] Furthermore, a difference vector is calculated based on the eigenvector and the central reference value vector, and correlation statistics of changes in different dimensions are calculated based on the difference vector; two variation directions of the eigenvector are determined based on the correlation statistics, including:
[0030] Based on the difference vector, the covariation relationship matrix between the changes in the values of the three dimensions of interest preferences, living habits and occupational attributes is calculated. The covariation relationship matrix represents the correlation statistics of the changes in different dimensions;
[0031] Perform eigendecomposition on the covariance matrix to obtain a sequence of eigenvectors sorted from largest to smallest by eigenvalue;
[0032] The eigenvectors ranked 1 and 2 in the eigenvector sequence are selected as the two mutation directions of the eigenvectors.
[0033] Furthermore, the system combines the user's current and historical conversation texts, the user's personal information items with category labels, the personal response adjustment coefficient, and the AI digital employee's preset knowledge base information and its own role-based personal information to generate a reply text for the user, including:
[0034] The AI digital employee receives the user's current conversation text and associated historical conversation text, the user's personality information items with category labels, and the personality response adjustment coefficient;
[0035] Dynamically adjust the weight of the user's personality information items according to the personality response adjustment coefficient to generate a personality feature vector scaled by the category label;
[0036] The AI digital employee inputs the scaled personality feature vector, the user's current conversation text and historical conversation text, preset knowledge base information and role-based personality information into the conversation generation engine to generate natural language response text.
[0037] The second aspect is a deep learning-based AI digital employee dialogue generation system, including:
[0038] Semantic extraction module, used to obtain and analyze the user's current conversation text and historical conversation text, extract semantic information that represents the user's personalized needs, and output identification results;
[0039] An information classification module is used to classify the user personality description information in the identification result according to predefined personalization categories and output user personality information items with category labels;
[0040] A feature distribution module, configured to calculate user personality feature distribution state parameters and a central reference value based on user personality information items with category labels;
[0041] A dispersion response module is used to determine the two variation directions of the user's personality characteristic distribution state parameters, calculate the characteristic dispersion coefficient based on the variation direction, and convert the characteristic dispersion coefficient into a personality response adjustment coefficient according to a preset dispersion-response relationship;
[0042] The reply text module is used to combine the user's current conversation text and historical conversation text, user personality information items with category labels, personality response adjustment coefficients, as well as the AI digital employee's preset knowledge base information and its own role-based personality information to generate a reply text for the user.
[0043] According to a third aspect, a computing device includes:
[0044] one or more processors;
[0045] The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method.
[0046] In a fourth aspect, a computer-readable storage medium stores a program, which implements the method when executed by a processor.
[0047] The above solution of the present invention includes at least the following beneficial effects:
[0048] By analyzing the user's current and historical conversation text, the AI digital employee can extract and categorize the user's personalized needs, enabling them to better understand their specific needs and generate more targeted responses. Calculating the user's personality trait distribution parameters and central reference values helps the AI digital employee gain a deeper understanding of the user's individual characteristics and needs, providing data support for generating personalized responses. Determining the direction of variation in the user's personality trait distribution parameters, calculating the feature dispersion coefficient, and converting it into a personalized response adjustment coefficient allows the AI digital employee to dynamically adjust the personalized weight of responses based on changes in the user's personality traits, improving the adaptability and accuracy of responses.
[0049] By combining user conversation text, personal information items, adjustment coefficients, knowledge base, and role-based personal information, the generated responses are not only targeted but also maintain consistency with the user conversation, while meeting the role characteristics of AI digital employees themselves and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a flowchart of a method for generating AI digital employee dialogue based on deep learning provided by an embodiment of the present invention.
[0051] Figure 2 This is a schematic diagram of an AI digital employee dialogue generation system based on deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0053] like Figure 1 As shown, an embodiment of the present invention proposes a method for generating AI digital employee dialogue based on deep learning, the method comprising the following steps:
[0054] Step 1: Obtain and analyze the user's current conversation text and its associated historical conversation texts, extract semantic information representing the user's personalized needs, and output the identification results;
[0055] Step 2: categorize the user personality description information in the identification result according to predefined personalized categories, and output user personality information items with category labels;
[0056] Step 3, calculating the user personality characteristic distribution state parameter and the central reference value of the user personality characteristic distribution state parameter based on the user personality information item with the category label;
[0057] Step 4: determining two variation directions of the user's personality characteristic distribution state parameters, calculating the characteristic dispersion coefficient based on the variation directions, and converting the characteristic dispersion coefficient into a personality response adjustment coefficient according to a preset dispersion-response relationship;
[0058] Step 5: Combine the user's current conversation text and historical conversation text, the user's personal information items with category labels, the personal response adjustment coefficient, and the AI digital employee's preset knowledge base information and its own role-based personal information to generate a reply text for the user.
[0059] In an embodiment of the present invention, by analyzing the user's current and historical conversation texts, extracting and identifying personalized semantic information, AI can perceive the user's personalized needs, such as interests and habits. This changes the situation where traditional technologies have difficulty effectively extracting user personality information, laying the foundation for targeted replies. The user's personality description information is classified according to predefined categories, and labeled personality information items are output, so that the scattered personality information is formed into structured data. The personality feature distribution parameters and central reference values are calculated to quantitatively present the distribution of the user's personality features in different dimensions, providing data support for AI to generate replies, making the replies more in line with the user's personality characteristics.
[0060] Determine the variation direction of the distribution of personality traits, calculate the dispersion coefficient and convert it into an adjustment coefficient, so as to dynamically adjust the influence weight of the personality information in the reply according to the user's personality traits, making the reply more adaptable.
[0061] By combining user conversation text, personal information items, adjustment coefficients, knowledge base, and role-based personal information, responses are generated that meet user needs, maintain conversation consistency, and reflect the characteristics of the AI character, thereby improving the user experience.
[0062] In a preferred embodiment of the present invention, the above step 1 of obtaining and analyzing the user's current conversation text and its associated historical conversation texts, extracting semantic information representing the user's personalized needs, and outputting identification results may include:
[0063] Step 100: Obtain the conversation text currently input by the user, retrieve the historical conversation text associated with the user, analyze the words, phrases and contextual relationships in the current conversation text and historical conversation texts, and identify the user's interest preferences, living habits or professional attributes related demand information;
[0064] Step 101: If the demand information is identified, the user personality description information including the demand information is output as an identification result; if the demand information is not identified, the identification result indicating that there is no personalized information is output.
[0065] In this embodiment of the present invention, the user's current conversation text is obtained through the input interface (e.g., a user asks, "I'm a long-distance running enthusiast. Does this watch have heart rate monitoring?"). Simultaneously, the user's previous interaction records are retrieved from a historical conversation database based on user identification (e.g., ID, session number, etc.), forming a complete collection of conversation text. For example, if the user previously mentioned, "I'm a programmer and I often sit for long periods of time," the historical conversation text must include this information. Basic processing, such as word segmentation and stop word removal, is performed on the current and historical conversation texts to convert the text into a word sequence. For example, the phrase "I'm a long-distance running enthusiast" is segmented into "I," "I am," "long-distance running," and "enthusiast," and stop words such as "I am" are removed.
[0066] Analyze words, phrases, and contextual relationships in text through natural language processing techniques (such as keyword matching algorithms).
[0067] Specifically, a keyword dictionary related to the user's interest preferences (such as "long-distance running" and "music"), lifestyle habits (such as "getting up early" and "fitness"), and professional attributes (such as "programmer" and "teacher") is preset. If words such as "long-distance running" and "programmer" appear in the text, they are marked as candidate demand information. The actual semantics of the keywords are judged in combination with the context. For example, the user mentioned "I run every morning". Through the context association of "morning" and "running", it is determined that it belongs to the "morning exercise" demand in "life habits" rather than a simple sports interest. Based on the results of preprocessing and semantic analysis, it is judged whether there is demand information related to interest preferences, lifestyle habits or professional attributes in the text. For example, if "long-distance running enthusiasts" appear in the text, it is identified as an interest preference demand; if "programmer" appears, it is identified as a professional attribute demand.
[0068] In step 101, if clear demand information is identified in step 100 (e.g., the user mentions "I am a teacher and need to stand for long periods of time"), this demand information is organized into structured user personality description information. For example, a description such as "Occupational attribute: teacher, long periods of standing" is generated and output as the identification result. If no information related to interests, preferences, lifestyle habits, or occupational attributes is identified in the text (e.g., the user simply asks "How much is the watch?"), a unified identification result (e.g., "No personalized information") is generated, indicating that the current conversation does not involve the user's personalized needs.
[0069] By combining semantic analysis of current and historical conversations, the system can deeply identify users' implicit personalized needs (such as those arising from their profession), avoiding superficial reliance on keyword matching and improving the accuracy of demand extraction. Retrieving and analyzing historical conversations allows the system to continuously track user characteristics (such as previously mentioned interests and hobbies), providing a coherent information foundation for personalized responses across multiple rounds of conversation.
[0070] When the conversation does not involve the user's personal information, a unified non-personalized label is output to avoid system misjudgment and ensure the rigor of the response logic.
[0071] In a preferred embodiment of the present invention, the above step 2, categorizing the user personality description information in the identification result according to predefined personalized categories and outputting user personality information items with category labels, may include:
[0072] Step 200, receiving the identification result. If the identification result contains user personality description information, the user personality description information is matched with predefined interest preference categories, life habit categories, and occupational attribute categories, and the user personality information item with interest preference, life habit or occupational attribute tags is output.
[0073] In this embodiment of the present invention, the identification result of the user's personality description information is obtained from the output of step 1 to clarify whether the current identification result contains personalized demand information. For example, if step 1 outputs "occupational attribute: teacher, standing for a long time", the identification result is that it contains personality description information; if the output is "no personalized information", the processing is terminated directly. The system's preset personalized category dictionary is called, which contains three categories of interest preferences, living habits, and occupational attributes and their sub-feature keywords. For example:
[0074] Interest preference categories: sub-feature keywords include "long-distance running", "music", "reading", "photography", etc.
[0075] Lifestyle category: sub-feature keywords include "getting up early", "morning exercise", "vegetarian", "staying up late", etc.
[0076] Occupational attribute category: Sub-feature keywords include "teacher", "programmer", "doctor", "designer", etc.
[0077] The user's personality profile is segmented to extract core feature words. For example, if the profile is "long-distance running enthusiast, runs every morning," the segmentation results are "long-distance running," "enthusiast," "every day," and "morning run," with the core feature words being "long-distance running" and "morning run." The core feature words are precisely matched with sub-feature keywords from predefined categories. For example, "long-distance running" matches the keyword "long-distance running" in the interest preference category, and "teacher" matches the keyword "teacher" in the occupation attribute category. If a core feature word cannot be directly matched (such as "morning run" in "every morning run"), semantic expansion (such as using synonyms and calculating semantic vector similarity) is used to determine its category. For example, "morning run" can be associated with the keyword "morning exercise" in the lifestyle category. When the personality profile involves multiple categories (such as "programmer likes running"), the primary category is determined based on the preset priority (occupation attribute > interest preference > lifestyle habit). For example, "programmer" is prioritized in the occupation attribute category, while "running" is prioritized in the interest preference category, ultimately outputting two category labels.
[0078] After matching, the personality description information is combined with the corresponding category label to form a structured user personality information item. For example, if the personality description information "Teacher, long standing" is matched to the occupation attribute category, the information item "{category: occupation attribute, description: teacher, long standing}" will be generated; if "daily morning run" is matched to the lifestyle category, the information item "{category: lifestyle habit, description: daily morning run}" will be generated.
[0079] Personality profile information is categorized into predefined categories, converting unstructured user needs into standardized, labeled data (e.g., "interest preferences" and "occupational attributes"). Category labels clearly identify the nature of user needs (e.g., interests, habits, occupation), enabling the system to intuitively understand the dimensions of a user's personalized needs and providing a clear logical basis for generating targeted responses. When a user possesses personality traits across multiple dimensions (e.g., "a programmer who enjoys long-distance running"), categorization can distinguish the weights of needs across different categories, preventing information confusion.
[0080] In a preferred embodiment of the present invention, the above step 3, calculating the user personality characteristic distribution state parameter and the central reference value of the user personality characteristic distribution state parameter based on the user personality information item with the category label, may include:
[0081] Step 300: Receive user personal information items with category tags, and count the number of information items with interest preference tags, the number of information items with lifestyle tags, and the number of information items with occupation attribute tags;
[0082] Step 301: Convert the interest preference quantity, the living habit quantity, and the occupation attribute quantity into corresponding numerical values to obtain the interest preference dimension value, the living habit dimension value, and the occupation attribute dimension value;
[0083] Step 302: Combining the interest preference dimension value, the living habit dimension value, and the occupation attribute dimension value to form a user personality characteristic distribution state parameter;
[0084] Step 303: Calculate the weighted average of the interest preference dimension value, the living habit dimension value, and the occupation attribute dimension value as the central reference value of the user personality characteristic distribution state parameter.
[0085] In an embodiment of the present invention, user personality information items with category labels are obtained from the output of step 2, such as "{category: interest preference, description: long-distance running}" and "{category: occupational attribute, description: teacher}".
[0086] Create three independent counters, one for each of the interest preference, lifestyle, and occupational attribute categories, with an initial value of 0. Iterate through all information items one by one, incrementing the corresponding counter based on their category label. For example, if the information item label is "interest preference," increment the interest preference counter by 1; if the label is "occupational attribute," increment the occupational attribute counter by 1. For example, if the user's personal information items are "{interest preference: long-distance running}," "{occupational attribute: teacher}," and "{lifestyle: morning exercise}," then the interest preference counter, lifestyle habit counter, and occupational attribute counter will all be 1.
[0087] Step 301: Preset the mapping rules between counter values and dimension values, using linear conversion or normalization to ensure that the dimension value is within a specific range (e.g., [0, 1]). For example, if the maximum value of the counter is N, then the dimension value = counter value ÷ N (ensuring that the dimension value ∈ [0, 1]). Assign basic weights to different categories based on business needs (e.g., a basic value of 3 for interest preferences and a basic value of 5 for occupational attributes). The dimension value = counter value × basic weight. Based on the interest preference counter value, the corresponding numerical value is calculated according to the conversion rules. For example, if the counter value is 2 and the maximum possible count is 5, the normalized dimension value = 2 ÷ 5. Similarly, if the lifestyle counter value is 1 and the maximum count is 5, the dimension value = 1 ÷ 5; if the occupational attribute counter value is 3 and the maximum count is 5, the dimension value = 3 ÷ 5.
[0088] Step 302 combines the three dimension values into an ordered vector or array structure, represented as [interest preference dimension value, lifestyle dimension value, occupational attribute dimension value]. For example, if step 301 calculates the interest preference dimension value = 0.4, the lifestyle dimension value = 0.2, and the occupational attribute dimension value = 0.6, then the distribution state parameter is [0.4, 0.2, 0.6]. This parameter directly reflects the distribution ratio of the user's personality characteristics across the three dimensions—the occupational attribute dimension accounts for the largest proportion, followed by interest preferences, and finally lifestyle habits.
[0089] Step 303: Assign different weight coefficients to the three dimensions based on the business scenario, for example, interest preference weight = 0.3, lifestyle weight = 0.2, and occupation attribute weight = 0.5 (reflecting that occupation attribute has a greater impact on response generation). Multiply each dimension value by its corresponding weight and then sum them up. The formula is:
[0090] Central reference value = interest preference dimension value × interest preference weight + life habit dimension value × life habit weight + occupation attribute dimension value × occupation attribute weight.
[0091] Dimension values and distribution parameters transform user personalized needs from qualitative descriptions into quantitative data (e.g., a career attribute dimension value of 0.6), enabling the system to accurately measure the strength of needs across different dimensions. Distribution parameters (e.g., [0.4, 0.2, 0.6]) intuitively demonstrate the distribution differences in a user's personality across interests, habits, and career dimensions, helping the system identify the most prominent personalized needs (e.g., career attributes). A central reference value, generated by combining the weights of each dimension, reflects the overall level of a user's personality and serves as a benchmark for variance analysis (e.g., determining whether current personality traits deviate from the norm). Quantitative dimension values and central reference values provide data support for adjusting response strategies (e.g., prioritizing career-related features when the career attribute dimension value is high), thus mitigating subjective response logic. Distribution parameters and central values allow the system to track changes in a user's multidimensional personality traits in real time (e.g., updating dimension values when new interests and preferences are added), ensuring that response strategies dynamically adapt to user needs.
[0092] In a preferred embodiment of the present invention, the above step 4, determining two variation directions of the user personality characteristic distribution state parameter, calculating the characteristic dispersion coefficient based on the variation directions, and converting the characteristic dispersion coefficient into a personality response adjustment coefficient according to a preset dispersion-response relationship, may include:
[0093] Step 400: receiving a user personality characteristic distribution state parameter and a central reference value, wherein the user personality characteristic distribution state parameter is composed of an interest preference dimension value, a living habit dimension value, and an occupation attribute dimension value to form a feature vector;
[0094] Step 401 is to calculate a difference vector based on the eigenvector and the central reference value vector, and calculate correlation statistics of changes in different dimensions based on the difference vector; and determine two variation directions of the eigenvector based on the correlation statistics, specifically including:
[0095] Step 4010: Calculate the covariation relationship matrix between the changes in the values of the three dimensions of interest preferences, living habits, and occupational attributes based on the difference vectors. The covariation relationship matrix represents the correlation statistics of the changes in different dimensions.
[0096] Step 4011, perform eigendecomposition on the covariance matrix to obtain a sequence of eigenvectors sorted from largest to smallest by eigenvalue;
[0097] Step 4012: Select the eigenvectors ranked 1 and 2 in the eigenvector sequence as the two variation directions of the eigenvectors;
[0098] Step 402: extract the eigenvalues corresponding to the two variation directions, and calculate the ratio of the maximum value to the minimum value of the two eigenvalues as the characteristic dispersion coefficient;
[0099] Step 403, mapping the characteristic dispersion coefficient to the corresponding personality response adjustment coefficient according to the preset dispersion-response relationship; the dispersion-response relationship defines the numerical mapping relationship between the characteristic dispersion coefficient and the personality response adjustment coefficient, which is used to dynamically adjust the influence weight of the user's personality information item when generating a reply.
[0100] In this embodiment of the present invention, the user's personality characteristic distribution state parameters (i.e., a feature vector composed of dimensional values of interest preferences, living habits, and occupational attributes, such as [0.4, 0.2, 0.6]) and a central reference value (e.g., 0.46) are obtained from the output of step 303. The central reference value is expanded to a vector with the same dimension as the feature vector. For example, when the central reference value is 0.46, the central reference value vector is [0.46, 0.46, 0.46], ensuring a one-to-one correspondence with the feature vector in terms of dimension.
[0101] Step 4010: Subtract the corresponding dimensions of the feature vector from the central reference vector to obtain a difference vector. For example, if the feature vector is [0.4, 0.2, 0.6] and the central reference vector is [0.46, 0.46, 0.46], the difference vector is [0.4 - 0.46, 0.2 - 0.46, 0.6 - 0.46] = [-0.06, -0.26, 0.14]. If the system has historical data records, it is necessary to collect multiple difference vectors from the user (e.g., difference vectors from the past 10 conversations) to form a dataset. If this is the first interaction, a dataset is constructed based on the current difference vector and a preset initial value.
[0102] Covariance measures the correlation between changes in two dimensions. For example, calculating the covariance between interests and preferences and lifestyle habits reflects whether these changes are in the same direction (e.g., if interests and preferences increase, lifestyle habits also increase). Covariances are calculated for each of the three dimensions (interests and preferences, lifestyle habits, and occupational attributes) to form a 3×3 covariance matrix. The diagonal elements of the matrix represent the variance of each dimension (e.g., the variance of interests and preferences), while the off-diagonal elements represent the covariance between each dimension (e.g., the covariance between interests and preferences and lifestyle habits).
[0103] Step 4011 mathematically decomposes the covariation matrix to obtain a set of eigenvalues and corresponding eigenvectors. Eigenvalues represent the degree of variation in a given direction, while eigenvectors represent the direction of variation (e.g., the proportion of change in interest preferences and occupational attributes). The eigenvalues are arranged in descending order, and the corresponding eigenvectors are also sorted accordingly. For example, the eigenvalues are sorted as λ1 > λ2 > λ3, where λ1 corresponds to the direction with the highest degree of variation and λ2 corresponds to the direction with the second highest degree of variation.
[0104] Step 4012: Select the first two eigenvectors (i.e., the two with the largest eigenvalues) from the sorted eigenvector sequence as the primary variation directions of the user's personality traits. For example, if the eigenvector sequence is v1 (corresponding to λ1), v2 (corresponding to λ2), and v3 (corresponding to λ3), then select v1 and v2 as the two variation directions. These two directions can explain the primary pattern of variation in the user's personality traits (e.g., v1 may indicate a coordinated change between occupational attributes and interest preferences, while v2 may indicate an inverse change between lifestyle habits and occupational attributes).
[0105] Step 402: Obtain the eigenvalues λ1 and λ2 corresponding to the first two variation directions from the eigendecomposition results. Divide the maximum of the two eigenvalues by the minimum to obtain the feature dispersion coefficient. For example, if λ1 = 0.5 and λ2 = 0.2, then the dispersion coefficient = 0.5 ÷ 0.2 = 2.5. This coefficient reflects the degree of dispersion of the user's personality traits along the main variation directions. A larger coefficient indicates more significant variation across different dimensions (e.g., variation in one direction is much greater than in another).
[0106] In step 403, the system presets a mapping table or function (e.g., a linear function or a piecewise function) between the dispersion coefficient and the personalized response adjustment coefficient. For example, the mapping rule defines: when the dispersion coefficient ≤ 1, the adjustment coefficient = 0.8; when 1 < coefficient ≤ 2, the adjustment coefficient = 0.9; when the coefficient > 2, the adjustment coefficient = 1.0.
[0107] Based on the dispersion coefficient calculated in step 402, the corresponding personalized response adjustment coefficient is searched or calculated. For example, if the dispersion coefficient is 2.5, it is mapped to 1.0 according to the rules. This coefficient is used to dynamically adjust the influence weight of the user's personalized information when generating subsequent responses (e.g., the larger the coefficient, the greater the influence weight of the personalized information on the response).
[0108] By using a covariation matrix and eigenvalue decomposition, the system can identify correlations and variations among different dimensions of user personality traits (e.g., whether occupational attributes and interests vary synergistically), rather than analyzing a single dimension in isolation. This improves understanding of the dynamics of user needs. The eigenvalue dispersion coefficient numerically represents the distribution differences of user personality traits, providing a basis for determining the prominence of user needs (e.g., a high dispersion indicates that demand for one dimension is significantly higher than for others). The personalized response adjustment coefficient automatically adjusts based on dispersion, allowing the system to increase the weight of personalized responses when user personality traits differ significantly (e.g., high dispersion) and appropriately decrease it when differences are smaller (e.g., low dispersion), avoiding overly biased or untargeted responses. Variation direction analysis helps the system understand changing trends in user personality (e.g., recent increases in demand for occupational attributes and decreases in demand for interests), enabling response strategies to adapt to the dynamic evolution of user needs and enhance the consistency of the interactive experience. Derivation of the adjustment coefficient through mathematical methods (e.g., eigenvalue decomposition) avoids subjective weighting and makes the personalized response adjustment process interpretable, facilitating system optimization and problem identification.
[0109] In a preferred embodiment of the present invention, step 5 combines the user's current conversation text and historical conversation text, the user's personal information items with category labels, the personal response adjustment coefficient, and the AI digital employee's preset knowledge base information and its own role-based personal information to generate a reply text for the user, which may include:
[0110] Step 500: The AI digital employee receives the user's current conversation text and associated historical conversation texts, the user's personality information item with a category label, and the personality response adjustment coefficient;
[0111] Step 501: dynamically adjust the weights of the user's personality information items according to the personality response adjustment coefficient to generate a personality feature vector scaled by the category label;
[0112] In step 502 , the AI digital employee inputs the scaled personality feature vector, the user's current conversation text and historical conversation text, preset knowledge base information, and role-based personality information into the conversation generation engine to generate a natural language response text.
[0113] In this embodiment of the present invention, the AI digital employee obtains the user's current conversation text (e.g., "How does this watch's long-distance running mode record data?") through an input interface and retrieves the user's previous interaction records (e.g., "I'm a teacher and need a sedentary reminder function") from a conversation history database to form a complete conversation text set. From the output of step 2, the AI digital employee obtains user personal information items with category labels, such as "{category: interest preference, description: long-distance running}" or "{category: occupation attribute, description: teacher}," and verifies the category label (interest preference, lifestyle, occupation attribute) and content description of each information item. From the output of step 403, the AI digital employee obtains a personality response adjustment coefficient (e.g., 1.0). This coefficient is used to dynamically adjust the weight of the personality information's influence on response generation. The AI digital employee accesses its built-in product knowledge base (e.g., smartwatch functional parameters and usage scenarios) and persona-based personality information (e.g., customer service assistant's speech style and politeness templates). For example, the "long-distance running mode" function description in the knowledge base is "records pace, distance, and heart rate curve." The persona-based information includes standard opening lines such as "Hello, I'm happy to answer your question."
[0114] In step 501, the personality trait distribution state parameters (e.g., [0.4, 0.2, 0.6]) generated in step 302 are used as basis vectors, corresponding to the original weights of interest preferences, living habits, and occupational attributes. The personality response adjustment coefficient (e.g., 1.0) is multiplied by the original weights of each dimension to generate a scaled personality trait vector. For example:
[0115] New weight of interest preference dimension = 0.4 × 1.0 = 0.4;
[0116] New weight of lifestyle dimension = 0.2 × 1.0 = 0.2;
[0117] The new weight of the occupational attribute dimension = 0.6×1.0=0.6.
[0118] If the adjustment coefficient is greater than 1 (e.g., 1.2), the influence of personality information is increased; if it is less than 1 (e.g., 0.8), the influence is weakened. The scaled weights are bound to the corresponding category labels to form structured weighted personality information items. For example, a weight of 0.6 for the occupation attribute category corresponds to the information item "Teacher, long-term standing," and a weight of 0.4 for the interest preference category corresponds to "long-distance running enthusiast."
[0119] In step 502, the current and past conversation texts are segmented and vectorized, converting them into semantic features recognizable by the model (e.g., word vector sequences). The scaled personality feature vector (e.g., [0.4, 0.2, 0.6]) and category label information are encoded into structured features, such as "Interest Preferences: 0.4, Occupational Attributes: 0.6." Information related to the current query (e.g., "Long-Distance Running Mode") and persona-specific personality information (e.g., opening speech templates) in the knowledge base are converted into text embedding vectors.
[0120] Dialogue generation engine processing flow:
[0121] After tokenizing the user's current conversation text (e.g., "How do I record data in long-distance running mode?") and past conversation text, they are converted into a sequence of word vectors using a pre-trained language model (e.g., BERT). Each word is mapped into a 768-dimensional embedding vector, with positional encoding added to preserve sequence order. Category labels such as interests, lifestyle habits, and occupational attributes are mapped into 128-dimensional embedding vectors. For example, the "interests" label corresponds to a specific vector. The personality trait weights obtained in step 501 (e.g., 0.4 for interests and 0.6 for occupational attributes) are converted into scalars and element-wise multiplied by the embedding vector of the corresponding category label. For example, each dimension of the occupational attribute label vector is multiplied by 0.6 to enhance its influence in subsequent calculations.
[0122] Based on the semantic representation of the current conversation text, relevant entries (e.g., "Long-distance running mode supports heart rate monitoring and pace analysis") are retrieved from the knowledge base. After tokenization, the retrieved knowledge base text is encoded into a vector sequence using the same pre-trained model as the conversation text. A special knowledge identifier embedding is added to distinguish the conversation content from the knowledge base content. Role-based speech templates (e.g., "Hello, I'm happy to answer your question") and style constraint features (e.g., politeness level, proportion of professional terminology) are converted into vector representations to form a role-based context vector. The conversation text encoding, weighted personality information vector, knowledge base encoding, and role-based context vector are concatenated by dimension to form a comprehensive feature vector. For example, the concatenated vector has a dimension of 768 (conversation) + 128 (personality) + 768 (knowledge) + 128 (role) = 1792. A multi-layer perceptron (MLP) is used to perform a nonlinear transformation on the concatenated vector to compress the dimensions and extract interaction information between features, generating the final fused feature vector (e.g., 512 dimensions).
[0123] The fused feature vector is projected into the query, key, and value spaces, with each head having a dimension of 512 ÷ 8 = 64 (assuming 8 heads). For each head, the dot product similarity between the query vector at the current position and the key vectors at all positions is calculated to obtain the attention score matrix.
[0124] Applying the softmax function to the attention score matrix converts the scores into a weight distribution, ensuring that the sum of all weights is 1. Based on the normalized weights, the value vector is weighted summed to obtain the output of each head. After concatenating the outputs of all heads, the linear projection is restored to the original dimension (512 dimensions) to obtain the final output of the self-attention layer.
[0125] In the decoder, a cross-modal attention mechanism is used to calculate the relevance of the current generated position to the knowledge base content. For example, when generating a response related to "long-distance running mode," attention weighting will be biased toward the vector positions corresponding to keywords such as "heart rate monitoring" and "pace analysis" in the knowledge base. Personality trait weighting influences attention calculations through a gating mechanism. For example, a high occupational attribute weight of 0.6 will increase the decoder's attention weighting for content related to "teachers" in the knowledge base (such as sedentary reminders).
[0126] With a special start marker (such as <start>) serves as the first input to the decoder. The decoder uses a cross-attention mechanism to focus on the fused feature vector output by the encoder, obtaining contextual representations of conversational, personality, knowledge, and role-based information. Each decoder layer processes the currently generated word sequence using a self-attention mechanism and integrates the encoder output using a cross-attention mechanism to update the hidden state. The final decoder layer projects the hidden state into a vocabulary-sized space and generates a probability distribution for the next word using a softmax function. For example, when generating responses related to "long-distance running mode," the probability of words like "heart rate" and "pace" increases due to the guidance of the knowledge base and personality information. When predicting the probability distribution, the role-based style constraint vector influences word selection through a bias term, for example, increasing the probability score of polite expressions (such as "please" and "thank you") and reducing the probability of unconventional speech. Personality trait weights directly adjust the generation probability of category-related words. For example, when the occupation attribute weight is high (0.6), the decoder increases the generation probability of words related to "teacher" (such as "sitting for a long time" and "classroom"). Through the hierarchical attention mechanism, the response structure is planned according to the personality weight. For example, when a user asks about "long-distance running mode" and career needs at the same time, the system will prioritize generating functional answers related to interest preferences (weight 0.4), and then generate career-related suggestions (weight 0.6).
[0127] Generated text is matched against a predefined library of grammatical rules (such as subject-verb-object structure and tense consistency) to identify and flag potential grammatical errors. A separate language model is used to score candidate text and select the most probable correction. For example, to correct "This feature can help you track your runs" to "This feature can help you record your running data," a classifier predicts the punctuation (such as commas and periods) that should be added after each word based on the word's part of speech, contextual semantics, and prosodic features. Responses are divided into multiple paragraphs based on content topic and length—for example, a feature introduction in one paragraph and personalized recommendations in another—to improve readability. A library of role-specific script templates (such as customer service opening and closing statements) is maintained, replacing generic statements with specialized scripts that align with the role's positioning. For example, "This product is great" can be replaced with "This product's long-distance running mode is very thoughtful and especially suitable for long-distance runners like you." The frequency of polite language is dynamically adjusted based on the role's positioning and conversation context. For example, customer service roles may include polite words such as "please" and "please ask" to avoid overly casual expressions. Combine the optimized parts (opening remarks, functional answers, personalized suggestions, and closing remarks) into a complete response according to the planned structure, ensuring logical coherence and a unified style. For example:
[0128] "Hello, I'm happy to answer your question! The long-distance running mode of this watch can record your heart rate, pace, and running track in real time. As a teacher, you may need to stand or sit for long periods of time, and our sedentary reminder function is also suitable for you. I hope this information is helpful to you!"
[0129] By integrating user information from current and past conversations (such as interests and occupations) and dynamically adjusting weights based on adjustment coefficients, responses are precisely tailored to the user's individual needs, avoiding generic responses. The inclusion of historical conversation text allows the system to track previous user requests (e.g., a user inquired about battery life), maintaining consistency in responses across multiple rounds of conversation (e.g., a subsequent reply could mention "the previously mentioned battery life is 7 days"), enhancing the user experience. By integrating product knowledge base information with user characteristics, responses accurately convey functional specifications (e.g., long-distance running mode tracking metrics) while providing customized recommendations (e.g., "As a long-distance runner, I recommend enabling the heart rate alert feature"), enhancing the practicality of responses. AI digital employee role-specific information (e.g., customer service style) ensures that responses adhere to business contextual communication standards (e.g., polite language and the use of technical terminology), avoiding conflicts between response style and role definition (e.g., customer service assistants avoid using casual, colloquial expressions). The personality response adjustment coefficient is automatically adjusted according to the degree of discreteness of the user's personality characteristics, so that the system can strengthen personalized responses when user needs differ significantly (such as high discreteness), and maintain basic functional answers when needs are more conventional (such as low discreteness), balancing the targetedness and versatility of the responses.
[0130] like Figure 2 As shown, an embodiment of the present invention further provides an AI digital employee dialogue generation system based on deep learning, comprising:
[0131] Semantic extraction module, used to obtain and analyze the user's current conversation text and historical conversation text, extract semantic information that represents the user's personalized needs, and output identification results;
[0132] An information classification module is used to classify the user personality description information in the identification result according to predefined personalization categories and output user personality information items with category labels;
[0133] A feature distribution module, configured to calculate user personality feature distribution state parameters and a central reference value based on user personality information items with category labels;
[0134] A dispersion response module is used to determine the two variation directions of the user's personality characteristic distribution state parameters, calculate the characteristic dispersion coefficient based on the variation direction, and convert the characteristic dispersion coefficient into a personality response adjustment coefficient according to a preset dispersion-response relationship;
[0135] The reply text module is used to combine the user's current conversation text and historical conversation text, user personality information items with category labels, personality response adjustment coefficients, as well as the AI digital employee's preset knowledge base information and its own role-based personality information to generate a reply text for the user.
[0136] It should be noted that this system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effects.
[0137] An embodiment of the present invention further provides a computing device comprising: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the above-described method. All implementations in the above-described method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0138] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, causes the computer to execute the above-described method. All implementations in the above-described method embodiment are applicable to this embodiment and can achieve the same technical effects.
[0139] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.< / start>
Claims
1. A method for generating AI digital employee dialogue based on deep learning, characterized in that: The method comprises: Step 1: Obtain and analyze the user's current conversation text and its associated historical conversation texts, extract semantic information representing the user's personalized needs, and output the identification results; Step 2: classify the user personality description information in the identification result according to the predefined personalized category, and output the user personality information item with the category label; Step 3, calculating the user personality characteristic distribution state parameter and the central reference value of the user personality characteristic distribution state parameter based on the user personality information item with the category label; Step 4, determining two variation directions of the user's personality characteristic distribution state parameters, calculating the characteristic dispersion coefficient based on the variation direction, and converting the characteristic dispersion coefficient into a personality response adjustment coefficient according to a preset dispersion-response relationship, including: receiving the user's personality characteristic distribution state parameters and a central reference value, wherein the user's personality characteristic distribution state parameters are composed of an interest preference dimension value, a living habit dimension value, and an occupational attribute dimension value to form a characteristic vector; calculating a difference vector based on the characteristic vector and the central reference value vector, and calculating correlation statistics of changes in different dimensions based on the difference vector; determining two variation directions of the characteristic vector based on the correlation statistics, wherein, based on the difference vector, the three dimensions of interest preference, living habit, and occupational attribute are calculated. a covariance relationship matrix between value changes, wherein the covariance relationship matrix represents the correlation statistics of changes in different dimensions; performing eigendecomposition on the covariance matrix to obtain a sequence of eigenvectors sorted from large to small by eigenvalue; selecting eigenvectors sorted 1 and 2 in the eigenvector sequence as two variation directions of the eigenvector; extracting the eigenvalues corresponding to the two variation directions, and calculating the ratio of the maximum value to the minimum value of the two eigenvalues as the characteristic dispersion coefficient; mapping the characteristic dispersion coefficient to the corresponding personality response adjustment coefficient according to a preset dispersion-response relationship; the dispersion-response relationship defines a numerical mapping relationship between the characteristic dispersion coefficient and the personality response adjustment coefficient, which is used to dynamically adjust the influence weight of the user's personality information item when generating a reply; Step 5: Combine the user's current conversation text and historical conversation text, the user's personal information items with category labels, the personal response adjustment coefficient, and the AI digital employee's preset knowledge base information and its own role-based personal information to generate a reply text for the user.
2. The method for generating AI digital employee dialogue based on deep learning according to claim 1 is characterized in that: Acquire and analyze the user's current conversation text and its associated historical conversation text, extract semantic information that represents the user's personalized needs, and output identification results, including: Obtain the user's current conversation text, retrieve historical conversation text associated with the user, analyze the words, phrases, and contextual relationships in the current and historical conversation texts, and identify demand information related to the user's interests, preferences, lifestyle, or professional attributes; If the demand information is recognized, the user personality description information including the demand information is output as the identification result; if the demand information is not recognized, the identification result indicating that there is no personalized information is output.
3. The method for generating AI digital employee dialogue based on deep learning according to claim 2, characterized in that: The user personality description information in the identification result is classified according to the predefined personalized categories, and the user personality information items with category labels are output, including: Receive the identification result. If the identification result contains user personality description information, match the user personality description information with predefined interest preference categories, life habit categories, and occupation attribute categories, and output user personality information items with interest preference, life habit or occupation attribute tags.
4. The method for generating AI digital employee dialogue based on deep learning according to claim 3 is characterized in that: Calculating a user personality characteristic distribution state parameter and a central reference value of the user personality characteristic distribution state parameter based on the user personality information item with the category label includes: Receive user personal information items with category tags, and count the number of information items with interest preference tags, the number of information items with lifestyle tags, and the number of information items with occupation attribute tags; Convert the number of interest preferences, the number of living habits, and the number of occupational attributes into corresponding numerical values to obtain the interest preference dimension value, the living habit dimension value, and the occupational attribute dimension value; Combining the interest preference dimension value, the living habit dimension value and the occupation attribute dimension value to form the user personality characteristic distribution state parameter; Calculate the weighted average of the interest preference dimension value, life habit dimension value, and occupation attribute dimension value as the central reference value of the user's personality characteristic distribution state parameter.
5. The method for generating AI digital employee dialogue based on deep learning according to claim 4 is characterized in that: The AI generates a response text tailored to the user by combining the user's current and historical conversation texts, the user's personalized information items with category labels, the personalized response adjustment coefficient, and the AI digital employee's preset knowledge base information and its own role-based personality information, including: The AI digital employee receives the user's current conversation text and associated historical conversation text, the user's personality information items with category labels, and the personality response adjustment coefficient; Dynamically adjust the weight of the user's personality information items according to the personality response adjustment coefficient to generate a personality feature vector scaled by the category label; The AI digital employee inputs the scaled personality feature vector, the user's current conversation text and historical conversation text, preset knowledge base information and role-based personality information into the conversation generation engine to generate natural language response text.
6. A deep learning-based AI digital employee dialogue generation system, which implements the method according to any one of claims 1 to 5, characterized in that: include: Semantic extraction module, used to obtain and analyze the user's current conversation text and historical conversation text, extract semantic information that represents the user's personalized needs, and output identification results; An information classification module is used to classify the user personality description information in the identification result according to predefined personalization categories and output user personality information items with category labels; A feature distribution module, configured to calculate user personality feature distribution state parameters and a central reference value based on user personality information items with category labels; A dispersion response module is used to determine the two variation directions of the user's personality characteristic distribution state parameters, calculate the characteristic dispersion coefficient based on the variation direction, and convert the characteristic dispersion coefficient into a personality response adjustment coefficient according to a preset dispersion-response relationship; The reply text module is used to combine the user's current conversation text and historical conversation text, user personality information items with category labels, personality response adjustment coefficients, as well as the AI digital employee's preset knowledge base information and its own role-based personality information to generate a reply text for the user.
7. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, which implements the method according to any one of claims 1 to 5 when executed by a processor.