Content interaction method and device, readable medium, electronic equipment and program product

By combining the first machine learning model to generate anthropomorphic replies and the second machine learning model for knowledge recall, the problem of delay and stiffness of Q&A robot response based on the large language model is solved, and a more efficient and flexible content interaction experience is achieved.

CN119476494APending Publication Date: 2025-02-18BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411668559.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When processing content and generating replies, a question-and-answer robot based on a large language model needs to analyze and process a large amount of data, resulting in users waiting for a long time to reply, and the output replies are rigid and rigid, lacking flexibility.

Method used

The first machine learning model associated with intelligent objects generates anthropomorphic reply content based on the target content and virtual human prompt words, and the second machine learning model recalls knowledge content and generates professional reply. The two jointly process it to improve content processing efficiency and reply flexibility.

Benefits of technology

It reduces the delay in users receiving replies, avoids the rigidity and rigidity of replies, and improves the flexibility and user interaction experience of replies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476494A_ABST
    Figure CN119476494A_ABST
Patent Text Reader

Abstract

A content interaction method and apparatus, a readable medium, an electronic device and a program product, the content interaction method comprising: obtaining target content input by a target user in an intelligent object page, the intelligent object page being used for interaction between the user and an intelligent object; first reply content is generated at least based on the target content and a virtual human cue word through a first machine learning model associated with the intelligent object, and the virtual human cue word is used for enabling the first machine learning model to generate anthropomorphic reply content; and performing knowledge content recall based on the target content through a second machine learning model associated with the intelligent object to obtain target knowledge content, and generating second reply content based on the target knowledge content, the second reply content being used for answering a question corresponding to the target content. The time delay of receiving reply content by a user can be reduced, the flexibility of the reply content is improved, and the interaction experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a content interaction method, device, readable medium, electronic device, and program product. Background Art

[0002] With the development and popularization of machine learning model technologies such as Large Language Model (LLM), more and more products use question-answering robots based on machine learning models to interact with users.

[0003] Take the question-answering robot based on the large language model as an example. When processing content and generating replies, the large language model needs to analyze and process a large amount of data and run complex algorithms at the same time, which means that after users enter a question, they need to wait for a certain period of time before receiving a reply. In addition, the replies output by the large language model are rigid and lack flexibility. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a content interaction method, the content interaction method comprising: Acquire target content input by a target user in a smart object page, wherein the smart object page is used for the user to interact with the smart object; Generate first reply content based on at least the target content and the virtual human prompt words through the first machine learning model associated with the smart object, wherein the virtual human prompt words are used to enable the first machine learning model to generate anthropomorphic reply content; The second machine learning model associated with the smart object is used to recall knowledge content based on the target content to obtain target knowledge content, and based on the target knowledge content, a second reply content is generated, wherein the second reply content is used to answer the question corresponding to the target content.

[0006] In a second aspect, the present disclosure provides a content interaction device, the content interaction device comprising: An acquisition module, used to acquire target content input by a target user in a smart object page, wherein the smart object page is used for the user to interact with the smart object; A first generating module, configured to generate first reply content based on at least the target content and a virtual human prompt word through a first machine learning model associated with the smart object, wherein the virtual human prompt word is used to enable the first machine learning model to generate anthropomorphic reply content; The second generation module is used to recall knowledge content based on the target content through the second machine learning model associated with the smart object, obtain the target knowledge content, and generate second reply content based on the target knowledge content, wherein the second reply content is used to answer the question corresponding to the target content.

[0007] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the program is executed by a processing device.

[0008] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.

[0009] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0010] Through the above technical solution, on the one hand, the first machine learning model associated with the smart object generates an anthropomorphic first reply content based on at least the target content and the virtual human prompt words, and on the other hand, the second machine learning model associated with the smart object recalls the knowledge content based on the target content to obtain the target knowledge content, and generates a second reply content for answering the target content based on the target knowledge content. By jointly processing the user's input content through the first machine learning model and the second machine learning model, the content processing efficiency can be improved and the delay in the user receiving the reply content can be reduced. In addition, the reply content is anthropomorphized by the first machine learning model to avoid the rigidity of the reply content, improve the flexibility of the reply content, and thus improve the user's interactive experience.

