Human-computer interaction method, device, electronic device and medium
By determining the target topics and target roles in information applications and using large language models to control the interactive dialogue model, the problems of single interaction functions and insufficient user stickiness in the prior art are solved, and a richer and immersive user interaction experience is achieved.
Patent Information
- Application Number
- CN202310987507.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-08-07
AI Technical Summary
The interactive functions of existing information applications are single, and the user interaction experience is monotonous, resulting in insufficient user stickiness.
By determining the target topic and target role, the interactive dialogue model is controlled using the pre-trained large language model to interact with the user according to the language style of the target role.
It improves the experience and user stickiness of human-computer interaction, making the interaction process more immersive and natural.
Smart Images

Figure CN117033587B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the fields of natural language processing, human-computer interaction, deep learning and large language models, and specifically to a human-computer interaction method. Background Art
[0002] In the new media era, people's demand for information is becoming more and more urgent. With the popularization of smart phones, mobile Internet has become the main way to obtain information. In this context, various information applications have sprung up, covering various fields from news, technology to entertainment.
[0003] In the related technologies, most information applications only provide users with interactive services such as commenting, liking and sharing. The interactive functions are single, the interactive experience is monotonous, and the user stickiness is insufficient. Summary of the invention
[0004] The present disclosure provides a human-computer interaction method, device, electronic device and medium.
[0005] According to one aspect of the present disclosure, a human-computer interaction method is provided, the method comprising:
[0006] Identify target topics to be discussed and target roles to be established;
[0007] Based on the target role and the target topic, controlling the interactive dialogue model to interact with the user based on the target topic in a language style that matches the target role;
[0008] The interactive dialogue model is a large language model that has been pre-trained.
[0009] According to another aspect of the present disclosure, a human-computer interaction device is provided, the device comprising:
[0010] A topic role determination module is used to determine the target topic to be discussed and the target role to be set;
[0011] A human-computer interaction module, for controlling the interactive dialogue model to interact with the user based on the target role and the target topic in a language style that conforms to the target role;
[0012] The interactive dialogue model is a large language model that has been pre-trained.
[0013] According to another aspect of the present disclosure, there is provided an electronic device, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the human-computer interaction method described in any embodiment of the present disclosure.
[0017] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the human-computer interaction method described in any embodiment of the present disclosure.
[0018] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the human-computer interaction method described in any embodiment of the present disclosure is implemented.
[0019] According to the technology disclosed in the present invention, the present invention can improve the interactive experience and increase user stickiness.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0022] Figure 1 is a flow chart of a human-computer interaction method provided according to an embodiment of the present disclosure;
[0023] Figure 2 is a flow chart of another human-computer interaction method provided according to an embodiment of the present disclosure;
[0024] Figure 3 is a flow chart of another human-computer interaction method provided according to an embodiment of the present disclosure;
[0025] Figure 4 is a structural schematic diagram of a human-computer interaction device provided according to an embodiment of the present disclosure;
[0026] Figure 5 A block diagram of an electronic device used to implement the human-computer interaction method of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0028] Figure 1 1 is a flowchart of a human-computer interaction method provided according to an embodiment of the present disclosure. The embodiment of the present disclosure can be applied to consulting applications and human-computer interaction through information applications. The method can be executed by a human-computer interaction device, which can be implemented in software and / or hardware. Figure 1 As shown, the human-computer interaction method of this embodiment may include:
[0029] S101, determining the target topic to be discussed and the target role to be set.
[0030] S102, based on the target role and the target topic, controlling the interactive dialogue model to interact with the user based on the target topic in a language style that matches the target role; wherein the interactive dialogue model is a pre-trained large language model.
[0031] The target topic to be discussed refers to the topic discussed by the interactive dialogue model and the user during the human-computer interaction process. In other words, the interaction between the interactive dialogue model and the user is carried out around the target topic. Optionally, the target topic to be discussed and the target role to be set are determined according to the user's discussion preference.
[0032] The target role to be set refers to the role played by the interactive dialogue model in the process of human-computer interaction. The target role has personalized characteristics, and its personalized characteristics can be reflected through language style. Optionally, the target role is a real role or a virtual role. The virtual role is an image expression created in literary and artistic works. For example, the virtual role can be an animated character. In contrast, the real role refers to an image expression that really exists in real social life. For example, the real role can be a historical figure.
[0033] Optionally, the target role is used to replace the common role in the standard role speech to obtain the target role speech. Then, the target role speech is input into the interactive dialogue model as input data, and the interactive dialogue model can be set as the target role. Among them, the common role is the default role set for the interactive dialogue model. Exemplarily, the default role can be a user assistant. The standard role speech is used to set the role of the interactive dialogue model. The target role speech is generated based on the standard role speech and the target role. The role information of the standard role speech and the target role speech is different. Exemplarily, the standard role speech can be "You are so-and-so now, please reply to my question in the language style of so-and-so."
[0034] Optionally, the interactive dialogue model is solidified as the target role, that is, in the process of human-computer interaction, the interactive dialogue model always interacts with the user as the target role. In the process of human-computer interaction, other role scripts will not take effect on the interactive dialogue model. Among them, other role scripts are obtained by replacing the common role in the standard role script with other roles. The other role is different from the target role. In this way, the authenticity of the human-computer interaction process can be improved, which is closer to the feeling of chatting with real people, which is conducive to improving the interactive immersion, thereby improving the user's interactive experience.
[0035] The interactive dialogue model is a pre-trained large language model. A large language model (LLM) is a deep learning model trained with a large amount of text data that can generate natural language text or understand the meaning of language text. A large language model can handle a variety of natural language tasks, such as text classification, question-answering, and dialogue. Through training, a large language model captures knowledge from a large amount of labeled and unlabeled data and stores the knowledge in a large number of parameters, with model parameters reaching tens of billions or hundreds of billions.
[0036] In the process of human-computer interaction, the interactive dialogue model generates a reply sentence for the acquired user sentence, wherein the reply sentence generated by the interactive dialogue model is consistent with the language style of the target character.
[0037] The technical solution disclosed in the present invention uses a large language model for human-computer interaction. With the language understanding ability and text generation ability of the large language model, the large language model plays the target role to interact with users around the target topic, which can improve the interactive experience. Applying the human-computer interaction method provided by the present invention to information applications can improve user stickiness.
[0038] In an optional embodiment, the method further includes: obtaining the user's communication directory in response to a friend invitation operation; determining the communication friends to be invited based on the friend click operation acting on the communication directory; and inviting the communication friends to join the interaction with the interactive dialogue model.
[0039] The friend invitation operation is initiated by the user and is used to invite the communication friends to join the interaction with the interactive dialogue model. The communication friends are recorded in the user's communication directory. It is worth noting that the user's communication directory is obtained with the user's explicit authorization.
[0040] In response to a friend invitation operation, a user's communication directory is obtained. According to a friend click operation in the communication directory, a communication friend to be invited is determined. The friend click operation is used to determine the communication friend to be invited from the communication friends in the communication directory. The friend click operation is initiated by the user.
[0041] It is worth noting that the disclosed technical solution supports batch invitation of communication friends, that is, a friend's click operation can act on at least two communication friends at the same time.
[0042] Invite communication friends to join the interaction with the interactive dialogue model, and control the interactive dialogue model to interact with the user and the user's communication friends in a language style that conforms to the target role.
[0043] The above technical solution strengthens the social attributes of the human-computer interaction method by inviting the user's communication friends to join in the process of human-computer interaction. Applying the above technical solution to information applications is conducive to improving user stickiness.
[0044] In an optional embodiment, the method further includes: in response to a topic click operation, generating identity information consistent with the target role for the interactive dialogue model based on the target role; and adding the target role as a communication friend of the user to the communication directory of the user based on the identity information of the interactive dialogue model.
[0045] The topic click operation is used to determine whether the user is willing to interact with the interactive dialogue model around the target topic. The topic click operation is initiated by the user. In response to the topic click operation, the user interacts with the interactive dialogue model.
[0046] The identity information of the interactive dialogue model is consistent with the target role set for the interactive dialogue model. The identity information consistent with the target role is generated for the interactive dialogue model based on the target role. Based on the identity information of the interactive dialogue model, the target role is added to the user's communication directory as a communication friend of the user.
[0047] The identity information refers to various information that can identify the target character alone or in combination with other information. For example, the identity information can be the character identifier of the target character, such as the character avatar and the character nickname.
[0048] The above technical solution generates identity information consistent with the target role for the interactive dialogue model after the user joins the interaction process with the interactive dialogue model, and adds the target role as the user's communication friend to the user's communication directory, thereby providing data support for the subsequent invitation of the user's communication friends to join the interaction with the interactive dialogue model, which is conducive to enhancing the social attributes of human-computer interaction.
[0049] Figure 2 It is a flow chart of another human-computer interaction method provided according to an embodiment of the present disclosure; this embodiment is an optional solution proposed on the basis of the above embodiment.
[0050] See also Figure 2 , the human-computer interaction method provided in this embodiment includes:
[0051] S201, determining the target topic to be discussed and the target role to be set.
[0052] S202: constructing a dialogue generation paradigm for the interactive dialogue model using the target topic and the acquired user sentences.
[0053] Among them, the dialogue generation paradigm is generated based on the target topic and the acquired user sentences. The dialogue generation paradigm is used to control the interactive dialogue model. Based on the dialogue generation paradigm, the topic relevance, interaction fluency and interaction atmosphere in the human-computer interaction process can be detected, and then the interaction fluency and interaction naturalness in the human-computer interaction process can be controlled.
[0054] S203, based on the dialogue generation paradigm, using the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target topic and the user statement; wherein the interactive dialogue model is a pre-trained large language model.
[0055] The target role is used to determine the language style required to generate the reply sentence. The reply sentence is related to the user sentence in terms of content, and the reply sentence is generated by the interactive dialogue model for the user sentence. The user sentence is input by the user. The reply sentence can be a question sentence or an answer sentence. The specific type of the reply sentence is not limited here and needs to be determined according to the actual situation.
[0056] Optionally, the dialogue generation paradigm is used as input data of the interactive control model, and the interactive control model detects the topic relevance, interaction fluency and interaction atmosphere in the human-computer interaction process based on the dialogue generation paradigm. Then, based on the obtained detection results, the interactive control model controls the interactive dialogue model to generate a reply sentence for the user sentence. The interactive control model is a pre-trained large language model.
[0057] The disclosed technical solution uses the target topic and the acquired user sentences to construct a dialogue generation paradigm for the interactive dialogue model. The dialogue generation paradigm can detect the topic relevance, interaction fluency and interaction atmosphere in the human-computer interaction process. Based on the dialogue generation paradigm, the interactive dialogue model is used to generate a reply sentence for the user sentence according to the target role, target topic and user sentence, which can control the interaction fluency and interaction naturalness in the human-computer interaction process, and provide technical support for improving the interaction experience and user stickiness.
[0058] In an optional embodiment, the method based on the dialogue generation paradigm uses the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target topic and the user statement, including: based on the dialogue generation paradigm, determining the target chat atmosphere in the human-computer interaction process; using the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target chat atmosphere and the user statement.
[0059] Based on the dialogue generation paradigm, the atmosphere of interaction in human-computer interaction can be detected. Optionally, the dialogue generation paradigm is input into the interaction control model, and the interaction control model determines the target chat atmosphere in the human-computer interaction process based on the dialogue generation paradigm. The interaction control model is a pre-trained large language model with language understanding ability, and can determine the atmosphere of interaction in human-computer interaction based on the acquired user sentences.
[0060] The target chat atmosphere refers to the atmosphere of interaction, which is determined by the interactive control model based on the acquired user sentences. For example, the target chat atmosphere can be humorous or serious. The target chat atmosphere is sent to the interactive dialogue model through the interactive control model.
[0061] The interactive dialogue model generates a reply statement for the user statement according to the target role, the target chat atmosphere and the user statement. Optionally, the interactive dialogue model first generates a reply statement for the user statement according to the target role and the user statement, then performs atmosphere processing on the generated reply statement according to the target chat atmosphere, and outputs the atmosphere processing result as a reply statement for the user statement through the interactive dialogue model.
[0062] The above technical solution, based on the dialogue generation paradigm, detects the atmosphere of interaction in the human-computer interaction process, determines the target chat atmosphere in the human-computer interaction process, and uses the target chat atmosphere to guide the interactive dialogue model to generate reply sentences for user sentences, thereby improving the naturalness of interaction in the human-computer interaction process and providing technical support for improving the interactive experience and user stickiness.
[0063] In an optional embodiment, based on a dialogue generation paradigm, the interactive dialogue model is used to generate a reply statement for the user statement according to the target role, the target topic and the user statement, including: based on the dialogue generation paradigm, determining whether a topic change opportunity occurs in the interactive dialogue model during the human-computer interaction process; if a topic change opportunity occurs, using the interactive dialogue model to determine a target chat topic; the target chat topic belongs to the target topic; using the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target chat topic and the user statement.
[0064] Based on the dialogue generation paradigm, the interaction fluency and topic relevance in human-computer interaction can be detected. Optionally, the dialogue generation paradigm is input into the interaction control model, and the interaction control model determines whether there is a topic change opportunity in the human-computer interaction process based on the dialogue generation paradigm. Among them, the topic change opportunity refers to the time when the chat topic may need to be changed.
[0065] When a topic change occurs, a new chat topic can be introduced. The target chat topic is the new chat topic after the change. The target chat topic is determined by the interactive dialogue model based on the target topic, and the target chat topic belongs to the target topic. For example, the target topic is "how to get along with a couple", and the target chat topic can be "what to do if you can't win an argument with your husband". The interactive dialogue model generates a reply statement for the user statement based on the target role, the target chat topic and the user statement.
[0066] The above technical solution, based on the dialogue generation paradigm, detects the timing of subject change in the human-computer interaction process. When the topic changes, the interactive dialogue model is used to determine the target chat topic. The target chat topic is used to guide the interactive dialogue model to generate reply statements for user statements, thereby improving the interaction fluency in the human-computer interaction process and providing technical support for improving the interactive experience and user stickiness.
[0067] In an optional embodiment, based on the dialogue generation paradigm, determining whether the interactive dialogue model has a topic change opportunity during the human-computer interaction process includes: based on the dialogue generation paradigm, determining whether the user sentence deviates from the target topic to obtain a topic detection result; based on the dialogue generation paradigm, determining whether the user sentence has an interaction interruption to obtain an interruption detection result; based on the topic detection result and / or the interruption detection result, determining whether the interactive dialogue model has a topic change opportunity during the human-computer interaction process.
[0068] The chat topic is an important factor that affects whether the interaction can continue. Introducing a new chat topic in a timely manner can avoid interruptions in the interaction. In addition, it is understandable that the interaction between the interactive dialogue model and the user revolves around the target topic, while the user's sentences are random and may deviate from the target topic. Introducing a new chat topic in a timely manner can avoid topic deviation. The dialogue generation paradigm is used to detect topic relevance and interaction fluency in human-computer interaction.
[0069] Optionally, the dialogue generation paradigm is input into the interactive control model, and the interactive control model determines whether the user's statement deviates from the target topic based on the dialogue generation paradigm to obtain a topic detection result. Optionally, the topic detection result includes deviation and non-deviation. In the case that the user's statement deviates from the target topic, it is determined that the interactive dialogue model has a topic change opportunity during the human-computer interaction process.
[0070] Optionally, the dialogue generation paradigm is input into the interactive control model, and the interactive control model determines whether the user's sentence has an interactive interruption based on the dialogue generation paradigm to obtain an interruption detection result. Optionally, the interruption detection result includes interruption and non-interruption. In the case of whether the user's sentence has an interactive interruption, it is determined when the interactive dialogue model changes the topic during the human-computer interaction process.
[0071] It is worth noting that when the topic detection result is deviation or the interruption detection result is terminal, or when the topic detection result is deviation and the interruption detection result is, it is possible to determine the timing of topic change in the interactive dialogue model during the human-computer interaction process.
[0072] The above technical solution provides a practical method for determining the timing of topic changes, and provides data support for improving topic relevance and interaction fluency in human-computer interaction.
[0073] Figure 3 1 is a flow chart of another human-computer interaction method provided according to an embodiment of the present disclosure. This embodiment is an optional solution proposed based on the above embodiment. Figure 3 As shown, the human-computer interaction method of this embodiment may include:
[0074] S301, extracting information from target content displayed on the current interface to obtain content elements of the target content.
[0075] The target content displayed on the current interface refers to the content that the user is browsing at the current moment. In general, the target content is the information content that the user is interested in. Optionally, the current interface is a human-computer interaction interface for a consulting application. The target content displayed on the current interface can be a video type or a graphic type. The data mode of the target content is not limited here and needs to be determined according to the actual situation.
[0076] Information is extracted from the target content displayed on the current interface to obtain content elements of the target content. Optionally, content understanding technology is used to understand the target content displayed on the current interface to extract key information from the target content displayed on the current interface to obtain content elements of the target content. The content understanding technology is related to the data modality of the target content. For example, if the target content is a video type, the content understanding technology can be a video understanding technology.
[0077] The content element of the target content is a refinement of the target content and is the content focus of the target content. The content element may be at least one of a theme element, a role element and an environment element.
[0078] S302, performing hot topic analysis on the hot topic to obtain topic elements of the hot topic.
[0079] Among them, hot topics refer to the hot issues that the public is most concerned about within a certain period of time and within a certain range. Most hot topics have a high degree of discussion participation. Hot topics can easily arouse users' interest in discussion.
[0080] Hot topics are analyzed, and the discussion focus of the hot topics is extracted to obtain the topic elements of the hot topics. For example, the topic data such as the comment content, forwarding data, like data and public opinion trends of the hot topics are analyzed, and the discussion focus of the hot topics is extracted to obtain the topic elements of the hot topics. Among them, the topic elements can be at least one of the theme elements, the role elements and the environment elements.
[0081] S303: Determine a target topic to be discussed based on the content elements of the target content and the topic elements of the hot topic.
[0082] The target topic to be discussed refers to the topic discussed between the interactive dialogue model and the user during the human-computer interaction process. The target topic is determined based on the content elements of the target content and the topic elements of the hot topic.
[0083] Content elements are the refinement of target content, and topic elements are the refinement of hot topics. Both target content and hot topics can arouse users' discussion interests. The target topic obtained by combining target content with hot topics meets users' discussion preferences.
[0084] S304: Determine the target role to be set according to the content elements of the target content and the topic elements of the target topic.
[0085] Determine the topic elements of the target topic. Optionally, perform a hot spot analysis on the target topic to determine the topic elements of the target topic.
[0086] Among them, the target role to be set is the role played by the interactive dialogue model in the human-computer interaction process.
[0087] The target role to be set is determined based on the content elements of the target content and the topic elements of the target topic. Optionally, it is determined whether the content elements and the topic elements include role elements. If both the content elements and the topic elements include role elements, the role elements in the content elements are determined as the role elements to be set; if only one of the content elements and the topic elements includes role elements, the included role elements are determined as the role elements to be set; if neither the content elements nor the topic elements include role elements, the target role to be set is determined based on the topic elements of the target topic.
[0088] Optionally, the target role to be set will be determined based on the role element in the content element. This is because the target content is displayed on the current interface, and the content element is a refinement of the target content. The role element in the content element is generally the main role in the target content. When the user browses the target content, the interactive dialogue model plays the main role in the target content and interacts with the user, which can enrich the interactive experience.
[0089] S305, based on the target role and the target topic, controlling the interactive dialogue model to interact with the user based on the target topic in a language style that matches the target role; wherein the interactive dialogue model is a pre-trained large language model.
[0090] The disclosed technical solution determines the target topic to be discussed based on the content elements of the target content and the topic elements of the hot topic, and determines the target role to be set based on the content elements of the target content and the topic elements of the target topic. Both the target content and the hot topic can arouse the discussion interest of the user. The target topic and the target role obtained by combining the target content with the hot topic are more in line with the discussion preference of the user. By playing the target role through the large language model to interact with the user around the target topic, the interactive experience in the human-computer interaction process can be improved.
[0091] In an optional embodiment, the target topic to be discussed is determined based on the content elements of the target content and the topic elements of the hot topic, including: determining the topic matching degree between the target content and the hot topic based on the content elements of the target content and the topic elements of the hot topic; and selecting the hot topic matching the target content as the target topic to be discussed according to the topic matching degree.
[0092] Among them, the topic matching degree is used to quantify the matching degree between the target content and the hot topics. The topic matching degree is positively correlated with the matching degree between the target content and the hot topics. The higher the topic matching degree, the more matching the target content and the hot topics.
[0093] Content elements are refinements of target content, and topic elements are refinements of hot topics. Content elements represent target content, and topic elements represent hot topics. Based on the content elements of target content and the topic elements of hot topics, the degree of match between target content and hot topics can be determined. Each hot topic involved in the match has a corresponding topic match. Optionally, hot topics are sorted in order from large to small according to the topic match. The hot topic with the largest topic match is selected as the target topic to be discussed. The target topic is generated in the hot topics and is a hot topic that matches the target content.
[0094] The above technical solution provides a practical method for determining target topics, which combines target content with hot topics, can better arouse users' interest in discussion, and provides data support for improving interactive experience and user stickiness.
[0095] In an optional embodiment, determining the target role to be set based on the content elements of the target content and the topic elements of the target topic includes: determining whether the content elements of the target content and the topic elements of the target topic include role elements; if neither the content elements nor the topic elements include role elements, determining the extended role of the target topic based on the topic elements of the target topic; and determining the target role to be set based on the extended role of the target topic.
[0096] The role element in the content element is the main role that appears in the target content, and the role element in the topic element is the focus role discussed in the hot topic. Both the role element in the content element and the role element in the topic element can arouse the discussion interest of users. The role element included in either the content element or the topic element can be used as the target role to be set.
[0097] If neither the content element nor the topic element includes a role element, an extended role of the target topic is determined based on the topic element of the target topic. Then, based on the extended role of the target topic, a target role to be set is determined. Specifically, the extended role can be used as the target role to be set.
[0098] Among them, the extended role refers to a role that does not directly appear in the target topic, the extended role is associated with the target topic, and the extended role has personalized characteristics. For example, the target topic is "How many years will the Terracotta Warriors archaeological work continue", and the extended role can be "Qin Shi Huang".
[0099] The above technical solution provides a feasible method for determining the target role. When neither the content elements nor the topic elements include the role element, the target role to be set can still be determined based on the extended role of the target topic, providing data support for improving the interactive experience and user stickiness.
[0100] Figure 4 1 is a schematic diagram of a human-computer interaction device according to an embodiment of the present disclosure. The present disclosure embodiment can be applied to consulting applications, where human-computer interaction is performed through information applications. The device can be implemented using software and / or hardware, and the device can implement the human-computer interaction method described in any embodiment of the present disclosure.
[0101] like Figure 4 As shown, the human-computer interaction device 400 includes:
[0102] A topic role determination module 401 is used to determine a target topic to be discussed and a target role to be set;
[0103] The human-computer interaction module 402 is used to control the interactive dialogue model to interact with the user based on the target role and the target topic in a language style that matches the target role; wherein the interactive dialogue model is a pre-trained large language model.
[0104] The technical solution disclosed in the present invention uses a large language model for human-computer interaction. With the language understanding ability and text generation ability of the large language model, the large language model plays the target role to interact with users around the target topic, which can improve the interactive experience. Applying the human-computer interaction method provided by the present invention to information applications can improve user stickiness.
[0105] Optionally, the human-computer interaction module 402 includes: a dialogue generation paradigm construction submodule, which is used to use the target topic and the acquired user sentence to construct a dialogue generation paradigm for the interactive dialogue model; a reply sentence generation submodule, which is used to generate a reply sentence for the user sentence based on the dialogue generation paradigm and the interactive dialogue model according to the target role, the target topic and the user sentence.
[0106] Optionally, the reply statement generation submodule includes: a topic change opportunity determination unit, which is used to determine whether a topic change opportunity occurs in the interactive dialogue model during the human-computer interaction process based on the dialogue generation paradigm; a chat topic determination unit, which is used to use the interactive dialogue model to determine a target chat topic if a topic change opportunity occurs; the target chat topic belongs to the target topic; and a first reply statement generation unit, which is used to use the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target chat topic and the user statement.
[0107] Optionally, the subject change timing determination unit includes: a topic deviation detection subunit, used to determine whether the user statement deviates from the target topic based on the dialogue generation paradigm to obtain a topic detection result; an interaction interruption detection subunit, used to determine whether the user statement has an interaction interruption based on the dialogue generation paradigm to obtain an interruption detection result; a subject change timing determination subunit, used to determine whether a subject change opportunity occurs in the interactive dialogue model during the human-computer interaction process based on the topic detection result and / or the interruption detection result.
[0108] Optionally, the reply statement generation submodule includes: a chat atmosphere determination unit, which is used to determine the target chat atmosphere in the human-computer interaction process based on the dialogue generation paradigm; and a second reply statement generation unit, which is used to adopt the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target chat atmosphere and the user statement.
[0109] Optionally, the topic role determination module 401 includes: an information extraction submodule, used to extract information from the target content displayed on the current interface to obtain content elements of the target content; a hot spot analysis submodule, used to perform hot spot analysis on hot topics to obtain topic elements of hot topics; a topic determination submodule, used to determine the target topic to be discussed based on the content elements of the target content and the topic elements of the hot topics; and a role determination submodule, used to determine the target role to be set based on the content elements of the target content and the topic elements of the target topic.
[0110] Optionally, the topic determination submodule includes: a topic matching determination unit, used to determine the topic matching degree between the target content and the hot topic based on the content elements of the target content and the topic elements of the hot topic; a target topic determination unit, used to select a hot topic matching the target content as a target topic to be discussed according to the topic matching degree.
[0111] Optionally, the role determination submodule includes: a role element determination unit, used to determine whether the content elements of the target content and the topic elements of the target topic include role elements; an extended role determination unit, used to determine the extended role of the target topic based on the topic elements of the target topic if neither the content elements nor the topic elements include role elements; and a target role determination unit, used to determine the target role to be set based on the extended role of the target topic.
[0112] Optionally, the device 400 also includes: a communication directory acquisition module, used to obtain the user's communication directory in response to a friend invitation operation; a communication friend determination module, used to determine the communication friends to be invited based on the friend click operation acting on the communication directory; and a friend invitation module, used to invite the communication friends to join the interaction with the interactive dialogue model.
[0113] Optionally, the device 400 also includes: an identity information determination module, which is used to generate identity information that matches the target role for the interactive dialogue model based on the target role in response to a topic click operation; and a communication friend adding module, which is used to add the target role as a communication friend of the user to the user's communication directory based on the identity information of the interactive dialogue model.
[0114] The human-computer interaction device provided in the embodiments of the present disclosure can execute the human-computer interaction method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the human-computer interaction method.
[0115] In the technical solution disclosed herein, the user information involved, the collection, storage, use, processing, transmission, provision and disclosure of voice control instructions, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0116] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0117] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0118] like Figure 5As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0119] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0120] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as human-computer interaction methods. For example, in some embodiments, the human-computer interaction method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the human-computer interaction method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the human-computer interaction method in any other appropriate manner (e.g., by means of firmware).
[0121] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0122] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable human-computer interaction device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0123] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0124] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0125] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0126] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0127] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, and other major directions.
[0128] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications such as artificial intelligence and blockchain, as well as model training.
[0129] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0130] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A human-computer interaction method, the method comprising: Extract information from the target content displayed on the current interface to obtain content elements of the target content; Conduct hot topic analysis on hot topics to obtain topic elements of hot topics; Determining a topic matching degree between the target content and the hot topic based on a content element of the target content and a topic element of the hot topic, wherein the content element and the topic element are at least one of a theme element, a character element, and an environment element; According to the topic matching degree, a hot topic matching the target content is selected as a target topic to be discussed; Determine the target role to be set according to the content elements of the target content and the topic elements of the target topic, wherein the target role to be set refers to the role played by the interactive dialogue model in the human-computer interaction process; Based on the target role and the target topic, controlling the interactive dialogue model to interact with the user based on the target topic in a language style that matches the target role; The interactive dialogue model is a pre-trained large language model.
2. The method according to claim 1, wherein: The step of controlling the interactive dialogue model to interact with the user based on the target role and the target topic in a language style that matches the target role includes: Using the target topic and the acquired user sentences to construct a dialogue generation paradigm for the interactive dialogue model; Based on the dialogue generation paradigm, the interactive dialogue model is used to generate a reply statement for the user statement according to the target role, the target topic and the user statement.
3. The method according to claim 2, wherein: The method based on the dialogue generation paradigm, using the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target topic and the user statement, includes: Based on the dialogue generation paradigm, determining whether the interactive dialogue model has a topic change opportunity during the human-computer interaction process; If a topic change opportunity occurs, the target chat topic is determined using the interactive dialogue model; the target chat topic belongs to the target topic; The interactive dialogue model is adopted to generate a reply statement for the user statement according to the target role, the target chat topic and the user statement.
4. The method according to claim 3, wherein: The determining, based on the dialogue generation paradigm, whether a topic change opportunity occurs in the interactive dialogue model during the human-computer interaction process includes: Based on the dialogue generation paradigm, determining whether the user sentence deviates from the target topic to obtain a topic detection result; Based on the dialogue generation paradigm, determining whether the user sentence has an interaction interruption to obtain an interruption detection result; Based on the topic detection result and / or the interruption detection result, it is determined whether a topic change opportunity occurs in the interactive dialogue model during the human-computer interaction process.
5. The method according to claim 2, wherein: The method based on the dialogue generation paradigm, using the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target topic and the user statement, includes: Based on the dialogue generation paradigm, determining a target chat atmosphere in the human-computer interaction process; The interactive dialogue model is adopted to generate a reply statement for the user statement according to the target role, the target chat atmosphere and the user statement.
6. The method according to claim 1, wherein: The step of determining the target role to be set according to the content elements of the target content and the topic elements of the target topic includes: Determining whether the content elements of the target content and the topic elements of the target topic include role elements; If neither the content element nor the topic element includes a role element, determining an extended role of the target topic based on the topic element of the target topic; Based on the extended roles of the target topic, a target role to be set is determined.
7. The method according to claim 1, further comprising: In response to a friend invitation operation, obtaining a user's communication directory; According to the click operation of the friends in the communication directory, the communication friends to be invited are determined; Invite the communication friend to join the interaction with the interactive dialogue model.
8. The method according to claim 7, further comprising: In response to a topic click operation, generating identity information consistent with the target role for the interactive dialogue model based on the target role; Based on the identity information of the interactive dialogue model, the target role is added to the communication directory of the user as a communication friend of the user.
9. A human-computer interaction device, comprising: A topic role determination module, used to determine a target topic to be discussed and a target role to be set, wherein the target role to be set refers to the role played by the interactive dialogue model in the human-computer interaction process; A human-computer interaction module, for controlling the interactive dialogue model to interact with the user based on the target role and the target topic in a language style that conforms to the target role; Wherein, the interactive dialogue model is a large language model that has been pre-trained; The topic role determination module includes: The information extraction submodule is used to extract information from the target content displayed on the current interface to obtain content elements of the target content; The hotspot analysis submodule is used to perform hotspot analysis on hot topics and obtain topic elements of the hot topics; A topic determination submodule, used to determine a target topic to be discussed based on the content elements of the target content and the topic elements of the hot topic; A role determination submodule, used to determine the target role to be set according to the content elements of the target content and the topic elements of the target topic; Wherein, the topic determination submodule includes: a topic matching degree determining unit, configured to determine a topic matching degree between the target content and the hot topic based on a content element of the target content and a topic element of the hot topic, wherein the content element and the topic element are at least one of a theme element, a character element, and an environment element; The target topic determination unit is used to select a hot topic matching the target content as the target topic to be discussed according to the topic matching degree.
10. The device according to claim 9, wherein: The human-computer interaction module comprises: A dialogue generation paradigm construction submodule, used to construct a dialogue generation paradigm for the interactive dialogue model using the target topic and the acquired user sentences; The reply statement generation submodule is used to generate a reply statement for the user statement based on the dialogue generation paradigm and using the interactive dialogue model according to the target role, the target topic and the user statement.
11. The device according to claim 10, wherein: The reply statement generation submodule includes: A topic change timing determination unit, used to determine whether a topic change timing occurs in the interactive dialogue model during the human-computer interaction process based on the dialogue generation paradigm; A chat topic determination unit, configured to determine a target chat topic using the interactive dialogue model if a topic change opportunity occurs; the target chat topic belongs to the target topic; The first reply statement generating unit is used to adopt the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target chat topic and the user statement.
12. The device according to claim 11, wherein The theme change timing determination unit includes: A topic deviation detection subunit, configured to determine whether the user's statement deviates from the target topic based on the dialogue generation paradigm to obtain a topic detection result; An interaction interruption detection subunit, configured to determine whether the user's statement has an interaction interruption based on the dialogue generation paradigm to obtain an interruption detection result; The topic change timing determination subunit is used to determine whether a topic change timing occurs in the interactive dialogue model during the human-computer interaction process based on the topic detection result and / or the interruption detection result.
13. The device according to claim 10, wherein: The reply statement generation submodule includes: A chat atmosphere determination unit, used to determine a target chat atmosphere in a human-computer interaction process based on the dialogue generation paradigm; The second reply statement generating unit is used to adopt the interactive dialogue model to generate a reply statement for the user statement according to the target role, the target chat atmosphere and the user statement.
14. The device according to claim 9, wherein: The role determination submodule includes: a role element determination unit, configured to determine whether the content elements of the target content and the topic elements of the target topic include role elements; an extended role determination unit, configured to determine an extended role of the target topic based on the topic element of the target topic if neither the content element nor the topic element includes a role element; The target role determination unit is used to determine the target role to be set based on the extended role of the target topic.
15. The apparatus according to claim 9, further comprising: A communication directory acquisition module, used to obtain the user's communication directory in response to a friend invitation operation; The communication friend determination module is used to determine the communication friends to be invited according to the click operation of the friends acting on the communication directory; The friend invitation module is used to invite the communication friends to join the interaction with the interactive dialogue model.
16. The apparatus according to claim 15, further comprising: An identity information determination module, configured to generate identity information that matches the target role for the interactive dialogue model based on the target role in response to a topic click operation; The communication friend adding module is used to add the target role as a communication friend of the user to the communication directory of the user based on the identity information of the interactive dialogue model.
17. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the human-computer interaction method according to any one of claims 1-8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the human-computer interaction method according to any one of claims 1-8.
19. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the human-computer interaction method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-role intelligent chatting method and system
CN105975622A
Conversation processing method and device thereof and electronic equipment
CN113205811A
Conversation processing method and device, electronic equipment and storage medium
CN115221294A
Virtual human dialogue method and system and storage medium
CN116340476A