Information generation method and device and electronic equipment

By dynamically generating target prompt words, using environment information and user status or dialogue content, the problem of large language models requiring frequent prompt words in user interaction is solved, and more efficient and personalized information generation is achieved.

CN119884438APending Publication Date: 2025-04-25LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510123957.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the interaction between users and models, existing large language models (LLMs) require users to frequently enter prompt words or guide them through multiple rounds of interaction, resulting in a large burden on users and lack of adaptability to dynamic scenarios.

Method used

By obtaining the target prompt words used to characterize the target identity, the target prompt words do not belong to the input information and are used to guide the processing process of the target model. The prompt word can be dynamically generated to adapt to different scenarios by the environment information obtained by the sensor or by the user status information, or determined by the dialogue content.

Benefits of technology

It simplifies user interaction, reduces the burden of user input, improves the system's ability to adapt to dynamic scenarios, and the generated output information is more in line with specific roles, styles or requirements, improving the quality and efficiency of information generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884438A_ABST
    Figure CN119884438A_ABST
Patent Text Reader

Abstract

The invention provides an information generation method, which comprises the following steps of: obtaining input information which is provided for a target model; a target cue word used for representing a target identity is obtained, the target cue word does not belong to the input information, and the target cue word is used for guiding the processing process of a target model; and guiding the target model to process the input information based on the target cue word to generate output information for output. The invention further provides a device for executing the method and electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence, and in particular to an information generation method, device and electronic device. Background Art

[0002] With the rapid development of artificial intelligence, large language models (LLMs) are pre-trained with network data (i.e., trained with public web search data). When users chat with LLMs, LLMs will find relevant answers based on the information on public web pages. Users need to enter accurate descriptive characters or characters that clearly represent requirements as prompts, or users need to accurately describe characters or characters that clearly represent requirements as prompts in the next round of conversation based on each answer to further guide LLM in order to get the answer the user wants. Usually, users rely on frequently entering prompts or guiding large voice models through multiple rounds of interactions. This method not only increases the burden on users, but also lacks the ability to adapt to dynamic scenarios. Summary of the invention

[0003] In view of this, the present disclosure provides an information generating method, device and electronic device.

[0004] One aspect of the present disclosure provides an information generation method, including: obtaining input information, the input information being used to provide to a target model; obtaining a target prompt word for characterizing a target identity, the target prompt word not belonging to the input information, wherein the target prompt word is used to guide a processing process of the target model; and guiding the target model to process the input information based on the target prompt word to generate output information for output.

[0005] According to an embodiment of the present disclosure, the input information is the input information of the Nth round in a conversation based on the target model, where N is an integer greater than or equal to 2; the output information of the N-1th round before the input information is the output information for output generated by the target model based on the prompt word representing the first identity; the target identity is different from the first identity.

[0006] According to an embodiment of the present disclosure, obtaining a target prompt word for characterizing a target identity includes: obtaining target data; processing the target data through a classification model to generate a target prompt word;

[0007] According to an embodiment of the present disclosure, a target prompt word for characterizing a target identity is obtained by at least one of the following methods: acquiring sensing parameters through a sensor, the sensing parameters being used to characterize environmental information corresponding to an electronic device having a sensor; determining a target prompt word based on the environmental information; or acquiring sensing parameters through a sensor, the sensing parameters being used to characterize status information of a user using an electronic device having a sensor; and determining a target prompt word based on the status information.

[0008] According to an embodiment of the present disclosure, obtaining a target prompt word for characterizing a target identity includes: obtaining conversation contents from the NMth round to the N-1th round, where M is a positive integer; and determining a target prompt word based on the conversation contents.

[0009] According to an embodiment of the present disclosure, obtaining the conversation content from the NMth round to the N-1th round includes: obtaining the conversation content from the NMth round to the N-1th round based on a preset time window; wherein the width of the time window is the preset time width, the end of the time window is the moment corresponding to the N-1th round of conversation, and the moment corresponding to the NMth round to the N-1th round is within the time window.

[0010] According to an embodiment of the present disclosure, before guiding the target model to process input information based on the target prompt word to generate output information for output, it also includes: if the target prompt word is related to the content classification of the personal knowledge base, based on the input information query, determine the personal target data corresponding to the input information; guiding the target model to process the input information based on the target prompt word to generate output information for output includes: guiding the target model to process personal target data to generate output information for output.

[0011] Another aspect of the present disclosure provides an information generating device, including: a first obtaining device, used to obtain input information, the input information is used to provide to a target model; a second obtaining device, used to obtain a target prompt word used to characterize the target identity, the target prompt word does not belong to the input information, wherein the target prompt word is used to guide the processing process of the target model; and a first generating device, used to guide the target model to process the input information based on the target prompt word to generate output information for output.

[0012] Another aspect of the present disclosure provides an electronic device, including: an input device for receiving input information; a processor for performing at least part of the following operations: obtaining input information, the input information being provided to a target model; obtaining a target prompt word for characterizing a target identity, the target prompt word not belonging to the input information, wherein the target prompt word is used to guide a processing process of the target model; and guiding the target model to process the input information based on the target prompt word to generate output information for output.

[0013] According to an embodiment of the present disclosure, the electronic device also includes: a sensor for collecting sensing parameters; the processor is also used to perform at least part of the following operations: obtaining sensing parameters through the sensor, the sensing parameters are used to characterize environmental information corresponding to the electronic device with the sensor; determining a target prompt word based on the environmental information; or obtaining sensing parameters through the sensor, the sensing parameters are used to characterize status information of a user using the electronic device with the sensor, and determining a target prompt word based on the status information.

[0014] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above information generation method when executed.

[0015] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the above information generation method when executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0017] Figure 1 The flowchart of the information generation method according to the embodiment of the present disclosure is schematically shown;

[0018] Figure 2 Schematically illustrates a session in an information processing method according to an embodiment of the present disclosure;

[0019] Figure 3 A flowchart for obtaining a target prompt word in an information processing method according to an embodiment of the present disclosure is schematically shown;

[0020] Figure 4 Another flowchart of obtaining a target prompt word in the information generation method according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 5 Another flowchart of obtaining a target prompt word in the information generation method according to an embodiment of the present disclosure is schematically shown;

[0022] Figure 6 Another flowchart of obtaining a target prompt word in the information generation method according to an embodiment of the present disclosure is schematically shown;

[0023] Figure 7 Schematically shows a flow chart of obtaining conversation content in the information generating method according to an embodiment of the present disclosure;

