Search

CN-121996762-A - Method for providing reply information, related device and computer program product

CN121996762ACN 121996762 ACN121996762 ACN 121996762ACN-121996762-A

Abstract

The application provides a method for providing reply information, a related device and a computer program product, wherein the method responds to receiving dialogue information sent by a user to a virtual character, acquires scene information where the virtual character is currently located and character description information of the virtual character, constructs a prompt word based on the scene information and the character description information, the prompt word is used for indicating language style parameters of the virtual character determined based on the character description information and the scene information and generating reply information which is consistent with the language style parameters and is used for replying the dialogue information, utilizes a prompt word call reply model to process the dialogue information and generate the reply information, and provides the reply information for the user through the virtual character aiming at the dialogue information. Therefore, based on the scene and the virtual character actually conversationed, conversational services can be dynamically, individually and differently provided for the user, so that the immersive interactive experience of the user is enhanced while the personification expression capability of the virtual character is improved.

Inventors

  • LI DONGJI

Assignees

  • 上海幻电信息科技有限公司

Dates

Publication Date
20260508
Application Date
20260115

Claims (14)

  1. 1. A method of providing reply messages, comprising: Responding to receiving dialogue information sent to the virtual character by a user, and acquiring scene information of the current virtual character and character description information of the virtual character; Constructing a prompt word based on the scene information and the character description information, wherein the prompt word is used for indicating that language style parameters of the virtual character are determined based on the character description information and the scene information, and generating reply information which is consistent with the language style parameters and is used for replying to the dialogue information; processing the dialogue information by using the prompt word call reply model to generate the reply information; and providing the reply information to the user aiming at the dialogue information through the virtual role.
  2. 2. The method of claim 1, wherein the character description information is generated by: Acquiring a history dialogue text of the virtual character; And generating the role description information corresponding to the virtual role based on the target dialogue text and/or the target sentence pattern structure in the history dialogue text, wherein the occurrence frequency of the target dialogue text is greater than or equal to a text frequency threshold value, and the occurrence frequency of the target sentence pattern structure is greater than or equal to a structure frequency threshold value.
  3. 3. The method according to claim 2, wherein the method further comprises: predicting each corresponding role emotion of each historical dialog text in response to acquiring at least two segments of the historical dialog text, and The generating the role description information corresponding to the virtual role based on the target dialogue text and/or the target sentence pattern structure in the history dialogue text comprises the following steps: Responding to the existence of at least two role emotions, and generating role description sub-information of the virtual role under the role emotion based on a target dialogue text and/or a target sentence pattern structure in a target historical dialogue text corresponding to the role emotion; And combining the character description sub-information to obtain the character description information.
  4. 4. The method of claim 3, wherein the constructing a hint word based on the scene information and the role description information includes: determining a target character emotion based on the scene information; And constructing a prompt word based on the scene information and the target role description sub-information corresponding to the target role in the role description information, wherein the prompt word is used for indicating the language style parameter of the virtual role determined based on the role description sub-information and the scene information, and generating reply information which is consistent with the language style parameter and is used for replying to the dialogue information.
  5. 5. The method of claim 4, wherein the determining a target character emotion based on the scene information comprises: Determining a target character emotion based on user friendliness of the virtual character to the user and the scene information.
  6. 6. The method according to claim 2, wherein the generating the character description information corresponding to the virtual character based on the target dialog text and/or the target sentence structure in the history dialog text includes: Generating initial role description information corresponding to the virtual role based on a target dialogue text and/or a target sentence pattern structure in the history dialogue text; constructing a test prompt word based on the initial character description information, wherein the test prompt word is used for indicating the character description information to determine a test language style parameter and generating test reply information which is consistent with the test language style parameter and is used for replying to test dialogue information; the test prompt word is used for calling the reply model to process the test dialogue information, and the test reply information is generated; Providing the initial role description information and the test reply information to target equipment; And responding to the target equipment to return an update instruction aiming at the initial role description information, and updating the initial role description information based on the update instruction to obtain the role description information corresponding to the virtual role.
  7. 7. The method according to claim 1, wherein the method further comprises: verifying the reply information by using the standard corpus corresponding to the language style parameters to generate a style consistency verification result, and The providing, by the virtual character, the reply information to the user for the dialogue information includes: And responding to the indication of the verification of the style consistency, and providing the reply information for the dialogue information to the user through the virtual role.
  8. 8. The method of claim 7, wherein the method further comprises: responding to the style consistency check result indicating that the check is not passed, and reading deviation reply sub-information in the reply information; Constructing an update prompt word for updating the deviation reply sub-information, wherein the update prompt word is used for indicating that the deviation reply sub-information is rewritten based on language style parameters; the update prompt word is used for calling the reply model to rewrite the deviation reply sub-information, and a rewrite result is generated; And updating the reply information based on the rewriting result.
  9. 9. The method of any of claims 1-8, responsive to recording historical dialog information sent by the user to the virtual character, the constructing a hint word based on the scene information and the character description information, comprising: And constructing a prompt word based on target historical dialogue information with a dialogue turn smaller than or equal to a turn threshold from the dialogue information, wherein the scene information and the role description information are used for indicating that language style parameters of the virtual role are determined based on the role description information, the scene information and the historical language style parameters corresponding to the virtual role in the target historical dialogue information, and the target historical dialogue information is used as the above information for reference to generate reply information which is consistent with the language style parameters and is used for replying to the dialogue information.
  10. 10. The method according to claim 9, wherein the method further comprises: and clearing records of the historical dialogue information in response to the current topic of the dialogue information being different from the historical topic of the historical dialogue information of the previous round of the dialogue information.
  11. 11. An apparatus for providing reply messages, comprising: the information acquisition module is configured to respond to receiving dialogue information sent to the virtual character by a user and acquire scene information of the current virtual character and character description information of the virtual character; a prompt word construction module configured to construct a prompt word based on the scene information and the character description information, wherein the prompt word is used for indicating a language style parameter of the virtual character determined based on the character description information and the scene information, and generating reply information which is consistent with the language style parameter and is used for replying to the dialogue information; The reply model calling module is configured to call a reply model to process the dialogue information by using the prompt word so as to generate the reply information; and the reply information providing module is configured to provide the reply information for the dialogue information to the user through the virtual role.
  12. 12. An electronic device, the electronic device comprising: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 9.
  13. 13. A computer readable medium having stored thereon computer program instructions executable by a processor to implement the method of any of claims 1 to 9.
  14. 14. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 9.

