Conversation method and device thereof

By determining the role type and information of the call object in an electronic device, filtering the language model and generating adaptive prompt words, the problem of the language model's stiff attitude is solved, and the call experience and character versatility are improved.

CN119149699APending Publication Date: 2024-12-17VIVO MOBILE COMM CO LTD

Patent Information

Application Number
CN202411288957.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

When the language model deployed in electronic devices replaces the owner to talk to the call object, it has a stiff attitude and is difficult to dynamically express the multifaceted nature of the characters.

Method used

By determining the role type and information of the call object, filtering the corresponding language model, and referring to the role information when generating the prompt word, so that the language model can output more suitable response results, reflecting the dynamic multifaceted nature of the characters.

Benefits of technology

It improves the call experience, allowing the language model to interact with the call object more naturally and humanely, showing the diversity and personalized characteristics of the characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149699A_ABST
    Figure CN119149699A_ABST
Patent Text Reader

Abstract

The invention discloses a call method and device, and belongs to the technical field of interaction. The call method comprises the following steps: determining a first role type of a call object, and obtaining first role information of the call object; according to the first role type, screening out a first language model corresponding to the first role type from the first model set; determining a first prompt word based on the first role information; inputting the first cue word into a first language model to obtain a first response result output by the first language model; and making a call with the call object based on the first response result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of interactive technology, and specifically relates to a communication method and a device thereof. Background Art

[0002] In the related technical solution, a language model is deployed in the electronic device so as to use the language model to replace the owner of the device to communicate with the call object.

[0003] However, the language style presented by the language model deployed in electronic devices is relatively fixed. When the language model is used to make a call on behalf of the owner, the attitude presented to the caller is relatively stiff, and it is difficult to dynamically express the dynamic and multi-faceted nature of the character. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a calling method and device thereof, which can solve the problem that when the language model deployed in the electronic device is talking to the caller on behalf of the owner, the attitude presented to the caller is relatively stiff and it is difficult to dynamically express the dynamic versatility of the character.

[0005] In a first aspect, an embodiment of the present application provides a method for making a call, comprising: determining a first role type of a call object and obtaining first role information of the call object; based on the first role type, screening out a first language model corresponding to the first role type from a first model set; determining a first prompt word based on the first role information; inputting the first prompt word into the first language model to obtain a first response result output by the first language model; and making a call with the call object based on the first response result.

[0006] In a second aspect, an embodiment of the present application provides a calling device, comprising: an acquisition module, used to determine a first role type of a calling object and acquire the first role information of the calling object; a screening module, used to screen out a first language model corresponding to the first role type from a first model set according to the first role type; a determination module, used to determine a first prompt word based on the first role information; a processing module, used to input the first prompt word into the first language model to obtain a first response result output by the first language model; and an answering module, used to conduct a call with the calling object based on the first response result.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.

[0011] In an embodiment of the present application, a method for making a call is proposed, in which the first role type and the first role information of the call object can be determined, and the first role type is used to filter out the first language model corresponding to the first role type from the first model set. In this process, the language model corresponding to the role type can be matched to the call object in a targeted manner. At the same time, in the process of generating the first prompt word, the first role information of the call object is referenced, so that the generated first prompt word is more adapted to the call object, so that the first response result obtained can reflect the dynamic multi-facetedness of the character, thereby improving the call experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 One of the flowcharts of the calling method in the embodiment of the present application is shown;

[0013] Figure 2 The second flowchart of the calling method in the embodiment of the present application is shown;

[0014] Figure 3 The third flowchart of the calling method in the embodiment of the present application is shown;

[0015] Figure 4 A fourth flowchart of the calling method in the embodiment of the present application is shown;

[0016] Figure 5 FIG5 shows a fifth flow chart of the calling method in the embodiment of the present application;

[0017] Figure 6 FIG6 shows a sixth flow chart of the calling method in the embodiment of the present application;

[0018] Figure 7 A schematic block diagram of a communication device in an embodiment of the present application is shown;

[0019] Figure 8 A schematic block diagram of an electronic device in an embodiment of the present application is shown;

[0020] Fig. 9 A schematic diagram of the hardware structure of an electronic device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly describe the embodiments in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.

[0022] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0023] The following is an explanation of the terms mentioned in this application:

[0024] Big model: refers to a big language model, which is a deep learning model with ultra-large-scale parameters and the ability to understand semantics and generate content. A big language model is a deep learning model trained with a large amount of text data and can handle a variety of natural language tasks, such as text classification, question-answering, and dialogue. The current important form of intelligent agents is to use the thinking and summarizing capabilities of big language models as the core, connect external memories, tool components, and enhance intelligence capabilities.

[0025] Reward model: The reward model is a model used to evaluate the value of the agent's behavior in reinforcement learning. It guides the agent's learning by calculating the reward value of each interaction.

[0026] RLHF: RLHF stands for Reinforcement Learning from Human Feedback. By incorporating human feedback into the training process, it provides machines with a natural and humane interactive learning process.