[0024] Figure 8 Another flow chart according to an embodiment of the present disclosure is schematically shown;

[0025] Fig. 9 A block diagram schematically shows an information generating device according to an embodiment of the present disclosure; and

[0026] Fig.10 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0031] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security, and national security.

[0032] The target model involved in the implementation of the present disclosure is a machine learning model that can recognize natural language and / or other inputs (such as audio, video, images, tables, etc.) input into the target model, and perform comprehensive language processing tasks such as analyzing semantics and answering questions, thereby generating output related to the input and / or responding to the input.

[0033] The target model involved in the implementation of the present disclosure learns the characteristics and rules of natural language by training a large amount of diverse data, so as to understand and generate natural language. It usually has model parameters ranging from hundreds of millions to hundreds of billions (model parameters are variables that control the behavior of the target model) and can capture complex relationships and patterns in natural language.

[0034] The target model involved in the implementation of the present disclosure may be a generative model or a generative language model (GLMs). For example, it may specifically include a large language model (LLMs), a GPT (Generative Pre-trained Transformer), etc. The model involved in the embodiments of the present application may be a general large model, or an expert large model obtained after fine-tuning based on demand, and the embodiments of the present application do not limit this.

[0035] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0036] Figure 1 The flowchart of the information generating method according to the embodiment of the present disclosure is schematically shown.

[0037] like Figure 1 As shown, the method includes operations S110 to S130.

[0038] In operation S110 , input information is obtained, and the input information is provided to a target model.

[0039] Input information is the content provided to the target model through an information transmission device or an interactive interface, which is used to trigger the target model to perform specific tasks or generate corresponding output results. It can be text, voice or other forms of content. It is used to provide the target model with the user's intention to clarify the user's needs or questions. The content of the input information can be specific instructions, questions, descriptions, or even vague requirements.

[0040] The input information may include a first prompt word, which is used to guide the target model processing process. For example, the first prompt word refers to the prompt content embedded in the input information, which is used to directly guide the target model to perform a specific task or adjust its generation behavior. The first prompt word is explicitly provided by the user and is passed to the target model together with the input information, and its purpose is to enable the model to understand the user's intention and complete the task more accurately.

[0041] For example, the first prompt word can be a task goal prompt word, which is used to clearly specify the task goal and tell the model how to process the input information or the expected output content format. For example, the input information is: "Use concise language to summarize the following article content...", where the first prompt word can be "Use concise language to summarize".

[0042] For example, the first prompt word may be an output form prompt word, which is used to specify the form or structure of the output result and help the model adjust the format of the generated content. For example, the input information is: "List the following data comparison in a table...", where the first prompt word may be "list in a table".

[0043] For example, the first prompt word may be a conditional prompt word, which is used to set specific conditional conditions or rules to constrain the scope or style of the content generated by the model. For example, input information: "Answer the following question in no more than 50 words...", where the first prompt word may be "Answer in no more than 50 words".

[0044] The input information may not include the first prompt word. The input information only includes the task description or request, and does not explicitly specify the processing method, role setting or output requirements of the target model. The description of the input content is implicit and vague, and the model behavior is not directly guided by the prompt word.

[0045] For example, the input information is a vague request, which does not explicitly state the specific task, but only gives simple operation instructions. For example, the input information is: "Summarize today's conversation.", in which the output format, role, or other constraints are not clearly specified. For example, the input information is a general question and answer, which does not contain prompt information to guide the model, and the model completes the processing according to the default rules or target prompt words. For example, the input information is: "How is the weather?", in which the role setting or output format is not clearly stated in the input content. For example, the input information is a brief description that only describes the subject or object of the task, and does not contain prompt information for specific task goals or processing methods. For example, the input information is: "Explain quantum computing.", in which no detailed explanation, concise summary, or other specific requirements are required.

[0046] In operation S120, a target prompt word for characterizing the target identity is obtained, where the target prompt word does not belong to the input information, wherein the target prompt word is used to guide the processing process of the target model.

[0047] The target prompt word is a prompt information different from the first prompt word. It is used to adjust and guide how the target model handles the task, characterize the identity, behavior or output style of the target model in the task, and thus optimize the model task processing logic and generation method.

[0048] The target prompt word does not depend on the input content. It is a kind of information generated by the system, provided externally or dynamically inferred, and is independent of user input. In contrast, the first prompt word is directly provided by the user or can be directly obtained from the input content, and is usually accompanied by the task description.

[0049] Target prompts can specify the role or identity characteristics of the target model when performing tasks, affecting the model's language style, behavior, and task processing methods. For example, target prompts give the model a specific role so that its output content can meet the characteristics of the role and task requirements, such as answering technical questions with professional terms, explaining knowledge points in a teaching tone, or solving user problems with a customer service tone. This representation enables the target model to better adapt to the needs of specific scenarios and enables users to obtain more contextual feedback. By setting a role or identity for the model, target prompts enhance the model's ability to adapt to different tasks and scenarios.

[0050] For example, the target prompt word can be a role characteristic prompt word, which gives the model a specific role so that it can handle tasks from a perspective that suits the role. For example, the role of a lawyer, the role of a doctor, the role of a teacher, etc. The target prompt word can also be a style and tone prompt word, which affects the style and tone of the model in the language output. For example, rigorous, humorous, concise, etc. The target prompt word can also be an environmental prompt word, which affects the scope of the model's generated output content to adapt to a specific situation. For example, the target prompt word is "in a restaurant."

[0051] The target prompt word can be one or more. When there are multiple target prompt words, the processing of the target model is guided by each target prompt word at the same time, and the generated output information matches the identity represented by each target prompt word at the same time. For example, the target model can generate output content in a humorous style with the role of a doctor at the same time.

[0052] In operation S130, the target model is guided to process the input information based on the target prompt word to generate output information for output.

[0053] When the target model generates output information, it will be constrained or guided by the "target prompt words" so that the output information generated by the model conforms to a specific role, style or requirement.

[0054] For example, the target prompt word is a role characteristic prompt word. For example, if the target prompt word is "lawyer role", then the model will provide clear and organized legal explanations in the capacity of a lawyer; for example, if the target prompt word is "customer service", then the model will generate information based on the standard customer service process and provide user-friendly guidance.

[0055] For example, the target prompt word is a style and tone prompt word. For example, if the target prompt word is "humorous style", the model will generate output information in a relaxed and interesting language. For example, if the target prompt word is "concise style", the output information generated by the model will be shorter and avoid lengthy explanations.

