User portrait construction and personalized interaction system based on AI dynamic prompt project

By using the AI ​​dynamic prompting project to build user profiles and personalize interaction systems, the problems of insufficient allocation of long-term and short-term user feature weights and conflict coordination in existing technologies have been solved. This has enabled the maintenance of long-term cognitive consistency and real-time interest alignment in personalized interaction, thereby improving the accuracy and consistency of the interaction.

CN121901802APending Publication Date: 2026-04-21SHENZHEN UASCENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN UASCENT TECH CO LTD
Filing Date
2026-03-12
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies lack a mechanism for dynamically and finely allocating weights and coordinating conflicts based on users' long-term and short-term characteristics in specific interaction scenarios. This makes it difficult for generated prompts to effectively match users' current real-time interests and states while maintaining long-term cognitive consistency, thus weakening the ability to provide accurate, coherent, and deeply personalized interactive experiences in complex dialogue scenarios.

Method used

The system employs an AI-based dynamic prompting engineering approach to build user profiles and personalize interactions. The scenario analysis module identifies interaction scenarios and core optimization goals, while the collaborative processing module performs quantitative evaluation and ranking of long-term and real-time features to generate a hierarchical feature set. This set is then integrated into scenario-adaptive instruction templates by the instruction generation module, and finally, personalized interactive content is output through the interaction execution module.

Benefits of technology

It achieves dynamic and refined weight allocation and organic integration of users' long-term and short-term characteristics in personalized prompt generation. The generated interactive content can maintain the consistency of users' long-term cognition and effectively match their current real-time interests and status, significantly improving the accuracy, consistency and user satisfaction of the interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901802A_ABST
    Figure CN121901802A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of AI interaction, in particular to a user portrait construction and personalized interaction system based on an AI dynamic prompt project, which comprises a scene analysis module used for recognizing an interaction scene and a core optimization target in the scene according to user input; the co-processing module is used for carrying out quantitative evaluation and sorting on the long-term features and the real-time features according to respective stability parameters of the long-term features and the real-time features and correlation parameters of the long-term features and the real-time features and the core optimization target, and generating a hierarchical feature set; the instruction generation module is used for adapting an instruction template according to the interaction scene and fusing the hierarchical feature set into the instruction template to generate a structured driving instruction; and the interaction execution module is used for executing the driving instruction to generate and output final personalized interaction content. According to the method, accurate balance of long and short term features of the user in personalized prompt generation can be realized through a scenarized dynamic weight distribution and feature conflict coordination mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of AI interaction, and in particular to a user profile building and personalized interaction system based on AI dynamic prompt engineering. Background Technology

[0002] With the widespread application of large language models in vertical fields such as intelligent customer service, online education, and personalized content recommendation, building accurate user profiles and generating highly personalized interactive content has become crucial for improving the intelligence level of AI systems and user experience. Traditional methods typically rely on users manually designing complex prompts or performing feature matching based on static rules. This not only demands high user capabilities but also struggles to adapt to the multidimensionality and dynamic changes in user states, resulting in interactive content lacking deep personalization and scenario adaptability.

[0003] To address the aforementioned issues, existing technologies have proposed a series of automated and structured prompt word generation schemes. For example, the technical solution in Chinese Invention Patent Publication No. CN118296119A, entitled "Prompt Word Generation Method, Apparatus, Device, Medium, and Program Product," identifies the task type of the user's input question, extracts relevant keywords, and automatically assembles prompt word elements based on pre-configured rules and a database. Finally, it concatenates these elements to generate a complete prompt word input language model to obtain the answer. This scheme automates prompt word generation to a certain extent, reduces the requirements for users' prompting engineering capabilities, and improves the standardization of question-and-answer processes under specific task types.

[0004] However, this existing technology still has significant limitations in achieving truly personalized and contextualized deep interaction. Its core mechanism is essentially a static element matching "centered on the current problem," lacking the ability to dynamically perceive, quantify, and organically integrate users' long-term stable characteristics (such as knowledge background, professional skills, and persistent preferences) and short-term temporary characteristics (such as current interests, emotional state, and conversational intent). Specifically, the system cannot finely allocate weights to the stability and relevance of user characteristics according to different interaction scenarios, nor can it logically coordinate and integrate conflicting characteristics. For example, in an educational tutoring scenario, when a student with a long-term weak foundation in mathematics asks about geometric concepts, the system can only embed general explanatory elements based on the task type of "knowledge point explanation," but cannot quantify and prioritize the long-term characteristic of "weak mathematical foundation," nor can it effectively combine it with the student's current temporary characteristic of "recent interest in football." This results in an explanation that is either too complex for the student's cognitive level or fails to leverage the student's current interest to enhance their motivation to understand. In workplace consulting scenarios, if a senior Java programmer has recently been frequently researching the message queue Kafka, when they inquire about high-concurrency system design, the system struggles to dynamically capture and appropriately weight this temporary interest characteristic. This results in generated suggestions failing to organically integrate the programmer's current learning focus, weakening the relevance and guidance of the output. Therefore, the core technical problem directly presented by existing technologies lies in the lack of a mechanism for dynamically and finely weighting and resolving conflicts based on the user's long-term and short-term characteristics according to specific interaction scenarios. This makes it difficult for generated suggestions to effectively match the user's current real-time interests and state while maintaining long-term cognitive consistency, ultimately limiting the ability to provide accurate, coherent, and deeply personalized interactive experiences in complex dialogue scenarios. Summary of the Invention

[0005] In order to achieve a precise balance between short-term and long-term user characteristics in personalized prompt generation through scenario-based dynamic weight allocation and feature conflict coordination mechanism, this application provides a user profile construction and personalized interaction system based on AI dynamic prompt engineering.

[0006] The user profile construction and personalized interaction system based on AI dynamic prompt engineering provided in this application adopts the following technical solution: A user profile construction and personalized interaction system based on AI dynamic prompt engineering includes: The scene analysis module is used to identify the interaction scene and the core optimization goal in that scene based on user input; The collaborative processing module, connected to the scene parsing module, is used to execute the following logical flow: based on the core optimization goal, the long-term features and real-time features associated with the user are quantitatively evaluated according to their respective stability parameters and their correlation parameters with the core optimization goal; the long-term features and real-time features are sorted according to the results of the quantitative evaluation, and conflicts between features are resolved according to preset rules to generate a hierarchical feature set. The instruction generation module, connected to the scene parsing module and the collaborative processing module, is used to adapt the instruction template according to the interaction scene and integrate the hierarchical feature set into the instruction template to generate structured driving instructions. An interactive execution module, connected to the instruction generation module, is used to execute the driving instructions to generate and output the final personalized interactive content.