[0011] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1is a schematic diagram of a processing flow of a robot based on a machine learning model according to an exemplary embodiment of the present disclosure; Figure 2 is a schematic diagram of a robot question and answer according to an exemplary embodiment of the present disclosure; Figure 3 is a flowchart of a content interaction method according to an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of a processing process of a first machine learning model and a second machine learning model according to an exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram of a smart object page according to an exemplary embodiment of the present disclosure; Figure 6 is a schematic diagram of a processing process of a first machine learning model and a second machine learning model according to an exemplary embodiment of the present disclosure; Figure 7 is a schematic diagram showing a reply content in a preset message format according to an exemplary embodiment of the present disclosure; Figure 8 is a schematic diagram of a content caching process according to an exemplary embodiment of the present disclosure; Fig. 9 is a structural block diagram of a content interaction device according to an exemplary embodiment of the present disclosure; Fig.10 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0013] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0014] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0015] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0016] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0017] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0018] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0023] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0024] In the related technology, the processing flow of chat or question-answering robots based on machine learning models such as large language models is as follows: Figure 1 As shown, with user authorization, the user input content is obtained, the input content is recognized through the machine learning model, and the next step is decided, such as chatting, Q&A, tool calling, etc., and the supplementary information required for the model to generate the reply content, such as knowledge base, tool description, etc., where tool calling refers to calling functions, data interfaces, etc. Taking the model processing step of Q&A as an example, context recall is required, such as recalling the knowledge needed by the machine learning model to answer questions and the user's historical input content, and then generating the reply content in combination with the context. Finally, the generated reply content can be rendered into a robot message and displayed on the chat interface.

[0025] Take the large language model as an example. When processing content and generating replies, the large language model needs to analyze and process a large amount of data and run complex algorithms at the same time, which means that after users enter content, they need to wait for a certain period of time before receiving a reply. Figure 2 As shown in the figure, it takes a certain amount of time for a large language model to generate a response or call a tool in a recall context, resulting in a delay. In addition, the responses output by a large language model usually rely on training data. Although the training data is large and diverse, the responses generated by the model are rigid and lack flexibility in some cases, especially in answering professional questions.

[0026] In view of this, the present disclosure provides a content interaction method, device, readable medium, electronic device and program product to solve the above technical problems.

[0027] The embodiments of the present disclosure are further explained below with reference to the accompanying drawings.

[0028] Figure 3 is a flowchart of a content interaction method according to an exemplary embodiment of the present disclosure, referring to Figure 3 , the method may include the following steps: S301: Acquire target content input by a target user in a smart object page, wherein the smart object page is used for the user to interact with the smart object.

[0029] Among them, the intelligent object can be a chat robot, a question-and-answer robot, etc., which can be determined according to the actual business scenario, and the present disclosure does not impose any restrictions on this.

[0030] S302: Generate first reply content based on at least the target content and the virtual human prompt words through the first machine learning model associated with the smart object, wherein the virtual human prompt words are used to enable the first machine learning model to generate humanized reply content.

[0031] For example, Figure 4 As shown, the first machine learning model can generate anthropomorphic reply content based on the user's input content and the virtual human prompt words. For example, a generalized reply to the user's input content, including greetings, introduction content, clarification content when the user cannot be replied, etc. The reply content is mainly generated based on the user's input content, does not rely on additional contextual content, and does not need to identify the intent of the user's input content. Therefore, it can be implemented using a machine learning model with a smaller parameter scale than the second machine learning model.

[0032] S303: Recall knowledge content based on the target content through the second machine learning model associated with the intelligent object to obtain the target knowledge content, and generate second reply content based on the target knowledge content, wherein the second reply content is used to answer the question corresponding to the target content.

[0033] For example, Figure 4 As shown, the second machine learning model can recall knowledge content based on the user's input content, and then generate reply content to answer the user's input content based on the recalled knowledge content. For example, to give a professional or clear reply to the user's input content, the second machine learning model needs to perform intent recognition, context recall, and generate reply content, and can give a professional reply to the user's input content, where context recall includes knowledge recall, calling tools, and the user's historical input content, etc., which is determined according to the actual scenario, and this disclosure does not limit this.

[0034] In addition, the second machine learning model may not be anthropomorphic, so the requirements for the model's prompt words are lower, and the output reply content can be in a format that the machine learning model is better at, rather than being required to be in natural language form, thereby being able to output reply content faster and reduce reply delays.