[0056] For example, the target prompt word is an environmental prompt word. For example, the scenario is that the device is in low-power mode and the target prompt word is "low battery", then the model may generate output information in a concise form to avoid generating pictures, audio and other content that causes a lot of power consumption; for example, the scenario is that the user is driving and the target prompt word is "driving", then the model may generate voice-type output information to avoid safety hazards caused by the user's line of sight diversion.

[0057] According to the disclosed embodiments, on the one hand, because the target prompt words are not input by the user but are automatically generated by the system, a more efficient user interaction experience is provided, the operation steps are simplified, and the convenience of the system can be significantly improved, especially in complex task scenarios. On the other hand, the target prompt words are dynamically generated by the system and can be flexibly adapted to different scenarios, which enhances the system's adaptability to dynamic scenarios and enables the model to provide the most optimized output results in different tasks and environments. On the other hand, the target prompt words can dynamically optimize the processing method of the model during task execution, improve the quality and efficiency of information generation, avoid the problem of redundant information or style mismatch, and further enhance the user experience.

[0058] Figure 2 The input information in the information processing method according to the embodiment of the present disclosure is schematically shown.

[0059] According to an embodiment of the present disclosure, the input information is the input information of the Nth round in the conversation based on the target model, where N is an integer greater than or equal to 2. The output information of the N-1th round before the input information is the output information for output generated by the target model based on the prompt word representing the first identity. The target identity is different from the first identity.

[0060] A turn can refer to the correspondence between input information and output information contained in a completed interaction cycle when a user and a target model have a conversation. Specifically, a turn is a processing mechanism of the target model triggered by user input information, and the target model generates output information based on the current input information, context information, and prompt words generated by the system, thereby completing a whole round of interaction.

[0061] A conversation may refer to a series of continuous interactive operations between a user and a target model based on a preset interactive logic, usually consisting of multiple rounds of input information and output information. A conversation may be conducted in a variety of forms such as text, voice, and image, and the processing mechanism of the target model is triggered by the input information to generate corresponding output information. At least some of the multiple rounds in a conversation may have logical continuity, and subsequent input information may be associated with the previous round of output information or developed based on the context. For example, a conversation may be an interactive process within a specific period of time; for example, a conversation may refer to an interactive process that includes a specific number of rounds of input and output information; for example, a conversation may be an interactive process that revolves around a single task topic. Figure 2 As shown, a session may include N rounds, wherein each completed round includes an input information Q: XXXXXX and a model output information A: xxxxxx. The Nth round may be an unfinished round, with only input information Q: XXXXXX.

[0062] The input information is the input information of the Nth round. Before the input information of the Nth round is processed, the target model has completed N-1 rounds of interaction, and the output information of the N-1th round is output information generated for output based on the prompt word representing the first identity.

[0063] In the N-1 rounds of interactions that have been completed in a conversation, the model may or may not have undergone an identity change, and in the final N-1 round of dialogue, the model generates output information for output based on the prompt words that represent the first identity, and the target identity is different from the first identity. In other words, the model may or may not have undergone an identity change in the first N-1 rounds, and at the beginning of the Nth round, the model's identity is different from the previous round.

[0064] In a session, a target prompt word can be generated in each round, that is, every time the target model receives input information of a new round, the system will regenerate a target prompt word for representing the target identity. The target prompt word can point to a different identity from the previous round, or it can point to the same identity as the previous round. The target model adjusts its processing logic based on the target prompt word to generate output information for output that meets the requirements of the current round.

[0065] For example, in a conversation, in the first round, the user inputs: "Please tell me about today's weather." The system generates the target prompt word: "As a weather forecaster" to indicate the target identity as a weather forecaster, and the model generates the output information: "It will rain lightly today." In the second round, the user inputs: "What about tomorrow?" The system generates the target prompt word: "As a weather forecaster" to indicate the target identity as a weather forecaster, and the model generates the output information: "It will be sunny tomorrow." In the third round, the user inputs: "Is this weather suitable for mountain climbing?" The system generates the target prompt word: "As an outdoor sports expert" to indicate the target identity as an outdoor sports expert, and the model generates the output information: "This weather is suitable for mountain climbing, but it is recommended to wear sunscreen and carry enough water with you."

[0066] It can be seen that in this dialogue, each round regenerates the output of the target prompt word guidance model. When the round is 2, the target identity represented by the generated target prompt word is "weather forecaster", which is the same as the identity represented by the prompt word used to generate the output information in the previous round (first round). When the round is 3, the target identity represented by the generated target prompt word is "outdoor sports expert", which is different from the identity represented by the prompt word used to generate the output information in the previous round (second round) (weather forecaster).

[0067] In a session, the target prompt word may not be generated in every round, but may be generated only when certain trigger conditions are met. The trigger conditions may include, but are not limited to, input information exceeding the current identity range, user intention changes, session time reaching a preset time threshold, session length reaching a preset threshold, external factors change, and meeting specific rules.

[0068] When the input information exceeds the scope of the current identity, that is, when the first identity does not match the input information, the target prompt word is generated. When the user's input content exceeds the scope of the current identity, or involves new fields or tasks, and the first identity cannot meet the user's needs, the target prompt word will be regenerated to adjust the identity. For example, the first identity represents "climatologist", and the model answers questions about global warming, while the user's input information is: "What impact does this climate change have on the economy?" It is detected that the question involves the economic field and does not match the identity of "climatologist". It is not appropriate to generate output information with the identity of "climatologist", which triggers the generation of the target prompt word and converts the identity to the target identity of "as an economist".

[0069] The user's intention changes, that is, the intention or tendency represented by the user's input information changes, triggering the generation of the target prompt word. In this case, the first identity can answer the user's intention, but it is more appropriate to regenerate the target prompt word to change the identity. For example, in the previous round, the user inputs: "How to improve indoor air quality?" The user's intention is to get general advice on improving indoor air quality. The first identity is an environmental expert, and the model outputs: "In order to improve indoor air quality, you can ventilate regularly, use an air purifier, reduce indoor pollution sources, etc." In this round, the user inputs: "What is the technical principle of an air purifier?" The user's intention shifts from general air quality improvement questions to an in-depth understanding of the technical principles of air purifiers, and the intention shifts to more professional technical questions. Although the first identity (environmental expert) can answer the user's question, its answer may be too brief or general and cannot go into the technical details. It triggers the generation of the target prompt word to convert to the target identity "technical expert", making the model output more professional.