[0027] MBTI: refers to the Myers-Briggs Type Indicator (MBTI), which divides personality into 16 categories based on four dimensions: attention direction, cognitive style, judgment style, and lifestyle.

[0028] Prompt: In the large artificial intelligence (AI) model, the main function of prompt is to prompt the AI ​​model with the context of input information and parameter information of the input model.

[0029] The machine owner's multi-role large model set, that is, the first model set in this application: a large language model set representing the machine owner's thinking characteristics, each large language model in the set is optimized and fine-tuned for the target role of the dialogue.

[0030] The following describes in detail the calling method and device provided by the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0031] In one embodiment, if Figure 1 As shown, a calling method is proposed, comprising:

[0032] Step 102: determine the first role type of the call object and obtain the first role information of the call object.

[0033] In some embodiments of the present application, the call object can be understood as an object that interacts with the agent.

[0034] Exemplarily, the call object may be an interactive call object, such as a friend of the phone owner, a chat object, such as an online friend of the phone owner, or a teaching object, such as a student of the phone owner.

[0035] In some embodiments of the present application, the first role type corresponding to the call object can be understood as the role type played by the call object in the call.

[0036] Exemplarily, the first role type may be a friend, student, teacher, relative, etc. of the owner.

[0037] In some embodiments of the present application, the role type range of the first role type is {parents, spouse, children, peers, elder relatives, younger relatives, leaders, subordinates, colleagues of the same level, friends, and others}.

[0038] In some embodiments of the present application, the first role information of the call object includes evaluation information of the call object and call content generated by the interaction with the call object.

[0039] The evaluation information on the call object can be understood as the evaluation of the call object by the phone owner, which can be set by the phone owner or obtained by counting historical interaction data.

[0040] Specifically, the evaluation information includes trust and favorability, wherein trust refers to the degree of trust that the owner has in the person being talked to, and favorability refers to the degree of initiative that the owner has in the person being talked to.

[0041] The trustworthiness can be calculated in the following way:

[0042] Specifically, the trust score is calculated by retrieving the historical communication records with the call object at all times on the electronic device, extracting features {first communication time, communication frequency, amount of high-density information, communication satisfaction} using large models and other technologies, and then using the pre-trained trust calculation model to calculate the trust score I trust .

[0043] Specifically, the method for calculating the favorability is to retrieve the historical communication records with the call object in the past month on the device, use large models and other technologies to extract features {communication frequency, conversation emotional tendency, active conversation ratio}, and then use the pre-trained favorability calculation model to calculate the favorability I adore .

[0044] In some embodiments of the present application, the call content generated by the interaction with the call object can be understood as the actual dialogue generated by the interaction with the call object.

[0045] For example, the caller says: Hello, how are you? The phone owner replies: Hello, old classmate.

[0046] In some embodiments of the present application, the first role type can be obtained by identifying the call object through the remark information and historical call records.

[0047] Specifically, if the recognition result is not "other", the role type R of the corresponding interactive object is recorded. cur Otherwise, the “other” role model in the first language model is used to inquire about the identity information of the call object, and then the first role type is obtained.

[0048] Specifically, during the interaction process, the timbre of the interaction adopts the timbre used by the owner's historical voice interaction. If the identity information of the call object meets the preset role type value range, the corresponding role type R is recorded. cur ; otherwise, mark the role type as "Other".

[0049] Step 104: According to the first role type, select a first language model corresponding to the first role type from the first model set.

[0050] In some embodiments of the present application, the first model set includes a language model corresponding to at least one role type. When the first role type is determined, a language model having the same role type as the first role type is searched in the first model set as the first language model.

[0051] Exemplarily, if the first role type is "teacher", a language model with the role type of "teacher" is searched in the first model set as the first language model.

[0052] Step 106: Determine a first prompt word based on the first role information.

[0053] Step 108: input the first prompt word into the first language model to obtain a first response result output by the first language model.

[0054] Step 110: Have a conversation with the conversation partner based on the first response result.

[0055] In an embodiment of the present application, a method for making a call is proposed, in which the first role type and the first role information of the call object corresponding to the call object can be determined, and the first language model corresponding to the call object can be screened out from the first model set using the first role type. In this process, the language model corresponding to the role type can be matched to the call object in a targeted manner. At the same time, in the process of generating the first prompt word, the first role information of the call object is referenced, so that the generated first prompt word is more adapted to the call object, so that the first response result obtained can reflect the dynamic multi-facetedness of the character, thereby improving the call experience.

[0056] In some embodiments of the present application, the calling method further includes: identifying the personality tendencies of the owner of the electronic device based on the historical usage records of the electronic device to obtain a personality tendency identification result; adjusting the first model based on the personality tendency identification result to obtain a second model; adjusting the second model based on the interaction data set to obtain a first model set, wherein the interaction data set includes historical interaction data of different role types, and the first model set includes language models corresponding to different role types.

