Response method and device, electronic equipment and storage medium
By receiving user input information in the large language model, determining the scene type and generating object description text, and combining the search text to generate response information, the problem of slow knowledge update and high hallucination rate in the question-and-answer task of the large language model is solved, and a more personalized and accurate response is achieved.
Patent Information
- Application Number
- CN202411868043.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-21
AI Technical Summary
The large language model faces the problems of slow knowledge update and high hallucination rate in question-and-answer tasks. The existing RAG technology has no perception of user personalized characteristics, resulting in redundant answers.
By receiving user input information, determining the scene type, and generating object description text based on the type determination object description feature, and generating response information in combination with the search text, improving the personalization and accuracy of the response.
It realizes generating more matching response information based on user characteristics, improves the personalization and accuracy of the response, and reduces the hallucination rate.
Smart Images

Figure CN119669424A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the field of large language models, generative models, and intelligent question-answering technology. More specifically, the present disclosure provides a response method, device, electronic device, storage medium, and computer program product. Background Art
[0002] In recent years, large model technology has demonstrated excellent generation, understanding, and reasoning capabilities, but it still faces problems such as slow knowledge update and high hallucination rate in question-answering tasks. To solve these problems, the search-augmented generation technology (RAG) provides relevant documents / fragments for large models, helping them to better acquire real-time knowledge and generate better answers with higher accuracy. Summary of the invention
[0003] The present disclosure provides a response method, device, electronic device, storage medium and computer program product.
[0004] According to a first aspect, a response method is provided, the method comprising: in response to receiving input information from a target object, determining a scene type according to the input information; in response to determining that the scene type belongs to a preset scene type, determining an object description feature of the target object corresponding to the scene type; generating an object description text according to the object description feature; and generating response information according to the object description text and a search text, wherein the search text is obtained after searching according to the input information.
[0005] According to a second aspect, an information interaction device is provided, which includes: a scene type determination module for determining the scene type according to the input information received from the target object; an object description feature determination module for determining the object description feature of the target object corresponding to the scene type in response to determining that the scene type belongs to a preset scene type; an object description text determination module for generating an object description text according to the object description feature; and a first response module for generating response information according to the object description text and a search text, wherein the search text is obtained after searching according to the input information.
[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 method provided according to the present disclosure.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and wherein the computer program implements the method provided according to the present disclosure when executed by a processor.
[0009] 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
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram of an exemplary system architecture to which a response method and apparatus can be applied according to an embodiment of the present disclosure;
[0012] Figure 2 is a flow chart of a response method according to an embodiment of the present disclosure;
[0013] Figure 3 is a system schematic diagram of a response method according to an embodiment of the present disclosure;
[0014] Figure 4 is a system schematic diagram of a response method according to an embodiment of the present disclosure;
[0015] Figure 5 is a block diagram of a response device according to an embodiment of the present disclosure; and
[0016] Figure 6 The present invention is a block diagram of an electronic device of a response method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] 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.
[0018] Currently, intelligent question answering is generally implemented with RAG technology, which allows large models to obtain more up-to-date and relevant knowledge by searching for relevant documents, thereby generating more appropriate answers. At present, RAG technology is often universal and has no perception of user personalized features. It is the same for everyone and the answers are redundant. Large models include large language models (LLM).
[0019] A method for improving the personalized effect of answers based on the user's historical conversations. The user's historical conversations are used as part of the LLM prompt, so that LLM can refer to the user's information to generate answers, thereby having partial personalized capabilities. For example, if user A once told LLM that he likes a certain singer, the singer can be used as the interest tag of user A. When user A asks LLM to recommend songs later, the singer's songs can be recommended.
[0020] However, the tags mined from the user's historical conversations cannot accurately represent the user's characteristics, because mining tags from conversations requires explicit expression by the user, which increases the user's operation cost. Secondly, the information in the conversation data is very large and complex, which will lead to inaccurate tag mining. Finally, if the user no longer updates the tags, there will be serious outdated problems.
[0021] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0022] Figure 1 is a schematic diagram of an exemplary system architecture to which a response method and device can be applied according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0023] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0024] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices, including but not limited to smart phones, tablet computers, laptops, etc.
[0025] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results to the terminal device.
[0026] The answering method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the information interaction device provided in the embodiment of the present disclosure can generally be set in the server 105. The answering method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the information interaction device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0027] Figure 2 is a flowchart of a response method according to an embodiment of the present disclosure.
[0028] like Figure 2 As shown, the response method 200 includes operations S210 to S240.
[0029] In operation S210 , in response to receiving input information from a target object, a scene type is determined according to the input information.
[0030] The target object may be a user, and the input information may be a question input by the user. Based on the semantics of the input information, it is possible to determine which scenario type the input information belongs to.
[0031] The embodiments of the present disclosure can be applied to enterprise office scenarios. The scenario types under the enterprise office scenarios may include personnel scenarios, financial scenarios, system scenarios, office scenarios, etc. Personnel scenarios may include specific scenarios such as leave and systems. Financial scenarios may include specific scenarios such as reimbursement and invoicing. System scenarios may include specific scenarios such as networks, assets, and departments. Office scenarios may include specific scenarios such as meetings, to-do lists, and document searches.
[0032] The input information may be subjected to text classification to obtain a scene type corresponding to the input information.
[0033] You can also use the large model LLM to determine the scenario type. For example, you can write a prompt word Prompt, which requires you to determine which scenario type the question belongs to based on the semantics of the question. If you determine that the scenario belongs to personnel, finance, system, office, etc., you can also request LLM to obtain specific scenarios under the scenario, such as asking for leave, finding documents, etc.
[0034] In operation S220, in response to determining that the scene type belongs to a preset scene type, an object description feature of a target object corresponding to the scene type is determined.
[0035] The preset scenarios may include the above-mentioned scenarios such as personnel, finance, system, office, etc. and specific scenarios under each scenario. If the current question is judged to belong to a target scenario in the preset scenarios according to the semantics of the input information, the object description feature corresponding to the target scenario may be determined.
[0036] The target object may have multiple object description features, and there may be at least one object description feature corresponding to the scene type. The multiple object description features may include: basic description features, historical operation description features, role description features, and social relationship description features.
[0037] The object description feature of the target object can also be called a user portrait. Multiple object description features of the target object can be user portraits of multiple dimensions of the target user. For example, the basic description feature of the target object is a basic portrait, the historical operation description feature of the target object is a work portrait, the role description feature of the target user is a role portrait, and the social relationship description feature of the target user is a social relationship portrait.
[0038] User portraits of the target users in the above multiple dimensions can be pre-built. The basic portrait can include the basic information of the user in the company, such as department, system, years of employment, etc. The role portrait can include the user's role, work direction, etc. The work portrait can include the projects, platforms, products, etc. that the user has experienced. The social relationship portrait can include the user's social relationships, superior-subordinate relationships, etc. in the company.
[0039] A correspondence may be pre-established between each of the above scenario types and user portraits of multiple dimensions. For example, the department scenario has a correspondence with the basic portrait, and the document search scenario has a correspondence with the work portrait, role portrait, and social relationship portrait. These correspondences may be stored in a scenario-portrait correspondence table.
[0040] For example, if the user's question is "How do I get to department X and which floor is it on?", the scenario type can be determined to be a department scenario, and the basic portrait can be obtained based on the scenario-portrait correspondence table.
[0041] For example, if the user's question is "Find documents in project Y", the scenario type can be determined as a document search scenario, and the work portrait, role portrait, and social relationship portrait can be obtained according to the scenario-portrait correspondence table.
[0042] In the technical solution disclosed in the present invention, users are aware of and agree to the acquisition and use of user-related feature information or portrait information, which complies with the provisions of relevant laws and regulations and does not violate public order and good morals.
[0043] In operation S230, an object description text is generated according to the object description features.
[0044] The object description feature may be in a structured data format (such as a Josn format). To facilitate subsequent processing, in one example, the object description feature may be directly described in a natural language to obtain an object description text.
[0045] In another example, since the object description features corresponding to the scene type may contain many features, in order to more accurately answer the user's question, the object description features related to the user's question can be determined from the object description features corresponding to the scene type. The object description features related to the user's question can be called target portrait information. The target portrait information can be converted into an object description text described in natural language.
[0046] For example, the basic description features (or basic portraits) include department information, system information, years of service information, etc. The input information is "how to get to department X, which floor is it on?" By searching the basic portraits, the user's department information can be obtained. The user's department information is the target portrait information. The user's department information can be converted into text to obtain the description text of the user's department. The description text of the user's department is the object description text required in this answering task.
[0047] In operation S240, response information is generated according to the object description text and the search text, wherein the search text is obtained after searching according to the input information.
[0048] The knowledge base can be searched based on the input information to obtain the search text. The search text can be a document or information fragment related to the input information. For example, if the input information is "how to get to department X and which floor it is on", the information of department X in multiple geographical locations of the company can be retrieved, such as the information of department X in location A, the information of department X in location B, and so on.
[0049] The object description text can be a text converted from the object description features corresponding to the scene type, and contains the target portrait information of the target object in a specific scene. For example, the input information is "how to get to department X and which floor it is on", and the scene type is determined to be a department scene. In the department scene, searching for the basic portrait can obtain the user's department information, which is the target portrait information. The structured department information is converted into text to obtain the object description text.
[0050] The response information can be an answer to the input information. The input information, search text and object description text can be input into LLM to obtain the response information.
[0051] For example, the input information "How to get to Department X, and which floor is it on", the object description text (the description text of the user's department), and the search text (the information of Department X in multiple geographical locations of the company) can be input into the LLM. Since the description text of the user's department describes the geographical location of the user's department, it can be determined from the search text that the information of Department X in the user's location is the information that the user actually wants to find. In this way, the response information that better meets the user's needs can be obtained.
[0052] The embodiment of the present disclosure determines the scene type according to the input information, and when the scene type belongs to the preset scene type, determines the object description feature corresponding to the scene type, generates the object description text according to the object description feature, and generates the response information according to the object description text and the search text. Since the search text is a knowledge document or information fragment related to the input information, the object description text characterizes the user characteristics in a specific scene, therefore, based on the object description text and the search text, the response information for replying to the input information in the specific scene is generated, which can generate the response information that better matches the target object requirements corresponding to the input information, and improve the matching degree of the response information.
[0053] Figure 3 It is a system diagram of a response method according to an embodiment of the present disclosure.
[0054] like Figure 3 As shown, the system of this embodiment may include a portrait retrieval module 310 , a document retrieval module 320 , a personalized detection module 330 and a generation module 340 .
[0055] The user has a user ID 301 . On the one hand, after the user inputs a user question 302 , the portrait retrieval module 310 can perform a portrait retrieval based on the user ID 301 and the user question 302 .
[0056] For example, the scenario type can be determined based on user question 302. The scenario type can be any one of the personnel scenario, financial scenario, system scenario, and office scenario. When it is determined that the scenario type belongs to any of the above scenarios, the specific scenario can be further determined. For example, the specific scenario can be a leave scenario in a personnel scenario, a department scenario in a system scenario, a document search scenario in an office scenario, etc.
[0057] Multiple user portraits of the user can be determined according to the user identifier 301. According to the specific scenario type to which the user question 302 belongs, a user portrait 311 corresponding to the specific scenario type can be determined from the portrait database, for example, the department scenario corresponds to the basic portrait, and the document search scenario corresponds to the work portrait, role portrait, and social relationship portrait.
[0058] The portrait database can be constructed in an offline scenario based on the enterprise domain user data 303. The enterprise domain user data 303 may include basic information of each user in the enterprise, documents written by the user, weekly reports, codes and other documents, as well as user communication information, superior-subordinate relationship information, etc. Based on the enterprise domain user data 303, a multi-dimensional user portrait of each user can be constructed, and the multi-dimensional user portrait can include a basic portrait, a role portrait, a work portrait and a social relationship portrait. The multi-dimensional user portraits of each user in the enterprise are stored in the database, and a portrait database can be obtained.
[0059] According to an embodiment of the present disclosure, the construction of a user portrait includes determining basic description features based on the basic information of the target object; determining historical operation description features and role description features from the historical operation data of the target object; and determining social relationship description features based on the historical social information of the target object.
[0060] The target object can be a target user, and the basic information can include the user's basic information in the company, such as department, system, and years of service. The basic information can be directly obtained from the company's database, and basic descriptive features can be generated based on the basic information as a basic portrait.
[0061] Historical behavior data may include documents written by users, weekly reports, codes, and other documents. LLM can be used to mine role description features from historical behavior data as role portraits. For example, a prompt word Prompt of LLM can be constructed so that LLM outputs the role description features of the user based on the user's historical behavior data. Role description features may include the user's role information and work direction information.
[0062] LLM can also be used to mine the user's historical behavior description features from historical behavior data as a work profile. For example, you can construct an LLM prompt word Prompt so that LLM outputs the user's historical behavior description features based on the user's historical behavior data. The historical behavior description features may include project information, platform information, product information, etc.
[0063] In order to ensure the extraction effect of the above-mentioned role description features and historical behavior description features, several similar samples can be constructed for LLM reference, so that LLM can output more accurate role portraits and work portraits.
[0064] The historical social information may include the user's historical communication information, joint meeting information with other users, and superior-subordinate relationships, etc. The social relationship description features of the target user may be generated according to the historical social information of the target user as the social relationship portrait of the target user.
[0065] The superior-subordinate relationship can generally be obtained through the company database. Explicit social relationships such as users' historical communication information and joint meeting information can be mined, and a social network can be constructed based on the mined information. Each user in a social network can be regarded as a node, and the connection between users is an edge. For example, user A's historical social record includes interaction information with user B, and user A and user C have a superior-subordinate relationship, then two edges between user A and user B, and user A and user C can be established. Next, the semantic representation (implicit representation) of each user in the social network can be calculated, and then the semantic similarity between the target user and other users can be calculated, and the semantic representations of multiple other users with the highest similarity to the target user are selected as the social relationship description features of the target user, that is, the social relationship portrait.
[0066] After determining the user portrait 311 corresponding to the scenario type, the portrait retrieval module 310 may search for the user portrait 311 to obtain target portrait data.
[0067] According to an embodiment of the present disclosure, a target description feature is obtained from an object description feature according to input information; and an object description text is generated according to the target description feature.
[0068] For example, user portrait 311 may contain a large amount of user portrait data. However, solving user problem 302 does not require all the data in user portrait 311. Therefore, user portrait 311 can be retrieved based on user problem 302 to obtain target portrait information corresponding to user problem 302. The target portrait information can be stored in the format of structured data. To facilitate the subsequent LLM processing, the retrieved target portrait information can be described in natural language to obtain an object description text, i.e., portrait text 312.
[0069] On the other hand, after the user inputs the user question 302 , the document retrieval module 320 may perform a common search based on the user question 302 , for example, retrieving documents or knowledge fragments related to the user question 302 from the knowledge base to obtain a search text 321 .
[0070] Next, personalized response information may be generated based on the portrait text 312 retrieved by the portrait retrieval module 310 and the search text 321 retrieved by the document retrieval module 320 .
[0071] According to an embodiment of the present disclosure, a generation mode is determined based on input information, object description text and search text; and in response to the generation mode being a personalized generation mode, response information is generated based on the object description text and search text.
[0072] The personalized generation mode refers to generating response information that meets different user characteristics for different users. In the personalized generation mode, due to the combination of user description features (user portraits), it is possible to generate response information that meets the user characteristics for different users, achieving a personalized response effect.
[0073] In the personalized generation task, if the subjectivity and objectivity of the user question 302 are not distinguished and personalized answers are given to all questions, there will also be a bad effect. For example, if the user question 302 is "Which dynasty did historical figure A belong to?", using a personalized answer method for such an objective question will affect the accuracy of the answer information.
[0074] In view of this, the embodiment of the present disclosure introduces a personalized detection module 303 to determine whether to perform a personalized answer. If the judgment result is yes, the generation mode of the answer information is a personalized generation mode. If the judgment result is no, the generation mode of the answer information is a common generation mode.
[0075] In one example, text classification may be performed based on input information, object description text, and search text, and the classification result indicates whether to provide a personalized answer.
[0076] In another example, LLM can be used to determine personalized answers. For example, input information, object description text, and search text are input into LLM, and the prompt word indicates whether the LLM output is suitable for personalized answers. In order to improve the judgment accuracy of LLM, some samples can be constructed to fine-tune LLM so that LLM can accurately determine whether the current question is suitable for personalized answers.
[0077] According to an embodiment of the present disclosure, based on input information, the object description text is matched with the search text to obtain a matching result, which indicates whether the object description text enhances the personalization of the response information; and based on the matching result, a generation mode is determined. The generation mode includes a personalized generation mode and a common generation mode.
[0078] For subjective questions of users, the user's object description text can generally enhance the personalization of the answer information. However, for objective questions, the object description text cannot enhance the personalization of the answer information. Therefore, the generation mode can be determined by judging whether the object description text enhances the personalization of the answer information.
[0079] For example, if the response information generated based on the object description text and the search text is inconsistent with the response information generated based only on the search text, and the response information generated based on the object description text and the search text is more in line with the user characteristics, then it can be determined that the object description text has personalized the answer to the user question 302, that is, the object description text has enhanced the degree of personalization of the response information 341, and the generation mode can be determined to be a personalized generation mode.
[0080] If the response information generated based on the object description text and the search text is consistent with the response information generated based only on the search text, it can be determined that the object description text has not performed any personalized enhancement on the answer to the user question 302, that is, the object description text has not enhanced the degree of personalization of the response information 341, and the generation mode can be determined to be the normal generation mode.
[0081] LLM can be used to determine whether the object description text enhances the personalization of the response information. For example, a prompt can be written in which the user question 302 is fused with the search text 321 to obtain a fused text, and then the fused text is matched with the object description text, and LLM is instructed to determine based on the matching result whether the response information 341 generated in combination with the object description text is consistent with the response information 341 generated based only on the fused text, and the response information is more in line with the user's characteristics. If yes, a yes can be output, otherwise a no can be output.
[0082] In the personalized generation mode, the user question 302, the portrait text 312 and the search text 321 can be input into the generation module 340, and the generation module 340 can generate personalized response information 341. In the common generation mode, the user question 302 and the search text 321 can be input into the generation module 340, and the generation module 340 can generate common response information 341.
[0083] According to the embodiments of the present disclosure, a personalized retrieval module is used to determine whether a personalized answer is needed. If a personalized answer is needed, personalized response information is generated based on the retrieved portrait text and the search text. If a personalized answer is not needed, ordinary response information is generated based on the search text. This can improve the accuracy of the response information while improving the personalized generation effect.
[0084] Figure 4 is a system diagram of a response method according to another embodiment of the present disclosure.
[0085] like Figure 4 As shown, the system of this embodiment includes a scene identification module 410 , a document retrieval module 420 , a portrait retrieval module 430 , a personalized detection module 440 , a personalized generation module 450 and a general generation module 460 .
[0086] After the user inputs a question, the document retrieval module 420 can perform document retrieval according to the user question to obtain a retrieval text 421 .
[0087] In addition, after the user inputs a question, the scene identification module 410 can determine whether the user question belongs to a preset scene, and if it is determined to belong to a preset scene, it can determine which specific scene it belongs to.
[0088] According to an embodiment of the present disclosure, the preset scenarios include task scenarios and transaction scenarios; the response method of the embodiment of the present disclosure also includes: establishing at least one of the following: a correspondence between the task scenario and the historical operation description feature; a correspondence between the transaction scenario and the basic description feature, the correspondence being used to determine the object description feature of the target object corresponding to the scenario type.
[0089] Task scenarios can include office scenarios, which include finding documents and holding meetings. Transaction scenarios can include personnel scenarios, financial scenarios, and system scenarios. Personnel scenarios include leave and regulations, while financial scenarios include reimbursement and invoicing. System scenarios include departments and assets. The above task scenarios and transaction scenarios are all preset scenarios.
[0090] For each of the above preset scenarios, a correspondence between the scenario and multiple user portraits can be pre-established according to the needs of the user in the scenario.
[0091] For example, in a task scenario, user questions are often related to the user's work content, role information, and social relationships. Therefore, a corresponding relationship between the task scenario and at least one of the work profile, role profile, and social relationship profile can be established. For example, in a document search scenario, the user may ask "find documents in project Y", "find documents sent by Z", etc. Therefore, a relationship can be established between the document search scenario and the work profile, social relationship profile, and role profile.
[0092] For another example, in a transaction scenario, user questions are often related to the user's basic information, role information, and superior-subordinate information. Therefore, a correspondence between the transaction scenario and at least one of the basic portrait, role portrait, and social relationship portrait can be established. For example, in a department scenario, a user may ask "how to get to department X, and which floor is it on?" A correspondence between the department scenario and the basic portrait can be established.
[0093] The correspondence between the above-mentioned scene types and the user portraits can be established according to the actual needs of the user in each scene, and the embodiments of the present disclosure are not limited to this.
[0094] After the scene identification module 410 identifies the specific scene and determines the corresponding user portrait according to the specific scene, the portrait retrieval module 430 can search for the user portrait corresponding to the scene type to obtain target portrait data, and describe the target portrait data in natural language to obtain portrait text 431.
[0095] Next, the personalized detection module 450 can determine whether personalized generation is required based on the search text 421 and the portrait text 431. If personalized generation is required, the personalized generation module 450 generates personalized response information based on the user question, the search text 421 and the portrait text 431. If personalized generation is not required, the general generation module 460 generates general response information based on the user question and the search text 431.
[0096] It should be noted that the scene identification module 410 may determine that the user question does not belong to any of the above-mentioned preset scenes. In this case, the scene identification module 410 may output that the scene type is empty. When the scene is empty, no portrait search is performed, but the general generation module 460 is directly executed, that is, general response information is generated according to the user question and the search text 421.
[0097] According to an embodiment of the present disclosure, in response to receiving a user question, a judgment is made on the scenario category. When the user question belongs to a preset scenario type, a user portrait is retrieved. When the user question does not belong to the preset scenario type, answer information can be directly generated based on the search text without retrieving the user portrait, thereby reducing the amount of calculation and improving the answer efficiency.
[0098] According to an embodiment of the present disclosure, the present disclosure also provides a response device.
[0099] Figure 5 is a block diagram of a response device according to an embodiment of the present disclosure.
[0100] like Figure 5 As shown, the response device 500 includes a scene type determination module 510 , an object description feature determination module 520 , an object description text determination module 530 and a first response module 540 .
[0101] The scene type determination module 510 is configured to determine the scene type according to the input information received from the target object.
[0102] The object description feature determination module 520 is used to determine the object description feature of the target object corresponding to the scene type in response to determining that the scene type belongs to the preset scene type.
[0103] The object description text determination module 530 is used to generate an object description text according to the object description features.
[0104] The first response module 540 is used to generate response information according to the object description text and the search text, wherein the search text is retrieved according to the input information.
[0105] The first response module 540 includes a generation mode determination unit and a first response information determination unit.
[0106] The generation mode determination unit is used to determine the generation mode according to the input information, the object description text and the search text.
[0107] The first response information determination unit is used to generate response information according to the object description text and the search text in response to determining that the generation mode is the personalized generation mode.
[0108] The generation mode determination unit includes a matching subunit and a generation mode determination subunit.
[0109] The matching subunit is used to match the object description text with the search text based on the input information to obtain a matching result. The matching result represents whether the object description text enhances the personalization of the response information.
[0110] The generation mode determination subunit is used to determine the generation mode according to the matching result, and the generation mode includes one of a personalized generation mode and a common generation mode.
[0111] The first response module 540 further includes a second response information determining unit.
[0112] The second response information determination unit is used to generate response information according to the search text in response to determining that the generation mode is the common generation mode.
[0113] The response device 500 further includes a second response module.
[0114] The second response module is used to generate response information according to the search text in response to determining that the scene type does not belong to the preset scene type.
[0115] The object description text determination module 530 includes a retrieval unit and an object description text generation unit.
[0116] The retrieval unit is used to obtain target description features from object description features according to input information.
[0117] The object description text generation unit is used to generate the object description text according to the target description features.
[0118] According to an embodiment of the present disclosure, the object description features include basic description features, historical operation description features, role description features, and social relationship description features. The response device 500 also includes a first feature determination module, a second feature determination module, and a third feature determination module.
[0119] The first feature determination module is used to determine basic description features according to basic information of the target object.
[0120] The second feature determination module is used to determine historical operation description features and role description features from the historical operation data of the target object.
[0121] The third feature determination module is used to determine the social relationship description features according to the historical social information of the target object.
[0122] The preset scenarios include task scenarios and transaction scenarios. The response device 500 also includes a corresponding relationship establishment module.
[0123] The correspondence establishment module is used to establish at least one of the following: the correspondence between the task scenario and the historical operation description features; the correspondence between the transaction scenario and the basic description features; wherein the correspondence is used to determine the object description features of the target object corresponding to the scenario type.
[0124] 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.
[0125] Figure 6 A schematic block diagram of an example electronic device 600 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.
[0126] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0127] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0128] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 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 601 performs the various methods and processes described above, such as the response method. For example, in some embodiments, the response method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the response method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the response method in any other appropriate manner (e.g., by means of firmware).
[0129] 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), complex 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.
[0130] 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 data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. 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.
[0131] 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.
[0132] 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).
[0133] 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.
[0134] A computer system may include clients and servers. Clients and servers 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 to each other.
[0135] 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.
[0136] 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 response method, comprising: In response to receiving input information from the target object, determining a scene type according to the input information; In response to determining that the scene type belongs to a preset scene type, determining an object description feature of the target object corresponding to the scene type; Generate an object description text according to the object description features; as well as Response information is generated according to the object description text and the search text, wherein the search text is obtained after searching according to the input information.
2. The method according to claim 1, wherein: The generating response information according to the object description text and the search text comprises: determining a generation mode according to the input information, the object description text and the search text; and In response to determining that the generation mode is the personalized generation mode, the response information is generated according to the object description text and the search text.
3. The method according to claim 2, wherein: Determining the generation mode according to the input information, the object description text and the search text includes: Based on the input information, matching the object description text with the search text to obtain a matching result, wherein the matching result indicates whether the object description text enhances the personalization degree of the response information; and The generation mode is determined according to the matching result, and the generation mode includes: a personalized generation mode and a common generation mode.
4. The method according to claim 3, wherein generating response information according to the object description text and the search text comprises: In response to determining that the generation mode is the normal generation mode, the response information is generated based on the search text.
5. The method according to claim 1, further comprising: In response to determining that the scene type does not belong to the preset scene type, the response information is generated according to the search text.
6. The method according to claim 1, wherein: Generating the object description text according to the object description feature comprises: According to the input information, obtaining a target description feature from the object description feature; and The object description text is generated according to the target description features.
7. The method according to claim 1, wherein: The object description features include basic description features, historical operation description features, role description features, and social relationship description features; The method further comprises: Determining the basic description features according to the basic information of the target object; Determining the historical operation description features and the role description features from the historical operation data of the target object; and The social relationship description feature is determined according to the historical social information of the target object.
8. The method according to claim 7, wherein: The preset scenarios include task scenarios and transaction scenarios; the method further includes: Establish at least one of the following: The correspondence between the task scenario and the historical operation description features; The correspondence between the transaction scenario and the basic description features; The corresponding relationship is used to determine the object description feature of the target object corresponding to the scene type.
9. A response device, comprising: a scene type determination module, configured to, in response to receiving input information from a target object, determine a scene type according to the input information; an object description feature determination module, configured to, in response to determining that the scene type belongs to a preset scene type, determine an object description feature of the target object corresponding to the scene type; An object description text determination module, used to generate an object description text according to the object description features; as well as The first response module is used to generate response information according to the object description text and the search text, wherein the search text is obtained after searching according to the input information.
10. The device according to claim 9, wherein: The first response module includes: a generation mode determination unit, configured to determine a generation mode according to the input information, the object description text and the search text; and The first response information determination unit is used to generate the response information according to the object description text and the search text in response to determining that the generation mode is the personalized generation mode.
11. The device according to claim 10, wherein: The generation mode determination unit comprises: a matching subunit, configured to match the object description text with the search text based on the input information to obtain a matching result, wherein the matching result indicates whether the object description text enhances the personalization degree of the response information; and The generation mode determination subunit is used to determine the generation mode according to the matching result, and the generation mode includes: one of a personalized generation mode and a common generation mode.
12. The device according to claim 11, wherein the first response module further comprises: The second response information determination unit is used to generate the response information according to the search text in response to determining that the generation mode is the common generation mode.
13. The apparatus according to claim 9, further comprising: The second response module is used to generate the response information according to the search text in response to determining that the scene type does not belong to the preset scene type.
14. The device according to claim 9, wherein the object description text determination module comprises: A retrieval unit, configured to obtain a target description feature from the object description feature according to the input information; as well as The object description text generating unit is used to generate the object description text according to the target description feature.
15. The device according to claim 9, wherein the object description features include basic description features, historical operation description features, role description features, and social relationship description features; The device also includes: A first feature determination module, used to determine the basic description feature according to the basic information of the target object; A second feature determination module is used to determine the historical operation description feature and the role description feature from the historical operation data of the target object; and The third feature determination module is used to determine the social relationship description feature according to the historical social information of the target object.
16. The device according to claim 15, wherein the preset scenarios include task scenarios and transaction scenarios; the device further comprises: The corresponding relationship establishing module is used to establish at least one of the following: The correspondence between the task scenario and the historical operation description features; The correspondence between the transaction scenario and the basic description features; The corresponding relationship is used to determine the object description feature of the target object corresponding to the scene type.
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 method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 8.
19. A computer program product, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Scene information-based searching method and device
CN104239465A
Intelligent response method and device, server and storage medium
CN112163078A
Information processing method and device, electronic equipment and storage medium
CN116484880A