[0070] When the session time reaches the preset time threshold, that is, when the duration of the session from the first round reaches the preset threshold, the target prompt word is triggered. For example, the previous round occurred on Monday, and the next round, that is, the current round, is triggered on Wednesday. A long time has passed. The first identity used in the previous round may not meet the needs of the user at the current moment, triggering the generation of the target prompt word to ensure that the output of the current round model meets the needs of the user.

[0071] When the conversation length reaches a preset threshold, that is, the number of rounds in the conversation reaches the preset length threshold, or the amount of data contained in the conversation reaches the preset threshold, the generation of the target prompt word is triggered. As the conversation length increases, the user's needs may gradually become more diverse or complex, and the initial identity may not be able to fully cover the new needs, so the generation of the target prompt word is triggered. For example, the generation of the target prompt word is triggered once every 10 rounds of conversation.

[0072] Changes in external factors may include, but are not limited to, changes in the spatial environment, changes in the temporal environment, changes in the electronic devices used, changes in the device status, changes in user preferences, changes in the user's emotional tendencies, etc. For example, when the user's spatial location changes from a residential area to a restaurant, the target prompt word is triggered to convert the target identity to "food expert" to facilitate providing more dining suggestions to the user. For example, when the user's spatial location changes to an office, the target prompt word is triggered to convert the target identity to "work assistant" to make the model's output information more refined, efficient and work-related. For example, when the user's mood becomes pessimistic, the target prompt word is triggered to convert the target identity to "humorous person", so that the model responds to the user in a more positive and relaxed way. For example, when the user wears and connects a Bluetooth headset, the electronic device used changes, and the target prompt word is triggered to convert the target identity to "voice assistant", so that the model outputs information in the form of voice output. For example, the state of the user's mobile phone switches from normal mode to game mode, which triggers the generation of target prompt words to convert the target identity to "game assistant", etc.

[0073] Satisfying a specific rule means that part of the content in the input information satisfies a preset specific rule. For example, it is preset that when the user inputs "123" as the beginning of the input information, the identity of the model is changed to "writing assistant". Then, when the user inputs "123 I am a little distressed recently", the system detects that the beginning of the input information is 123, triggers the generation of target prompt words to convert the target identity to "writing assistant", and generates output information: "You mentioned that you are a little distressed recently. I can help you organize your thoughts or assist you in writing articles related to your mood." For example, it is preset that the "normal mode" of the model only includes two identities, "family assistant" and "work assistant", and the "advanced mode" of the model can include multiple identities such as "family assistant", "work assistant", "legal advisor", "technical expert", etc. When the user prompts to switch from "normal mode" to "advanced mode", it triggers the generation of target prompt words to redefine the target identity.

[0074] According to the disclosed embodiments, the identity transition can be completed in the same conversation. The continuity and context relevance of the identity transition enable the target model to understand the user's intention more accurately and provide a coherent interactive experience. Since the generation of target prompt words can be controlled by trigger conditions, the intelligence of the conversation is enhanced, and the target model can flexibly adjust the identity when necessary, which not only avoids the interference caused by unnecessary identity switching, but also ensures that the identity conversion is carried out at the right time, thereby improving the pertinence and accuracy of the answer.

[0075] In other embodiments, the input information is the input information of the first round of the conversation of the target model. That is, when a conversation is started, the generation of a target prompt word is triggered, so that the model has an initial identity when talking to the user, and this target prompt word does not belong to the user input information.

[0076] Figure 3 The flowchart of obtaining the target prompt word in the information processing method according to the embodiment of the present disclosure is schematically shown.

[0077] like Figure 3 As shown, based on the foregoing embodiment, operation S120 may include operations S310 to S320.

[0078] In operation S310, target data is obtained.

[0079] In operation S320, the target data is processed by the classification model to generate a target prompt word.

[0080] Target data refers to data from various sources used to generate target prompt words, which is key information that directly affects the system's identity conversion and behavior adjustment. The target data is analyzed and classified using a classification model to generate target prompt words for guiding the processing of the target model. Specifically, the target data is preprocessed, including but not limited to text segmentation, sentiment analysis, data normalization, and the like. Furthermore, for different types of target data, the system extracts feature information, such as identity, location, time, intent, or state features, and then generates a feature vector. The classification model maps feature vectors to different category labels, and different category labels correspond to different target identities, output methods, or ranges, thereby generating at least one target prompt word based on the category label.

[0081] A classification model is a pre-trained machine learning model that is used to assign input data to one or more predefined categories or labels, that is, to classify the data so that each data point belongs to a specific category. The model is trained using labeled data (that is, each input data already has a corresponding category label), and then it can predict and classify new, unlabeled data.

[0082] The algorithm or architecture used by the classification model can be one or more of logistic regression, decision tree, support vector machine, K-nearest neighbor algorithm, random forest, neural network, and those skilled in the art can select a suitable algorithm or architecture to design a classification model according to actual conditions, and the present disclosure does not impose any restrictions on this.