[0035] It is worth noting that the present disclosure Figure 4 The dual-model processing flow shown in Figure 1 The single model processing flow shown can generate the first reply content and the second reply content based on the first machine learning model and the second machine learning model respectively, thereby improving the efficiency of reply content generation and reducing reply delay. In addition, the first machine learning model and the second machine learning model can be processed in parallel to further reduce reply delay.

[0036] It should be noted that the first machine learning model and the second machine learning model can be a large language model, a neural network model, a deep learning model, etc., and the present disclosure does not limit this.

[0037] In addition, the target content and the reply content may be text content, picture content, audio content, video content, etc., which is not limited in the present disclosure.

[0038] In a possible manner, the content interaction method also includes: in response to the first machine learning model generating first reply content, returning the first reply content to the terminal device of the target user, wherein the smart object page is displayed on the terminal device; in response to the second machine learning model generating second reply content, merging the first reply content and the second reply content to remove the content in the second reply content that is identical to the first reply content, obtaining a third reply content, and returning the third reply content to the terminal device.

[0039] For example, since the first machine learning model does not need to perform content recall and intent recognition, the first machine learning model can quickly respond to the user's input content to generate reply content, and Figure 5 As shown, it is displayed on the smart object page, while the second machine learning model takes a certain amount of time to generate the reply content, which is also displayed on the smart object page. However, since the reply content output by the first machine learning model can be displayed quickly, that is, the user can quickly get a reply after perceiving the input content, thereby improving the user's interactive experience.

[0040] For example, the third reply content can be generated by combining the first reply content and the second reply content, and displayed on the smart object page, for example, removing the content in the second reply content that is the same as the first reply content to avoid content redundancy. Since the second machine learning module may not perform anthropomorphic processing, the second reply content may be a rigid templated content, so the second reply content can be optimized based on the first reply content, for example, performing anthropomorphic processing, so that the generated third reply content is more vivid and flexible. The specific requirements can be determined, and the present disclosure does not limit this.

[0041] By adopting the above method, the user's input content is processed jointly by the first machine learning model and the second machine learning model, which can improve the content processing efficiency and reduce the delay for the user to receive the reply content. In addition, the reply content is anthropomorphized by the first machine learning model to avoid the rigidity of the reply content, improve the flexibility of the reply content, and thus improve the user's interactive experience.

[0042] It is worth noting that if Figure 6As shown, the virtual person attribute information can be pre-defined, such as defining the virtual person's personality attributes, so as to generate anthropomorphic reply content that fits the virtual person's attribute information, making the reply content more vivid and flexible.

[0043] In a possible manner, a first reply content is generated through a first machine learning model at least based on the target content and a virtual human prompt word, including: generating a first reply content through a first machine learning model based on the target content, a virtual human prompt word and user information, wherein the user information includes at least one of the following information: a content recognition result obtained by performing text content recognition on the target content under authorization; user attribute information of the target user obtained under authorization; historical interaction information of the target user on the smart object page obtained under authorization.

[0044] For example, under authorization, such as Figure 6 As shown, the text content recognition of the user's input content is performed to obtain the content recognition result, the user's user attribute information is obtained, the user's historical interaction information on the smart object page is obtained, etc., which can be determined according to the needs, and the present disclosure does not limit this. Among them, the content recognition result represents the positive or negative meaning expressed by the input content, and the user attribute information can be regional information, so that a targeted reply can be generated according to the regional information, for example, including the reply content in the corresponding regional dialect, and the present disclosure does not limit this.

[0045] Then, the content recognition results, user attribute information, at least one of the historical interaction information, the user input content and the virtual human prompt words are combined to generate reply content for different text meanings, different user attributes or different user interaction habits, making the reply content more vivid and flexible.

[0046] In a possible manner, the virtual human prompt words include expression animation prompt words, and a first reply content is generated based on at least the target content and the virtual human prompt words through a first machine learning model associated with the smart object, including: generating a first reply content including expression animation based on at least the target content and the virtual human prompt words through a first machine learning model associated with the smart object.

[0047] For example, under authorization, such as Figure 6 As shown, the text content recognition is performed on the user's input content to obtain the content recognition result, and then the expression animation prompt word is constructed based on the positive meaning or negative meaning corresponding to the content recognition result, the expression animation and the expression animation prompt word preset template, and then the reply content including the expression animation is generated based on the user input content and the expression animation prompt word, such as Figure 5The expression animation displayed in the message replied by the smart object shown. The expression animation prompt word can be used to instruct the first machine learning model to select different expression animations for different content recognition results. The expression animation can be pre-stored in the expression animation library and then obtained on demand. In this way, the reply content including different expression animations can be generated based on the content meaning expressed by the input content, making the reply content more vivid and flexible.