[0007] Optionally, when the collaborative processing module performs the quantitative evaluation, for each of the long-term features and real-time features, its stability parameter is determined based on the frequency of occurrence of the feature in historical interactions, and its correlation parameter is determined based on the semantic matching degree between the feature and the core optimization objective.

[0008] Optionally, the collaborative processing module is configured to: generate a comprehensive weight value for each feature based on the stability parameter and the correlation parameter through a preset combination operation rule; sort each feature according to the comprehensive weight value; and determine the priority order of different features in the hierarchical feature set based on the sorting result and a preset conflict arbitration rule.

[0009] Optionally, the collaborative processing module identifies and distinguishes core dominant features, auxiliary dominant features, and supplementary features based on the comprehensive weight value and preset stability differentiation threshold, semantic association threshold, and supplementary weight threshold, so as to form the hierarchical feature set. Among them, the core dominant feature is the long-term feature whose stability parameter is higher than the stability distinction threshold and whose correlation parameter is higher than the semantic association threshold; the auxiliary dominant feature is the long-term feature whose stability parameter is higher than the stability distinction threshold but whose correlation parameter is not higher than the semantic association threshold; and the supplementary feature is the real-time feature whose comprehensive weight value is higher than the supplementary weight threshold.

[0010] Optionally, when performing the quantitative evaluation, the collaborative processing module adjusts the combination operation rules for each feature based on the comparison result between its occurrence frequency and the stability discrimination threshold. This is so that when calculating the comprehensive weight value, features with stability parameters higher than the stability discrimination threshold are given higher calculation priority relative to correlation parameters in the combination operation rules.

[0011] Optionally, when performing the quantitative evaluation, the collaborative processing module further adjusts the combination operation rules for each feature based on the comparison result between its semantic matching degree and the semantic association threshold. This is to increase the calculation priority of the correlation parameter relative to the stability parameter for features that exceed the semantic association threshold when calculating the comprehensive weight value.

[0012] Optionally, the collaborative processing module performs the following steps when constructing the hierarchical feature set: From all long-term features that satisfy the conditions for the core dominant feature, the one with the highest comprehensive weight value is selected as the final core dominant feature. From all long-term features that satisfy the conditions for the auxiliary dominant feature, select the one with the highest correlation to the final core dominant feature as the final auxiliary dominant feature; From all real-time features that satisfy the supplementary feature conditions, the one with the highest comprehensive weight value is selected as the final supplementary feature; The final core dominant feature, the final auxiliary dominant feature, and the final supplementary feature are organized according to a preset primary and secondary logical structure to generate the hierarchical feature set.

[0013] Optionally, the instruction generation module is configured to perform the following steps to incorporate the hierarchical feature set into the instruction template: Based on the interaction scenario, select a matching instruction template from the preset template library; Based on the preset mapping logic, the feature content with different priority order in the hierarchical feature set is filled into different variable positions in the selected instruction template that are predefined and correspond to the priority order.

[0014] Optionally, it also includes an evolution update module, which is configured to: Obtain user feedback on the personalized interactive content; Based on the type of feedback, the stability parameters or correlation parameters used by the collaborative processing module in performing the quantitative evaluation are adaptively adjusted. The adjustment process of the stability parameters and correlation parameters is recorded in versions, and parameter status rollback based on version records is supported.

[0015] Optionally, the evolution update module is further configured as follows: Based on the type of feedback, determine the direction and magnitude of adjustment for the stability parameter or correlation parameter; The adjusted stability or correlation parameters are updated as new version parameters to the collaborative processing module and associated with the version record. Upon receiving a rollback instruction, the parameters used by the collaborative processing module are switched to the target version parameters according to the version record.

[0016] In summary, this application includes the following beneficial technical effects: 1. This system accurately identifies interaction scenarios and core optimization goals through a scenario analysis module. Then, through a collaborative processing module, it performs quantitative evaluation, sorting, and conflict coordination based on the stability parameters of long-term and real-time features and their correlation parameters with the core optimization goals, generating a hierarchical feature set. This enables dynamic and refined weight allocation and organic integration of users' long-term and short-term features in personalized prompt generation. It directly solves the core technical problem of the lack of deep personalization and scenario adaptability in interactive content caused by the lack of such a mechanism in existing technologies. This allows the generated interactive content to maintain the consistency of users' long-term cognition while effectively matching their current real-time interests and states.

[0017] 2. The system integrates hierarchical feature sets into scene-adaptive instruction templates based on the instruction generation module, generates structured driving instructions, and outputs the final personalized interactive content through the interaction execution module. This process ensures that the interactive content strictly adheres to the core optimization goals of the scene and naturally incorporates user feature priorities, thereby significantly improving the accuracy, coherence, and user satisfaction of the interaction, and providing a highly targeted personalized experience in complex dialogue scenarios such as education and tutoring and workplace consultation.

[0018] 3. The system introduces an evolution update module, which dynamically adjusts feature parameters by collecting user feedback and establishes version records and rollback mechanisms. This enables the system to continuously adapt to changes in user characteristics and optimize interaction effects, while avoiding system instability caused by parameter adjustments. This ensures the reliability and self-optimization capability of long-term interaction and enhances the sustainability and robustness of the system. Attached Figure Description

[0019] Figure 1 This is a module architecture diagram of the interactive system; Figure 2 It is a logic flowchart of the interactive system. Detailed Implementation

[0020] The following combination Figures 1-2 This application will be described in further detail.