[0057] In some embodiments of the present application, the historical usage record of the electronic device can be understood as the historical operation record of the electronic device. The owner can interact with different call partners by operating the electronic device, and can also fill in information and browse different pages through the electronic device.

[0058] In some embodiments of the present application, the first model can be understood as an untrained large model.

[0059] Exemplarily, the first model is an initial large model.

[0060] In the above embodiment, the owner's personality tendency P user Belongs to the predefined personality set S P The personality tendencies in the character classification model are used to record the history of each personality association. piThe behaviors in the personality classification score are scored, and according to the mean score, in the personality tendency set S P The closest personality tendency is selected as the owner's personality tendency P user .

[0061] Among them, the historical usage records associated with personality include a set of dialogue tuples {the other party's statement, the owner's reply}, and may also include a sequence of frequently listened music styles {the first music style, the second music style, the third music style}, or include note type statistics {the number of lyrical notes, the number of planning notes}.

[0062] Specifically, the MBTI sixteen personality types can be used as the personality tendency set S P , using the personality classification model with confidence in the four personality dimensions of attention, cognitive style, judgment style, and lifestyle, and recording the history of personality associations R pi Classify and combine to get the MBTI personality with the highest probability as the owner's personality tendency P user .

[0063] In some embodiments of the present application, the personality classification model may use common classification models such as neural networks and support vector machines as its structure.

[0064] In some embodiments of the present application, according to the personality tendency recognition result P user , get the second model LLM PB , that is, according to the owner's personality tendency P user , get the second model LLM PB .

[0065] Among them, Large Language Model (LLM), LLM PB Represents the second model.

[0066] Exemplarily, the second model is a personality-based large model.

[0067] Specifically, for the predefined personality tendency set S P For each personality tendency element in the corpus, the corpus that meets the personality characteristics is collected as training data, based on the first model LLM B Perform full fine-tuning to obtain the second model set {LLM PB-p}.

[0068] Among them, p is the personality tendency set S P The personality tendency element in the character tendency, p is taken as the personality tendency recognition result P user , and get the second model LLM PB .

[0069] In this embodiment, a corresponding first model set can be created for the owner according to the historical usage record of the electronic device, and during actual use, it is ensured that the first response result can fully reflect the dynamic versatility of the owner and improve the interaction efficiency.

[0070] In some embodiments of the present application, the second model is adjusted based on the interaction data set to obtain the first model set, specifically including: determining a reward model set based on the interaction data set, the reward model set including reward models corresponding to historical interaction data of different role types; adjusting the second model based on the reward model set to obtain the first model set.

[0071] In this embodiment, the interaction data set is also called the multi-role dialogue data set {R ci}, for each dialogue object role i, train the reward model Reward for evaluating the large model generation results ci , the trained second model is evaluated by using the reward model corresponding to the historical interaction data of different character types, and finally a first model set that can fully reflect the different character types is obtained. In this process, the language model in the first model set can be adapted to the corresponding character type, thereby obtaining a response result that conforms to the dynamic and multi-faceted nature of the character.

[0072] Specifically, the reward model evaluates the result generated by the second model by calculating the similarity between the language style of the result generated by the second model and the corresponding character dialogue data set, and uses the similarity result as the evaluation score.