[0083] Operation S320 may also be: generating a target prompt word by processing the target data and the historical data through the classification model. The historical data (such as the user's historical behavior, interaction records, etc.) may be used as input features of the classification model, that is, the historical data is processed into a feature vector and is input into the classification model as one of the inputs together with the feature vector formed by the target data to generate a prompt word.

[0084] Operation S320 may also be: generating target prompt words by processing the target data through the classification model and the knowledge graph. The knowledge graph contains entities, relationships and context information. The entity relationships and context information in the knowledge graph can be used as inputs to the classification model. Through the support of embedding technology or graph neural network, the graph information is input into the classification model together with other input features to generate target prompt words. For example, the knowledge graph can provide "patient symptoms-diagnosis-treatment" association information, and the classification model generates the target prompt word "medical consultation assistant" based on the features.

[0085] According to the embodiments of the present disclosure, the classification model has powerful data learning capabilities, can dynamically adjust the generation of prompt words in different interaction scenarios, and automatically identify the prompt words that best match the target identity and scenario, thereby achieving efficient and accurate prompt word generation, improving the flexibility and personalized service capabilities of the target model in complex environments, and better adapting to the needs of different users and scenarios.

[0086] The output classification information of the classification model provided in the embodiment of the present disclosure is used as a characterizing identity prompt word, and the classification information will affect the identity of the target model (LLM) when answering and the corresponding personal knowledge base (PKB) used to answer. In one embodiment, when the target model answers based on network data, because of the target identity prompt word represented by the classification information, the answer result of answering with the target identity is more focused. In another embodiment, the output classification information of the classification model is also used to determine the corresponding personal knowledge base (PKB), so that the answer result of the target model (LLM) based on the data in the corresponding personal library is more focused. The classification model provided in the embodiment of the present disclosure makes the answer result more focused and the effect better.

[0087] In other embodiments, the target prompt word can also be generated according to preset rules. For example, the target prompt word is generated by matching specific features, such as keywords, sentence patterns or fixed patterns. For example, when the target data contains "weather" related content, a prompt word related to the "weather assistant" identity is generated. Through feature matching, when the dialogue between the user and the target model is relatively concise and clear, fast matching can be achieved, which takes up less resources and is fast.

[0088] Figure 4 Another flowchart for obtaining a target prompt word in the information generation method according to an embodiment of the present disclosure is schematically shown.

[0089] like Figure 4 As shown, operation S120 may include operations S410 to S420.

[0090] In operation S410, sensing parameters are acquired through a sensor, where the sensing parameters are used to characterize environmental information corresponding to an electronic device having the sensor.

[0091] In the embodiments of the present disclosure, the sensing parameters are collected by sensors built into the electronic device, and / or the sensing parameters are collected by sensors that can be connected to and communicate with the electronic device, and / or the sensing parameters are collected by sensors in other electronic devices that can be connected to and communicate with the electronic device.

[0092] The sensors include, but are not limited to, one or more of temperature sensors, humidity sensors, pressure sensors, acceleration sensors, gyroscope sensors, light sensors, gas sensors, sound sensors, heart rate sensors, skin conductivity sensors, touch sensors, infrared sensors, magnetometer sensors, position sensors, barcode scanners, biometric sensors, motion sensors, ambient noise sensors, air quality sensors, air pressure sensors, radar sensors, vibration sensors, rotation sensors, thermocouple sensors, ultraviolet sensors, current sensors, ultrasonic sensors, chemical sensors, etc.

[0093] The sensing parameters are data collected by the sensor, which can reflect or describe the physical, chemical properties or environmental characteristics of the environment in which the device is located, and may include but are not limited to parameters, gas concentration parameters, magnetic field strength parameters, vibration frequency parameters, acceleration parameters, rotation angular velocity parameters, displacement parameters, distance parameters, depth parameters, touch pressure parameters, current parameters, voltage parameters, resistance parameters, electromagnetic radiation parameters, radio frequency signal strength parameters, heat parameters, heart rate parameters, blood oxygen saturation parameters, skin resistance parameters, breathing rate parameters, electromyography signal parameters, bioelectric signal parameters, motion parameters, environmental color parameters, humidity change rate parameters, etc. One or more of the parameters.

[0094] Environmental information may refer to comprehensive information obtained by analyzing and processing sensing parameters that can describe the state of the environment in which the electronic device is located. For example, it may be one or more of the following information: temperature state, humidity level, air pressure state, light condition, UV index, noise environment, air quality level, carbon dioxide concentration level, types and concentrations of harmful gases, magnetic field distribution, vibration environment, motion trajectory, vibration intensity, distance information, obstacle detection information, ambient brightness changes, environmental color information, geographic location state, weather conditions (such as sunny, rainy, snowy), time state (such as day or night), etc.

[0095] In addition to being collected through sensors, environmental information can also be obtained through other means, including but not limited to the following: obtaining data through the Internet (obtaining public environmental data such as weather forecasts and air quality indexes through the Internet), satellite remote sensing data (using satellite images or remote sensing technology to obtain macro-environmental information such as geography and climate), map service interface (obtaining terrain, location and environment-related data through geographic information system API), camera image analysis (using image processing technology to analyze the captured environmental images to extract information such as light, color, obstacles, etc.), user setting information (users manually set specific states, such as power saving mode, flight mode, game mode, etc.), local storage data (calling historical environmental information from the device's storage), network device sharing (sharing its environmental perception information through other connected smart devices, such as temperature or humidity detection values ​​of neighboring devices), and simulation data generation (generating virtual environmental information through simulation systems for prediction or testing).

[0096] In operation S420, the target prompt word is determined based on the environmental information, and the target prompt word matching the current context is automatically selected or generated according to the state, change or characteristics of the environment to ensure that the output information generated by the target model conforms to the specific role, style or requirement, thereby achieving more personalized and adaptive output.

[0097] For example, if environmental information indicates that the air quality is poor (such as a high PM2.5 index), the system generates target prompts to convert the target identity to "health expert", and constrains the target model to generate health-related prompts, such as wearing a mask, starting an air purifier, etc. For example, if environmental information indicates that the user is in a gym, the system generates target prompts to convert the target identity to "fitness expert", and constrains the model to generate content related to fitness or exercise, such as playing exercise motivational music or suggesting exercise plans.

[0098] According to the embodiments of the present disclosure, environmental information is collected and generated based on sensors or other means, external environmental changes are perceived in real time, and prompt words adapted to the scene are generated to improve accuracy and real-time performance, and enhance scene adaptability and user experience.

[0099] Figure 5 Another flowchart for obtaining a target prompt word in the information generation method according to an embodiment of the present disclosure is schematically shown.

[0100] According to an embodiment of the present disclosure, operation S120 may include operations S510 to S520.

[0101] In operation S510, a sensing parameter is acquired through a sensor, where the sensing parameter is used to represent status information of a user using an electronic device having the sensor.

[0102] In the embodiments of the present disclosure, the sensing parameters are collected by sensors built into the electronic device, and / or the sensing parameters are collected by sensors that can be connected to and communicate with the electronic device, and / or the sensing parameters are collected by sensors in other electronic devices that can be connected to and communicate with the electronic device.

[0103] The sensors include, but are not limited to, one or more of facial recognition sensors, voice recognition sensors, expression analysis sensors, heart rate sensors, skin conductivity sensors, motion sensors, location sensors, GPS modules, pressure sensors, proximity sensors, light sensors, cameras, microphones, acceleration sensors, gyroscope sensors, biometric sensors, sleep monitoring sensors, brain wave sensors, body temperature sensors, gait analysis sensors, and ambient sound sensors.

[0104] The types of sensing parameters include, but are not limited to: facial expression parameters, voice intonation parameters, heart rate parameters, skin conductivity parameters, gait parameters, body temperature parameters, breathing rate parameters, eye movement parameters, position parameters, activity level parameters, motion acceleration parameters, sleep quality parameters, pressure sensing parameters, touch force parameters, brain wave parameters, grip strength parameters, ambient sound parameters, focal length change parameters, posture parameters, and touch frequency parameters.

[0105] State information may refer to comprehensive information obtained by analyzing and processing sensing parameters that can reflect the user's current situation or physiological, psychological, and behavioral characteristics. State information usually describes the user's activity state, emotional state, identity characteristics, or interest preferences. For example, it may be one or more of the user's emotional state (such as happy, anxious, tired), current identity (such as father, employee, customer), current activity (such as running, sleeping, reading), attention level, interest topic, geographic location (such as at home, at work, outdoors), health status (such as normal heart rate, excessive stress), fatigue state, sleep state, posture state (such as standing, sitting, lying), social interaction state (such as talking on the phone, alone), intention state (such as learning intention, entertainment intention), language state (such as talking loudly, whispering), action state (such as fast movement, stillness), workload state, and time-related state (such as working time, rest time).

[0106] In addition to being collected through sensors, status information can also be obtained through other means, including but not limited to the following: historical behavior analysis (inferring status, such as interests or needs, through user operation records), social network data (extracting content from social platforms, such as emotions or dynamics), third-party service interfaces (integrating external platform data, such as health or schedule information), collaborative device sharing (obtaining status from data shared by devices such as smart watches), rule inference (inferring status based on preset rules, such as inferring fatigue after a long period of inactivity), machine learning model prediction (predicting status by combining models with data, such as emotion classification), and group behavior pattern comparison (inferring status by comparing group behavior, such as inferring activity in time period).

[0107] In operation S520, the target prompt word is determined based on the status information, and the target prompt word that can constrain or guide the target model processing process is automatically generated according to the user's current status information to ensure that the output information generated by the target model meets the specific role, style or requirements, thereby achieving more personalized and adaptive output.

[0108] For example, if the status information indicates that the user is anxious, the target prompt word "answer in a comforting tone" is generated to guide the target model to output in a relaxed and comforting tone. For example, if the status information indicates that the user is interested in technology, the target prompt words "provide technology-related content" or "answer questions in a popular science style" are generated. For example, if the status information indicates that the user is at home, the prompt words "provide family-related advice" or "interact in a relaxed tone" are generated. For example, if the status information indicates that the user has low attention, the system generates the prompt words "answer in a short and easy-to-understand way" or "reduce the output of complex information."

[0109] According to the embodiments of the present disclosure, by collecting and generating status information based on sensors or other means, the user status can be accurately identified, and more personalized prompt words can be generated to improve pertinence and initiative.

[0110] Figure 6 Another flowchart for obtaining a target prompt word in the information generation method according to an embodiment of the present disclosure is schematically shown.

[0111] like Figure 6 As shown, based on the foregoing embodiment, operation S120 may include operations S610 to S620.

[0112] In operation S610, the conversation contents from the NMth round to the N-1th round are obtained, where M is a positive integer and N is an integer greater than or equal to 2.

[0113] In operation S620, a target prompt word is determined based on the conversation content.

[0114] Go back from the Nth round (latest round) of the current conversation, extract the conversation content of the previous M rounds, and process it as context information. N represents the current round, that is, the round in which the user is interacting. M is a positive integer, indicating the number of rounds to go back to. If M=1M=1, it means only going back to the previous round of conversation; if M>1, it goes back to multiple rounds. The conversation content from the N-MN-Mth round to the N-1N-1th round is extracted as the conversation content of the context of the current conversation situation, helping to generate target prompt words that adapt to the current situation.

[0115] For example, the following is a multi-round dialogue between a user and a target model: Round 1 dialogue: User input: "Please check today's weather for me.", Target model output: "Today's weather is sunny and the temperature is 20 degrees."; Round 2 dialogue: User input: "What about tomorrow?", Target model output: "Tomorrow will be cloudy and the temperature will be 18 degrees."; Round 3 dialogue: User input: "Is tomorrow suitable for running?", Target model output: "Tomorrow the humidity will be higher, but the wind will be smaller, which is suitable for running."; Round 4 dialogue: User input: "OK, help me set a running reminder.", Target model output: "OK, I will set a running reminder for 7 o'clock tomorrow morning.".

[0116] Assume that the fourth round of dialogue is in progress (i.e., N=4). If M=1, we need to extract the dialogue content from rounds N−M=4−1=3 to N−1=4−1=3; if M=2, we need to extract the dialogue content from rounds N−2 to N−1, that is, from rounds 2 to 3. In the case of M=2, the model can use the information of "tomorrow's weather" and "suitable for running" to generate a more appropriate target prompt word, such as "pay attention to running conditions and weather forecast", so as to provide users with more personalized services in the fourth round of dialogue.

[0117] Figure 7 The flowchart of obtaining the conversation content in the information generating method according to the embodiment of the present disclosure is schematically shown.

[0118] like Figure 7 As shown, operation S610 may include operation S710.

[0119] In operation S710, based on a preset time window, the conversation content from the NMth round to the N-1th round is obtained, wherein the width of the time window is the preset time width, the end of the time window is the time corresponding to the N-1th round of conversation, and the time corresponding to the NMth round to the N-1th round is within the time window.

[0120] A time window is preset with a preset time width to limit the historical time range that the target model needs to refer to. The width of the time window can be flexibly adjusted according to the specific application scenario, such as adapting to short-term fast interactions or long-term complex interactions. The end of the time window is fixed to the time corresponding to the N-1N-1th round of the current conversation, that is, the time window covers the latest historical conversation period. The range of the time window is determined by the time corresponding to the conversation content from the N-Mth round to the N-1th round, where the N-Mth round is the starting point of the time window.

[0121] According to the set time window, the historical conversation content within the window is obtained, including user input information and output information of the target model, and the conversation content outside the time window is ignored to ensure that the model only refers to the most recent relevant context information to avoid interference from premature or irrelevant historical content.

[0122] In another embodiment, operation S610 may include obtaining the conversation content from the NMth round to the N-1th round based on a preset round window, wherein the width of the round window is M and the end of the round window is the N-1th round. That is, a round window is preset to limit the historical round range that the target model needs to refer to, and according to the set round window, the historical conversation content within the window range is obtained, including the user input information and the output information of the target model, and the conversation content outside the round window is ignored; the historical conversation content within the window range can be sent to the classification model to obtain classification information, and the classification information is used to characterize the prompt words of the target identity. In this implementation, the classification model should be a pre-trained intention understanding model, which obtains the user's intention through the analysis of context information, for example, the user tries to guide the target model to answer with what identity or what kind of background knowledge within the window range, that is, the historical conversation content within the window range is processed by the classification model to obtain classification information, and the classification information is used to characterize the identity prompt words of the target model, ensuring that the target model can answer the new round of questions with the corresponding identity knowledge based on the identity prompt words and the answers are more focused and closer to the answers that the user wants to get.

[0123] In combination with the embodiments shown above, the target data may be one or more of sensing parameters and / or environmental information represented by the sensing parameters, sensing parameters and / or user status information represented by the sensing parameters, and conversation contents from the NMth round to the N-1th round.

[0124] The target data is processed by a classification model to generate a target prompt word. The classification model can be used to process one or more of the sensing parameters and / or environmental information represented by the sensing parameters, the sensing parameters and / or user status information represented by the sensing parameters, and the conversation contents from the NMth round to the N-1th round to obtain different category labels. Different category labels correspond to different target identities, output methods or ranges, so as to generate at least one target prompt word according to the category labels.

[0125] For another example, the classification model is used to process one or more of the sensing parameters and the conversation contents from the NMth round to the N-1th round to obtain the environmental information corresponding to the electronic device and / or the status information used to characterize the user, and then the environmental information and / or the status information are processed by another classification model to obtain the target prompt word.

[0126] In combination with the embodiments shown above, when sensors are used to collect sensing parameters to obtain environmental information and / or status information, a target prompt word can be generated in each round, that is, whenever the target model receives a new round of input information, the sensing parameters collected by this sensor are obtained to obtain environmental information and / or status information once, and then the target prompt word is generated based on the environmental information and / or status information.

[0127] When using sensors to collect sensing parameters to obtain environmental information and / or status information, target prompt words may not be generated every round, but may be generated when certain trigger conditions are met. For example, when the sensing parameters collected by the sensor meet the preset sensing parameter conditions, the generation of the target prompt words is triggered.

[0128] Specifically, for example, when the data from the location sensor indicates that the device is in a restaurant, the generation of the target prompt word is triggered, so that the target identity is changed to "food expert" to guide the model to generate output. When the data from the facial data sensor indicates that the user is in a low mood, the generation of the target prompt word is triggered, so that the target identity is changed to "optimist" to guide the model to generate output.

[0129] In combination with the above-mentioned embodiments, when the target prompt word is determined by the conversation content, a target prompt word can be generated in each round, that is, whenever the target model receives input information of a new round, the conversation content from the NMth round to the N-1th round is obtained, and then the target prompt word is generated.

[0130] When the target prompt word is determined by the conversation content, the target prompt word may not be generated in every round, but may be generated when certain trigger conditions are met. For example, when the topic of the user's conversation content changes, the generation of the target prompt word is triggered to transform into the target identity corresponding to the content related to the changed topic. For example, when the tone and emotion expressed in the user's conversation content changes, the generation of the target prompt word is triggered to transform into the target identity corresponding to the changed tone and emotion.

[0131] In combination with the above-mentioned embodiments, data representing environmental information and / or state information can be collected through sensors and / or other methods mentioned above, and the conversation content from the NMth round to the N-1th round can be obtained at the same time, and the environmental information and / or state information and / or conversation content can be integrated to generate a target prompt word. Alternatively, data representing environmental information and / or state information can be collected through sensors and / or other methods mentioned above, and the conversation content from the NMth round to the N-1th round can be obtained at the same time to determine at least one target prompt word, and then multiple target prompt words can be screened, or multiple target prompt words can be used in between. The target prompt word can be generated once in each round, or the generation of the target prompt word can be triggered when at least part of the target data meets the preset data conditions.

[0132] Figure 8 Another flow chart according to an embodiment of the present disclosure is schematically shown.

[0133] like Figure 8 As shown, before operation S130, operation S810 may be further included.

[0134] In operation S810, if the target prompt word is related to the content classification of the personal knowledge base, personal target data corresponding to the input information is determined based on the input information query.

[0135] A personal database is a database that specifically stores user personal information, preferences, historical behaviors, and related data. This data is usually provided by users in their daily lives or accumulated by the system through interaction with users, providing users with more personalized and customized services. Unlike public databases or general data sources, personal databases focus on data that is highly relevant to user identity, habits, interests, work content, etc.

[0136] For example, a person's work knowledge base may include his task list, meeting minutes, project progress, colleague contact information, etc. in the company; in life scenarios, a personal database may contain the user's schedule, shopping history, health records (such as steps, heart rate, etc.) or hobbies (such as favorite movies or music types); if the user uses a smart assistant device, the personal database may also include environmental information collected by the device, the user's common phrases, historical search records, etc. This information can help the system generate more appropriate suggestions or services based on the user's specific needs in different scenarios, thereby improving user experience and interaction efficiency.

[0137] The specific process may be, first determine whether the target prompt word is related to the content classification of the personal knowledge base. If the target prompt word has a matching relationship with the content in the personal knowledge base, the system further processes the input information based on the matching relationship. If the target prompt word is related to the content classification of the personal knowledge base, the system will query the personal knowledge base based on the input information to determine the personal target data corresponding to the input information. For example: in a work scenario, the target prompt word may guide the system to query the user's personal work knowledge base to obtain data related to the user's current task. In a life scenario, the target prompt word can guide the system to query the user's schedule, interest preferences and other life-related data.

[0138] On this basis, operation S130 may include: using the target prompt words to guide the target model to process the personal target data to generate output information for output. After querying the relevant personal target data, the system guides the target model to process the data according to the target prompt words to generate output information that meets the user's needs. For example, if the target prompt words are related to work, the system may guide the target model to generate relevant work suggestions or schedules based on the work task data. If the target prompt words are related to the user's personal interests, the system may guide the target model to generate personalized recommended content.

[0139] According to the disclosed embodiments, on the one hand, by integrating the data in the personal knowledge base, the system can quickly retrieve relevant information in multiple scenarios, reduce dependence on public databases, and speed up response. On the other hand, it supports dynamic switching of different scenarios, and generates more personalized output information through the personal database according to the user's current scenario and needs, thereby improving the user experience.

[0140] Fig. 9 The block diagram schematically shows an information generating device according to an embodiment of the present disclosure.

[0141] like Fig. 9 As shown, the information generating device 900 includes a first obtaining module 910 , a second obtaining module 920 and a first generating module 930 .

[0142] The first obtaining module 910 is used to obtain input information, and the input information is used to provide to the target model. In some embodiments, the first obtaining module 910 can be used to perform operation S110 in the aforementioned method, which will not be described in detail here.

[0143] The second acquisition module 920 is used to obtain a target prompt word for characterizing the target identity, the target prompt word does not belong to the input information, wherein the target prompt word is used to guide the processing process of the target model. In some embodiments, the second acquisition module 920 can be used to perform operation S120 in the above method, which is not described in detail here.

[0144] The first generating module 930 is used to guide the target model to process the input information based on the target prompt word to generate output information for output. In some embodiments, the first generating module 930 can be used to perform the operation S130 in the above method, which will not be described in detail here.

[0145] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0146] For example, any multiple of the first acquisition module 910, the second acquisition module 920, and the first generation module 930 can be combined in one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the first acquisition module 910, the second acquisition module 920, and the first generation module 930 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware, and firmware or in a suitable combination of any of them. Alternatively, at least one of the first obtaining module 910 , the second obtaining module 920 , and the first generating module 930 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.

[0147] It should be noted that the data processing system part in the embodiments of the present disclosure corresponds to the data processing method part in the embodiments of the present disclosure. The description of the data processing system part specifically refers to the data processing method part, which will not be repeated here.

[0148] Fig.10 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0149] like Fig.10 As shown, the electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 to a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0150] In RAM 1003, various programs and data required for the operation of electronic device 1000 are stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1002 and / or RAM 1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0151] According to an embodiment of the present disclosure, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device 1000 may further include one or more of the following components connected to the input / output (I / O) interface 1005: an input portion 1006, which may include an input device, such as a keyboard, a mouse, a microphone, a camera, etc., for receiving user input information, and the input portion may also include a sensor, such as a temperature sensor, a humidity sensor, a pressure sensor, an acceleration sensor, a gyroscope sensor, a light sensor, a gas sensor, a sound sensor, a heart rate sensor, a skin electrical sensor, a touch sensor, an infrared sensor, a magnetometer sensor, a position sensor, a barcode scanner, a biometric sensor, a motion sensor, an environmental noise sensor, an air quality sensor, an air pressure sensor, a radar sensor, a vibration sensor, a rotation sensor, a thermocouple sensor, an ultraviolet sensor, etc. The computer system 1005 includes one or more of a sensor, a current sensor, an ultrasonic sensor, a chemical sensor, and / or a facial recognition sensor, a voice recognition sensor, an expression analysis sensor, a heart rate sensor, a skin electrical sensor, a motion sensor, a position sensor, a GPS module, a pressure sensor, a proximity sensor, a light sensor, a camera, a microphone, an acceleration sensor, a gyroscope sensor, a biometric sensor, a sleep monitoring sensor, a brain wave sensor, a body temperature sensor, a gait analysis sensor, and an ambient sound sensor; an output portion 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage portion 1008 including a hard disk; and a communication portion 1009 including a network interface card such as a LAN card, a modem, etc. The communication portion 1009 performs communication processing via a network such as the Internet. The drive 1010 is also connected to the input / output (I / O) interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that the computer program read therefrom is installed into the storage portion 1008 as needed.