[0021] This application discloses a user profile construction and personalized interaction system based on AI dynamic prompt engineering. For example... Figure 1 and Figure 2As shown, the user profile construction and personalized interaction system based on AI dynamic prompting engineering specifically addresses the core problem of existing technologies lacking dynamic and refined weight allocation and conflict coordination of users' short-term and long-term characteristics based on specific interaction scenarios. Through a closed-loop design encompassing scenario analysis, collaborative processing, instruction generation, interaction execution, and evolutionary updates, it achieves a precise balance between users' short-term and long-term characteristics in personalized prompt generation. The following steps are described in detail: Implementation of the S1 Scene Analysis Module The core of the scene analysis module is to accurately locate the interaction scene and corresponding core optimization target based on user input, providing a scene-based benchmark for the feature quantification evaluation of the subsequent collaborative processing module. This solves the problem of vague scene recognition in existing technologies, which leads to a lack of targeted feature processing, and makes personalized interaction more in line with the user's current needs.

[0022] S11 Constructs a Scene Classification System The organization brought together professionals from the fields of online education, career consulting, and intelligent customer service to jointly define the system's core application scenarios. In the online education field, scenarios were categorized into three types: knowledge point explanation, homework tutoring, and exam point review; in the career consulting field, scenarios were categorized into three types: skills enhancement, career planning, and problem troubleshooting; and in the intelligent customer service field, scenarios were categorized into three types: function consultation, fault reporting, and demand feedback.

[0023] Each scenario is assigned a core optimization goal, which is based on statistical analysis of users' core needs in each scenario. For example, the core optimization goal for the knowledge point explanation scenario is to use simple language that matches the user's cognitive level, because users in this scenario mostly want to obtain easily understandable knowledge interpretations, so the difficulty of expression needs to be balanced with their own understanding; the core optimization goal for the skill improvement scenario is to combine the user's existing skills and focus on current learning hot topics, because when working users improve their skills, they need to build on their existing foundation and also want to keep up with the latest industry trends; the core optimization goal for the function consultation scenario is to make the steps clear and adaptable to the user's operational proficiency, because when users use the function, clear steps and guidance that are appropriate to their own level can improve the success rate of operation.

[0024] A dedicated keyword library is established for each scenario. Keywords are derived from high-frequency vocabulary statistics of 100,000 historical user input texts for the corresponding scenario. 100,000 historical data entries were chosen because this volume covers most common expressions used by users in the scenario, ensuring the comprehensiveness and representativeness of the keyword library. For example, the keyword library for the knowledge point explanation scenario includes words such as "how to understand," "what," "explain," and "meaning"; the keyword library for the skill improvement scenario includes words such as "how to learn," "improve," "master," and "learning methods"; and the keyword library for the function consultation scenario includes words such as "how to operate," "function usage," "usage steps," and "how to set up."

[0025] S12 Extract User Input Keywords After obtaining the complete text input of the user's current interaction, perform text preprocessing operations first. The first step is to remove all punctuation marks in the text to avoid interference from punctuation on vocabulary statistics; the second step is to eliminate common meaningless words, including common function words such as "de", "le", "ma", "a", "o", etc. that do not have the meaning of scene representation. After preprocessing, a pure text is obtained.

[0026] Count the occurrence frequency of each word in the pure text, and set the frequency threshold to 2 times. This threshold is determined by testing 50,000 pieces of user input text in different scenarios. It is found that words with an occurrence frequency of 2 times or more can effectively reflect the core intention of the user input, while words with a frequency lower than 2 times are mostly mentioned accidentally and contribute very little to scene recognition. Select words with an occurrence frequency greater than or equal to 2 times as candidate keywords.

[0027] Perform semantic deduplication on the candidate keywords. Semantic deduplication is judged based on the core semantic consistency of the words. For example, "study" and "research" have the same core semantics, and only "study" is retained as a candidate keyword; "operate" and "control" have the same core semantics, and only "operate" is retained as a candidate keyword, to avoid the influence of semantically repeated words on the accuracy of subsequent scene matching. Finally, form a set of user input keyword sets.

[0028] S13 Identify the interaction scenario and the core optimization goal Calculate the matching degree between the user input keyword set and each scene-specific keyword library. The matching degree is obtained by dividing the number of intersection words between the user input keywords and the scene keyword library by the total number of user input keywords. This calculation method only involves counting data with consistent dimensions, and can intuitively and accurately reflect the degree of closeness between the user input and each scene.

[0029] Set the scene matching threshold to 70%. This threshold is determined by testing 50,000 user input samples. The test results show that when the matching degree reaches 70% or more, the accuracy of scene recognition can reach about 92%; if the threshold is set too high, some valid inputs may not be able to match the corresponding scene due to the matching degree not meeting the standard; if the threshold is set too low, the probability of scene misjudgment will increase. A threshold of 70% can better balance the accuracy and coverage of scene recognition.

[0030] Determine the current interaction scenario according to the matching degree result: if the matching degree of a single scene is greater than or equal to 70%, directly determine this scene as the current interaction scenario; if the matching degrees of multiple scenes are all greater than or equal to 70%, select the scene with the highest matching degree as the current interaction scenario; if the matching degrees of all scenes are less than 70%, default to match the general consultation scenario, and the core optimization goal of the general consultation scenario is set to be concise in expression and cover core information to cope with interaction requirements that are not clearly classified.

[0031] After determining the current interaction scenario, the core optimization objectives pre-bound to the scenario are extracted. These core optimization objectives are then directly passed to the collaborative processing module, providing a clear scenario guide for the quantitative evaluation and weight allocation of user features, ensuring that subsequent feature processing is highly consistent with the user's current scenario needs.

[0032] Implementation of the S2 Collaborative Processing Module The collaborative processing module takes over the core optimization objectives output by the scene analysis module, and performs quantitative evaluation, ordered sorting, and conflict coordination on long-term and real-time user characteristics to generate a hierarchical feature set. This design specifically addresses the lack of a dynamic fusion mechanism for long-term and short-term characteristics in existing technologies, enabling a precise balance between the two in personalized interactions, ensuring both long-term consistency of user cognition and real-time needs.

[0033] S21 Obtains User Short-Term and Long-Term Characteristics Long-term user characteristics are derived from the system's stored historical interaction data over the past 12 months and the basic information provided by users during registration. These characteristics encompass categories such as knowledge background, professional skills, long-term preferences, and basic attributes, including, for example, weak mathematical foundation, proficiency in Java programming, preference for case-based learning, and being a junior high school student. The selection criterion for long-term characteristics is a frequency of at least 30 occurrences in historical interactions. This criterion was determined through statistical analysis of 100,000 user characteristic data points; characteristics appearing 30 times or more better reflect stable user attributes and can prevent incidentally mentioned characteristics from interfering with subsequent evaluation results.