[0048] In related technologies, when machine learning models deal with new problems that they have not been trained on, there is a possibility that they will generate inaccurate responses. This situation is called "model hallucination."

[0049] In a possible manner, the first machine learning model associated with the smart object generates the first reply content based at least on the target content and the virtual human prompt words, including: the first machine learning model associated with the smart object performs knowledge ability recall based on the target content to obtain the target knowledge ability, and generates the first reply content based at least on the target knowledge ability, the target content and the virtual human prompt words, wherein the target knowledge ability is used to characterize the answer ability of the second machine learning model to the target content. The content interaction method also includes: when the target knowledge ability characterizes that the second machine learning model cannot answer the target content, controlling the second machine learning model to stop generating reply content.

[0050] For example, Figure 6 As shown, knowledge capabilities can be determined based on the knowledge base. The knowledge base can include knowledge content in different fields, corpus content, callable tools, etc. The first machine learning model does not need to pay attention to specific knowledge content, but only needs to understand the knowledge capabilities of the knowledge base. For example, the knowledge base includes knowledge about "xx". There is no need to recall specific knowledge content about "xx". It is enough to understand that the knowledge base includes knowledge about "xx". Among them, the corpus content can include conversation content of manual services, preset corpus content for small talk, etc., to help the first machine learning model generate more vivid and flexible reply content.

[0051] In other words, the knowledge capability is equivalent to telling the first machine learning model which questions the second machine learning model has the ability to answer, so that it can generate reply content that represents whether it can answer the user's question or not. Furthermore, when it is determined that it does not have the knowledge capability to answer the input content, that is, when the second machine learning model cannot answer the user's question, the second machine learning model can be controlled to stop generating reply content, thereby preventing the second machine learning model from generating inaccurate reply content and solving the model hallucination problem.

[0052] In a possible manner, generating the first reply content based on at least the target content and the virtual human prompt words through the first machine learning model associated with the smart object includes: performing semantic recognition on the target content through the first machine learning model associated with the smart object to obtain a semantic recognition result, and generating the first reply content based on at least the semantic recognition result and the virtual human prompt words. The content interaction method also includes: when the semantic recognition result indicates that the target content has unclear semantics, controlling the second machine learning model to stop generating the reply content.

[0053] For example, the first machine learning model can be used to perform semantic recognition on the user's input content, and then generate reply content based on the semantic recognition result and the virtual human prompt words, such as reply content that indicates that the user's input content has unclear semantics, so that the user can be prompted to re-enter new content. Furthermore, when the semantic recognition result indicates that the target content has unclear semantics, the second machine learning model can be controlled to stop generating reply content, so as to avoid the second machine learning model from generating inaccurate reply content and solve the model hallucination problem.

[0054] It is worth noting that, on the one hand, the first machine learning model quickly responded, and the reply content was personified, and the user's unclear semantics could be explained, reducing reply delays and making the replies vivid and flexible. On the other hand, the second machine learning model recalls knowledge based on the input content and generates professional replies, and because of the personified reply content generated by the first machine learning model, the professional replies can be avoided from being rigid and stiff. Combining the first reply content with the second reply content, it can reflect the process of the intelligent object first answering the call, then thinking, and then giving a detailed and professional reply, which is more vivid and flexible.

[0055] In addition, content filtering can also be performed on user input content and model output reply content, including filtering the content of abnormal requests, etc., which can be specifically set according to needs and is not limited in this disclosure.

[0056] After the reply content is generated, it needs to be output and displayed on the user's terminal device, for example, in a streaming output manner, which can be selected according to the needs, and the present disclosure does not limit this.

[0057] It should be noted that streaming output is a data processing method that means that data is processed and transmitted immediately when it is generated or received, rather than waiting for all data to be acquired before transmitting it all at once. This method allows data to be transmitted and processed step by step in real time, which can reduce waiting time and improve processing efficiency. In addition, content that can be streamed is called streaming output content, and content that cannot be streamed, such as cards, charts, pictures, etc., is called non-streaming output content.