[0073] In some embodiments of the present application, a multi-role reward model set {Reward ci Tune the second model LLM PB .

[0074] Specifically, each role reward model has a second model LLM PB Perform RLHF to obtain the main character model LLM Ci , i represents the role type, after RLHF is completed, the multi-role model set {LLM Ci}.

[0075] In some embodiments of the present application, the historical usage record of the electronic device includes at least one historical interaction data, each historical interaction data has corresponding remark information, and the call method also includes: using a first classification model to perform role classification on each remark information to obtain a target role type corresponding to each historical interaction data and a confidence level corresponding to the target role type; based on the confidence level corresponding to the target role type being greater than or equal to a first threshold, using the target role type as the role type of the corresponding historical interaction data; based on the confidence level corresponding to the target role type being less than the first threshold, performing content identification on the historical interaction data to obtain the role type corresponding to the historical interaction data; and constructing an interaction data set based on the historical interaction data and the role type corresponding to the historical interaction data.

[0076] In this embodiment, the historical interaction data may be one or more of historical telephone call data, historical text message data, and historical chat records of chat software.

[0077] Specifically, by setting the time window T, the chat records are trimmed to obtain dialogue data segments, that is, historical interaction data.

[0078] In some embodiments of the present application, the remark information is also a remark on the call object.

[0079] Exemplarily, the remark information is "Dear Mom" ​​or "Sister who goes to school".

[0080] The first classification model is used to classify the role of each remark information in an attempt to obtain the role type, and the first threshold is set to evaluate the confidence level of the target role type classified by the first classification model.

[0081] Specifically, if the confidence level corresponding to the target role type is greater than or equal to the first threshold, the credibility of the target role type is considered to be relatively high, and the target role type can be used as the role type of the corresponding historical interaction data; otherwise, content recognition is performed on the historical interaction data to determine the role type corresponding to the historical interaction data through content recognition.

[0082] In this process, the efficiency of determining the role type can be improved while the accuracy of the determined role type is improved.

[0083] Exemplarily, the first threshold value is 0.8, and the confidence corresponding to the target role type is greater than or equal to 0.8, then the target role type is used as the role type of the corresponding historical interaction data; otherwise, if the confidence corresponding to the target role type is less than 0.8, content recognition is performed on the historical interaction data to obtain the role type corresponding to the historical interaction data.

[0084] Typically, different remark information is set for different call objects. Therefore, using the remark information to obtain the role type corresponding to the historical interaction data can improve the efficiency of determining the role type corresponding to the historical interaction data while ensuring the accuracy of the role type corresponding to the historical interaction data.

[0085] By performing content recognition on historical interaction data, when the classification using the first classification model is unreasonable, the role type corresponding to the historical interaction data can be accurately obtained, so as to meet the usage needs in different scenarios.

[0086] In some embodiments of the present application, content recognition is performed on historical interaction data to obtain role types corresponding to the historical interaction data, specifically including: segmenting the chat content according to time windows, extracting topics for each chat content using a large language model, and obtaining a topic sequence.

[0087] Perform frequency statistics on the topic elements in the topic sequence to obtain the topic distribution D chatt , compare the preset chat topic distribution of each role type to obtain the role type with the highest similarity. If the similarity between the topic distribution of the chat content and the topic distribution of the role type is greater than the threshold Th c , the current role type is determined to be this role type, otherwise, the role type value is taken as "other".

[0088] Among them, the historical interaction data is a multi-role dialogue dataset {R ci}, for example, the multi-role dialogue dataset {R ci} includes a tuple {dialogue object role type, dialogue data segment}.

[0089] In some embodiments of the present application, the first classification model is a pre-trained annotation name classification model.

[0090] In some embodiments of the present application, when the first role information of the call object includes evaluation information of the call object and call content generated by the interaction with the call object, the evaluation information includes trust and favorability, and a first prompt word is determined based on the first role information, specifically including: determining a memory prompt word based on the first role type, trust and personalized memory data block; determining a scene prompt word based on the first role type and favorability; determining a historical conversation prompt word based on the call content; obtaining an owner information prompt word determined based on the owner description information, and obtaining an output request prompt word; determining a first prompt word based on the memory prompt word, the scene prompt word, the historical conversation prompt word, the owner information prompt word and the output request prompt word.

[0091] In this embodiment, memory prompt words can be understood as prompt words determined based on the historical interaction data of the call object; scene prompt words can be understood as prompt words determined based on the historical interaction impressions of the call object; historical conversation prompt words can be understood as prompt words determined by reference to the interaction content and personalized memory data blocks; owner information prompt words can be understood as prompt words related to the owner; output requirement prompt words can be understood as prompt words set for the language model output format.

[0092] Among them, the output requires the prompt word Prompt req It is a prompt word generated according to the template of the language model output format.

[0093] For example, please answer [Output Requirements] in the following format:

[0094] {

[0095] Can the current conversation be terminated: ""

[0096] Whether the other party has initiated a decision-making question, and what the question is: ""

[0097] Your answer: ""

[0098] }

[0099] The personalized memory data block can be understood as a data block determined by the historical interaction data of the call object. The use of the personalized memory data block can make the determined historical conversation prompt words involve the historical interaction data of the call object, thereby improving the accuracy of the first prompt words.

[0100] Among them, the owner description information can be understood as information used to describe the owner of the device.

[0101] In this embodiment, the first prompt word is generated based on different prompt words, which can improve the accuracy of the first response result output by the first language model.

[0102] For example, the owner description information is represented by a person information key-value pair Prof, and the owner description information is stringified using a preset format to generate an owner information prompt word, that is, a person prompt word Prompt Prof .

[0103] For example, the generated character prompt Prompt Prof For "You are a civil engineer, male, 30 years old, and like to play table tennis."

[0104] In some embodiments of the present application, based on the first role type, the trust level and the personalized memory data block, determining the memory prompt word specifically includes: searching the personalized memory data block with a high correlation with the conversation content Q in the personalized memory data M, using the permission control tag associated with the data block to filter the personalized memory data block that meets the control condition {the role type of the call object R cur , Trust Rating I trust} object, and obtain the memory prompt word of the associated dialogue, where the memory prompt word is also the personalized memory prompt word Prompt M .

[0105] For example, if the conversation content Q is "What did you do yesterday", the memory prompt word is "

Memory

[0106] In some embodiments of the present application, the historical conversation prompt word Prompt is determined based on the call content. hig .

[0107] Among them, the call content is the historical record generated by this interaction.

[0108] For example, "[Historical Conversation] The following is the record of your conversation:

[0109] [Other party]:Hello.

[0110] [You]: Hello, old classmate.

[0111] Among them, the first prompt word can be a prompt word obtained by connecting the memory prompt word, the scene prompt word, the history conversation prompt word, the owner information prompt word and the output requirement prompt word in sequence.

[0112] In some embodiments of the present application, the first prompt word is a prompt word obtained by sequentially connecting the owner information prompt word, the memory prompt word, the scene prompt word, the history conversation prompt word and the output requirement prompt word.

[0113] In some embodiments of the present application, the calling method further includes: generating personalized memory data based on the historical usage record of the electronic device; wherein the personalized memory data includes the owner description information and the personalized memory data block.

[0114] In this embodiment, personalized memory data may be pre-constructed so that the first prompt word is determined according to the personalized memory data.

[0115] In some embodiments of the present application, personalized memory data is generated based on the historical usage records of the electronic device, specifically including: determining the owner description information based on the owner's personal information and owner's hobby information filled in the historical usage records of the electronic device; determining the personalized memory data block based on the interaction data set determined based on the historical usage records of the electronic device.

[0116] Among them, the personal information of the machine owner, that is, the machine owner's setting information, can be the machine owner's historical data of filling out forms in a highly trusted software environment such as a bank or an institution, search and extract objective condition setting information, and record the items in the preset objective condition setting table W opro Personal information.

[0117] Optional, objective condition setting project table W opro Contains name, gender, age, place of origin, and place of residence.

[0118] In some embodiments of the present application, the owner's hobby information can be based on the owner's historical software usage frequency statistics to obtain the activity type of the owner's high-frequency software usage scenarios and generate hobby-related personality information.

[0119] Among them, objective condition personality information and hobby personality information together constitute the owner description information, that is, the personality information key-value pair Prof.

[0120] In some embodiments of the present application, the interactive data set is also a personalized memory data block set {M ci}, by calculating the information entropy of historical interaction data, the historical interaction data with information entropy greater than the preset threshold is recorded as a personalized memory data block M ci , where i represents the role type.

[0121] Personalized memory data block M ci , add personalized data block permission tags {MPerm ci For each personalized memory data block, there is a corresponding permission control label of all role types, which is composed of a two-tuple {role type, minimum accessible trust}, indicating that when talking to a person of the corresponding role type, the trust level must reach the minimum accessible trust level before the personalized memory data block content can be accessed.

[0122] Among them, the trust value in the personalized data block permission label is generated by the big model based on the personalized memory data block content and role type decision.

[0123] Adding a personalized data block permission tag {MPerm ci}After that, the personalized memory data is vectorized and stored in the database.

[0124] Specifically, the personalized data block with the permission label is stored in the vector database to complete the generation of queryable personalized memory data M.

[0125] In some embodiments of the present application, a call is made with the call object based on the first response result, specifically including: parsing the first response result to obtain a parsing result; determining based on the parsing result that the call has not ended and there is a decision-making problem, determining the problem content of the decision-making problem based on the first response result; determining a second prompt word based on the problem content of the decision-making problem, the first role type, and evaluation information of the call object; inputting the second prompt word into the first language model to obtain a second response result output by the first language model; and making a call with the call object based on the second response result.

[0126] In this embodiment, in the case of a decision-making problem, a new prompt word can be generated, and the new prompt word, that is, the second prompt word, can be input into the first language model to obtain a response result of the first language model. In this process, the existing decision problem can be processed, thereby increasing the controllability of the call answering result.

[0127] For example, if the “colleague” role type mentions the need to borrow money in the conversation, the corresponding decision problem content “borrow money” is generated, and the output of the role model may be:

[0128] {

[0129] Decision-making question: Agree or disagree: “Can’t decide”

[0130] Does the decision problem generate pending tasks: "Yes; whether to lend money to colleague Zhang is yet to be determined";

[0131] Your answer to the conversation: "I will discuss it with my family and give you an answer later."

[0132] }

[0133] Among them, "I will discuss it with my family and get back to you later" is the second response result in this application.

[0134] Among them, the splicing strategy of the second prompt word is:

[0135] You are talking to {{Calling object role type R cur}} to make a call, the other party's trust is {{Trust I trust}}, the favorability is {{Favorability I adore}}, do you agree or disagree with the decision problem {{decision problem content D}};

[0136] Please answer in the following format, where you can choose one of "yes, no, or unsure" to answer whether you agree or disagree with the decision-making question.

[0137] {

[0138] Decision Question: Agree or not: ""

[0139] Whether the decision problem generates a to-do task: ""

[0140] Your dialogue answer content: ""

[0141] }

[0142] In some embodiments of the present application, when it is determined based on the analysis result that the call has not ended and there is no decision-making problem, a first response result is output.

[0143] In this embodiment, when it is determined based on the analysis result that the call has not ended and there is no decision-making problem, the first response result is directly output to meet the call answering needs when there is no decision-making problem.

[0144] In some embodiments of the present application, taking a call as an example, Figure 2 As shown, the calling method includes:

[0145] Step 202: Generate a first model set according to the device usage record.

[0146] Among them, the multi-role large model collection {LLM Ci}That is, the first model set in this application.

[0147] Step 204, generating personalized memory data M according to the device usage record.

[0148] Step 206, based on the machine owner multi-role large model set {LLM Ci}Answer the call with the personalized memory data M.

[0149] like Figure 3 As shown, in step 202, a first model set is generated according to the device usage record, specifically including:

[0150] Step 302, identifying the personality tendency of the device owner based on the device usage record.

[0151] Step 304, obtaining a second model according to the personality tendency recognition result.

[0152] Step 306: classify the historical conversation records to obtain an interaction data set.

[0153] Step 308: Generate a multi-role reward model set based on the interaction data set.

[0154] Step 310: Use the multi-role reward model set to tune the second model through the RLHF method to obtain the first model set.

[0155] Among them, Figure 4 As shown, in step 306, the historical conversation records are classified to obtain an interaction data set, which specifically includes:

[0156] Step 402: Try to obtain the role type according to the remark information.

[0157] Step 404, the remark information obtains the role type successfully. If the judgment result is yes, the process ends. If the judgment result is no, the process proceeds to step 406.

[0158] Step 406, obtaining the role type according to the chat content.

[0159] Among them, Figure 5 As shown, in step 204, the personalized memory data M is generated according to the device usage record, which specifically includes:

[0160] Step 502: extracting the device owner's personal information.

[0161] Step 504, extracting the personalized memory database.

[0162] Step 506: Add a personalized data block permission tag.

[0163] Step 508: The personalized memory data is vectorized and stored in the database.

[0164] Among them, Figure 6 As shown, in step 206, based on the large model set {LLM Ci} and personalized memory data M, to answer the call, including:

[0165] Step 602: Identify the role type of the call partner.

[0166] Step 604: identifying the call object relationship.

[0167] Step 606: extract the call content.

[0168] Step 608: Generate prompt words for the character model.

[0169] Step 610, character model dialogue query.

[0170] Step 612, whether to end the conversation, if the judgment result is yes, execute step 620, if the judgment result is no, execute step 614.

[0171] Step 614, whether there is a decision problem, if the judgment result is yes, execute step 616, if the judgment result is no, execute step 618.

[0172] Step 616, decision problem processing.

[0173] Step 618: output the call reply message.

[0174] Step 620, end the call.

[0175] Step 622, call summary.

[0176] Among them, in the call summary, based on the call records of this round, the role model is used to summarize the main content, decision records and tasks to be done.

[0177] Optionally, the prompt word input into the role model is "Based on the above call records, please help summarize the main content, decision records and tasks to be done."

[0178] The calling method provided in the embodiment of the present application can be executed by a calling device. The calling method is executed by a calling device as an example to illustrate the calling device provided in the embodiment of the present application.

[0179] In some embodiments of the present application, Figure 7 As shown, a communication device 700 is provided, including: an acquisition module 702, used to determine the first role type of the call object and obtain the first role information of the call object; a screening module 704, used to screen out a first language model corresponding to the first role type from a first model set according to the first role type; a determination module 706, used to determine a first prompt word based on the first role information; a processing module 708, used to input the first prompt word into the first language model to obtain a first response result output by the first language model; and an answering module 710, used to communicate with the call object based on the first response result.

[0180] In the embodiment of the present application, the first role type and the first role information of the call object corresponding to the call object can be obtained, and the first language model corresponding to the first role type can be selected from the first model set using the first role type. In this process, the language model corresponding to the role type can be matched to the call object in a targeted manner. At the same time, in the process of generating the first prompt word, the first role information is referenced, so that the generated first prompt word is more adapted to the call object, so that the first response result obtained can reflect the dynamic multi-facetedness of the character, thereby improving the call experience.

[0181] In some embodiments of the present application, the processing module 708 is also used to: identify the personality tendencies of the owner of the electronic device based on the historical usage records of the electronic device to obtain a personality tendency identification result; adjust the first model based on the personality tendency identification result to obtain a second model; adjust the second model based on the interaction data set to obtain a first model set, wherein the interaction data set includes historical interaction data of different role types, and the first model set includes language models corresponding to different role types.

[0182] In some embodiments of the present application, the processing module 708 is specifically used to: determine a reward model set based on an interaction data set, the reward model set including reward models corresponding to historical interaction data of different role types; adjust the second model based on the reward model set to obtain a first model set.

[0183] In some embodiments of the present application, the historical usage record of the electronic device includes at least one historical interaction data, each historical interaction data has corresponding remark information, and the processing module 708 is also used to: use the first classification model to perform role classification on each remark information to obtain the target role type corresponding to each historical interaction data and the confidence corresponding to the target role type; based on the confidence corresponding to the target role type being greater than or equal to a first threshold, use the target role type as the role type of the corresponding historical interaction data; based on the confidence corresponding to the target role type being less than the first threshold, perform content identification on the historical interaction data to obtain the role type corresponding to the historical interaction data; and construct an interaction data set based on the historical interaction data and the role type corresponding to the historical interaction data.

[0184] In some embodiments of the present application, when the first role information of the call object includes evaluation information of the call object and call content generated by the interaction with the call object, the evaluation information includes trust and favorability, and the determination module 706 is specifically used to: determine the memory prompt word based on the first role type, trust and personalized memory data block; determine the scene prompt word based on the first role type and favorability; determine the historical conversation prompt word based on the call content; obtain the owner information prompt word determined based on the owner description information, and obtain the output requirement prompt word; determine the first prompt word based on the memory prompt word, the scene prompt word, the historical conversation prompt word, the owner information prompt word and the output requirement prompt word.

[0185] In some embodiments of the present application, the processing module 708 is further used to: generate personalized memory data based on the historical usage record of the electronic device; wherein the personalized memory data includes the owner description information and the personalized memory data block.

[0186] In some embodiments of the present application, the processing module 708 is specifically used to: determine the owner description information based on the owner's personal information and owner's hobby information filled in the historical usage record of the electronic device; determine the personalized memory data block based on the interaction data set determined by the device usage record.

[0187] In some embodiments of the present application, the answer module 710 is specifically used to: parse the first response result to obtain a parsing result; determine the content of the decision-making problem based on the first response result when the call is not ended and there is a decision-making problem based on the parsing result; determine the second prompt word based on the content of the decision-making problem, the first role type and the evaluation information of the call object; input the second prompt word into the first language model to obtain a second response result output by the first language model; and talk to the call object based on the second response result.

[0188] In some embodiments of the present application, the answering module 710 is further specifically used to: output a first response result when it is determined based on the analysis result that the call has not ended and there is no decision-making problem.

[0189] The communication device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0190] The communication device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0191] The communication device provided in the embodiment of the present application can achieve Figure 1 The various processes implemented in the call method embodiment can achieve the same technical effect. To avoid repetition, they will not be described here.