[0034] Real-time user characteristics are derived from the current interactive session text and short-term interaction data within the past 7 days. Real-time characteristics include current interests, temporary needs, and session intent, such as recently following football, recently researching Kafka, or urgently needing to solve an Excel data statistics problem. The selection criteria for real-time characteristics are set as explicitly mentioned in the current session or interactions within the past 7 days. This criterion accurately captures the user's current state, ensuring the timeliness and relevance of the characteristics, and providing a foundation for subsequent dynamic fusion.

[0035] S22 Calculate characteristic stability parameters and correlation parameters S221 Calculate stability parameters The stability parameter measures the long-term stability of a feature, ranging from 0 to 1. A higher value indicates stronger feature stability. The calculation first counts the total number of times each feature appears in the user's historical interactions over the past 12 months, then divides this count by the total number of interactions over those 12 months to obtain the stability parameter.

[0036] A stability threshold of 0.8 was set, determined through tracking and analysis of 100,000 user feature data points. The tracking results showed that features with a stability parameter greater than or equal to 0.8 maintained stability in the subsequent 6 months of interactions, effectively distinguishing between long-term stable and unstable features. For example, if a user's total interactions over the past 12 months were 200, and the feature "weak mathematical foundation" appeared 180 times, its stability parameter (180 divided by 200) is 0.9, higher than the stability threshold of 0.8, classifying it as a long-term stable feature. Conversely, the feature "recently interested in football" appeared only 5 times in historical interactions, and its stability parameter (5 divided by 200) is 0.025, lower than the stability threshold of 0.8, classifying it as a real-time temporary feature.

[0037] S222 Calculate correlation parameters The relevance parameter measures the degree of association between a feature and the core optimization objective of the current scenario. Its value ranges from 0 to 1, with a higher value indicating a stronger association. The calculation involves first breaking down the textual description of the core optimization objective and extracting core words as keywords. Then, keywords for each feature are extracted in the same way. The semantic overlap is calculated by counting the number of semantic overlaps between the two sets of keywords; this semantic overlap is the relevance parameter.

[0038] A semantic association threshold of 0.7 was set, determined through association tests on 50,000 features and the core optimization objective. Test results show that features with a relevance parameter greater than or equal to 0.7 provide more significant support for the core optimization objective and effectively improve the targeting of interactive content. For example, the core optimization objective is to simplify the expression and match the user's cognitive level; its keywords are "simplified" and "cognitive level." The keywords for the feature "weak mathematical foundation" are "mathematical foundation" and "weak," with a semantic overlap of 0.85, higher than the semantic association threshold of 0.7, indicating a high correlation between this feature and the core optimization objective. The keywords for the feature "likes basketball" are "basketball" and "likes," with a semantic overlap of 0.1 with the core optimization objective keywords, lower than the semantic association threshold of 0.7, indicating extremely low correlation.

[0039] S23 Adjusting the rules for combined operations The weighting of the combined operation is used to determine the relative importance of the stability parameter and the correlation parameter when calculating the overall weight value. Initially, the weighting of both the stability parameter and the correlation parameter is set to 0.5 to ensure the neutrality of the evaluation starting point.

[0040] S231 Rule Adjustment Based on Stability Parameters For each feature to be evaluated, its stability parameter is first compared with the stability discrimination threshold (0.8) to generate a preliminary prediction of weight adjustment: If the feature stability parameter is greater than 0.8, it is predicted that the feature has outstanding long-term stability, and its stability parameter weight should be increased in subsequent calculations.

[0041] If the feature stability parameter is less than or equal to 0.8, it is predicted that the stability of the feature has not reached the high stability standard, and the weight ratio of its correlation parameter should be increased in subsequent calculations.

[0042] This preliminary assessment phase does not directly change the percentage figures, but rather provides a basis for subsequent comprehensive adjudication.

[0043] S232 Rule Adjustment Based on Correlation Parameter Based on the prediction of S231, the relevance parameter of each feature is further compared with the semantic association threshold (0.7), and combined with the stability prediction results, the final combination operation rule (i.e. the final weight ratio) is determined through explicit rules: If the feature stability parameter is greater than 0.8 and the correlation parameter is greater than 0.7, the feature possesses both high stability and high scenario relevance. To balance its long-term consistency value with its criticality in the current scenario, the final weight ratio is determined to be 50% for the stability parameter and 50% for the correlation parameter.

[0044] If a feature's stability parameter is greater than 0.8, but its relevance parameter is less than or equal to 0.7, the feature is highly stable but its correlation with the core objective of the current scenario is only moderate. To strengthen its role in maintaining user cognitive consistency, the final weighting is determined to be 60% for the stability parameter and 40% for the relevance parameter.

[0045] If the feature stability parameter is less than or equal to 0.8, but the correlation parameter is greater than 0.7: although the feature is not stable enough, it is highly correlated with the core objective of the current scenario. To enhance its contribution to achieving the scenario requirements, the final weight ratio is determined to be 40% for the stability parameter and 60% for the correlation parameter.

[0046] If the feature stability parameter is less than or equal to 0.8 and the correlation parameter is less than or equal to 0.7, then neither the feature's stability nor its relevance to the scene is outstanding. To reduce the interference of low-stability features and to appropriately consider their potential association with the scene, the final weight ratio is determined to be 40% for the stability parameter and 60% for the correlation parameter.

[0047] This set of standardized processes ensures that feature weight allocation is accurately and dynamically adapted to the feature's own attributes (stability, relevance) and scenario requirements, thus overcoming the limitations of static weight allocation.

[0048] S24 calculates the comprehensive weight value of features. The comprehensive weight value is used to comprehensively measure the importance of features and is derived based on the adjusted combination operation rules. Since it is necessary to consider the weighted proportions of stability parameters and relevance parameters, the formula is derived as follows: Comprehensive Weight Value = Stability Parameter × Stability Parameter Proportion + Relevance Parameter × Relevance Parameter Proportion. All parameters in this formula have values ​​between 0 and 1, ensuring consistent dimensions, and the calculated result also falls within the 0-1 range, thus intuitively reflecting the comprehensive importance of the features.