[0058] In related technologies, such as Figure 2 As shown, the robot based on the machine learning model adopts the streaming output method. When the reply content includes streaming output content and non-streaming output content, the reply content is displayed abnormally due to compatibility issues. In addition, the machine learning model itself or the tool that the machine learning model needs to call may not support streaming output, or the streaming interface protocols supported by different machine learning models are different, which may cause the reply content to be generated or displayed abnormally.

[0059] In a possible manner, the first reply content and the second reply content include streaming output content and / or non-streaming output content, and returning the first reply content to the user terminal includes: returning the first reply content to the terminal device in a preset message format. Returning the third reply content to the terminal device includes: returning the third reply content to the terminal device in a preset message format; wherein the non-streaming output content in the preset message format is in a JSON format with a preset delimiter added, and the streaming output content in the preset message format is in a text format.

[0060] It should be understood that in streaming output, delimiters are used to distinguish different parts or fields in the data stream and help maintain the consistency of the data format so that the data can be parsed and processed correctly. Therefore, characters that serve as delimiters can be predefined, such as Figure 7 "@@" is used as a separator, which can be set according to the needs, and the present disclosure does not limit this. In addition, the JSON format can define the type (type), number (id), etc. of the content, and the present disclosure does not limit this.

[0061] For example, Figure 7 In the reply content of the preset message format shown, the streaming output content is returned in text format. The streaming output content has its own delimiters, and the terminal device can directly parse and render it. For non-streaming output content, it is returned in JSON format and separated by delimiters before and after. In this way, when the terminal device parses the reply content, it parses and renders the non-streaming output content in segments based on the delimiters, such as cards, charts, pictures, etc. This is equivalent to adding delimiters to non-streaming output content to imitate streaming output content.

[0062] Therefore, when the interfaces of tools, knowledge, models, etc. that the intelligent objects of the terminal device rely on are text streaming interfaces, they can be directly compatible with the text streaming interfaces without modifying the interfaces. In addition, since the non-streaming output content can be written into the message by adding separators before and after the non-streaming output content, the streaming output content and the non-streaming output content can coexist in one message, and there is no requirement for the order. Moreover, both the streaming output content and the non-streaming output content can be filled into the message by appending. Thus, it can be like Figure 5As shown, various formats of streaming output content and non-streaming output content can be displayed compatibly in the same message.

[0063] In a possible manner, the content interaction method further includes: converting the first reply content and the second reply content into a preset message format and storing them in a cache. Returning the first reply content to the terminal device according to the preset message format includes: reading the first reply content in the preset message format from the cache, and returning the first reply content in the preset message format to the terminal device. Returning the third reply content to the terminal device according to the preset message format includes: reading the third reply content in the preset message format from the cache, and returning the third reply content in the preset message format to the terminal device.

[0064] For example, in order to display streaming output content and non-streaming output content in the same message, the reply content can be cached first. Figure 8 As shown, the reply content is obtained from the tool interface or the model interface through the application program interface, and then the data is processed and stored in the cache, and then the identifier of the reply content in the cache, such as the content number (ID), is returned. The data processing includes adding separators to non-streaming output content, which can be determined according to needs and is not limited by the present disclosure.

[0065] Furthermore, the content ID can be sent to the conversation service through the tool. The conversation service obtains the corresponding reply content from the cache based on the content ID, and constructs it into a message and sends it to the smart object front end to display the message on the front end page.

[0066] By storing the reply contents obtained by different protocol interfaces into the cache, including streaming output contents and non-streaming output contents, the reply contents can be subsequently obtained from the cache based on a unified interface, thus providing the prerequisite for compatible display of streaming output contents and non-streaming output contents.

[0067] Based on the same concept, the present disclosure provides a content interaction device, such as Fig. 9 As shown, the content interaction device 900 includes: An acquisition module 901 is used to acquire target content input by a target user in a smart object page, wherein the smart object page is used for the user to interact with the smart object; A first generating module 902 is configured to generate first reply content based on at least the target content and the virtual human prompt words through a first machine learning model associated with the smart object, wherein the virtual human prompt words are used to enable the first machine learning model to generate anthropomorphic reply content; The second generation module 903 is used to recall knowledge content based on the target content through the second machine learning model associated with the smart object, obtain the target knowledge content, and generate second reply content based on the target knowledge content, wherein the second reply content is used to answer the question corresponding to the target content.

[0068] Optionally, the virtual human prompt words include expression animation prompt words, and the first generating module 902 is used to: The first machine learning model associated with the smart object generates a first reply content including an expression animation based at least on the target content and the virtual human prompt words.