[0192] like Figure 8As shown, an embodiment of the present application further provides an electronic device 800, including a processor 802 and a memory 804, wherein the memory 804 stores programs or instructions that can be executed on the processor 802, and when the program or instructions are executed by the processor 802, the various steps of the above-mentioned call method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0193] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0194] Fig. 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0195] like Fig. 9 As shown, the electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.

[0196] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0197] In some embodiments of the present application, the processor 910 is used to determine a first role type of a call object and obtain the first role information of the call object; based on the first role type, filter out a first language model corresponding to the first role type from a first model set; determine a first prompt word based on the first role information; input the first prompt word into the first language model to obtain a first response result output by the first language model; and talk to the call object based on the first response result.

[0198] In some embodiments of the present application, the processor 910 is also used to identify the personality tendencies of the owner of the electronic device based on the historical usage records of the electronic device to obtain a personality tendency identification result; adjust the first model based on the personality tendency identification result to obtain a second model; adjust the second model based on the interaction data set to obtain a first model set, the interaction data set includes historical interaction data of different role types, and the first model set includes language models corresponding to different role types.

[0199] In some embodiments of the present application, the processor 910 is specifically used to determine a reward model set based on an interaction data set, where the reward model set includes reward models corresponding to historical interaction data of different role types; and adjust the second model based on the reward model set to obtain a first model set.