[0049] The supplementary weight threshold was set at 0.6, which was determined through performance testing on 30,000 sets of real-time features. Test results show that real-time features with a comprehensive weight value greater than or equal to 0.6 effectively improve the real-time relevance of interactive content, providing users with a more targeted interactive experience. For example, the stability parameter of the characteristic "weak mathematical foundation" is 0.9, and the correlation parameter is 0.85. After rule adjustment, the stability parameter accounts for 50%, and the correlation parameter accounts for 50%, so its comprehensive weight value is 0.9×0.5+0.85×0.5=0.875; the stability parameter of the characteristic "likes basketball" is 0.7, and the correlation parameter is 0.1. After rule adjustment, the stability parameter accounts for 40%, and the correlation parameter accounts for 60%, so its comprehensive weight value is 0.7×0.4+0.1×0.6=0.34; the stability parameter of the characteristic "recently interested in football" is 0.025, and the correlation parameter is 0.75. After rule adjustment, the stability parameter accounts for 40%, and the correlation parameter accounts for 60%, so its comprehensive weight value is 0.025×0.4+0.75×0.6=0.46.

[0050] S25 Feature Classification and Screening S251 Feature Classification Based on comprehensive weight values ​​and various threshold standards, features are divided into three categories: core dominant features, auxiliary dominant features, and supplementary features. The criteria for determining core dominant features are long-term characteristics, a stability parameter greater than 0.8, and a relevance parameter greater than 0.7. This standard ensures that core dominant features balance long-term stability and scenario relevance, providing core direction for interactive content. The criteria for determining auxiliary dominant features are also long-term characteristics, a stability parameter greater than 0.8, and a relevance parameter less than or equal to 0.7. This standard ensures that auxiliary dominant features maintain user cognitive consistency and provide supplementary support for the core direction. The criteria for determining supplementary features are real-time characteristics with a comprehensive weight value greater than 0.6. This standard ensures that supplementary features meet users' real-time needs, improving the real-time nature of interactive content. This classification method allows different types of features to perform their respective functions, solving the problem of chaotic feature fusion.

[0051] S252 Feature Filtering From all long-term features that meet the conditions for core dominant features, the one with the highest comprehensive weight value is selected as the final core dominant feature; if no core dominant feature exists, the one with the highest comprehensive weight value from the auxiliary dominant features is selected as the final core dominant feature.

[0052] From all long-term features that meet the conditions for auxiliary dominant features, the one with the highest correlation to the final core dominant feature is selected as the final auxiliary dominant feature. The correlation is obtained by dividing the number of times the two appear together in historical interactions by the number of times the core dominant feature appears in history. If there is no auxiliary dominant feature, the selection of this type of feature is skipped.

[0053] From all real-time features that meet the supplementary feature criteria, the one with the highest comprehensive weight value is selected as the final supplementary feature; if no supplementary feature exists, the feature selection for that type is skipped. The selection process resolves conflicts between features through explicit rules, making feature combinations more logical.

[0054] S26 generates a hierarchical feature set. The final core dominant features, final auxiliary dominant features, and final supplementary features are organized according to a pre-defined primary-secondary logical structure to generate a hierarchical feature set. The core dominant features serve as the first level of the set, guiding the core direction of personalized interaction; the auxiliary dominant features serve as the second level, providing supplementary support to the core direction; and the supplementary features serve as the third level, reflecting the user's real-time state. If a feature selection result is empty, the corresponding level in the hierarchical feature set is marked as NULL to ensure a clear and targeted set structure, providing stable and ordered feature input for subsequent instruction generation modules.

[0055] Implementation of the S3 instruction generation module The instruction generation module takes the interactive scene determined by the scene parsing module and the hierarchical feature set output by the collaborative processing module, and accurately transforms the scene requirements and feature priorities into structured driving instructions. This solves the problems in existing technologies where prompt generation is mostly a simple splicing of elements, lacks logical organization, and features are awkwardly integrated. The instructions not only fit the core needs of the scene, but also highlight the priority relationship of features, providing clear and accurate guidance for the subsequent generation of personalized interactive content.

[0056] S31 selects the appropriate instruction template S311 Builds a Scenario-Based Instruction Template Library The instruction template library was built collaboratively by NLP engineers and professionals from various fields, ensuring that the templates not only conform to the logical norms of natural language generation but also accurately adapt to the core optimization goals of different scenarios. The template library corresponds one-to-one with the scenario classification system, with 3 to 5 instruction templates for each scenario, the number determined through statistical analysis of the diversity of user interaction needs in each scenario. Testing shows that 3 to 5 templates can cover more than 85% of the interaction requirements in a scenario, while avoiding redundancy and efficiency degradation caused by an excessive number of templates.

[0057] Each instruction template predefines three types of variable positions, corresponding to the core dominant feature, auxiliary dominant feature, and supplementary feature of the hierarchical feature set. The design of variable positions matches the feature priority, ensuring that the core feature occupies a key guiding position in the instruction. For example, the instruction template for the knowledge point explanation scenario includes: based on the core variable, combined with relevant cases of auxiliary variables, supplementary scenarios of supplementary variables, explaining the target knowledge point in plain language, with complexity adapted to the user's cognitive level; and breaking down the target knowledge point step by step based on the user base corresponding to the core variable, through relevant examples of auxiliary and supplementary variables, ensuring that the explanation is clear and easy to understand.

[0058] S312 matches the instruction template of the current scene. Based on the current interaction scenario output by the scenario parsing module, a command template that perfectly matches the scenario is retrieved from the template library. If multiple matching templates exist for the scenario, one is randomly selected as the base template. Random selection ensures balanced use of each template and avoids homogenization of interaction content due to overuse of a single template. If no perfectly matching template is found, the keyword overlap between the scenario to which each template belongs and the current interaction scenario is calculated, and the template with the highest overlap is selected as the base template to ensure the adaptability of the template to the scenario.