[0069] Optionally, the first generating module 902 is used to: Generate first reply content based on the target content, the virtual human prompt word and the user information through the first machine learning model, wherein the user information includes at least one of the following information: A content recognition result obtained by performing text content recognition on the target content under authorization; User attribute information of the target user obtained under authorization; The historical interaction information of the target user on the smart object page is obtained under authorization.

[0070] Optionally, the first generating module 902 is used to: Performing semantic recognition on the target content through the first machine learning model associated with the smart object to obtain a semantic recognition result, and generating a first reply content based at least on the semantic recognition result and the virtual human prompt word; The content interaction method further includes: When the semantic recognition result indicates that the target content has unclear semantics, the second machine learning model is controlled to stop generating reply content.

[0071] Optionally, the first generating module 902 is used to: Recalling knowledge capabilities based on the target content through the first machine learning model associated with the smart object to obtain target knowledge capabilities, and generating first reply content based at least on the target knowledge capabilities, the target content and the virtual human prompt words, wherein the target knowledge capabilities are used to characterize the answering ability of the second machine learning model to the target content; The content interaction device 900 further includes: The first control module is used to control the second machine learning model to stop generating reply content when the target knowledge capability represents that the second machine learning model cannot answer the target content.

[0072] Optionally, the content interaction device 900 further includes: a returning module, configured to return the first reply content to a terminal device of the target user in response to the first machine learning model generating the first reply content, wherein the smart object page is displayed on the terminal device; A processing module is used to merge the first reply content and the second reply content in response to the second machine learning model generating the second reply content, so as to remove the content in the second reply content that is identical to the first reply content, obtain third reply content, and return the third reply content to the terminal device.

[0073] Optionally, the first reply content and the second reply content include streaming output content and / or non-streaming output content, and the returning module is used to: Returning the first reply content to the terminal device according to a preset message format; The processing module is used for: Returning the third reply content to the terminal device according to a preset message format; The non-streaming output content in the preset message format is in a JSON format with a preset separator added, and the streaming output content in the preset message format is in a text format.

[0074] Optionally, the content interaction device 900 further includes: A cache module, used for converting the first reply content and the second reply content into the preset message format and storing them in a cache; The return module is used to: Reading the first reply content in the preset message format from the cache, and returning the first reply content in the preset message format to the terminal device; The processing module is used for: The third reply content in the preset message format is read from the cache, and the third reply content in the preset message format is returned to the terminal device.

[0075] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the above-mentioned content interaction method are implemented.

[0076] Based on the same concept, the present disclosure also provides an electronic device, which may include: a storage device having a computer program stored thereon; The processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned content interaction method.

[0077] Based on the same concept, an embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the steps of the above-mentioned content interaction method when executed by a processor.

[0078] Reference below Fig.10 , which shows a schematic diagram of the structure of an electronic device 100 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0079] like Fig.10 As shown, the electronic device 100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 102 or a program loaded from a storage device 108 to a random access memory (RAM) 103. In the RAM 103, various programs and data required for the operation of the electronic device 100 are also stored. The processing device 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.

[0080] Typically, the following devices may be connected to the I / O interface 105: an input device 106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 109. The communication device 109 may allow the electronic device 100 to communicate with other devices wirelessly or by wire to exchange data. Fig.10 The electronic device 100 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0081] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 109, or installed from the storage device 108, or installed from the ROM 102. When the computer program is executed by the processing device 101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0082] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0083] In some embodiments, any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used for communication, and can be interconnected with 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0084] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0085] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the target content input by the target user in the smart object page, wherein the smart object page is used for the user to interact with the smart object; generates a first reply content based on at least the target content and the virtual human prompt words through the first machine learning model associated with the smart object, wherein the virtual human prompt words are used to enable the first machine learning model to generate personified reply content; recalls knowledge content based on the target content through the second machine learning model associated with the smart object to obtain the target knowledge content, and generates a second reply content based on the target knowledge content, wherein the second reply content is used to answer the question corresponding to the target content.

[0086] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0087] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0088] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0089] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0090] 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 device, 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.