[0200] In some embodiments of the present application, the historical usage record of the electronic device includes at least one historical interaction data, each historical interaction data has corresponding remark information, and the processor 910 is further used to use the first classification model to perform role classification on each remark information to obtain a target role type corresponding to each historical interaction data and a confidence level corresponding to the target role type; based on the confidence level corresponding to the target role type being greater than or equal to a first threshold, the target role type is used as the role type of the corresponding historical interaction data; based on the confidence level corresponding to the target role type being less than the first threshold, content recognition is performed on the historical interaction data to obtain the role type corresponding to the historical interaction data; and an interaction data set is constructed based on the historical interaction data and the role type corresponding to the historical interaction data.

[0201] In some embodiments of the present application, the processor 910 is specifically used to parse the first response result to obtain a parsing result; when it is determined based on the parsing result that the call has not ended and there is a decision-making problem, determine the problem content of the decision-making problem based on the first response result; determine the second prompt word based on the problem content of the decision-making problem, the first role type and the evaluation information of the call object; input the second prompt word into the first language model to obtain a second response result output by the first language model; and talk to the call object based on the second response result.

[0202] In the embodiment of the present application, the first role type and the first role information of the call object corresponding to the call object can be obtained, and the first language model corresponding to the first role type can be selected from the first model set using the first role type. In this process, the language model corresponding to the role type can be matched to the call object in a targeted manner. At the same time, in the process of generating the first prompt word, the first role information is referenced, so that the generated first prompt word is more adapted to the call object, so that the first response result obtained can reflect the dynamic multi-facetedness of the character, thereby improving the call experience.