[0059] S32 incorporates a hierarchical feature set S321 sets priority mapping logic The system pre-defines the mapping logic between template variables and feature levels. Core variables correspond to core dominant features in the hierarchical feature set, auxiliary variables correspond to auxiliary dominant features, and supplementary variables correspond to supplementary features. This mapping logic is based on feature priority and the functional design of template variables. Core dominant features serve as the core basis for personalized interaction and correspond to core variables in the template that play a key guiding role. Auxiliary dominant features provide supplementary support for the core direction and correspond to auxiliary variables in the template used to enhance understanding. Supplementary features align with users' real-time needs and correspond to supplementary variables in the template used to improve fit, ensuring accurate adaptation and logical coherence between features and templates.

[0060] S322 Fill Feature and Optimize Instructions According to the established mapping logic, the final core dominant feature, final auxiliary dominant feature, and final supplementary feature output by the collaborative processing module are filled into the corresponding variable positions in the basic template. During the filling process, if the filtering result of a certain type of feature is empty, the corresponding variable and related descriptive statements in the template are deleted to avoid logical breaks or redundant expressions due to missing variables. For example, if the basic template is "Based on the core variable, combined with relevant cases of auxiliary variables, supplement the relevant scenarios of supplementary variables, explain the target knowledge points in plain language, and adapt the complexity to the user's cognitive level," when the core dominant feature is weak mathematical foundation, the auxiliary dominant feature is liking basketball, and the supplementary feature is recently paying attention to football, the filled instruction would be "Based on the weak mathematical foundation, combined with relevant cases of liking basketball, supplement the relevant scenarios of recently paying attention to football, explain the similarity of triangles in plain language, and adapt the complexity to the cognitive level of a junior high school student." After filling, the instructions are grammatically validated and the statements are optimized to ensure that the driving instructions are fluent, logically clear, and can accurately convey the feature fusion requirements and the core objectives of the scenario.

[0061] Implementation of the S4 interactive execution module The interaction execution module receives structured driving instructions from the instruction generation module and generates and outputs personalized interactive content through modular natural language generation components, closing the single interaction process. This module specifically addresses the problems of disconnect between interactive content and scenarios / user characteristics, as well as the awkward expression in existing technologies. It ensures that the output content accurately responds to core optimization goals while naturally incorporating short-term and long-term user characteristics, improving the coherence of the interaction and the user experience.

[0062] S41 executes driver instructions S411 Configurable Modular Natural Language Generation Components The natural language generation component employs a three-tiered modular design: semantic parsing, content organization, and language polishing. Each unit operates independently yet collaborates closely, ensuring accurate conversion from instructions to content. This modular structure, based on the logical flow of interactive content generation, facilitates individual optimization of each step while guaranteeing consistency in the overall generation effect, making it a key design for achieving precise and personalized interaction.

[0063] The semantic parsing unit focuses on deconstructing structured driving instructions, extracting core information, and transforming it into generation guidelines. The parsing process clarifies three core requirements: the core expression must correspond to the core optimization goal of the scenario, such as "combining existing skills with focusing on learning hotspots" in a skills enhancement scenario; feature fusion must clarify the integration methods and priorities of core dominant features, auxiliary dominant features, and supplementary features; and complexity must match the user's cognitive level or operational proficiency, such as "basic-level step-by-step guidance" for new employees.

[0064] The content organization unit retrieves a structured knowledge base for the corresponding domain based on the generation guidelines. The knowledge base is constructed according to scenario categories, with each scenario's knowledge base containing three sub-bases: core knowledge, a case study library, and precautions. The case study library is linked to user characteristic dimensions. During retrieval, content highly matching user characteristics is prioritized. For example, if the core dominant characteristic is "proficient in Java," Java-related technical cases are retrieved first to ensure the content aligns with the user's background.

[0065] The language polishing unit is responsible for optimizing the expression of core content. Key optimization areas include conversationalization, strengthening logical connections, and removing redundant information. Polishing avoids piling up technical jargon, providing colloquial explanations for necessary terms; it uses transitional phrases to allow features to blend naturally with the content, rather than awkwardly piecing them together; and it removes information irrelevant to the core needs, ensuring concise and focused content to improve user comprehension.

[0066] S412 parses instructions and organizes core content. The structured driving instructions output by the instruction generation module are input into the natural language generation component. The semantic parsing unit first decomposes the scenario attributes, feature information, and generation requirements in the instructions to form detailed step-by-step generation guidelines. Based on the guidelines, the content organization unit retrieves relevant core knowledge and cases from the knowledge base of the corresponding scenario and constructs content by combining the user's short-term and long-term characteristics. For example, the supplementary feature of "recently studying Kafka" is incorporated into the suggestions for high-concurrency system design. The language polishing unit optimizes the expression of the constructed core content to make it conform to the habits of spoken communication, with clear logic and natural fluency.

[0067] S42 outputs personalized interactive content S421 adapts to various output formats. Based on the current interaction scenario determined by the scenario analysis module, the corresponding output format is matched, with the format design deeply integrated with the core optimization goals of the scenario. For knowledge point explanation and skill enhancement scenarios, a "core explanation + case supplement" format is used. The core explanation clearly states the key points, while the case supplement provides concrete examples based on user characteristics, reducing the difficulty of understanding. For homework tutoring and problem troubleshooting scenarios, a "step breakdown + precautions" format is used. The steps are presented in a logical order, and the precautions address potential user misunderstandings or key points, improving operability. For function consultation and fault reporting scenarios, an "operation guide + frequently asked questions" format is used. The operation guide is clear and concise, and the frequently asked questions anticipate future user inquiries, reducing repetitive interactions.

[0068] This scenario-based format adaptation is not a simple form division, but a design based on users' information acquisition habits in different scenarios. For example, when users use the query function, they pay more attention to the clarity of the steps, and when they search for knowledge points, they rely more on case studies to help them understand. After adaptation, the interactive content can better meet the user's needs and improve the efficiency of information transmission.

[0069] S422 Multi-interface adaptation output After the natural language generation component generates content, it outputs it to users through a variety of interactive interfaces supported by the system, covering mainstream platforms such as app interfaces, web interfaces, and mini-program interfaces, to meet the usage scenarios and habits of different users. During output, the content layout is optimized, with core information highlighted in bold and steps or examples presented in bullet points (if necessary), avoiding large blocks of text. At the same time, it ensures that the content adapts to the display characteristics of different interfaces; for example, the mini-program interface adapts to a simple layout, while the app interface can present richer example details, allowing users to obtain a clear and comfortable reading experience on different devices and achieving an efficient interactive loop.