[0152] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0153] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0154] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0155] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 1002 and / or the RAM 1003 described above and / or one or more memories other than the ROM 1002 and the RAM 1003 .

[0156] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the information generation method provided by the embodiment of the present disclosure.

[0157] When the computer program is executed by the processor 1001, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0158] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1009, and / or installed from the removable medium 1011. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0159] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0160] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0161] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for generating information, comprising: Obtaining input information, wherein the input information is used to provide to a target model; Obtaining a target prompt word for representing the identity of the target, the target prompt word not belonging to the input information, wherein the target prompt word is used to guide the processing process of the target model; The target model is guided to process the input information based on the target prompt word to generate the output information for output.

2. The method according to claim 1, wherein the input information is input information of the Nth round in a conversation based on the target model, where N is an integer greater than or equal to 2; The output information of the N-1th round before the input information is the output information for output generated by the target model based on the prompt word representing the first identity; The target identity is different from the first identity.

3. According to the method of claim 1, obtaining a target prompt word for representing the target identity comprises: Obtain target data; The target prompt word is generated by processing the target data through a classification model.

4. The method according to claim 2 or 3, wherein the target prompt word for characterizing the target identity is obtained by at least one of the following: Acquiring sensing parameters through the sensor, wherein the sensing parameters are used to characterize environmental information corresponding to the electronic device having the sensor; Determining the target prompt word based on the environmental information; or Acquiring sensing parameters through a sensor, wherein the sensing parameters are used to characterize status information of a user who uses an electronic device having the sensor; The target prompt word is determined based on the state information.