[0091] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0092] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0093] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A content interaction method, characterized in that: The content interaction method comprises: Acquire target content input by a target user in a smart object page, wherein the smart object page is used for the user to interact with the smart object; Generate first reply content based on at least the target content and the virtual human prompt words through the first machine learning model associated with the smart object, wherein the virtual human prompt words are used to enable the first machine learning model to generate anthropomorphic reply content; The second machine learning model associated with the smart object is used to recall knowledge content based on the target content to obtain target knowledge content, and based on the target knowledge content, a second reply content is generated, wherein the second reply content is used to answer the question corresponding to the target content.

2. The content interaction method according to claim 1, characterized in that: The virtual human prompt words include expression animation prompt words, and the first machine learning model associated with the smart object generates first reply content based on at least the target content and the virtual human prompt words, including: The first machine learning model associated with the smart object generates a first reply content including an expression animation based at least on the target content and the virtual human prompt words.

3. The content interaction method according to claim 1, characterized in that: The step of generating the first reply content based at least on the target content and the virtual human prompt word by using the first machine learning model includes: Generate first reply content based on the target content, the virtual human prompt word and the user information through the first machine learning model, wherein the user information includes at least one of the following information: A content recognition result obtained by performing text content recognition on the target content under authorization; User attribute information of the target user obtained under authorization; The historical interaction information of the target user on the smart object page is obtained under authorization.

4. The content interaction method according to claim 1, characterized in that: The first machine learning model associated with the smart object generates first reply content based at least on the target content and the virtual human prompt word, including: Performing semantic recognition on the target content through the first machine learning model associated with the smart object to obtain a semantic recognition result, and generating a first reply content based at least on the semantic recognition result and the virtual human prompt word; The content interaction method further includes: When the semantic recognition result indicates that the target content has unclear semantics, the second machine learning model is controlled to stop generating reply content.

5. The content interaction method according to claim 1, characterized in that: The first machine learning model associated with the smart object generates first reply content based at least on the target content and the virtual human prompt word, including: Recalling knowledge capabilities based on the target content through the first machine learning model associated with the smart object to obtain target knowledge capabilities, and generating first reply content based at least on the target knowledge capabilities, the target content and the virtual human prompt words, wherein the target knowledge capabilities are used to characterize the answering ability of the second machine learning model to the target content; The content interaction method further includes: When the target knowledge capability represents that the second machine learning model cannot answer the target content, the second machine learning model is controlled to stop generating reply content.

6. The content interaction method according to any one of claims 1 to 5, characterized in that: The content interaction method further includes: In response to the first machine learning model generating the first reply content, returning the first reply content to a terminal device of the target user, wherein the smart object page is displayed on the terminal device; In response to the second machine learning model generating the second reply content, the first reply content and the second reply content are merged to remove the content in the second reply content that is identical to the first reply content, to obtain third reply content, and the third reply content is returned to the terminal device.

7. The content interaction method according to claim 6, characterized in that: The first reply content and the second reply content include streaming output content and / or non-streaming output content, and returning the first reply content to the user terminal includes: Returning the first reply content to the terminal device according to a preset message format; The returning the third reply content to the terminal device includes: Returning the third reply content to the terminal device according to a preset message format; The non-streaming output content in the preset message format is in a JSON format with a preset separator added, and the streaming output content in the preset message format is in a text format.

8. The content interaction method according to claim 7, characterized in that: The content interaction method further includes: Converting the first reply content and the second reply content into the preset message format and storing them in the cache; The returning the first reply content to the terminal device according to a preset message format includes: Reading the first reply content in the preset message format from the cache, and returning the first reply content in the preset message format to the terminal device; The returning the third reply content to the terminal device according to a preset message format includes: The third reply content in the preset message format is read from the cache, and the third reply content in the preset message format is returned to the terminal device.

9. A content interaction device, characterized in that: The content interaction device comprises: An acquisition module, used to acquire target content input by a target user in a smart object page, wherein the smart object page is used for the user to interact with the smart object; A first generating module, configured to generate first reply content based on at least the target content and a virtual human prompt word through a first machine learning model associated with the smart object, wherein the virtual human prompt word is used to enable the first machine learning model to generate anthropomorphic reply content; The second generation module is used to recall knowledge content based on the target content through the second machine learning model associated with the smart object, obtain the target knowledge content, and generate second reply content based on the target knowledge content, wherein the second reply content is used to answer the question corresponding to the target content.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Interaction method and device, equipment and storage medium

    CN120560547A

  • Interaction method and device, equipment and storage medium

    CN120560548A

  • Page updating method and device

    CN120892641A