[0070] Implementation of the S5 Evolution Update Module The evolution update module receives personalized interactive content from the interaction execution module. By collecting user feedback, it dynamically adjusts the core parameters of the collaborative processing module and establishes a parameter version record and rollback mechanism, forming a self-optimizing closed loop for the system. This module specifically addresses the problems of coarse-grained, long-cycle, and irreversible user profile updates in existing technologies, enabling the system to continuously adapt to changes in user characteristics. This improves long-term interactive effects while ensuring system stability.

[0071] S51 collects user feedback S511 Design Dual-Dimensional Feedback Collection Method Feedback collection employs a dual-dimensional design combining explicit and implicit feedback to ensure comprehensive and accurate information. Explicit feedback utilizes an interactive interface with three buttons: "Satisfied," "Neutral," and "Dissatisfied." Users can directly click the corresponding button to express their intuitive evaluation of the interactive content. This design aligns with user habits and allows for quick and direct attitudinal feedback.

[0072] Implicit feedback is automatically acquired by analyzing subsequent user interactions, with three key behavioral metrics defined: viewing time of interactive content, whether users continue to ask related questions, and whether they use the suggestions in the interactive content. Viewing time thresholds are set at 30 seconds and 10 seconds, determined through statistical analysis of 50,000 user interaction data points: a viewing time of ≥30 seconds generally indicates that the user recognizes the value of the content, while <10 seconds indicates that the content does not meet core needs; continuing to ask related questions indicates that the user has a need for further exploration, indirectly reflecting the content's reference value; completing the operation according to the suggestions in the interactive content and providing feedback "solved" directly indicates that the suggestions are practical.

[0073] S512 accurately determines feedback type The system comprehensively analyzes explicit and implicit feedback, classifying it into only two categories: positive and negative feedback. This avoids overly detailed classifications that could lead to confusion in parameter adjustment logic. If the explicit feedback is "satisfied," or if the implicit feedback meets two or more positive indicators, it is classified as positive feedback. If the explicit feedback is "dissatisfied," or if the implicit feedback meets two or more negative indicators, it is classified as negative feedback. If the explicit feedback is "neutral" and the implicit feedback shows no clear bias, the feedback type is not determined, and parameter adjustments are not triggered. This ensures that parameter adjustments are based on a clear user attitude, avoiding meaningless and frequent fluctuations.

[0074] S52 Adjusts Feature-Related Parameters S521 establishes refined adjustment rules. Parameter adjustments target the stability and relevance parameters used by the collaborative processing module, with adjustment rules deeply tied to feedback type and feature type. Positive feedback indicates that the current feature parameter settings meet user needs, requiring an increase in the impact of the corresponding features; negative feedback indicates that the parameter settings are biased, requiring a decrease in the impact of the corresponding features, ensuring that adjustments are precise and aligned with user experience.

[0075] The adjustment range was determined through testing with 20,000 user feedback data points. This data volume covers different scenarios and user types, effectively ensuring the universality of the adjustment range. The core dominant feature has the greatest impact on the interaction direction, and its stability parameter is adjusted by 0.05. The auxiliary dominant feature plays a supplementary supporting role, and its stability parameter is adjusted by 0.03. The supplementary feature focuses on real-time needs, and its relevance parameter is adjusted by 0.04. The adjustment range for negative feedback is the same as that for positive feedback, only in the opposite direction, ensuring significant adjustment effects while avoiding drastic parameter fluctuations that could lead to system instability.

[0076] S522 performs parameter adjustment and boundary constraints Based on the final feedback type and the adjustment rules defined in S521, perform specific parameter adjustment operations: If it is positive feedback: increase the stability parameter of the core dominant feature by 0.05, increase the stability parameter of the auxiliary dominant feature by 0.03, and increase the correlation parameter of the supplementary feature by 0.04.

[0077] For negative feedback: reduce the stability parameter of the core dominant feature by 0.05, reduce the stability parameter of the auxiliary dominant feature by 0.03, and reduce the correlation parameter of the supplementary feature by 0.04. This adjustment magnitude is consistent with the absolute value of the magnitude of positive feedback, only in the opposite direction.

[0078] After adjustment, boundary constraints are immediately applied to the parameter values ​​to ensure that all parameter values ​​remain within a reasonable and valid range of 0 to 1. If a parameter becomes greater than 1 after adjustment, its value is set to 1.0; if it becomes less than 0, its value is set to 0.0. This boundary constraint mechanism avoids the impact of outlier parameters on the accuracy of subsequent feature quantification evaluation. Finally, the adjusted stability or correlation parameters are updated as new version parameters in the feature database of the collaborative processing module and associated with the version record of this adjustment.

[0079] S53 parameter version history and rollback S531 establishes a complete version record mechanism Create a unique version number for each parameter adjustment. The version number format is set to "User ID-Adjustment Date-Version Number", such as U1001-20240920-V5. This format can clearly identify the user to whom the parameter belongs, the adjustment time, and the number of iterations, which is convenient for subsequent traceability.

[0080] Each version record contains complete information: the parameter value before adjustment, the parameter value after adjustment, details of user feedback on which the adjustment was based, and the adjustment time. All records are stored in the system parameter database in a structured manner, ensuring efficient and convenient data querying and retrieval. The version record mechanism makes the parameter adjustment process fully traceable, providing reliable data support for subsequent rollback operations and system optimization.

[0081] S532 supports flexible parameter rollback. Two types of rollback trigger conditions are set: receiving a manual rollback command initiated by the user, or the system detecting a significant decrease in interaction effect after parameter adjustment. The criterion for a decrease in interaction effect is a decrease in user satisfaction of ≥10%. This threshold is determined through long-term monitoring of the system's interaction effect and can effectively identify the negative impact of parameter adjustment.

[0082] When the rollback condition is triggered, the system queries the target version parameters based on the version history. The target version can be a specific version number specified by the user, or the system can recommend the optimal version with the highest historical satisfaction. Upon receiving the rollback command, the system switches the parameters used by the collaborative processing module to the target version parameters according to the version history, completing the parameter rollback. This ensures that the system can quickly restore to the optimal parameter state and avoids the continued impact of poor adjustments on the user experience.