Description

Method for providing reply information, related device and computer program product Technical Field The present application relates to the field of computer technology, and in particular, to a method and apparatus for providing reply information, an electronic device, a computer readable medium, and a computer program product. Background With the rapid development of the field of natural language processing (Natural Language Processing, abbreviated as NLP), language generation technology based on a reply model such as a large language model (Large Language Model, abbreviated as LLM) has been widely applied to a plurality of scenes such as intelligent conversations, content generation, virtual assistants, and the like. The model has strong semantic understanding and language generating capability through learning massive corpus, and can generate coherent, natural and contextually relevant dialogue content. For example, in the field of games, because the interaction experience between the virtual character and the player becomes a key factor affecting the immersion of the game and the viscosity of the user, some game manufacturers choose to access a Large Language Model (LLM) for the virtual character and the image, so as to improve the interaction capability between the virtual character and the user through the LLM, so that the virtual character is not limited to mechanically providing preset dialogue content, but can dynamically and intelligently communicate with the user more naturally and personally. In such a context, it is interesting and urgent how LLM can be utilized more efficiently to provide a more immersive, more vivid interactive experience for users. Disclosure of Invention Aspects of the present application provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for providing reply information, capable of dynamically, individually, and differentially providing a conversation service to a user based on a scene in which the user is located and a virtual character actually being conversationed, thereby enhancing an immersive interactive experience of the user while enhancing a personification expression capability of the virtual character. According to one aspect of the application, a method for providing reply information is provided, which comprises the steps of responding to receiving dialogue information sent by a user to a virtual character, obtaining scene information of the virtual character and character description information of the virtual character, constructing a prompt word based on the scene information and the character description information, wherein the prompt word is used for indicating language style parameters of the virtual character determined based on the character description information and the scene information and generating reply information which is consistent with the language style parameters and is used for replying the dialogue information, utilizing a prompt word to call the reply model to process the dialogue information, generating the reply information, and providing the reply information to the user through the virtual character aiming at the dialogue information. In another aspect of the application, an apparatus for providing reply information is provided, which comprises an information acquisition module configured to acquire scene information where a virtual character is currently located and character description information of the virtual character in response to receiving dialogue information sent to the virtual character by a user, a prompt word construction module configured to construct a prompt word based on the scene information and the character description information, wherein the prompt word is used for indicating language style parameters of the virtual character to be determined based on the character description information and the scene information and generating reply information which is consistent with the language style parameters and is used for replying the dialogue information, a reply model calling module configured to call the reply model to process the dialogue information by using the prompt word and generate the reply information, and a reply information providing module configured to provide the reply information to the user for the dialogue information through the virtual character. In another aspect of the application, an electronic device is provided that includes at least one processor and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of providing reply information as provided above. In another aspect of the application, a computer-readable storage medium having stored thereon computer program instructions executable by a processor to implement a method of providing reply information as provided above is provided.