[0203] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0204] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0205] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.

[0206] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned call method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0207] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0208] An embodiment of the present application further provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned call method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0209] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0210] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned call method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0211] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "including one" do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0212] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the embodiments of the present application are essentially or partly contributed to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0213] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for making a call, characterized in that: include: Determine the first role type of the call object, and obtain the first role information of the call object; According to the first role type, selecting a first language model corresponding to the first role type from a first model set; Determine a first prompt word based on the first role information; Inputting the first prompt word into the first language model to obtain a first response result output by the first language model; A conversation is conducted with the conversation partner based on the first response result.

2. The communication method according to claim 1, characterized in that: The calling method further includes: Based on the historical usage records of the electronic device, the personality tendency of the owner is identified to obtain the personality tendency identification result; Adjusting the first model based on the personality tendency identification result to obtain a second model; The second model is adjusted based on the interaction data set to obtain the first model set, wherein the interaction data set includes historical interaction data of different role types, and the first model set includes language models corresponding to different role types.

3. The communication method according to claim 2, characterized in that: The adjusting the second model based on the interaction data set to obtain the first model set specifically includes: Determining a reward model set based on the interaction data set, wherein the reward model set includes reward models corresponding to historical interaction data of different role types; The second model is adjusted based on the reward model set to obtain the first model set.

