Generation strategy determination, content generation method, device, equipment and medium
By matching user feature sets with scene feature configurations, the target scene is determined and a generation strategy is formulated, which solves the problem that large language model products cannot be customized, and achieves more accurate content generation and improved user experience.
Patent Information
- Application Number
- CN202510639467.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-11-17
AI Technical Summary
Existing large language model products cannot achieve personalized customization for users, resulting in poor content generation effects and failing to meet diverse market demands.
By acquiring a set of user features, and based on the matching between user features and scene feature configurations of multiple scenarios, the target scenario is determined, and the associated generation strategy is determined based on the target scenario, including model strategy, prompt word framework, and prompt word strategy.
It enables precise scenario classification based on user characteristics, generates content that better suits the characteristics of the scenario, improves the relevance and accuracy of content generation, enhances user experience, and meets diverse market demands.
Smart Images

Figure CN123115805A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a generation strategy determination method, a content generation method, a generation strategy determination device, a content generation device, an electronic device, and a readable storage medium. Background Technology
[0002] Large Language Models (LLMs) are machine learning models for natural language processing with large-scale parameters and complex computational structures, such as generative policy determination large language models. With the emergence of large language models, question-answering systems based on Artificial Intelligence Generated Content (AIGC), such as voice assistants, are widely used in various scenarios.
[0003] Large language model dialogue systems can utilize Retrieval-Augmented Generation (RAG) technology. The system workflow is as follows: first, the user's request is understood to obtain the needs; appropriate knowledge is retrieved based on the needs; prompts are used to assemble the user's request, knowledge, instructions, and other information as input to the large language model; and finally, the large language model generates a response based on the input. Existing technical solutions often employ globally fixed prompt frameworks and strategies.
[0004] Existing large language model products (such as large language model dialogue systems) cannot achieve personalized customization for users, that is, generate personalized outputs such as content, recommendations, and answers that meet the requirements based on different users' needs and preferences. This results in poor content generation and fails to meet diverse market demands. Summary of the Invention
[0005] The technical problem to be solved by the embodiments of the present invention is to provide a method for determining a generation strategy, a content generation method, an apparatus, an electronic device, and a readable storage medium, so as to solve the problem that existing large language model products (such as large language model dialogue systems) cannot achieve user personalization, resulting in poor content generation effect and failure to meet diverse market demands.
[0006] To address the above problems, the present invention provides a method for determining a generation strategy, the method comprising:
[0007] Obtain the user feature set;
[0008] The target scenario is determined based on the matching between the user feature set and the scenario feature configurations of multiple scenarios;
[0009] Based on the target scenario, determine the associated generation strategy.
[0010] Optionally, determining the target scene based on the matching between the user feature set and the scene feature configurations of multiple scenes includes:
[0011] For each user feature in the user feature set, a corresponding feature matching algorithm is used to determine the matching status between each user feature and the scene feature configurations of the multiple scenarios; wherein, the feature matching algorithm includes at least one of the following: conditional consistency algorithm, content similarity algorithm, and regular expression matching algorithm;
[0012] Based on the matching results, the target scene corresponding to the matched scene features is determined.
[0013] Optionally, determining the target scene corresponding to the matched scene features based on the matching results includes:
[0014] Based on the matching results and the priorities set for the multiple scenarios, the target scenario corresponding to the matched scenario feature configuration is determined.
[0015] Optionally, determining the matching status between each user feature and the scene feature configurations of the plurality of scenes includes:
[0016] The scene features, sorted by priority from high to low, are matched sequentially with the user feature set to obtain the matching results; wherein, the priority is configured for the scene.
[0017] The step of determining the target scene corresponding to the matched scene features based on the matching results includes:
[0018] After determining the matching situation based on the user feature set and any scene feature configuration, and based on the matching situation, determining that the user feature set matches the any scene feature configuration, then outputting the target scene corresponding to the matched scene feature configuration.
[0019] Optionally, the user features in the user feature set include at least one of the following: user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge.
[0020] Optionally, before obtaining the user feature set, the method further includes:
[0021] Receive any request to add, delete, or modify a scenario configuration; wherein, the scenario configuration includes scenario feature configuration and generation strategy.
[0022] Optionally, the generation strategy includes at least one of the following: model strategy, prompt word framework, and prompt word strategy.
[0023] The present invention also provides a content generation method, the method comprising:
[0024] Responding to user requests, obtain user characteristics;
[0025] Based on the user characteristics, determine the corresponding target scenario;
[0026] Based on the generation strategy associated with the target scenario, the response content for the user request is generated.
[0027] The present invention also provides a generation strategy determination apparatus, the apparatus comprising:
[0028] The set acquisition module is used to acquire user feature sets;
[0029] The scene matching module is used to determine the target scene based on the matching between the user feature set and the scene feature configurations of multiple scenes;
[0030] The strategy determination module is used to determine the associated generation strategy based on the target scenario.
[0031] Optionally, the scene matching module includes:
[0032] The situation determination submodule is used to determine the matching status between each user feature and the scene feature configuration of the multiple scenarios for each user feature in the user feature set using the corresponding feature matching algorithm; wherein, the feature matching algorithm includes at least one of the following: conditional consistency algorithm, content similarity algorithm, and regular expression matching algorithm;
[0033] The scene determination submodule is used to determine the matching scene features and configure the corresponding target scene based on the matching results.
[0034] Optionally, the scenario determination submodule includes:
[0035] The first scene determination unit is used to determine the target scene corresponding to the matched scene feature configuration based on the matching situation and the priority set for the multiple scenes.
[0036] Optionally, the situation determination submodule includes:
[0037] A matching unit is used to match the scene feature configurations sorted from high to low priority with the user feature set in sequence to obtain the matching results; wherein, the priority is configured for the scene;
[0038] The scenario determination submodule includes:
[0039] The second scene determination unit is used to determine the matching situation based on the user feature set and any scene feature configuration, and then, based on the matching situation, determine that the user feature set matches any scene feature configuration, and output the target scene corresponding to the matched scene feature configuration.
[0040] Optionally, the user features in the user feature set include at least one of the following: user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge.
[0041] Optionally, the device further includes:
[0042] The request receiving module is used to receive any request to add, delete, or modify a scenario configuration before obtaining the user feature set; wherein the scenario configuration includes scenario feature configuration and generation strategy.
[0043] Optionally, the generation strategy includes at least one of the following: model strategy, prompt word framework, and prompt word strategy.
[0044] The present invention also provides a content generation apparatus, the apparatus comprising:
[0045] The feature acquisition module is used to acquire user features in response to user requests;
[0046] The scene determination module is used to determine the corresponding target scene based on the user characteristics;
[0047] The content generation module is used to generate response content for the user request based on a generation strategy associated with the target scenario.
[0048] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0049] Memory, used to store computer programs;
[0050] The processor, when executing a program stored in memory, implements the method described above.
[0051] This invention also discloses a readable storage medium that, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the method described above.
[0052] According to one embodiment of the present invention, a user feature set is first obtained, and then a target scene is obtained based on the matching results between the user feature set and multiple scene feature configurations configured for different scenarios. Next, a generation strategy associated with the determined target scene is selected. In this way, the present invention can determine the matching scene based on the user feature set, supports more fine-grained scene configuration, achieves accurate scene classification, and allows for quick and flexible addition, deletion, and modification of scene configurations, as well as customized generation strategies for different scenes. This enables model products to generate content that better suits the characteristics of various scenarios, thereby improving the targeting and accuracy of content generation, significantly enhancing the effect of content generation, improving user experience, and meeting diverse market demands.
[0053] According to another embodiment of the present invention, user characteristics are obtained in response to user requests, and then the corresponding target scenario is determined based on the user characteristics. Finally, response content for the user request is generated based on a generation strategy associated with the target scenario. In this way, the present invention can determine the matching scenario based on user characteristics and customize the generation strategy for different scenarios. This enables the model product to generate content that is more in line with the characteristics of each scenario, thereby improving the targeting and accuracy of content generation, significantly enhancing the effect of content generation, strengthening the user experience, and meeting diverse market demands. Attached Figure Description
[0054] Figure 1 A flowchart illustrating the steps of a generation strategy determination method according to an embodiment of the present invention is shown.
[0055] Figure 2 A flowchart illustrating the output of the personalized model is shown;
[0056] Figure 3 A schematic diagram of the scene matching process is shown;
[0057] Figure 4 A flowchart illustrating the steps of a content generation method according to an embodiment of the present invention is shown.
[0058] Figure 5 The diagram shows a structural block diagram of an embodiment of a generation strategy determination device provided by an embodiment of the present invention;
[0059] Figure 6 This diagram illustrates a structural block diagram of a content generation apparatus embodiment provided by one embodiment of the present invention;
[0060] Figure 7 A structural block diagram of an electronic device for determining generation strategies and generating content is shown according to an exemplary embodiment. Detailed Implementation
[0061] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] The generation strategy determination method in this embodiment of the invention can be executed by an intelligent system or platform with large models and related technical capabilities, such as an intelligent dialogue system or intelligent assistant platform, or any other applicable hardware and software. This embodiment of the invention does not impose any limitations on this. These systems or platforms run in a server or cloud environment and have capabilities such as data processing, model calculation, and logical judgment. For example, this generation strategy determination method can be applied to the voice assistant of an intelligent vehicle system.
[0063] Reference Figure 1 The diagram illustrates a flowchart of a generation strategy determination method provided by an embodiment of the present invention, which may specifically include the following steps:
[0064] Step 101: Obtain the user feature set.
[0065] In this embodiment of the invention, the user feature set refers to a set of various information that can describe a user, such as user registration time, conversation time, conversation content, retrieval knowledge, and other user features. Specifically, it can include any applicable user features according to actual needs, and this embodiment of the invention does not impose any restrictions on this.
[0066] In an optional embodiment of the present invention, the user features in the user feature set include at least one of the following: user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge.
[0067] User information refers to relevant data and information that can directly or indirectly identify a specific user. Examples include user registration information, hardware device usage information, or any other applicable information; this embodiment of the invention does not impose any limitations on this.
[0068] Among them, classification model features refer to the key attributes and indicators extracted when using a classification model to process and analyze data, which are used to distinguish different categories or labels. For example, features obtained by classifying user requests through a classification model, or any other applicable information. This embodiment of the invention does not limit this.
[0069] Among them, time information refers to various data and attributes related to time, which reflects the point in time or time period in which an event, behavior or state occurs, such as the time when an interaction occurs, or any other applicable information. This embodiment of the invention does not limit this.
[0070] Location information refers to various data and attributes related to geographic location. It indicates the geographic location of an object or event, such as the user's location when the interaction occurs, or any other applicable information. This embodiment of the invention does not limit this.
[0071] The dialogue content refers to the specific text, voice, images, documents or other forms of information exchanged between the user and the system (e.g., a dialogue system based on a retrieval-enhanced big data model) or between users. For example, the dialogue history and current dialogue content between the user and the dialogue system, or any other applicable information. This embodiment of the invention does not limit this.
[0072] The function content refers to information related to the link calling tool or function, such as information about the link calling a certain spreadsheet tool and a certain scientific computing function, or any other applicable information. This embodiment of the invention does not limit this.
[0073] Among them, retrieval-enhanced knowledge refers to relevant knowledge and information obtained from external knowledge sources (such as databases, documents, web pages, etc.) through retrieval technology, which is used to enhance the model or system's understanding and processing capabilities for specific problems or tasks. For example, knowledge related to user requests obtained through tools and external retrieval, or any other applicable information, are not limited in this embodiment of the present invention.
[0074] These user characteristics depict user attributes and interaction contexts from different perspectives, providing rich evidence for subsequent scene matching and thus supporting more refined scene classification.
[0075] In this embodiment of the invention, various types of user information are collected through various methods to construct a user feature set. For example, basic user information is obtained from the data filled in during user registration; information such as the user's interaction time and location with the system is recorded in system logs; the dialogue content of user requests is analyzed using natural language processing technology to extract keywords, semantic features, and other characteristics; function content is obtained from called functions; and external knowledge related to user requests is obtained through retrieval enhancement technology. These acquired user features are integrated to form a complete user feature set, providing a comprehensive data foundation for subsequent scenario matching.
[0076] Step 102: Determine the target scene based on the matching between the user feature set and the scene feature configurations of multiple scenes.
[0077] In this embodiment of the invention, a scenario refers to a scenario divided according to business needs, user needs, or specific situations in technical applications, such as car Q&A, travel Q&A, mathematical calculation, time understanding, car comparison, hot topic scenarios, etc. Specifically, it can include any applicable scenario, and this embodiment of the invention does not limit it.
[0078] In this embodiment of the invention, scene feature configuration is a set of user feature configurations set for each scene to define the feature conditions of that scene. Each scene feature configuration contains configuration information for one or more user features, which clarifies the types of user features that the scene focuses on and their specific requirements.
[0079] For example, a scenario feature configuration for a car-related question-and-answer scenario might include a classification model feature configuration that includes "car"-related keywords in the user's request, as well as location information configuration that the user's location is a "4S store".
[0080] In this embodiment of the invention, a matching result is obtained by comparing a user feature set with scene feature configurations for multiple scenarios. The user's current scenario is then determined based on the matching result. For example, the user feature set is compared with each scene feature configuration, and a matching score is calculated. The scene feature configuration with the highest matching score is determined as the matched scene feature configuration.
[0081] In this embodiment of the invention, the corresponding target scenario is determined based on the matched scenario feature configuration. Each scenario feature configuration corresponds to a specific scenario, therefore the matched scenario feature configuration directly determines the target scenario. For example, if the matched scenario feature configuration is the scenario feature configuration for the "car troubleshooting Q&A" scenario, then the target scenario is the "car troubleshooting Q&A" scenario.
[0082] Step 103: Determine the associated generation strategy based on the target scenario.
[0083] In this embodiment of the invention, the generation strategy refers to the strategy formulated for generating content based on a determined target scenario, including but not limited to model strategies, prompt word frames, and prompt word strategies. Different generation strategies will affect the way and effect of the model generates content, thereby meeting the personalized needs of different scenarios.
[0084] In an optional embodiment of the present invention, the generation strategy includes at least one of the following: a model strategy, a prompt word framework, and a prompt word strategy.
[0085] In this context, model strategy refers to the strategy for selecting an appropriate model and determining the model's input content during the content generation process, based on the specific needs and characteristics of the scenario. By selecting a suitable model and input content, content that meets the requirements of a particular scenario can be generated.
[0086] For example, in an intelligent customer service system, when a user inquires about product-related issues, the model strategy can select a pre-trained model that excels at answering product information questions, and use the user's question as the model's input. For instance, if a user asks, "How is the battery life of this phone?", the model strategy will select a model that can accurately understand and answer questions related to product performance. The input will be the user's question, and the model's generated answer might be, "This phone has excellent battery life and can meet your normal daily usage needs."
[0087] For example, in a content recommendation system, when recommending articles to a user, the model strategy can choose a model suitable for text generation and use the user's historical reading preferences and current trending topics as input. For instance, if a user frequently reads science and technology articles, and the current trending topic is artificial intelligence, the model strategy will choose a model capable of generating science and technology articles. The input will include the user's reading preferences and current trending topics, and the model's generated content might be recommendations of science and technology articles related to artificial intelligence.
[0088] A cue word framework is a structured template used to guide large models in generating specific types of content. It defines a series of cue words or instructions, explicitly telling the model what kind of content to generate, including requirements for the content's theme, style, format, and length. Cue word frameworks can help users interact with the model more efficiently, generating content that meets expectations.
[0089] For example, the APE framework breaks down a user's request into three main parts: Action, Purpose, and Expectation. The COAST framework focuses on five core elements: Context, Objectives, Action, Support, and Technology.
[0090] The cue word strategy refers to the methods and techniques for designing and selecting appropriate cue words based on specific task requirements and scenario characteristics. It involves how to guide the model to generate content that meets the requirements through cue words, including how to select keywords, how to organize the sentence structure of the cue words, and how to adjust the length and complexity of the cue words.
[0091] For example, the simple prompt word strategy: when asking the model to generate a poem, simple prompt words can be used directly, such as "write a poem about love." This strategy is suitable for some relatively simple and explicit tasks, where the model can directly generate relevant content based on the prompt words.
[0092] For example, a more complex prompt strategy can be used when generating more complex and specific content. For instance, when asking the model to generate a review article about a product, the following prompt could be used: "Please write a review article about [Product Name] based on the following points: appearance design, performance, user experience, advantages and disadvantages analysis, comparison with other products, etc. The article should be at least 1000 words long, and the language style should be objective, professional, and vivid." This detailed prompt strategy guides the model to generate more suitable content.
[0093] In this embodiment of the invention, after determining the target scenario, a corresponding generation strategy is determined based on the generation strategy configured for that target scenario. By determining a generation strategy that matches the target scenario, clear guidance can be provided for subsequent content generation, making the generated content more in line with user needs and business characteristics in that scenario.
[0094] According to one embodiment of the present invention, a user feature set is first obtained, and then a target scene is obtained based on the matching results between the user feature set and multiple scene feature configurations configured for different scenarios. Next, a generation strategy associated with the determined target scene is selected. In this way, the present invention can determine the matching scene based on the user feature set, supports more fine-grained scene configuration, achieves accurate scene classification, and allows for quick and flexible addition, deletion, and modification of scene configurations, as well as customized generation strategies for different scenes. This enables model products to generate content that better suits the characteristics of various scenarios, thereby improving the targeting and accuracy of content generation, significantly enhancing the effect of content generation, improving user experience, and meeting diverse market demands.
[0095] In an optional embodiment of the present invention, a specific implementation of determining the target scene based on the matching situation between the user feature set and the scene feature configurations of multiple scenes may include: for each user feature in the user feature set, using a corresponding feature matching algorithm to determine the matching situation between each user feature and the scene feature configurations of the multiple scenes; wherein, the feature matching algorithm includes at least one of the following: conditional consistency algorithm, content similarity algorithm, and regular expression matching algorithm; and determining the target scene corresponding to the matched scene feature configuration based on the matching situation.
[0096] Feature matching algorithms are algorithms used to determine the matching status between a user feature set and a scene feature configuration. They compare user features in the user feature set with feature configurations in the scene feature configuration to determine whether they match or are similar, thereby identifying the user's target scene.
[0097] The conditional consistency algorithm is used to determine whether a user feature set and a scene feature configuration are completely identical. It compares the user features in the user feature set with the feature configurations in the scene feature configuration to determine if they are completely identical. If they are completely identical, the match is considered successful.
[0098] Content similarity algorithms are used to calculate the content similarity (such as cosine similarity) between user features and corresponding feature configurations in a scene feature configuration. It calculates the similarity by comparing the text content in the user feature set with the text content in the scene feature configuration. Similarity is usually represented by a similarity score; a higher score indicates greater content similarity.
[0099] Regular expression matching is an algorithm used to match features between a set of user features and a configuration of scene features based on regular expressions. It defines a regular expression pattern and checks whether user features in the user feature set match the pattern. If they match, the match is considered successful.
[0100] User feature matching refers to the matching result between user features and feature configurations. It reflects the similarity or degree of matching between user features in the user feature set and the corresponding feature configurations in the scene feature configuration, and is usually represented by a matching score or matching label.
[0101] For example, suppose the user feature set includes the user's request text "My car makes an unusual noise when starting," and the user's location is "garage." The scene feature configuration is "car troubleshooting Q&A," which includes classification model features containing keywords such as "car" and "troubleshooting" in the user's request, as well as location information such as "garage" or "repair shop." Through feature matching algorithms, the matching result of user features can be represented as a matching score, such as 0.9, indicating a high degree of match between the user features and the scene feature configuration.
[0102] When matching a set of user features with any scenario feature configuration, for each user feature in the set of user features, the corresponding feature matching algorithm is used to determine the matching status between the user features in the set of user features and the feature configurations in the scenario feature configuration.
[0103] For example, user information, classification model features, time information, and location information can use conditional consistency algorithms; dialogue content and function content can use content similarity algorithms; and retrieval augmentation knowledge can use regular expression matching algorithms.
[0104] Then, based on the matching results, the matching scene feature configuration is determined. For example, the user feature set is compared with each scene feature configuration, and a matching score is calculated. The matching score can be a weighted sum of the matching results of each feature, or other suitable metrics. Based on the matching scores, the scene feature configuration with the highest score is selected as the matching scene feature configuration.
[0105] Finally, based on the matched scene feature configurations, the corresponding target scene is determined. Each scene feature configuration corresponds to a specific scene, therefore, the matched scene feature configurations directly determine the target scene.
[0106] For example, such as Figure 2 The diagram illustrates the output flow of the personalized model. Developers can configure various scenarios. For example, vertical business scenarios refer to scenarios related to specific business areas, including car Q&A, travel Q&A, entertainment Q&A, and persona Q&A. These scenarios are primarily identified using classification model features. Logical function scenarios refer to scenarios related to system functions, such as mathematical calculations, logical reasoning, and tool enhancement. These scenarios typically involve specific functional modules of the system. These scenarios are primarily identified using function content. Signal personalization scenarios refer to scenarios that personalize based on user behavior and preferences, such as time understanding and location understanding. These scenarios are primarily identified using time and location information. Traffic gray-scale scenarios refer to scenarios where gray-scale testing is conducted in the system, such as car comparisons and mobile phone comparisons. These scenarios are primarily identified using user information. Personalized selection scenarios refer to selecting specific user groups from a user base through specific rules or algorithms for personalized services or marketing, such as hot topic scenarios and customized scenarios. These scenarios are primarily identified using dialogue content and retrieval enhancement knowledge. The process involves obtaining a set of user features and using a feature matching algorithm corresponding to multiple features to determine the target personalized scenario. Based on the determined personalized target scenario, the system selects an associated personalized model strategy, prompt strategy, and personalized prompt framework. Finally, based on the personalized model strategy, prompt strategy, and personalized prompt framework, a personalized model output (i.e., response content) is generated.
[0107] By using multiple feature matching algorithms, the matching between user feature sets and scene feature configurations can be compared more comprehensively. The combined application of these algorithms can significantly improve the accuracy of scene matching, reduce the possibility of false matching, and better adapt to various complex scenarios and user needs, enhancing the system's flexibility and adaptability. Consequently, it can more accurately determine the target scene in which the user is located, meeting the requirements of scene refinement and complexity.
[0108] In an optional embodiment of the present invention, a specific implementation of determining the target scene corresponding to the matched scene feature configuration based on the matching situation may include: determining the target scene corresponding to the matched scene feature configuration based on the matching situation and the priority set for the plurality of scenes.
[0109] The system comprehensively considers the matching of user features and the priority of the scenarios corresponding to the scenario feature configurations to determine the target scenario that best meets the user's needs. The priority is pre-configured for the scenarios corresponding to the scenario features and is used to select the optimal one from multiple matching scenario feature configurations.
[0110] For example, such as Figure 3 The diagram illustrates the scene matching process. Users input information into the system through various means (such as text or voice). A user feature set is acquired, specifically including user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge. Various feature matching algorithms are used to determine the matching status of user features between the user feature set and the scene feature configuration. Specifically, user information, classification model features, time information, and location information are determined using a conditional consistency algorithm; dialogue content and function content are determined using a content similarity algorithm; and retrieval enhancement knowledge is determined using a regular expression matching algorithm. Some feature matching algorithms also rely on text feature models, which are models used to extract and represent key information from text data. They convert text into numerical vectors or feature representations, enabling computers to understand and process text data. Based on the results of the feature matching algorithms, scene feature configurations that match the user features are determined. The matched scene feature configurations are then sorted according to a preset priority. This priority can be set based on factors such as business needs and scene importance. Finally, the target scene corresponding to the matched scene feature configuration is output. Based on the matching results, the system can determine the user's context and adopt corresponding generation strategies, such as generating personalized content, recommendations, and answers.
[0111] In one implementation, for each user feature in the user feature set, a corresponding feature matching algorithm (such as conditional consistency algorithm, content similarity algorithm, regular expression matching algorithm, etc.) is used to calculate its matching score with the scene feature configuration. The matching score can be binary (match or non-match) or continuous (such as similarity score). The matching score is then weighted by the priority of the scene feature configuration. The priority can be used as a weight, multiplied by the matching score to obtain a weighted matching score. Based on the weighted matching score, the scene feature configuration with the highest score is selected as the matching scene feature configuration, thereby determining the corresponding target scene.
[0112] For example, suppose there is an intelligent customer service system where a user requests the question, "My car makes an unusual noise when starting." The system has the following two scenario feature configurations: Scenario A (Car Fault Q&A): Priority 0.8, Matching Score 0.9. Scenario B (Car Maintenance Q&A): Priority 0.6, Matching Score 0.7. The weighted matching scores are: Scenario A: 0.8 * 0.9 = 0.72, Scenario B: 0.6 * 0.7 = 0.42. Based on the weighted matching scores, Scenario A, with the highest score, is selected as the target scenario.
[0113] In another implementation, for each user feature in the user feature set, a corresponding feature matching algorithm is used to determine the initial matching scene feature configuration. The initial matching scene feature configuration refers to the scene feature configuration whose matching score exceeds a certain threshold. Among the initial matching scene feature configurations, the scene feature configuration with the highest priority is selected as the matching scene feature configuration according to a preset priority, thereby determining the corresponding target scene.
[0114] For example, suppose there's an e-commerce platform where a user enters "sports shoes" in the search box. The system has the following three scenario feature configurations: Scenario A (product search): priority 0.9, match score 0.8; Scenario B (brand recommendation): priority 0.7, match score 0.6; Scenario C (user reviews): priority 0.5, match score 0.4. The initial matching scenario feature configurations are Scenario A and Scenario B (match score exceeding the threshold of 0.5). Among these initial matching scenario feature configurations, Scenario A is selected as the target scenario based on priority.
[0115] By setting priorities, the scenario that best meets the important business needs or the user's main intent is selected when multiple scenarios may match, thus improving the rationality and accuracy of scenario matching.
[0116] In an optional embodiment of the present invention, a specific implementation of determining the matching situation between each user feature and the scene feature configurations of the plurality of scenarios may include: sequentially matching the scene feature configurations sorted in descending order of priority with the user feature set to obtain the matching situation; wherein the priority is configured for the scenario. Correspondingly, a specific implementation of determining the target scene corresponding to the matched scene feature configuration based on the matching situation may include: after determining the matching situation based on the user feature set and any scene feature configuration, determining that the user feature set matches any scene feature configuration based on the matching situation, and then outputting the target scene corresponding to the matched scene feature configuration.
[0117] First, sort all scenario feature configurations according to their set priorities from highest to lowest. Priority settings can be determined by considering multiple factors such as business needs, the importance of the scenario, and user behavior patterns. For example, in an intelligent customer service system, scenarios related to users' urgent problems (such as "fault reporting") can be set to high priority, while scenarios related to product inquiries (such as "product introduction") can be set to lower priority.
[0118] The scenario feature configurations, sorted by priority, will be matched against the user feature set sequentially. Matching will begin with the highest priority scenario feature configuration and proceed downwards until a matching scenario feature configuration is found.
[0119] For each scene feature configuration, a combination of feature matching algorithms (such as conditional consistency algorithms, content similarity algorithms, and regular expression matching algorithms) is used to determine the matching status between the user feature set and the scene feature configuration. If the user feature set matches the current scene feature configuration, the matching process is immediately stopped, and the target scene corresponding to the scene feature configuration is determined.
[0120] By prioritizing and matching sequentially, the system ensures that among multiple possible matching scenarios, the scenario feature configuration that better meets user needs or is more important for business scenarios is selected first, thereby improving the rationality and accuracy of scenario matching. Moreover, since the matching process stops immediately if the user feature set matches the current scenario feature configuration, the amount of computation is reduced and the matching efficiency is improved.
[0121] In an optional embodiment of the present invention, before obtaining the user feature set, the method may further include: receiving an add request, delete request, or modify request for any scenario configuration; wherein the scenario configuration includes scenario feature configuration and generation strategy.
[0122] Scene configuration includes scene feature configuration and generation strategy. Scene feature configuration defines the characteristic conditions of the scene, including the configuration of one or more user features. The generation strategy defines the strategies used to generate content in this scene, including model strategy, prompt word framework, and prompt word strategy. Scene configuration may also include scene priority, etc.
[0123] The system receives scenario configuration requests from users or administrators through various means, such as a graphical user interface (GUI), application programming interface (API), or command-line interface (CLI). Requests can include operations to add, delete, or modify scenario configurations.
[0124] An add request refers to a request submitted by a user or administrator to add scenario configurations, which requires providing information such as the scenario's unique identifier, scenario feature configurations, and generation strategies.
[0125] A deletion request is a request submitted by a user or administrator to delete a scenario configuration, and requires the provision of a unique identifier for the scenario.
[0126] A modification request refers to a request submitted by a user or administrator to modify the scene configuration. It requires providing a unique identifier for the scene, as well as the modified scene feature configuration and / or generation strategy.
[0127] In this way, the system can flexibly manage scenario configurations, dynamically adjust scenario configurations according to actual needs, and has the ability to continuously update and customize scenarios, thereby improving the system's adaptability and usability to adapt to ever-changing needs and business scenarios.
[0128] The content generation method in this embodiment of the invention can be executed by an intelligent system or platform with large models and related technical capabilities, such as an intelligent dialogue system or intelligent assistant platform, or any other applicable hardware and software. This embodiment of the invention does not impose any limitations on this. These systems or platforms run in a server or cloud environment and possess capabilities such as data processing, model computation, and logical judgment. For example, this content generation method can be applied to the voice assistant of an intelligent vehicle system.
[0129] Reference Figure 4 The diagram illustrates a flowchart of a content generation method provided by an embodiment of the present invention, which may specifically include the following steps:
[0130] Step 201: In response to the user request, obtain user characteristics.
[0131] In this embodiment of the invention, user requests can be input in the form of voice, images, videos, text, or commands, etc., and this embodiment of the invention does not impose any limitations on this. For example, it may be voice input issued by the user or text input submitted by the user.
[0132] In this embodiment of the invention, when a user request is received, characteristic information related to the user, i.e., user characteristics, is obtained through various methods. User characteristics may include one or more. User characteristics include user registration time, conversation occurrence time, conversation content, retrieval knowledge, etc. Specifically, any applicable user characteristics may be included according to actual needs, and this embodiment of the invention does not impose any restrictions on this. In one specific implementation, multiple user characteristics can be constructed into the user characteristic set described in the above embodiments.
[0133] Step 202: Determine the corresponding target scenario based on the user characteristics.
[0134] In this embodiment of the invention, the specific implementation method for determining the corresponding target scenario based on user characteristics may include a variety of methods, and this embodiment of the invention does not limit this.
[0135] For example, the target scenario can be determined based on the matching results between the user feature set and the scenario feature configurations of multiple scenarios. This approach is relatively lightweight, supports adding scenario categories at any time, and is better able to meet changing user or market needs.
[0136] For example, user characteristics can be input into a scene classification model to determine the target scene. A scene classification model is a machine learning model used to automatically classify the scene a user is in based on input user characteristics. By training the scene classification model, it learns user characteristic patterns under different scenes, thus enabling it to accurately determine the corresponding target scene based on new user characteristic input. This method can effectively handle complex relationships between user characteristics and scenes, improving the accuracy and efficiency of scene classification.
[0137] Optionally, determining the target scene based on the matching between the user feature set and the scene feature configurations of multiple scenes includes:
[0138] For each user feature in the user feature set, a corresponding feature matching algorithm is used to determine the matching status between each user feature and the scene feature configurations of the multiple scenarios; wherein, the feature matching algorithm includes at least one of the following: conditional consistency algorithm, content similarity algorithm, and regular expression matching algorithm;
[0139] Based on the matching results, the target scene corresponding to the matched scene features is determined.
[0140] Optionally, determining the target scene corresponding to the matched scene features based on the matching results includes:
[0141] Based on the matching results and the priorities set for the multiple scenarios, the target scenario corresponding to the matched scenario feature configuration is determined.
[0142] Optionally, determining the matching status between each user feature and the scene feature configurations of the plurality of scenes includes:
[0143] The scene features, sorted by priority from high to low, are matched sequentially with the user feature set to obtain the matching results; wherein, the priority is configured for the scene.
[0144] The step of determining the target scene corresponding to the matched scene features based on the matching results includes:
[0145] After determining the matching situation based on the user feature set and any scene feature configuration, and based on the matching situation, determining that the user feature set matches the any scene feature configuration, then outputting the target scene corresponding to the matched scene feature configuration.
[0146] Optionally, the user features in the user feature set include at least one of the following: user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge.
[0147] Optionally, before obtaining the user feature set, the method further includes:
[0148] Receive any request to add, delete, or modify a scenario configuration; wherein, the scenario configuration includes scenario feature configuration and generation strategy.
[0149] Step 203: Generate the response content for the user request based on the generation strategy associated with the target scenario.
[0150] In this embodiment of the invention, after determining the target scenario, the model is invoked to generate the response content of the user request based on the generation strategy associated with the target scenario.
[0151] Optionally, the generation strategy includes at least one of the following: model strategy, prompt word framework, and prompt word strategy.
[0152] Specifically, based on the model strategy in the generation strategy, an appropriate model architecture or model parameter settings can be selected; based on the prompt word framework and prompt word strategy, prompt words can be provided to guide the model to generate specific types of content.
[0153] For example, in a "car repair Q&A" scenario, a pre-trained model in the automotive field is selected based on the generation strategy. A prompt word framework containing keywords such as "car model" and "fault symptoms," along with prompt words designed specifically for the user's question, such as "Please analyze the possible causes and provide repair suggestions based on the [fault symptoms] of [car model]," are then input into a multimodal large model. The model generates corresponding response content based on these inputs, such as analysis of the causes of car faults and repair suggestions. By adopting a generation strategy that matches the target scenario, more personalized, accurate, and user-relevant content can be generated, improving user satisfaction and the system's application effectiveness.
[0154] According to embodiments of the present invention, user characteristics are obtained in response to user requests, and then the corresponding target scenario is determined based on these user characteristics. Finally, response content for the user request is generated based on a generation strategy associated with the target scenario. In this way, the present invention can determine matching scenarios based on user characteristics and customize generation strategies for different scenarios. This enables model products to generate content that is more in line with the characteristics of each scenario, thereby improving the targeting and accuracy of content generation, significantly enhancing the effect of content generation, strengthening the user experience, and meeting diverse market demands.
[0155] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0156] Reference Figure 5 The diagram illustrates a structural block diagram of a generation strategy determination device according to another embodiment of the present invention, which may specifically include the following modules:
[0157] The set acquisition module 301 is used to acquire a set of user features;
[0158] The scene matching module 302 is used to determine the target scene based on the matching situation between the user feature set and the scene feature configurations of multiple scenes;
[0159] The strategy determination module 303 is used to determine the associated generation strategy based on the target scenario.
[0160] Optionally, the scene matching module includes:
[0161] The situation determination submodule is used to determine the matching status between each user feature and the scene feature configuration of the multiple scenarios for each user feature in the user feature set using the corresponding feature matching algorithm; wherein, the feature matching algorithm includes at least one of the following: conditional consistency algorithm, content similarity algorithm, and regular expression matching algorithm;
[0162] The scene determination submodule is used to determine the matching scene features and configure the corresponding target scene based on the matching results.
[0163] Optionally, the scenario determination submodule includes:
[0164] The first scene determination unit is used to determine the target scene corresponding to the matched scene feature configuration based on the matching situation and the priority set for the multiple scenes.
[0165] Optionally, the situation determination submodule includes:
[0166] A matching unit is used to match the scene feature configurations sorted from high to low priority with the user feature set in sequence to obtain the matching results; wherein, the priority is configured for the scene;
[0167] The scenario determination submodule includes:
[0168] The second scene determination unit is used to determine the matching situation based on the user feature set and any scene feature configuration, and then, based on the matching situation, determine that the user feature set matches any scene feature configuration, and output the target scene corresponding to the matched scene feature configuration.
[0169] Optionally, the user features in the user feature set include at least one of the following: user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge.
[0170] Optionally, the device further includes:
[0171] The request receiving module is used to receive any request to add, delete, or modify a scenario configuration before obtaining the user feature set; wherein the scenario configuration includes scenario feature configuration and generation strategy.
[0172] Optionally, the generation strategy includes at least one of the following: model strategy, prompt word framework, and prompt word strategy.
[0173] According to one embodiment of the present invention, a user feature set is first obtained, and then a target scene is obtained based on the matching results between the user feature set and multiple scene feature configurations configured for different scenarios. Next, a generation strategy associated with the determined target scene is selected. In this way, the present invention can determine the matching scene based on the user feature set, supports more fine-grained scene configuration, achieves accurate scene classification, and allows for quick and flexible addition, deletion, and modification of scene configurations, as well as customized generation strategies for different scenes. This enables model products to generate content that better suits the characteristics of various scenarios, thereby improving the targeting and accuracy of content generation, significantly enhancing the effect of content generation, improving user experience, and meeting diverse market demands.
[0174] Reference Figure 6 The diagram illustrates a structural block diagram of a content generation apparatus embodiment provided by another embodiment of the present invention, which may specifically include the following modules:
[0175] The feature acquisition module 401 is used to acquire user features in response to user requests;
[0176] The scene determination module 402 is used to determine the corresponding target scene based on the user characteristics;
[0177] The content generation module 403 is used to generate response content for the user request based on a generation strategy associated with the target scenario.
[0178] According to another embodiment of the present invention, user characteristics are obtained in response to user requests, and then the corresponding target scenario is determined based on the user characteristics. Finally, response content for the user request is generated based on a generation strategy associated with the target scenario. In this way, the present invention can determine the matching scenario based on user characteristics and customize the generation strategy for different scenarios. This enables the model product to generate content that is more in line with the characteristics of each scenario, thereby improving the targeting and accuracy of content generation, significantly enhancing the effect of content generation, strengthening the user experience, and meeting diverse market demands.
[0179] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0180] Figure 7 This is a structural block diagram illustrating an electronic device 700 for determining generation strategies and generating content, according to an exemplary embodiment. For example, the electronic device 700 may be an in-vehicle computer, a computer, a digital broadcasting terminal, a messaging device, a game console, a medical device, a fitness device, etc.
[0181] Reference Figure 7 The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.
[0182] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0183] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0184] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.
[0185] Multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0186] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
[0187] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0188] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 may detect the on / off state of device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or a component of electronic device 700, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0189] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0190] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0191] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0192] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a terminal's processor, enables the terminal to perform a generation policy determination method, the method comprising:
[0193] Obtain the user feature set;
[0194] The target scenario is determined based on the matching between the user feature set and the scenario feature configurations of multiple scenarios;
[0195] Based on the target scenario, determine the associated generation strategy.
[0196] Optionally, determining the target scene based on the matching between the user feature set and the scene feature configurations of multiple scenes includes:
[0197] For each user feature in the user feature set, a corresponding feature matching algorithm is used to determine the matching status between each user feature and the scene feature configurations of the multiple scenarios; wherein, the feature matching algorithm includes at least one of the following: conditional consistency algorithm, content similarity algorithm, and regular expression matching algorithm;
[0198] Based on the matching results, the target scene corresponding to the matched scene features is determined.
[0199] Optionally, determining the target scene corresponding to the matched scene features based on the matching results includes:
[0200] Based on the matching results and the priorities set for the multiple scenarios, the target scenario corresponding to the matched scenario feature configuration is determined.
[0201] Optionally, determining the matching status between each user feature and the scene feature configurations of the plurality of scenes includes:
[0202] The scene features, sorted by priority from high to low, are matched sequentially with the user feature set to obtain the matching results; wherein, the priority is configured for the scene.
[0203] The step of determining the target scene corresponding to the matched scene features based on the matching results includes:
[0204] After determining the matching situation based on the user feature set and any scene feature configuration, and based on the matching situation, determining that the user feature set matches the any scene feature configuration, then outputting the target scene corresponding to the matched scene feature configuration.
[0205] Optionally, the user features in the user feature set include at least one of the following: user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge.
[0206] Optionally, before obtaining the user feature set, the method further includes:
[0207] Receive any request to add, delete, or modify a scenario configuration; wherein, the scenario configuration includes scenario feature configuration and generation strategy.
[0208] Optionally, the generation strategy includes at least one of the following: model strategy, prompt word framework, and prompt word strategy.
[0209] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a terminal's processor, enables the terminal to perform a content generation method, the method comprising:
[0210] Responding to user requests, obtain user characteristics;
[0211] Based on the user characteristics, determine the corresponding target scenario;
[0212] Based on the generation strategy associated with the target scenario, the response content for the user request is generated.
[0213] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0214] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0215] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0216] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0217] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0218] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0219] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0220] The foregoing has provided a detailed description of a generation strategy determination method, a content generation method, a generation strategy determination device, a content generation device, an electronic device, and a readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for determining a generation strategy, characterized in that, The method includes: Obtain the user feature set; The target scenario is determined based on the matching between the user feature set and the scenario feature configurations of multiple scenarios; Based on the target scenario, determine the associated generation strategy.
2. The method according to claim 1, characterized in that, The step of determining the target scene based on the matching between the user feature set and the scene feature configurations of multiple scenes includes: For each user feature in the user feature set, a corresponding feature matching algorithm is used to determine the matching status between each user feature and the scene feature configurations of the multiple scenarios; wherein, the feature matching algorithm includes at least one of the following: conditional consistency algorithm, content similarity algorithm, and regular expression matching algorithm; Based on the matching results, the target scene corresponding to the matched scene features is determined.
3. The method according to claim 2, characterized in that, The step of determining the target scene corresponding to the matched scene features based on the matching results includes: Based on the matching results and the priorities set for the multiple scenarios, the target scenario corresponding to the matched scenario feature configuration is determined.
4. The method according to claim 2, characterized in that, Determining the matching status between each user feature and the scene feature configurations of the multiple scenarios includes: The scene features, sorted by priority from high to low, are matched sequentially with the user feature set to obtain the matching results; wherein, the priority is configured for the scene. The step of determining the target scene corresponding to the matched scene features based on the matching results includes: After determining the matching situation based on the user feature set and any scene feature configuration, and based on the matching situation, determining that the user feature set matches the any scene feature configuration, then outputting the target scene corresponding to the matched scene feature configuration.
5. The method according to any one of claims 1-4, characterized in that, The user features in the user feature set include at least one of the following: user information, classification model features, time information, location information, dialogue content, function content, and retrieval enhancement knowledge.
6. The method according to any one of claims 1-5, characterized in that, Before obtaining the user feature set, the method further includes: Receive any request to add, delete, or modify a scenario configuration; wherein, the scenario configuration includes scenario feature configuration and generation strategy.
7. The method according to any one of claims 1-6, characterized in that, The generation strategy includes at least one of the following: model strategy, prompt word framework, and prompt word strategy.
8. A content generation method, characterized in that, The method includes: Responding to user requests, obtain user characteristics; Based on the user characteristics, determine the corresponding target scenario; Based on the generation strategy associated with the target scenario, the response content for the user request is generated.
9. A generation strategy determination device, characterized in that, The device includes: The set acquisition module is used to acquire user feature sets; The scene matching module is used to determine the target scene based on the matching between the user feature set and the scene feature configurations of multiple scenes; The strategy determination module is used to determine the associated generation strategy based on the target scenario.
10. A content generation apparatus, characterized in that, The device includes: The feature acquisition module is used to acquire user features in response to user requests; The scene determination module is used to determine the corresponding target scene based on the user characteristics; The content generation module is used to generate response content for the user request based on a generation strategy associated with the target scenario.
11. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-8.
12. A readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-8.