5. According to the method of claim 2 or 3, obtaining a target prompt word for representing the target identity comprises: Obtaining the conversation content from the NMth round to the N-1th round, where M is a positive integer; The target prompt word is determined based on the conversation content.

6. According to the method of claim 5, the obtaining of the conversation contents from the NMth round to the N-1th round comprises: Based on a preset time window, obtaining the conversation content from the NMth round to the N-1th round; The width of the time window is a preset time width, the end of the time window is the time corresponding to the N-1th round of dialogue, and the time corresponding to the NMth round to the N-1th round is within the time window.

7. The method according to claim 1, before guiding the target model to process the input information based on the target prompt word to generate the output information for output, further comprises: If the target prompt word is related to the content classification of the personal knowledge base, based on the input information query, determine the personal target data corresponding to the input information Guiding the target model to process the input information based on the target prompt word to generate the output information for output includes: The target prompt word guides the target model to process the personal target data to generate output information for output.

8. An information generating device, comprising: A first obtaining device is used to obtain input information, and the input information is used to provide to the target model; A second obtaining means is used to obtain a target prompt word for representing the identity of the target, wherein the target prompt word does not belong to the input information, wherein the target prompt word is used to guide the processing process of the target model; as well as The first generating device is used to guide the target model to process the input information based on the target prompt word to generate the output information for output.

9. An electronic device, comprising: An input device for receiving input information; A processor is configured to perform at least part of the following operations: obtaining input information, the input information being provided to a target model; Obtaining a target prompt word for representing the identity of the target, the target prompt word not belonging to the input information, wherein the target prompt word is used to guide the processing process of the target model; The target model is guided to process the input information based on the target prompt word to generate the output information for output.

10. The electronic device according to claim 9, further comprising: Sensor, used to collect sensing parameters; The processor is further configured to perform at least part of the following operations: acquiring a sensing parameter through a sensor, the sensing parameter being used to characterize environmental information corresponding to an electronic device having the sensor; and determining the target prompt word based on the environmental information; Alternatively, a sensing parameter is acquired through a sensor, where the sensing parameter is used to characterize state information of a user using an electronic device having the sensor, and the target prompt word is determined based on the state information.