4. The communication method according to claim 2, characterized in that: The historical usage record of the electronic device includes at least one piece of the historical interaction data, each piece of the historical interaction data has corresponding remark information, and the call method further includes: Using the first classification model to classify each of the remark information into roles, and obtaining a target role type corresponding to each of the historical interaction data and a confidence level corresponding to the target role type; Based on the confidence level corresponding to the target role type being greater than or equal to a first threshold, taking the target role type as the role type of the corresponding historical interaction data; Based on the confidence level corresponding to the target role type being less than the first threshold, performing content recognition on the historical interaction data to obtain a role type corresponding to the historical interaction data; The interaction data set is constructed based on the historical interaction data and the role type corresponding to the historical interaction data.

5. The communication method according to any one of claims 1 to 4, characterized in that: The communicating with the communicating party based on the first response result specifically includes: Parsing the first response result to obtain a parsing result; If it is determined based on the analysis result that the call is not ended and there is a decision problem, determine the problem content of the decision problem based on the first response result; Determine a second prompt word based on the question content of the decision question, the first role type, and the evaluation information of the call object; Inputting the second prompt word into the first language model to obtain a second response result output by the first language model; A conversation is conducted with the conversation partner based on the second response result.

6. A communication device, characterized in that: include: An acquisition module, used to determine the first role type of the call object and acquire the first role information of the call object; A screening module, configured to screen out a first language model corresponding to the first role type from a first model set according to the first role type; A determination module, configured to determine a first prompt word based on the first role information; a processing module, configured to input the first prompt word into the first language model to obtain a first response result output by the first language model; A response module is used to communicate with the communication object based on the first response result.

7. The communication device according to claim 6, characterized in that: The processing module is further used for: Based on the historical usage records of the electronic device, the personality tendency of the owner is identified to obtain the personality tendency identification result; Adjusting the first model based on the personality tendency identification result to obtain a second model; The second model is adjusted based on the interaction data set to obtain the first model set, wherein the interaction data set includes historical interaction data of different role types, and the first model set includes language models corresponding to different role types.

8. The communication device according to claim 7, characterized in that: The processing module is specifically used for: Determining a reward model set based on the interaction data set, wherein the reward model set includes reward models corresponding to historical interaction data of different role types; The second model is adjusted based on the reward model set to obtain the first model set.

9. The communication device according to claim 7, characterized in that: The historical use record of the electronic device includes at least one piece of the historical interaction data, each piece of the historical interaction data has corresponding remark information, and the processing module is further used to: Using the first classification model to classify each of the remark information into roles, and obtaining a target role type corresponding to each of the historical interaction data and a confidence level corresponding to the target role type; Based on the confidence level corresponding to the target role type being greater than or equal to a first threshold, taking the target role type as the role type of the corresponding historical interaction data; Based on the confidence level corresponding to the target role type being less than the first threshold, performing content recognition on the historical interaction data to obtain a role type corresponding to the historical interaction data; The interaction data set is constructed based on the historical interaction data and the role type corresponding to the historical interaction data.

10. The communication device according to any one of claims 6 to 9, characterized in that: The response module is specifically used for: Parsing the first response result to obtain a parsing result; If it is determined based on the analysis result that the call is not ended and there is a decision problem, determine the problem content of the decision problem based on the first response result; Determine a second prompt word based on the question content of the decision question, the first role type, and the evaluation information of the call object; Inputting the second prompt word into the first language model to obtain a second response result output by the first language model; A conversation is conducted with the conversation partner based on the second response result.

Citation Information

Patent Citations

  • Intelligent dialogue method, device, equipment and storage medium

    CN110399474A

  • Generative large model training method and man-machine voice interaction method based on model

    CN116343766A

  • Task type dialogue response method and device

    CN117609449A

  • Large language model shaping method for deeply simulating human characters

    CN118113848A

  • Intelligent customer service question and answer method based on large language model technology

    CN118364084A

Cited By

  • Psychological interview large model dialogue quality evaluation method and system, medium and product

    CN121029562A