A method and system for generating prompts based on user habits and documents
Patent Information
- Application Number
- CN202511346047.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2026-08-11
- Estimated Expiration
- 2045-09-19
AI Technical Summary
[0003]随着自然语言处理技术的发展,提示词生成技术已经在智能问答、文档处理及个性化推荐等领域展现出应用潜力;然而,现有的提示词生成技术在结合用户习惯、文档语义特征以及动态适应多样化场景方面仍有改进空间
所述动态优化模块,被配置为根据预设的动态调整算法对所述目标提示词,进行优化,获得优化提示词,并将优化提示词反馈至用户界面;
Smart Images

Figure CN121478946B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a method and system for generating prompt words based on user habits and documents. Background Technology
[0002] The technology of generating prompts based on user habits and document content refers to dynamically generating prompts that match user needs by analyzing user behavior and the semantic features of documents. For example, in intelligent question-answering systems, a user's historical query records and the topic content of the current document can be used together to generate prompts that are more relevant to the user's intent.
[0003] With the development of natural language processing technology, prompt word generation technology has shown its application potential in fields such as intelligent question answering, document processing, and personalized recommendation; however, existing prompt word generation technology still has room for improvement in combining user habits, document semantic features, and dynamically adapting to diverse scenarios. Summary of the Invention
[0004] In order to at least overcome the above-mentioned shortcomings in the prior art, the purpose of this application is to provide a method and system for generating prompt words based on user habits and documents to solve the above problems.
[0005] Firstly, this application provides a method for generating prompt words based on user habits and documents, including: Acquire user behavior data and document semantic features; Based on the user behavior data and document semantic features, and using a user preference model, preference feature vectors are mapped to keywords to obtain an initial set of prompt words; The initial set of prompt words is matched with the real-time document content to obtain target prompt words that meet the user's needs; The target prompt word is optimized according to a preset dynamic adjustment algorithm to obtain an optimized prompt word, and the optimized prompt word is fed back to the user interface; In response to detecting user feedback behavior to prompt words, the user preference model is updated based on the feedback behavior.
[0006] The prompt word generation method based on user habits and documents disclosed in this invention comprises a series of logically rigorous and interrelated steps, forming a closed-loop system. First, the system acquires user behavior data and the semantic features of the document to be processed, and constructs and continuously updates a user preference model based on this information. Second, this preference model finely distinguishes and extracts the user's long-term and short-term preferences, thereby generating an initial prompt word set. Subsequently, the initial prompt word set undergoes deep context-aware matching with the document content that the user is interacting with in real time to select target prompt words highly relevant to the user's current needs. Based on this, this invention uses a preset dynamic adjustment algorithm to optimize the target prompt words, generating final optimized prompt words and presenting them to the user in real time. Finally, the system continuously monitors the user's feedback behavior on these optimized prompt words and integrates this feedback data into the user preference model update process in real time, thereby achieving dynamic adaptability and continuous optimization of the model.
[0007] This invention proposes a method and system for generating prompt words based on user habits and documents. By integrating user behavior data and document content, prompt words that meet user needs can be dynamically generated, improving the personalization level of prompt words while reducing dependence on labeled data, thus meeting the demand of intelligent services for efficient and flexible prompt word generation.
[0008] In one possible implementation, the user preference model is obtained based on user behavior data and document semantic features, wherein the user behavior data includes the user's historical operation records, query patterns, and operation frequency; and the document semantic features include the document's topic distribution and keyword weights. The construction of the user preference model includes: The user's historical operation records are divided into multiple time windows, and the operation frequency and query pattern within each time window are statistically analyzed. The topic distribution of the document is decomposed into topic vectors, and the importance score of each topic vector is obtained by calculating keyword weights. The importance scores of user operation frequency, query pattern and document topic vector are weighted and fused to obtain an initial user preference model; The initial user preference model is dynamically adjusted based on the frequency of user operations to obtain an updated user preference model.
[0009] In one possible implementation, the step of mapping preference feature vectors to keywords based on the user behavior data and document semantic features, and using a user preference model, to obtain an initial set of prompt words includes: Based on the user preference model, obtain the user's long-term and short-term preference characteristics; Based on the long-term preference features and the topic distribution of the documents, a first set of candidate prompt words is obtained through matching. Based on the aforementioned short-term preference features and the keyword weights of the documents, a second set of candidate suggestion words is obtained through matching. The first set of candidate prompts and the second set of candidate prompts are merged to obtain an initial set of prompts.
[0010] In one possible implementation, the matching based on the long-term preference features and the topic distribution of documents includes: Based on long-term preference features, they are mapped to topic vectors, and the cosine similarity between them and document topic vectors is obtained. Based on cosine similarity, topic vectors with values higher than a preset threshold are obtained, and the keywords corresponding to the topic vectors are selected as prompt words in the first candidate prompt word set.
[0011] In one possible implementation, matching is performed based on the short-term preference features and the keyword weights of the document, including: Based on short-term preference features, they are mapped to keyword vectors, and the cosine similarity between them and the document keyword weight vectors is calculated. Based on cosine similarity, keywords with values higher than a preset threshold are selected as prompt words in the second set of keyword candidate prompt words.
[0012] In one possible implementation, the step of matching the initial set of prompt words with the real-time document content to obtain target prompt words that meet the user's needs includes: Based on each prompt word in the initial prompt word set and the real-time document content, the semantic similarity between the prompt word and the real-time document content is obtained. The document semantic features of the real-time document content also include contextual relevance. Based on the semantic similarity, the cosine similarity between the prompt word and the document content is obtained through a word embedding model; Select suggestion words with semantic similarity higher than a preset threshold as candidate target suggestion words; Candidate target prompts are sorted according to their contextual relevance, and prompts within a preset number are selected as target prompts.
[0013] In one possible implementation, the sorting based on the contextual relevance of candidate target prompts includes: Based on the document content, obtain the semantic graph structure, where the nodes of the graph structure represent keywords and the edges of the graph structure represent the relationships between keywords; Calculate the connection strength of candidate target prompts in the semantic graph structure; Candidate target prompts are sorted according to connection strength, and the prompts that rank within a preset number are selected as target prompts.
[0014] In one possible implementation, optimizing the target prompt word according to a preset dynamic adjustment algorithm includes: Acquire user behavior data related to target prompts, including click-through rate, dwell time, and feedback rating; Based on the operational behavior data, a user satisfaction score is obtained for each target prompt word; Based on the user satisfaction score, target prompt words with user satisfaction scores below a preset threshold are marked as prompt words to be optimized. The semantic expansion algorithm is used to replace or supplement the prompt words to be optimized to obtain optimized prompt words.
[0015] In one possible implementation, the replacement or supplementation of the prompt word to be optimized according to the semantic expansion algorithm includes: Obtain optimization suggestions based on synonyms, hyponyms, or related words of the suggestion words to be optimized; By matching optimized suggestion words with real-time document content, suggestion words that meet user needs are obtained.
[0016] Secondly, this application provides a prompt word generation system based on user habits and documents, including a user behavior analysis module, a document semantic parsing module, a prompt word generation module, a dynamic optimization module, and a user preference update module connected in sequence; The user behavior analysis module is configured to acquire user behavior data and document semantic features; The document semantic parsing module is configured to map preference feature vectors to keywords based on the user behavior data and document semantic features, and a preset user preference model, to obtain an initial set of prompt words. The prompt word generation module is configured to match the initial prompt word set with the real-time document content to obtain target prompt words that meet the user's needs; The dynamic optimization module is configured to optimize the target prompt word according to a preset dynamic adjustment algorithm, obtain an optimized prompt word, and feed the optimized prompt word back to the user interface; The user preference update module is configured to update the user preference model in response to detecting user feedback behavior to prompt words, based on the feedback behavior.
[0017] In summary, this application provides a prompt word generation method and system based on user habits and documents. By dynamically analyzing user behavior data and document semantic features to construct a user preference model, and fusing preference features at different time scales to generate optimized prompt words, the model is updated in real time based on user feedback. This solves the technical defects of traditional methods in dynamic collaborative analysis and temporal continuity adjustment, and realizes a prompt word generation method and system that dynamically analyzes user operation habits and document semantic features, fuses features at multiple time scales, and adjusts recommendation strategies. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram illustrating the steps of the prompt word generation method based on user habits and documents in an embodiment of this application; Figure 2 This is a flowchart illustrating the prompt word generation method based on user habits and documents according to an embodiment of this application; Figure 3 This is a schematic diagram illustrating the process of constructing and continuously updating a user preference model according to an embodiment of this application. Figure 4 This is a flowchart illustrating the importance score for each topic vector in an embodiment of this application. Figure 5 This is a schematic diagram illustrating the process of obtaining the initial prompt word set in an embodiment of this application; Figure 6 This is a schematic diagram illustrating the process of obtaining target prompt words that meet user needs in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a prompt word generation system based on user habits and documents, according to an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0020] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0021] Example 1 Please refer to the following: Figure 1 The diagram below illustrates the steps of the prompt word generation method based on user habits and documents provided in this embodiment of the invention. Further, the prompt word generation method based on user habits and documents may specifically include the content described in steps S1-S5.
[0022] Step S1: Obtain user behavior data and document semantic features; Step S2: Based on the user behavior data and document semantic features, and using the user preference model, map the preference feature vector to keywords to obtain an initial set of prompt words; Step S3: Match the initial set of prompt words with the real-time document content to obtain target prompt words that meet the user's needs; Step S4: Optimize the target prompt word according to the preset dynamic adjustment algorithm to obtain the optimized prompt word, and feed the optimized prompt word back to the user interface; Step S5: In response to detecting user feedback behavior to the prompt words, update the user preference model based on the feedback behavior.
[0023] This invention provides a method for generating prompts based on user habits and documents. Through user behavior analysis, deep document semantic parsing, and a dynamic feedback optimization mechanism, it overcomes the limitations of existing technologies in terms of the accuracy and real-time performance of prompt generation, particularly in capturing the user's instantaneous intent in specific interactive contexts and deeply mining the contextual relationships within the document. This invention ensures that the generated prompts highly match the user's current needs and the document's context through multi-dimensional data fusion and intelligent matching.
[0024] When implementing the embodiments of this application, it is necessary to construct a user preference model based on user behavior data and document semantic features. This is because the user's operation behavior and document content jointly determine the relevance and personalization of the prompt words.
[0025] In the initial state, user behavior data is analyzed by examining historical operation records, query patterns, and operation frequency to extract long-term user preference characteristics. Simultaneously, document semantic features are analyzed by examining document topic distribution, keyword weights, and contextual relevance to extract core document information. The combination of these two data sets provides the foundation for subsequently generating the initial set of prompt words.
[0026] Based on this, the process of generating the initial prompt word set takes into account the matching degree between user preferences and document content to ensure that the generated prompt words are highly relevant.
[0027] Among them, user behavior data refers to user interaction behavior recorded through a log system, used to capture users' operating habits and real-time intentions; document semantic features refer to text features extracted through natural language processing technology, used to represent the deep semantic information of document content; user preference model refers to a mathematical model that dynamically represents user interests, used to balance long-term preferences and short-term needs; dynamic adjustment algorithm refers to an optimization mechanism based on user feedback, used to correct the recommendation weight of prompt words in real time.
[0028] In the embodiments of the present invention, please refer to the following: Figure 2 This embodiment is a flowchart illustrating a method for generating prompts based on user habits and documents.
[0029] Step S1: Perform user behavior analysis; obtain user behavior data and document semantic features; Step S2: Perform document semantic parsing; based on the user behavior data and document semantic features, and using the user preference model, map the preference feature vector to keywords to obtain an initial set of prompt words; Step S3: Prompt word generation; Match the initial prompt word set with the real-time document content to obtain target prompt words that meet the user's needs; Step S4: Perform dynamic optimization. Optimize the target prompt word according to a preset dynamic adjustment algorithm to obtain an optimized prompt word, and then feed the optimized prompt word back to the user interface. Step S5: Update user preferences; In response to detecting user feedback behavior to prompt words, update the user preference model based on the feedback behavior.
[0030] When the user does not provide feedback on the prompt, the prompt can be dynamically optimized using real-time document content. Each time a target prompt is generated, the prompt set will include multiple candidate prompts. These prompts are matched and filtered with the document content through semantic similarity calculation, and finally the target prompt that best meets the user's needs is selected. Meanwhile, the priority order of prompt words is adjusted based on the user's real-time operation behavior, and the prompt words are further optimized by combining dynamic adjustment algorithm. If the initial prompt word set fails to fully meet the user's needs, the dynamic adjustment algorithm will reorder or replace the prompt words to improve the prompt words and make them more in line with the user's needs.
[0031] When users provide feedback on the prompts, the user preference model is updated based on the feedback information. This ensures that the prompts maintain a high level of personalization even when user needs change. User feedback triggers updates to the preference model, forming a continuously optimized closed-loop system.
[0032] This invention effectively realizes the dynamic optimization process of prompt word generation, and iteratively updates the user preference model through user feedback behavior, so that the prompt words can maintain a high level of personalization in diverse scenarios.
[0033] Traditional methods typically process user behavior data and document content independently, resulting in a lack of contextual relevance in the generated prompts. This application, however, enables prompts to dynamically adapt to changes in user needs by jointly modeling user behavior and document semantic features. Existing technologies rely on fixed rules or pre-trained models, making it difficult to handle unlabeled new scenarios. This application, on the other hand, adopts a feedback-driven dynamic adjustment mechanism, which significantly reduces the dependence on labeled data. Existing update cycles are relatively long, while this application achieves real-time correction of model parameters through real-time feedback.
[0034] Through the aforementioned technical solutions, the collaborative analysis of user behavior data and document content effectively improves the accuracy of suggestion word recommendations. The dynamic adjustment mechanism ensures rapid adaptation to changes in new domain documents or user behavior, while feedback-driven model updates reduce manual annotation costs. The resulting suggestions retain long-term user preference characteristics while also responding promptly to real-time operational needs, demonstrating stronger adaptability in personalized recommendation scenarios.
[0035] Example 2 Based on Example 1, please refer to the following: Figure 1-7 This is a flowchart illustrating the prompt word generation method based on user habits and documents provided in this embodiment of the invention. For its basic principles, please refer to [link / reference]. Figure 2 .
[0036] Step S1: Obtain user behavior data and document semantic features; In one possible implementation, the user preference model is obtained based on user behavior data and document semantic features, wherein the user behavior data includes the user's historical operation records, query patterns, and operation frequency; and the document semantic features include the document's topic distribution and keyword weights. The construction of the user preference model includes: The user's historical operation records are divided into multiple time windows, and the operation frequency and query pattern within each time window are statistically analyzed. The topic distribution of the document is decomposed into topic vectors, and the importance score of each topic vector is obtained by calculating keyword weights. The importance scores of user operation frequency, query pattern and document topic vector are weighted and fused to obtain an initial user preference model; The initial user preference model is dynamically adjusted based on the frequency of user operations to obtain an updated user preference model.
[0037] In the implementation of this application embodiment, firstly, the user's historical operation records are divided into time series, and then divided into multiple preset time windows, such as minute-level, hour-level, or day-level time windows. Then, the user's operation frequency and query pattern within each time window are subjected to refined statistics and feature extraction.
[0038] The historical operation records include at least: user click behavior, page scroll position, cursor hover duration, text selection area, input query content, navigation path, and interactive feedback on generated prompts, such as clicking, ignoring, modifying, or rating.
[0039] The operation frequency is obtained by counting events within a unit of time and weighting the results by combining the event types. The query pattern is obtained by performing lexical analysis, syntactic analysis, and semantic entity recognition on the query statement input by the user, and constructing a query keyword sequence or query intent vector.
[0040] Then, the topic distribution of the document is represented by a multidimensional vectorization, which decomposes it into a series of topic vectors, each topic vector representing a core semantic topic in the document.
[0041] Meanwhile, the importance score of each topic vector is calculated based on the keyword weights, which are obtained through calculation to ensure that the extracted keywords are both statistically significant and semantically important.
[0042] Then, the importance scores of the user operation frequency feature vector, query pattern feature vector, and document topic vector are deeply weighted and fused. An initial user preference feature vector is generated through an attention mechanism network. This user preference feature vector represents the user's current interests, habits, and potential connections to the document content in a high-dimensional space. The weighted fusion process dynamically adjusts the weights of different features on user preferences, and these weights can be learned using a machine learning model trained on historical data.
[0043] Finally, based on the dynamic changes in the user's real-time operation frequency, such as frequent clicks or text selections in a specific document area, the parameters of the initial user preference feature vector are adjusted and optimized. This is achieved, for example, by updating the feature weights through incremental learning or a decay mechanism based on the forgetting curve, thereby forming an updated user preference model that can reflect the user's latest intentions in real time. This update process ensures the dynamic adaptability of the user preference model, enabling it to capture transient and refined shifts in user intent.
[0044] In the implementation of the embodiments of this application, please refer to the following: Figure 3 A flowchart illustrating the process of building and continuously updating a user preference model.
[0045] First, user behavior data and document semantic features were collected and analyzed. The user behavior data covers key information such as the user's historical operation records, current query patterns, and operation frequency. Historical operation records are not limited to user click behavior, but also include page scroll position, cursor hover duration in specific areas, text selection areas, user-input query content, navigation paths within the document, and interactive feedback to generated prompts, such as clicking, ignoring, modifying, or rating.
[0046] To utilize this behavioral data, time series segmentation technology is employed to divide users' historical operation records into preset time windows, such as minute-level, hour-level, or day-level. Within each time window, the frequency of user operations and query patterns are statistically analyzed and features are extracted.
[0047] The operation frequency is obtained by weighting the events within a unit of time. Different types of events, such as active clicks and passive hovers, are preset with different weights to reflect their contribution to the user's intent.
[0048] The query pattern is implemented using existing natural language processing techniques, including lexical analysis, syntactic analysis, and semantic entity recognition of the user's input query statement, and then constructing a query keyword sequence or a high-dimensional query intent vector to capture the deep semantics of the user's query.
[0049] Please refer to the following: Figure 4 This is a schematic diagram illustrating the process of decomposing the topic distribution of the document into topic vectors and obtaining the importance score of each topic vector through keyword weight calculation, as described in this invention.
[0050] Deep semantic analysis is performed on the input document to extract its semantic features, including the document's topic distribution, keyword weights, and deep semantic relationships.
[0051] The topic distribution is represented by high-dimensional vectorization, which decomposes it into a series of topic vectors. Each topic vector represents a core semantic topic in the document. We decompose the document into K core semantic topics, and each topic is represented by a vector.
[0052] First, the document undergoes text preprocessing operations such as word segmentation, stop word removal, and lemmatization to obtain the preprocessed text, which is now the word sequence.
[0053] Then, the Dirichlet Allocation (LDA) model is used to obtain topic vectors. By decomposing topic vectors, the semantic structure of the document can be quantified, and the document content can be mapped to multiple topics. The Dirichlet Allocation model is a generative probability model, which is a probability-based stepwise extraction process.
[0054] The preprocessed text is input into the Dirichlet Allocation Model, with the desired number of topics, K, specified. It is assumed that each document is represented by a multinomial distribution of a topic, and each topic is represented by a multinomial distribution of words. The generation process of the Dirichlet Allocation Model involves first randomly generating a topic distribution for a document; then, for each position in the document, randomly generating a topic based on the document's topic distribution; next, randomly generating a word from the word distribution of that generated topic; and finally, repeating this process until the entire document is generated.
[0055] Then, the matrix of topic and word distribution is output, representing the probability of each word appearing under each topic. Each row here is a topic vector, and then the word and topic distribution vectors of the document content can be output, indicating the probability that the document content belongs to each of these K topics, that is, obtaining the probability of each topic and word distribution in the K topic distributions.
[0056] To quantify the importance of each topic vector, keyword weights are calculated. These keyword weights are calculated by weighting the results using a combination of TF-IDF and the TextRank algorithm. The calculated keyword weights are used to evaluate the importance of each topic obtained in Phase 1 to the current document, ensuring that the extracted keywords are not only statistically significant but also semantically crucial, accurately reflecting the local content focus of the document.
[0057] For the current document and its document library, calculate the TF-IDF value for each word. This assigns high weights to words that appear frequently in the current document but less frequently in other documents. A high TF value measures the importance of a word in the current document, while a high IDF value measures its uniqueness in the entire document set. Input the current document into the TextRank algorithm to obtain the TextRank score for each word. Words adjacent to many important words are assigned high weights, thus capturing semantic importance.
[0058] Then, the TF-IDF value (for statistical significance) and TextRank score (for semantic importance) are combined and weighted to obtain a more comprehensive keyword weight and ranking.
[0059] For each topic, i.e., each topic vector, obtain the most important keyword representing the topic (that is, the keyword within the top threshold range based on ranking) and its probability in the topic word distribution. Then, retrieve the keyword weight. The product of the probability and the keyword weight is used to calculate the importance score of the topic.
[0060] At this point, we have obtained K topic vectors and an importance score for each vector. We then sort the topics and select the most core and important semantic topics in the document.
[0061] By weighted and fused with the importance scores of the extracted user operation frequency feature vector, query pattern feature vector and document topic vector, and implemented through an attention-based neural network, the user preference model can be captured as well as the complex nonlinear relationship between the habits of different users and the document content features. Based on historical user behavior data and document semantic features, a user preference model can be trained.
[0062] Based on the document semantic features, the user preference model generates an initial user preference feature vector, which represents the user's current interests, habits, and potential associations with the document content.
[0063] In the weighted fusion process, the weights of different features on user preferences can be preset, or they can be trained and dynamically adjusted based on historical data through machine learning models to maximize the accuracy of the model in predicting user intent.
[0064] To ensure the user preference model reflects the user's latest intent in real time, the parameters of the initial user preference feature vector are adjusted and optimized based on changes in the frequency of real-time user actions. For example, when frequent clicks or text selections are detected in a specific document area, this usually indicates a transient shift in user intent. The feature weights are immediately updated through incremental learning or a decay mechanism based on the forgetting curve, resulting in an updated user preference model that reflects the user's latest intent in real time. This update process ensures the dynamic adaptability of the user preference model, enabling it to capture transient shifts in user intent and providing the most relevant information for subsequent prompt generation.
[0065] Step S2: Based on the user behavior data and document semantic features, and using the user preference model, map the preference feature vector to keywords to obtain an initial set of prompt words; In one possible implementation, please refer to [the relevant documentation / reference]. Figure 5 The flowchart illustrates the process of obtaining an initial set of prompt words. The step of mapping preference feature vectors to keywords based on the user behavior data and document semantic features, using a user preference model, to obtain the initial set of prompt words includes: Based on the user preference model, obtain the user's long-term and short-term preference characteristics; Based on the long-term preference features and the topic distribution of the documents, a first set of candidate prompt words is obtained through matching. Based on the aforementioned short-term preference features and the keyword weights of the documents, a second set of candidate suggestion words is obtained through matching. The first set of candidate prompts and the second set of candidate prompts are merged to obtain an initial set of prompts.
[0066] In the implementation of this application embodiment, firstly, the user's long-term preference features and short-term preference features are extracted and distinguished from the user preference feature vector generated from the updated user preference model.
[0067] The long-term preference features are obtained by aggregating and analyzing users' historical operation records over a longer time scale, reflecting the user's stable and continuous areas of interest. The short-term preference features are extracted by real-time analysis of users' behaviors in the current interaction session, such as document browsing, mouse hovering, text highlighting, or partial queries in the last few minutes, reflecting the user's immediate interests and focus in the current context.
[0068] Then, deep matching is performed based on the long-term preference features and the topic distribution of the documents.
[0069] The long-term preference feature vector is mapped to the topic embedding space to generate a long-term interest topic vector, and then the cosine similarity between the long-term interest topic vector and each topic vector in the document is calculated.
[0070] Topics with a cosine similarity higher than a preset first threshold are selected, and the most representative keywords within these topics are selected as the first candidate prompt word set. The representative keywords are selected by using words in LDA that are most relevant to the topic, and are sorted by their TF-IDF values in the document.
[0071] Then, the short-term preference features are matched with the keyword weights of the documents.
[0072] The short-term preference feature vector is mapped to the keyword embedding space to generate a short-term intent keyword vector. Then, the cosine similarity between the short-term intent keyword vector and the embedding vector of each keyword in the document is calculated, and a comprehensive evaluation is performed in combination with the keyword weights.
[0073] Keywords with a cosine similarity higher than a preset second threshold and a keyword weight higher than a preset third threshold are selected as the second candidate prompt word set. The keyword embedding vectors are obtained through existing context-related word embedding models to capture the semantic information of words in specific contexts.
[0074] Finally, the first and second candidate suggestion sets are merged. The merging process first removes duplicate suggestions from both sets, then weights them based on scores generated during the matching of long-term and short-term preferences, and finally sorts them. For example, suggestions in the first candidate set are assigned lower weights (reflecting generalization), while suggestions in the second candidate set are assigned higher weights (reflecting immediacy), resulting in a final, integrated, and sorted initial suggestion set. This merging strategy ensures that the suggestions reflect both the user's macro-level interests and their micro-level intentions.
[0075] In this embodiment, the user's long-term and short-term preference features are first extracted and distinguished from the updated user preference model. The long-term preference features are obtained through aggregation analysis, topic modeling, or interest graph construction of the user's historical operation records over a longer time scale (e.g., weeks or months), stably reflecting the user's continuous and deep areas of interest. Conversely, the short-term preference features are extracted through real-time analysis of the user's immediate behaviors in the current interaction session, such as document browsing, mouse hovering, text highlighting, or local queries in the last few minutes, sensitively reflecting the user's immediate interests and focus in the current context. This distinction is crucial for simultaneously satisfying the user's macro-level interests and micro-level intentions.
[0076] Deep matching is performed based on the long-term preference features and the topic distribution of the documents.
[0077] The long-term preference feature vector is mapped to a long-term interest topic vector compatible with the document topic vector space through a pre-trained linear transformation layer or non-linear mapping function. The dimension of the long-term interest topic vector is consistent with the dimension of the document topic vector, and each component represents the intensity of the user's interest in the corresponding topic.
[0078] Then, for all topic vectors obtained from the topic distribution of the document, the cosine similarity between the long-term interest topic vector and each document topic vector is calculated. The formula for calculating the cosine similarity between the topic vector and the document topic vector is: , It is a long-term interest topic vector. The document topic vector is used for cosine similarity, which is calculated by the dot product of the topic vector and the document topic vector, plus the vector length. This effectively quantifies the directional consistency between the two vectors in a high-dimensional space, thus reflecting the degree of alignment between user interests and document topics.
[0079] Finally, based on the calculated cosine similarity, all topic vectors that are higher than the preset first threshold will be selected. From each topic represented by the selected topic vectors, the N keywords with the highest relevance to it will be selected as the components of the first candidate prompt word set.
[0080] The relevance is quantified by the probability distribution of words on a topic in the topic model, and then combined with the frequency and location information of keywords in the document for post-screening to ensure that the selected keywords can accurately reflect the core content of the topic, thereby forming a first candidate prompt word set with macro-guidance.
[0081] At the same time, a fine-grained matching is performed based on the short-term preference features and the keyword weights of the documents.
[0082] The short-term preference features, extracted from the user's real-time behavior within the current document interaction area (e.g., the sentence where the cursor is located, the selected phrase, and the recently entered local query terms), are mapped into a short-term intent keyword vector through a context-aware word embedding model. This short-term intent keyword vector captures the user's specific semantic focus within the current micro-context and exhibits high context sensitivity.
[0083] Then, for all keywords in the document whose keyword weights have been extracted and calculated, their embedding vectors in the current document context are extracted using the same context-aware word embedding model, and combined with the keyword weights to form a keyword weight embedding vector.
[0084] Next, the cosine similarity between the short-term intent keyword vector and the weighted embedding vector of each keyword in the document is calculated to measure the semantic fit between the user's immediate intent and the local content of the document. Based on the calculated cosine similarity, all keywords exceeding a preset second threshold are selected.
[0085] The preset second threshold is dynamically adjusted according to the real-time requirements of user interaction and the degree requirements of prompt words. For example, the threshold can be appropriately reduced to increase coverage when the user is browsing quickly, while the threshold is increased to ensure accuracy when the user is making a precise query.
[0086] Finally, from the selected keywords, keywords with a weight higher than a preset third threshold are chosen as part of the second candidate prompt word set. The preset third threshold is used to filter out keywords in the document that are related to short-term semantic intent but have low importance, ensuring that the selected prompt words have sufficient salience and guidance significance, thereby generating a micro-level second candidate prompt word set.
[0087] To obtain the final initial prompt word set, the first candidate prompt word set and the second candidate prompt word set are merged.
[0088] The merging process first removes duplicate prompts from both sets to avoid redundancy. Then, a weighted ranking is applied based on the combined scores generated from matching long-term and short-term preferences. For example, prompts in the first candidate set are assigned lower weights (reflecting their generalization), while prompts in the second candidate set are assigned higher weights (reflecting their immediacy). This merging strategy ensures that the final initial set of prompts reflects both the user's macro-level interests and captures their micro-level intentions, achieving an effective balance between the two.
[0089] In one possible implementation, the matching based on the long-term preference features and the topic distribution of documents includes: Based on long-term preference features, they are mapped to topic vectors, and the cosine similarity between them and document topic vectors is obtained. Based on cosine similarity, topic vectors with values higher than a preset threshold are obtained, and the keywords corresponding to the topic vectors are selected as prompt words in the first candidate prompt word set.
[0090] In one possible implementation, matching is performed based on the short-term preference features and the keyword weights of the document, including: Based on short-term preference features, they are mapped to keyword vectors, and the cosine similarity between them and the document keyword weight vectors is calculated. Based on cosine similarity, keywords with values higher than a preset threshold are selected as prompt words in the second set of keyword candidate prompt words.
[0091] Step S3: Match the initial set of prompt words with the real-time document content to obtain target prompt words that meet the user's needs.
[0092] In one possible implementation, please refer to [the relevant documentation / reference]. Figure 6 The flowchart illustrates the process of obtaining target prompts that meet user needs. The step of matching the initial prompt set with the real-time document content to obtain target prompts that meet user needs includes: Based on each prompt word in the initial prompt word set and the real-time document content, the semantic similarity between the prompt word and the real-time document content is obtained. The document semantic features of the real-time document content also include contextual relevance. Based on the semantic similarity, the cosine similarity between the prompt word and the document content is obtained through a word embedding model; Select suggestion words with semantic similarity higher than a preset threshold as candidate target suggestion words; Candidate target prompts are sorted according to their contextual relevance, and prompts within a preset number are selected as target prompts.
[0093] In the implementation of the embodiments of this application, please refer to the following: Figure 6 This is a flowchart illustrating the steps for obtaining the target prompt word in this embodiment.
[0094] First, for each prompt word in the initial prompt word set, a context-aware model is used to calculate the semantic similarity between the prompt word and the real-time document content that the user is currently interacting with. The real-time document content specifically refers to the text fragments within the screen area that the user is currently browsing, editing, or interacting with. Its semantic features, in addition to conventional word and topic information, emphasize its deep contextual relationships, such as the syntactic dependencies of words in sentences, the semantic relationships between entities, and the logical connections between paragraphs.
[0095] Then, the semantic similarity calculation process is specifically carried out through a word embedding model. First, the prompt word and its surrounding context information are encoded into a prompt word vector, and at the same time, the relevant text fragments in the real-time document content are encoded into a document context vector. Then, the cosine similarity between the two vectors is calculated.
[0096] Then, prompt words with semantic similarity higher than a preset fourth threshold are selected as preliminary candidate target prompt words. The preset fourth threshold is preset based on the length and complexity of the real-time document content and the user's expected relevance to the prompt words. For example, for short texts or simple documents, the threshold can be appropriately increased to achieve better coverage, while for long texts or complex documents, it may need to be adjusted appropriately to ensure sufficient coverage.
[0097] Finally, the preliminary candidate target prompts are ranked based on the deep contextual relationships mined between them and the real-time document content. This ranking mechanism comprehensively considers multiple dimensions, including the prompt's position in the document structure, the strength of its syntactic association with the user's current focus area, and its importance in the document's semantic graph, selecting prompts within a preset number as the final target prompts.
[0098] This step effectively solves the problem of the lack of effective mining of deep contextual relationships in documents in existing technologies.
[0099] In one possible implementation, the sorting based on the contextual relevance of candidate target prompts includes: Based on the document content, obtain the semantic graph structure, where the nodes of the graph structure represent keywords and the edges of the graph structure represent the relationships between keywords; Calculate the connection strength of candidate target prompts in the semantic graph structure; Candidate target prompts are sorted according to connection strength, and the prompts that rank within a preset number are selected as target prompts.
[0100] In the implementation of this application embodiment, firstly, a semantic graph structure is constructed based on the real-time document content that the user is interacting with.
[0101] In the semantic graph structure, the nodes of the graph structure can include key entities, noun phrases, verb phrases, or phrases with specific semantic functions in the document.
[0102] The edges of the graph structure represent semantic associations between the nodes. These semantic associations include at least: co-occurrence relationships (co-occurring in the same sentence or paragraph), syntactic dependencies (subject-verb-object relationships, modification relationships), semantic hypernym / hypernym relationships, causal relationships, attribute relationships, or other associations identified through a pre-trained knowledge graph. Each edge is assigned a weight reflecting the association strength, calculated based on co-occurrence frequency, mutual information, and then the implicit association strength learned through a graph neural network.
[0103] Then, for each of the initial candidate target prompts, its connection strength in the dynamically constructed semantic graph structure is calculated. The connection strength is calculated in the following ways: First, if the prompt word itself is a node in the semantic graph, its connection strength can be characterized by the centrality measure of the node, for example, by calculating its degree centrality (the number of connecting edges), betweenness centrality (the frequency of being the intermediate point of the shortest path), or PageRank value (node importance).
[0104] Second, if the prompt word contains words that are semantically related to multiple nodes in the graph, the connection strength can be calculated by weighting the associated nodes, where the weights are inversely proportional to the semantic distance between the prompt word and the node. For example, the shortest path length between the prompt word and the node corresponding to the user's current focus area can be calculated, along with the accumulated weights along the path.
[0105] Then, after calculating the connection strength of each preliminary candidate target cue word, all candidate target cue words are sorted in descending order according to the connection strength. Cue words with higher connection strength indicate that they have a stronger relevance to the user's focus in the semantic structure of the current document, and are therefore more valuable.
[0106] Finally, prompt words ranked within a preset number are selected from the sorting results as the final target prompt words. This preset number (e.g., the top 3 to 5) can be dynamically configured based on available space in the user interface, the user's cognitive load, and the prompt word recommendation strategy. This precise sorting process ensures that the generated target prompt words are not only semantically relevant but also possess high structural importance and activation characteristics within the context, effectively solving the problem of insufficient effective mining of deep contextual relationships in documents in existing technologies.
[0107] Step S4: Optimize the target prompt word according to the preset dynamic adjustment algorithm to obtain the optimized prompt word, and feed the optimized prompt word back to the user interface; In one possible implementation, optimizing the target prompt word according to a preset dynamic adjustment algorithm includes: Acquire user behavior data related to target prompts, including click-through rate, dwell time, and feedback rating; Based on the operational behavior data, a user satisfaction score is obtained for each target prompt word; Based on the user satisfaction score, target prompt words with user satisfaction scores below a preset threshold are marked as prompt words to be optimized. The semantic expansion algorithm is used to replace or supplement the prompt words to be optimized to obtain optimized prompt words.
[0108] In implementing this embodiment, firstly, real-time user behavior data regarding the target prompt words that have already been responded to is continuously acquired. This behavior data includes at least: the user's click-through rate on the prompt words, the user's dwell time on the content corresponding to the prompt words, and the user's explicit or implicit feedback ratings on the prompt words (e.g., likes / dislikes, relevant / irrelevant tags).
[0109] The click-through rate refers to the ratio of the number of times a user clicks on the prompt after it is displayed to the number of times it is displayed; the dwell time refers to the length of time a user remains active in the document area or related content guided by the prompt after clicking on it; and the feedback rating is the evaluation of the usefulness of the prompt provided by the user directly through interface interaction.
[0110] Then, based on the acquired operational behavior data, a comprehensive evaluation model is used to calculate the user satisfaction score for each target prompt word. The formula for calculating the user satisfaction score is as follows: , It is the user satisfaction score. It is a preset click-through rate weight. It is the normalized value of the number of clicks. It is a weighted average of the preset dwell time. It is the normalized value of the dwell time. These are the preset weights for feedback ratings. It is the normalized value of the feedback score. The weight parameters can be dynamically adjusted according to the emphasis of each indicator in different application scenarios to adapt to different scenario requirements.
[0111] Then, based on the user satisfaction score, target prompt words with user satisfaction scores below a preset fifth threshold are marked as prompt words to be optimized. The preset fifth threshold can be determined based on the average satisfaction distribution in historical data, and can identify prompt words that fail to effectively guide users or fail to meet user needs.
[0112] Finally, based on a semantic expansion algorithm, the marked prompt words to be optimized are replaced or supplemented to generate a new set of optimized prompt words.
[0113] This optimization process forms a real-time closed-loop feedback mechanism, solving the problem of the lack of an immediate, robust, and closed-loop iterative prompt word optimization mechanism in existing technologies.
[0114] In one possible implementation, the replacement or supplementation of the prompt word to be optimized according to the semantic expansion algorithm includes: Obtain optimization suggestions based on synonyms, hyponyms, or related words of the suggestion words to be optimized; By matching optimized suggestion words with real-time document content, suggestion words that meet user needs are obtained.
[0115] In the implementation of this application embodiment, the semantic expansion algorithm uses existing historical data to train a semantic knowledge graph. For each prompt word to be optimized, the semantic knowledge graph is used to perform multi-dimensional semantic queries to obtain synonyms, hyponyms, and words that are highly related to the prompt word in a specific field.
[0116] Then, the synonyms, hyponyms, or related words obtained through the semantic expansion algorithm are combined with the original prompt words to be optimized to form a new set of candidate prompt words for optimization.
[0117] For each optimized suggestion word in the candidate optimized suggestion word set, it is again subjected to deep matching with the real-time document content that the user is interacting with. The matching process is the same as the matching mechanism for obtaining the target suggestion word, that is, the suggestion word vector is calculated through a word embedding model, and then the cosine similarity between the suggestion word vector and the document context vector is combined with the connection strength in the semantic graph for comprehensive evaluation and ranking.
[0118] This step ensures that the semantically expanded prompts remain highly relevant to the user's current document context, avoiding the generation of generic or out-of-context prompts.
[0119] Finally, from the matched and sorted optimized suggestion words, a preset number of suggestion words with the highest relevance to the real-time document content and the strongest connection will be selected as the final optimized suggestion word set, which will be pushed to the user interface for display.
[0120] This process ensures that even if the initial prompts are ineffective, more effective and user-relevant prompts can be quickly generated through intelligent expansion and context rematching, forming a real-time closed-loop feedback mechanism. This solves the problem of existing technologies lacking an immediate, robust, and iterative prompt optimization mechanism.
[0121] In step S5, in response to detecting user feedback behavior to the prompt words, the user preference model is updated based on the feedback behavior.
[0122] Example 3 This is the third embodiment of the present invention. Based on embodiments 1 and 2, please refer to the following references. Figure 7 A schematic diagram of the structure of a prompt word generation system based on user habits and documents. The prompt word generation system based on user habits and documents includes a user behavior analysis module, a document semantic parsing module, a prompt word generation module, a dynamic optimization module, and a user preference update module connected in sequence.
[0123] The user behavior analysis module is configured to acquire user behavior data and document semantic features; The document semantic parsing module is configured to map preference feature vectors to keywords based on the user behavior data and document semantic features, and a preset user preference model, to obtain an initial set of prompt words. The prompt word generation module is configured to match the initial prompt word set with the real-time document content to obtain target prompt words that meet the user's needs; The dynamic optimization module is configured to optimize the target prompt word according to a preset dynamic adjustment algorithm, obtain an optimized prompt word, and feed the optimized prompt word back to the user interface; The user preference update module is configured to update the user preference model in response to detecting user feedback behavior to prompt words, based on the feedback behavior.
[0124] In the implementation of this application's embodiments, the prompt word generation system based on user habits and documents includes multiple sequentially connected functional modules, namely a user behavior analysis module, a document semantic parsing module, a prompt word generation module, a dynamic optimization module, and a user preference update module. The user behavior analysis module analyzes users' historical operation records, query patterns, and operation frequencies. The document semantic parsing module parses the document's topic distribution, keyword weights, and contextual relevance. The prompt word generation module generates an initial prompt word set and filters target prompt words. The dynamic optimization module optimizes the target prompt words. The user preference update module updates the user preference model based on user feedback behavior.
[0125] Through the above steps, the system can dynamically generate prompts that meet user needs and maintain a high level of personalization in diverse scenarios. For example, when a user switches to a new search topic, the system can quickly capture the user's short-term preference characteristics and generate relevant prompts based on the document content; when a user shows high satisfaction with a particular prompt, the system will then strengthen the relevance of that prompt, thereby improving the user experience.
[0126] In summary, by combining user behavior data with document semantic features, a dynamic closed-loop process was constructed, enabling personalized prompt generation. Close collaboration between modules ensured efficient system operation and enhanced its adaptability. This design not only improved the technical effectiveness of prompt generation but also provided strong support for intelligent services.
[0127] Example 4 The fourth embodiment of the present invention differs from the previous embodiments in that: Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0128] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.
[0129] The units described as separate components may or may not be physically separate. As will be apparent to those skilled in the art, the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0130] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0131] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or grid device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0132] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating prompt words based on user habits and documents, characterized in that, include: Acquire user behavior data and document semantic features; Based on the user behavior data and document semantic features, and based on a preset user preference model, the preference feature vectors are mapped to keywords to obtain an initial set of prompt words; The initial set of prompt words is matched with the real-time document content to obtain target prompt words that meet the user's needs; The target prompt word is optimized according to a preset dynamic adjustment algorithm to obtain an optimized prompt word, and the optimized prompt word is fed back to the user interface; In response to detecting user feedback behavior to prompt words, the user preference model is updated based on the feedback behavior; The step of mapping preference feature vectors to keywords based on the user behavior data and document semantic features, using a user preference model, to obtain an initial set of prompt words includes: Based on the user preference model, obtain the user's long-term and short-term preference characteristics; Based on the long-term preference features and the topic distribution of the documents, a first set of candidate prompt words is obtained through matching. Based on the aforementioned short-term preference features and the keyword weights of the documents, a second set of candidate suggestion words is obtained through matching. The first and second candidate prompt sets are merged, the prompt scores are weighted, and the prompts are sorted to obtain an initial prompt set.
2. The prompt word generation method based on user habits and documents according to claim 1, characterized in that, Before the step of mapping preference feature vectors to keywords based on the user behavior data and document semantic features, and obtaining the initial prompt word set according to the user preference model, the method further includes: The historical operation records of the user behavior data are divided into a set number of time windows, and the operation frequency and query pattern within each time window are statistically analyzed. The topic distribution of the document's semantic features is decomposed into topic vectors, and the importance score of each topic vector is obtained by calculating keyword weights. The user operation frequency, query pattern and document topic vector importance score of the user behavior data are weighted and fused to obtain an initial user preference model; The parameters of the initial user preference model are adjusted based on the frequency of user operations to obtain an updated user preference model.
3. The prompt word generation method based on user habits and documents according to claim 1, characterized in that, The matching based on the long-term preference features and the topic distribution of documents includes: Based on long-term preference features, they are mapped to topic vectors, and the cosine similarity between the topic vectors of the long-term preference features and the document topic vectors is obtained. Based on the cosine similarity between the topic vector of the long-term preference feature and the document topic vector, topic vectors with a value higher than a preset threshold are obtained, and the keywords corresponding to the topic vectors are selected as prompt words in the first candidate prompt word set.
4. The prompt word generation method based on user habits and documents according to claim 1, characterized in that, The matching based on the short-term preference features and the keyword weights of the documents includes: Based on the short-term preference features, they are mapped to keyword vectors, and the cosine similarity between the keyword vectors of the short-term preference features and the document keyword weight vectors is obtained. Based on the cosine similarity between the keyword vector of the short-term preference feature and the document keyword weight vector, keywords with a value higher than a preset threshold are obtained, and these keywords are selected as prompt words in the second candidate prompt word set.
5. The prompt word generation method based on user habits and documents according to claim 1, characterized in that, The step of matching the initial set of prompt words with the real-time document content to obtain target prompt words that meet the user's needs includes: Based on each prompt word in the initial prompt word set and the real-time document content, the semantic similarity between the prompt word and the real-time document content is obtained. The document semantic features of the real-time document content also include contextual relevance. Based on the semantic similarity, the cosine similarity between the prompt word and the document content is obtained through a word embedding model; Select suggestion words with semantic similarity higher than a preset threshold as candidate target suggestion words; Candidate target prompts are sorted according to their contextual relevance, and prompts within a preset number are selected as target prompts.
6. The prompt word generation method based on user habits and documents according to claim 5, characterized in that, The sorting based on the contextual relevance of candidate target prompts includes: Based on the document content, obtain the semantic graph structure; where the nodes of the graph structure represent keywords, and the edges of the graph structure represent the relationships between keywords; Calculate the connection strength of candidate target prompts in the semantic graph structure; Candidate target prompts are sorted according to connection strength, and the prompts that rank within a preset number are selected as target prompts.
7. The prompt word generation method based on user habits and documents according to claim 1, characterized in that, The optimization of the target prompt words according to the preset dynamic adjustment algorithm includes: Acquire user behavior data related to target prompts, including click-through rate, dwell time, and feedback rating; Based on the operational behavior data, a user satisfaction score is obtained for each target prompt word; Based on the user satisfaction score, target prompt words with user satisfaction scores below a preset threshold are marked as prompt words to be optimized. The semantic expansion algorithm is used to replace or supplement the prompt words to be optimized to obtain optimized prompt words.
8. The prompt word generation method based on user habits and documents according to claim 7, characterized in that, The step of replacing or supplementing the prompt words to be optimized according to the semantic expansion algorithm includes: Obtain optimization suggestions based on synonyms, hyponyms, or related words of the suggestion words to be optimized; By matching optimized suggestion words with real-time document content, suggestion words that meet user needs are obtained.
9. A prompt word generation system based on user habits and documents, characterized in that, It includes a user behavior analysis module with sequential electrical connections, a document semantic parsing module, a prompt word generation module, a dynamic optimization module, and a user preference update module; The user behavior analysis module is configured to acquire user behavior data and document semantic features; The document semantic parsing module is configured to map preference feature vectors to keywords based on the user behavior data and document semantic features, according to a preset user preference model, to obtain an initial set of prompt words; The prompt word generation module is configured to match the initial prompt word set with the real-time document content to obtain target prompt words that meet the user's needs; The dynamic optimization module is configured to optimize the target prompt word according to a preset dynamic adjustment algorithm, obtain an optimized prompt word, and feed the optimized prompt word back to the user interface; The user preference update module is configured to update the user preference model in response to detecting user feedback behavior to prompt words, based on the feedback behavior. The step of mapping preference feature vectors to keywords based on the user behavior data and document semantic features, using a user preference model, to obtain an initial set of prompt words includes: Based on the user preference model, obtain the user's long-term and short-term preference characteristics; Based on the long-term preference features and the topic distribution of the documents, a first set of candidate prompt words is obtained through matching. Based on the aforementioned short-term preference features and the keyword weights of the documents, a second set of candidate suggestion words is obtained through matching. The first and second candidate prompt sets are merged, the prompt scores are weighted, and the prompts are sorted to obtain an initial prompt set.
Citation Information
Patent Citations
Text writing real-time recommendation method based on topic model and user behavior data
CN112989025A
Efficient and intelligent large model cue word engineering method and system
CN119227691A
Prompt word generation method and device, equipment, medium and program product
CN119739834A