[0083] The implementation principle of the user profile construction and personalized interaction system based on AI dynamic prompting engineering in this application embodiment is as follows: First, the system accurately identifies the interaction scenario and its core optimization goals through the scene analysis module, providing a scenario-based benchmark for subsequent feature processing. Then, the collaborative processing module quantitatively evaluates, sorts, and coordinates conflicts between long-term and real-time features based on their respective stability parameters and their correlation parameters with the core optimization goals, generating a hierarchical feature set. The instruction generation module adapts the instruction template according to the scenario and integrates the hierarchical features to form structured driving instructions. Finally, the interaction execution module generates and outputs personalized interaction content, while the evolution update module dynamically adjusts feature parameters based on user feedback and supports version rollback. This closed-loop process, through scenario-based dynamic weight allocation and feature conflict coordination mechanisms, achieves the organic integration and precise balance of long-term stable user features and short-term real-time features in prompt generation. This effectively solves the problem of insufficient depth of personalization and scenario adaptability in interaction content caused by the lack of dynamic and refined weight allocation and conflict coordination capabilities in existing technologies, ultimately providing a coherent, accurate, and highly personalized interactive experience in complex dialogue scenarios.

[0084] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A user profile construction and personalized interaction system based on AI dynamic prompt engineering, characterized in that, include: The scene analysis module is used to identify the interaction scene and the core optimization goal in that scene based on user input; The collaborative processing module, connected to the scene parsing module, is used to execute the following logical flow: based on the core optimization goal, the long-term features and real-time features associated with the user are quantitatively evaluated according to their respective stability parameters and their correlation parameters with the core optimization goal; the long-term features and real-time features are sorted according to the results of the quantitative evaluation, and conflicts between features are resolved according to preset rules to generate a hierarchical feature set. The instruction generation module, connected to the scene parsing module and the collaborative processing module, is used to adapt the instruction template according to the interaction scene and integrate the hierarchical feature set into the instruction template to generate structured driving instructions. An interactive execution module, connected to the instruction generation module, is used to execute the driving instructions to generate and output the final personalized interactive content.

2. The system according to claim 1, characterized in that, When the collaborative processing module performs the quantitative evaluation, for each feature among the long-term features and real-time features, it determines its stability parameter based on the frequency of occurrence of the feature in historical interactions, and determines its correlation parameter based on the semantic matching degree between the feature and the core optimization objective.

3. The system according to claim 2, characterized in that, The collaborative processing module is configured to: generate a comprehensive weight value for each feature based on the stability parameter and the correlation parameter through a preset combination operation rule; sort each feature according to the comprehensive weight value; and determine the priority order of different features in the hierarchical feature set based on the sorting result and a preset conflict arbitration rule.

4. The system according to claim 3, characterized in that, The collaborative processing module identifies and distinguishes core dominant features, auxiliary dominant features, and supplementary features based on the comprehensive weight value and preset stability distinction threshold, semantic association threshold, and supplementary weight threshold, so as to form the hierarchical feature set. Among them, the core dominant feature is the long-term feature whose stability parameter is higher than the stability distinction threshold and whose correlation parameter is higher than the semantic association threshold; the auxiliary dominant feature is the long-term feature whose stability parameter is higher than the stability distinction threshold but whose correlation parameter is not higher than the semantic association threshold; and the supplementary feature is the real-time feature whose comprehensive weight value is higher than the supplementary weight threshold.

5. The system according to claim 4, characterized in that, When performing the quantitative evaluation, the collaborative processing module adjusts the combination operation rules for each feature based on the comparison result between its occurrence frequency and the stability discrimination threshold. This is to increase the calculation priority of the stability parameter relative to the correlation parameter for features that are higher than the stability discrimination threshold when calculating the comprehensive weight value.

6. The system according to claim 5, characterized in that, When performing the quantitative evaluation, the collaborative processing module further adjusts the combination operation rules for each feature based on the comparison result between its semantic matching degree and the semantic association threshold. This is to increase the calculation priority of the correlation parameter relative to the stability parameter for features that exceed the semantic association threshold when calculating the comprehensive weight value.

7. The system according to claim 4, characterized in that, When constructing the hierarchical feature set, the collaborative processing module performs the following steps: From all long-term features that satisfy the conditions for the core dominant feature, the one with the highest comprehensive weight value is selected as the final core dominant feature. From all long-term features that satisfy the conditions for the auxiliary dominant feature, select the one with the highest correlation to the final core dominant feature as the final auxiliary dominant feature; From all real-time features that satisfy the supplementary feature conditions, the one with the highest comprehensive weight value is selected as the final supplementary feature; The final core dominant feature, the final auxiliary dominant feature, and the final supplementary feature are organized according to a preset primary and secondary logical structure to generate the hierarchical feature set.

8. The system according to claim 1, characterized in that, The instruction generation module is configured to perform the following steps to incorporate the hierarchical feature set into the instruction template: Based on the interaction scenario, select a matching instruction template from the preset template library; Based on the preset mapping logic, the feature content with different priority order in the hierarchical feature set is filled into different variable positions in the selected instruction template that are predefined and correspond to the priority order.

9. The system according to claim 1, characterized in that, It also includes an evolution update module, which is configured as follows: Obtain user feedback on the personalized interactive content; Based on the type of feedback, the stability parameters or correlation parameters used by the collaborative processing module in performing the quantitative evaluation are adaptively adjusted. The adjustment process of the stability parameters and correlation parameters is recorded in versions, and parameter status rollback based on version records is supported.

10. The system according to claim 9, characterized in that, The evolution update module is further configured as follows: Based on the type of feedback, determine the direction and magnitude of adjustment for the stability parameter or correlation parameter; The adjusted stability or correlation parameters are updated as new version parameters to the collaborative processing module and associated with the version record. Upon receiving a rollback instruction, the parameters used by the collaborative processing module are switched to the target version parameters according to the version record.

Citation Information

Patent Citations

  • Prompt word generation method and device, equipment, medium and program product

    CN118296119A

Cited By

  • A marketing user portrait dynamic updating method based on multi-source data fusion

    CN122240935A