Session template generation method and related product

By generating session templates based on sesimilar matching degree and user feedback filtering, the problem of traditional template quality dependence on manual sorting is solved, and the quality and interaction efficiency of templates are improved.

CN119150830APending Publication Date: 2024-12-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411087485.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The quality of the conversation templates stored in the traditional knowledge base depends on manual collation and cannot guarantee text quality, affecting the efficiency of business communication and business processing.

Method used

The target accents are determined based on the matching degree between the accents of the first session text and the second session text, and the session template is generated, and the template is filtered and adjusted according to the user feedback information to ensure the quality and effectiveness of the template.

Benefits of technology

It improves the matching degree and efficiency of conversation templates and user interaction, and ensures business communication and business processing efficiency when online customer service interacts with users through target conversation templates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150830A_ABST
    Figure CN119150830A_ABST
Patent Text Reader

Abstract

The invention relates to artificial intelligence, and provides a session template generation method and a related product. The method comprises the following steps: determining a target semantic element based on a semantic element of a first session text and a matching degree between the semantic element and a second session text; generating a first session template of the first session text according to the target semantic element; and determining a target session template based on the first session template and the feedback information of the user. According to the method, the text quality of the template can be ensured, the online customer service can interact with the user through the target session template, and the efficiency of service communication and service processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a conversation template generation method and related products. Background Art

[0002] In the field of intelligent question-answering, online customer service can obtain corresponding conversation templates from a pre-built knowledge base, and then use the obtained conversation templates to communicate with users. However, the conversation templates stored in traditional knowledge bases often rely on manual editing. The quality of the conversation templates obtained in this way depends on user experience, which makes the text quality unable to be guaranteed, which is not conducive to improving the efficiency of business communication and business processing. Summary of the invention

[0003] The present application provides a conversation template generation method and related products to solve the technical problem that the text quality of the template cannot be guaranteed.

[0004] A first aspect of an embodiment of the present application provides a method for generating a session template, the method comprising:

[0005] Based on the semantic elements of the first conversation text and the matching degree between the semantic elements and the second conversation text, a target semantic element is determined; based on the target semantic element, a first conversation template of the first conversation text is generated; based on the first conversation template and user feedback information, a target conversation template is determined.

[0006] A second aspect of an embodiment of the present application provides a session template generation device, the device comprising:

[0007] A determination unit is used to determine a target semantic element based on semantic elements of a first conversation text and a matching degree between the semantic element and a second conversation text; a generation unit is used to generate a first conversation template of the first conversation text according to the target semantic element; the determination unit is also used to determine a target conversation template based on the first conversation template and user feedback information.

[0008] A third aspect of an embodiment of the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the method provided in the first aspect when executing the computer program.

[0009] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the first aspect are implemented.

[0010] A fifth aspect of an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in the method provided in the first aspect are implemented.

[0011] In the conversation template generation method of the present embodiment, the target semantic element is screened out by the matching degree between the semantic element corresponding to the first conversation text and the second conversation text, which can ensure that the screened target semantic element matches the second conversation text, thereby improving the matching degree between the target conversation template and the second conversation text. The present application embodiment also screens the conversation template according to the feedback information, which can ensure the quality and utility of the screened target conversation template, which is conducive to the online customer service to interact with the user through the target conversation template, and improve the efficiency of business communication and business processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0013] Figure 1 This is a schematic diagram of an application scenario of the method for generating a session template provided in an embodiment of the present application;

[0014] Figure 2 is a flowchart of a method for generating a session template provided by an embodiment of the present application;

[0015] Figure 3 It is a schematic diagram of a conversation text within a preset time period provided by an embodiment of the present application;

[0016] Figure 4 is a schematic diagram of replacing a target semantic element in a first semantic element group provided by an embodiment of the present application;

[0017] Figure 5 is a schematic diagram of deleting a target semantic element in a first semantic element group provided by an embodiment of the present application;

[0018] Figure 6 is a flowchart of a method for generating a session template provided by another embodiment of the present application;

[0019] Fig. 7A , Figure 7B , Figure 7C This is a schematic diagram of a dialogue interface provided by an embodiment of the present application;

[0020] Figure 8 is a flow chart for screening initial elements provided by an embodiment of the present application;

[0021] Fig. 9 is a flowchart of a method for generating a session template provided by another embodiment of the present application;

[0022] Fig.10 It is a functional module diagram of a conversation template generating device provided by an embodiment of the present application;

[0023] Fig.11 It is a structural diagram of a computer device for implementing a method for generating a session template provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0025] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.

[0027] Some terminology explanation:

[0028] Natural Language Processing (NLP): NLP is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between humans and computers using natural language. At present, NLP theoretical research and model exploration have gradually expanded to a wider range of fields that are closer to human intelligence. The problems involved have also gradually extended from tasks such as word segmentation, semantic classification and matching, and question answering, showing a trend from easy to difficult.

[0029] Figure 1 This is a schematic diagram of an application scenario of the method for generating a session template provided by an embodiment of the present application. Figure 1 As shown, in the application scenario provided by the embodiment of the present application, the computer device 100 is connected to the database 200. Through the communication connection between the computer device 100 and the database 200, the computer device 100 can obtain the conversation text within the preset time period from the database 200. The computer device 100 can also generate a target conversation template based on the obtained conversation text, and store the target conversation template in the database 200, wherein the preset time period can be a period of time before the current moment, and the preset time period can be customized according to user needs. For example, if the current moment is July 5, the preset time period can be from July 1 to July 4.

[0030] The database 200 can also be connected to the terminal device 300 and the intelligent robot 400 corresponding to the seat. The terminal device 300 or the intelligent robot 400 can store the conversation text of the interaction with the user in the database 200. The terminal device 300 or the intelligent robot 400 can also obtain the corresponding target conversation template from the database 200 to interact with the user.

[0031] The terminal device 300 in the present application can be a personal computer, a tablet computer, a handheld device, a vehicle-mounted device, a wearable device, a computer device or other processing device connected to a wireless modem, etc. In different networks, the terminal device 300 can be different types of devices, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), 5G network or terminal equipment in future evolution network, etc.

[0032] The computer device 100 in the present application may be any electronic product that can interact with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), etc. The computer device 100 may include a network device and / or a user device. The network device includes, but is not limited to, a single network electronic device, an electronic device group consisting of multiple network electronic devices, or a cloud consisting of a large number of hosts or network electronic devices based on cloud computing.

[0033] In another embodiment, the terminal device 300 or the intelligent robot 400 can be integrated into the computer device 100 so that the computer device 100 can implement part or all of the functions of the terminal device 300 or the intelligent robot 400. For example, after the computer device 100 stores the target conversation template in the database 200, it can obtain the corresponding target conversation template from the database 200 to interact with the user.

[0034] In another embodiment, the database 200 may be an external database (e.g., cloud storage) of the computer device 100, or the database 200 may be a built-in database of the computer device 100. For example, if the database 200 is built in the storage device of the computer device 100, the terminal device 300 or the intelligent robot 400 may communicate with the computer device 100 through a network, and the network may be a wireless network or a wired network, and the wireless network includes, but is not limited to: a cellular network, a wireless local area network (Wireless Fidelity, Wi-Fi), an infrared network or a Bluetooth network, and the wired network includes, but is not limited to: Ethernet, a universal serial bus (USB) or a controller area network.

[0035] It should be noted that Figure 1 The number and connection relationship of each device are only for illustration and do not constitute a limitation to the embodiments of the present application.

[0036] like Figure 2 FIG. 1 is a flow chart of a method for generating a session template according to an embodiment of the present application. The method for generating a session template is applied to a computer device, for example, Figure 1 The computer device 100. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0037] S201, determining a target semantic element based on the semantic element of the first conversation text and the matching degree between the semantic element and the second conversation text.

[0038] In at least one embodiment of the present application, the first conversation text may be any question text in the conversation text within the preset time period, for example, the question text may represent a question initiated by an agent or an intelligent robot or a user. The conversation text within the preset time period may be an interactive text between an agent or an intelligent robot and a user within the preset time period.

[0039] In one example, an agent or intelligent robot can interact with a user in a variety of ways, and a corresponding interactive text can be obtained according to each interactive method. For example, when an agent or intelligent robot has a voice call with a user, the content of the voice call will be recorded and translated into text through voice recognition technology to form an interactive text of the voice call; when an agent or intelligent robot interacts with a user through an online chat tool, the agent or intelligent robot can directly receive and send text messages, and can use text messages as interactive text. In another example, the conversation text within a preset time period may include text obtained by an agent or intelligent robot interacting with a user in a variety of scenarios. For example, the conversation text within the preset time period may be text obtained by an agent or intelligent robot interacting with a user based on a pre-collection scenario. The conversation text within the preset time period may also be interactive text in a high-age scenario or an information verification scenario.

[0040] The second conversation text can be determined from the conversation texts within a preset time period according to the first conversation text. Specifically, in each conversation text within the preset time period, the first conversation text is usually the text at the end of the conversation text, and the second conversation text corresponding to the first conversation text can be the text at the beginning of the conversation text. Figure 3 The schematic diagram of the conversation text within the preset time period shown in FIG. Figure 3 Explain the relationship between the first conversation text and the second conversation text, Figure 3 , three rounds of dialogue between an agent and a user are shown, namely: the first round of dialogue, the second round of dialogue and the third round of dialogue. The first round of dialogue includes the agent's question A1 and the user's answer A2, the second round of dialogue includes the user's question B1 and the agent's answer B2, and the third round of dialogue includes the user's question C1 and the agent's answer C2. If the first conversation text is question B1, the second conversation text may be the text before the first conversation text (question B1), for example, the second conversation text includes the agent's question A1 and the user's answer A2; if the first conversation text is question C1, the second conversation text may be the text before the first conversation text (question C1), for example, the second conversation text includes the agent's question B1 and the user's answer B2.

[0041] In at least one embodiment of the present application, the semantic elements of the first conversation text can be determined based on the text vocabulary in the first conversation text. The text vocabulary in the first conversation text can be used as the sememe, and the semantic element is a semantic unit one level lower than the sememe. For example, the text vocabulary "sister" can be used as the sememe, and the corresponding semantic elements can include: [+relative], [+sibling], [+older], [-male]; for another example, the text vocabulary "woman" can be used as the sememe, and the corresponding semantic elements can include: [+person], [+female], [+adult], wherein the symbol "+" indicates that there is a corresponding semantic element, and the symbol "-" indicates that there is no corresponding semantic element.

[0042] In at least one embodiment of the present application, a method for determining the degree of match between the semantic elements of a first conversation text and a second conversation text includes: a computer device performs semantic element recognition on text vocabulary based on the parts of speech of the text vocabulary in the first conversation text to obtain the semantic elements of the first conversation text, and determines the degree of match based on the similarity distance between each semantic element and the intention of the second conversation text.

[0043] Among them, the semantic elements of the first conversation text can be obtained from a preset vocabulary semantic element mapping library based on text vocabulary and corresponding parts of speech, and the vocabulary semantic element mapping library includes the correspondence between text vocabulary, parts of speech, and semantic elements. Vocabularies with different parts of speech correspond to different semantic elements. For example, if the part of speech of the word "symbol" is a noun, the corresponding semantic element can be [+abstract concept], [+abstract phenomenon]; if the part of speech of the word "symbol" is a verb, the corresponding semantic element can be: [+behavior or process of expressing abstract meaning through concrete things].

[0044] The intent of the second conversation text can be obtained by identifying the second conversation text based on a pre-trained intent recognition model, and the intent recognition model can be trained based on a pre-trained language model such as Roberta. The matching degree is inversely proportional to the similarity distance. For example, the smaller the similarity distance, the higher the corresponding matching degree.

[0045] The embodiment of the present application combines the parts of speech of text vocabulary to identify semantic elements of text vocabulary, thereby improving the accuracy of semantic elements, and then accurately determining the matching degree based on the similarity distance between the semantic elements and the intention of the second conversation text.

[0046] In at least one embodiment of the present application, a computer device determines a target semantic element based on semantic elements of a first conversation text and a matching degree between the semantic elements and a second conversation text, including: the computer device filters out an initial semantic element from the semantic elements of the first conversation text according to the matching degree, and determines the target semantic element from the initial semantic element according to the frequency of the initial semantic element in the first conversation text.

[0047] The initial sememe is a sememe with a matching degree greater than a preset threshold (eg, 0.9). The target sememe is the first N initial semes with the highest frequency, where N can be determined based on the number of initial semes. For example, if the number of initial semes is 10, N can be set to 5.

[0048] The embodiment of the present application selects an initial semantic element from multiple semantic elements through matching degree, so that the selected initial semantic element can be matched with the second conversation text, and then determines the target semantic element from the initial semantic element through frequency, so as to ensure that the target semantic element is an important semantic element in the first conversation text.

[0049] S202: Generate a first conversation template of a first conversation text according to the target semantic element.

[0050] In at least one embodiment of the present application, the first conversation template may be generated based on the vocabulary corresponding to the semantic element group, wherein the semantic element group may be obtained by combining the target semantic elements.

[0051] In at least one embodiment of the present application, the computer device generates a first conversation template of the first conversation text according to the target semantics, including: the computer device randomly combines the target semantics to obtain a first semantic group, and adjusts the semantics of the first semantic group according to a preset semantic relationship to obtain a second semantic group. The computer device obtains the vocabulary corresponding to the second semantic group from a preset mapping dictionary, and generates the first conversation template according to the obtained vocabulary.

[0052] The preset semantic element relationship can be determined according to the semantic element combination condition, and the semantic element combination condition includes the condition that multiple semantic elements can be combined with each other. For example, the semantic element combination condition includes: the similarity between the semantic elements that are combined with each other is greater than the preset similarity. The preset semantic element relationship can include the corresponding relationship between the first semantic element and the second semantic element, and the combination method of the first semantic element and the second semantic element. The second semantic element represents a semantic element that can be combined with the first semantic element. For example, the preset semantic element relationship is: the first semantic element [+relative]: the second semantic element [+adult], and the combination method is [+relative]-[+adult]. The combination method "[+relative]-[+adult]" means that the first semantic element [+relative] is in front and the second semantic element [+adult] is in the back.

[0053] The preset mapping dictionary stores the correspondence between semantic element groups and words. For example, if the semantic element group is [female]-[adult], the corresponding word obtained from the preset mapping dictionary is: woman.

[0054] This embodiment can increase the number of the first semantic element group by randomly combining target semantic elements, and ensure the rationality of the combination between semantic elements in the second semantic element group by adjusting the first semantic element group by preset semantic element relationship, thereby improving the rationality of the generation of the first conversation template.

[0055] In some embodiments, the computer device adjusts the semantic elements of the first semantic element group according to the preset semantic element relationship to obtain the second semantic element group, which includes: the computer device determines semantic element pairs from the first semantic element group based on the preset semantic element relationship, and the semantic element pairs include adjacent and non-combinable target semantic elements in the first semantic element group. For the target semantic element in the front position of the semantic element pair, the computer device obtains the corresponding combined semantic element from the preset semantic element relationship, and replaces the target semantic element in the back position of the semantic element pair with the combined semantic element to obtain the second semantic element group. Figure 4 Instructions to replace the target semantics in the first semantics group. Figure 4 It is shown that the first semantic element group includes: "semantic element 1", "semantic element 2", "semantic element 3" in sequence. It is determined that "semantic element 2" and "semantic element 3" cannot be combined, and the semantic element pair obtained is: "semantic element 2"-"semantic element 3". According to the preset semantic element relationship, the semantic element that can be combined with "semantic element 2" is: "semantic element 4". Therefore, the computer device can replace "semantic element 3" in the first semantic element group with "semantic element 4" to obtain the second semantic element group: "semantic element 1", "semantic element 2", "semantic element 4".

[0056] In another embodiment, the computer device deletes the target semantic element that is located at the rear of the semantic element pair from the first semantic element group. Figure 5 Instructions to delete the target sememe in the first sememe group. Figure 5 It is shown that the first semantic element group includes: "semantic element 1", "semantic element 2", and "semantic element 3" in sequence. It is determined that "semantic element 2" and "semantic element 3" cannot be combined, and the semantic element pair obtained is: "semantic element 2"-"semantic element 3". Therefore, the computer device can delete the target semantic element ("semantic element 3") at the later position in the semantic element pair ("semantic element 2"-"semantic element 3"), and obtain the second semantic element group: "semantic element 1", "semantic element 2".

[0057] This embodiment adjusts the first semantic element group in a variety of ways, which can ensure the rationality of the combination of semantic elements in the second semantic element group while increasing the number of the second semantic element group.

[0058] In some embodiments, the computer device obtains the vocabulary corresponding to the second semantic element group from a preset mapping dictionary, and generates a first conversation template based on the obtained vocabulary, including: the computer device obtains multiple corresponding vocabulary based on multiple second semantic element groups, merges the multiple vocabulary according to the set frequency corresponding to the vocabulary and / or the merging order of the vocabulary, and obtains the first conversation template.

[0059] For example, the vocabulary corresponding to the "second semantic element group X" is "word x", the vocabulary corresponding to the "second semantic element group Y" is "word y", and the vocabulary corresponding to the second semantic element group Z is "word z". If the set frequency of "word x" is 1, the set frequency of "word y" is 1, and the set frequency of "word z" is 2, "word z" can be in front of "word x", "word z" can be after "word y", and "word x" can be in front of "word y", then multiple words are merged, and the first conversation template obtained can be: word z, word x, word y, word z; if the set frequency of "word x" is 2, the set frequency of "word y" is 1, and the set frequency of "word z" is 1, "word z" can be in front of "word x", "word x" can be after "word y", and "word x" can be in front of "word y", then multiple words are merged, and the first conversation template obtained can be: word z, word x, word y, word x.

[0060] This embodiment merges multiple words through different set frequencies and / or different word merging orders, thereby increasing the number of templates of the first conversation template.

[0061] S203: Determine a target conversation template based on the first conversation template and user feedback information.

[0062] In at least one embodiment of the present application, the feedback information may include the user's evaluation information on the first conversation template. For example, the evaluation information may be: "This sentence is easy to understand". The feedback information may also include the user's behavior information on the first conversation template. For example, if the first conversation template is a template related to a collection scenario, the behavior information may be information related to "the user completes repayment"; for another example, if the first conversation template is a template related to an electric sales scenario, the behavior information may be information related to "the user purchases a product". The target conversation template may be the top M first conversation templates with the highest first template scores.

[0063] The computer device determines a target conversation template based on the first conversation template and user feedback information, including: the computer device determines a first template score of the first conversation template according to the feedback information, and determines the target conversation template from the first conversation template according to the first template score.

[0064] Among them, the method for determining the first template score can be found in the description of the second template score below, and this application will not repeat the description.

[0065] In this embodiment, the target conversation template is screened out from the first conversation template by scoring the first template. Since the target conversation template is screened out after being verified by the user, the quality of the target conversation template can be ensured.

[0066] In another embodiment, the feedback information may include the user's evaluation information on the second conversation template, and the feedback information may also include the user's behavior information on the second conversation template. For example, if the second conversation template is a template related to the collection scenario, the behavior information may be information related to "the user completes the repayment"; for another example, if the second conversation template is a template related to the telemarketing scenario, the behavior information may be information related to "the user purchases the product". The second conversation template is determined based on the expansion template corresponding to the first conversation template and the first conversation text.

[0067] The computer device determines the target conversation template based on the first conversation template and the user's feedback information, and further includes: the computer device performs text expansion on the first conversation template to obtain an expanded template, and generates a second conversation template based on the expanded template and the first conversation text. The computer device determines a second template score of the second conversation template according to the feedback information, and determines the target conversation template from the second conversation template according to the second template score. The target conversation template can be the first M second conversation templates with the highest second template scores.

[0068] The expanded template may include text obtained by expanding each first conversation template separately. For example, the first conversation template includes template Q, template K and template V. By expanding each first conversation template separately, the expanded text obtained may include: template Q+text F, template K+text F, template V+text F. The expanded template may also include a template obtained by expanding a combination template of multiple first conversation templates. The combination template may include at least two first conversation templates. For example, the first conversation template includes template Q, template K and template V. The first conversation templates are combined to obtain a combination template of: template Q+template K, template K+template V, template Q+template V, template Q+template K+template V. The corresponding expanded template may include: template Q+template K+text F, template K+template V+text F, template Q+template V+text F, template Q+template K+template V+text F. The combination template may be obtained by splicing at least two first conversation templates front and back. The combination template may also be obtained by interlacing templates based on at least two first conversation templates.

[0069] The second conversation template includes part of the text or all of the text in the expanded template and the first conversation text. For example, if the expanded template is: template Q+template K+text F, then the second conversation template may include template Q+template K+text F+first conversation text, the second conversation template may also include template K+text F+first conversation text, the second conversation template may also include template Q+text F+first conversation text, etc.

[0070] This embodiment can improve the content richness of the expanded template by expanding the first conversation template, and then generate a second conversation template by combining the first conversation text and the expanded template, which can not only further improve the content richness of the second conversation template, but also increase the number of second conversation templates. In addition, this embodiment also selects the target conversation template from the second conversation template by scoring the second template. Since the target conversation template is selected after user verification, the quality of the target conversation template can be ensured.

[0071] In some embodiments, the user feedback information includes feedback information of a first number of users, and the computer device determines the second template score of the second conversation template based on the feedback information, including: the computer device counts a second number of feedback information containing positive emotional information in the feedback information, and determines the second template score based on the first number and the second number.

[0072] Among them, the feedback information of positive emotional information includes evaluation information with positive emotional value. For example, for the evaluation information "this sentence is easy to understand", since the emotional value corresponding to the evaluation information is positive emotion, the evaluation information "this sentence is easy to understand" belongs to the feedback information of positive emotional information; for the evaluation information "this sentence is difficult to understand", since the emotional value corresponding to the evaluation information is negative emotion, the evaluation information "this sentence is difficult to understand" does not belong to the feedback information of positive emotional information. The feedback information of positive emotional information can also include behavior information that can increase business volume. For example, for the feedback behavior: "user completes repayment", since the feedback behavior of "user completes repayment" can increase the "repayment rate" in the collection scenario, the information corresponding to the feedback behavior of "user completes repayment" belongs to the feedback information of positive emotional information; for the feedback behavior: "user purchases product", since the feedback behavior of "user purchases product" can increase the "product sales" in the telemarketing scenario, the information corresponding to the feedback behavior of "user purchases product" belongs to the feedback information of positive emotional information. The second template score can be obtained according to the ratio of the second quantity to the first quantity.

[0073] This embodiment can quantify the score of the second template through the second number of feedback information of positive sentiment information and the first number of users who receive the conversation template, which is beneficial to the screening of conversation templates.

[0074] In at least one embodiment of the present application, after determining the target conversation template, the computer device determines the conversation turn of the first conversation text, and based on the conversation turn corresponding to the first conversation text, stores the target conversation template in a database. This embodiment stores the correspondence between the conversation turn corresponding to the first conversation text and the target conversation template in a database, which helps the intelligent robot or agent to obtain the corresponding conversation template through the database to interact with the user, thereby improving the efficiency of business communication and business processing.

[0075] In multiple embodiments of the present application, the target semantic element is screened out by the matching degree between the semantic element corresponding to the first conversation text and the second conversation text, which can ensure that the screened target semantic element matches the second conversation text, thereby improving the matching degree between the target conversation template and the second conversation text. The embodiment of the present application also screens the conversation template according to the feedback information, which can ensure the quality and effectiveness of the screened target conversation template, which is conducive to the online customer service to interact with the user through the target conversation template, and improve the efficiency of business communication and business processing.

[0076] like Figure 6 As shown in FIG. 1 , it is a flow chart of a method for generating a session template provided by another embodiment of the present application. Figure 6 As shown, it specifically includes steps S601-S605:

[0077] S601, taking a group of question texts in the same conversation round in the conversation texts within a preset time period as the first conversation text, and determining the second conversation text from the conversation texts within the preset time period based on the conversation round corresponding to the first conversation text.

[0078] In at least one embodiment of the present application, in combination Fig. 7A , Figure 7B and Figure 7C Description of the first conversation text, Fig. 7A A first dialogue interface is shown, which shows three rounds of dialogue between an agent and a user, wherein the first round of dialogue in the first dialogue interface includes the agent's question S1 and the user's answer S2, the second round of dialogue in the first dialogue interface includes the user's question T1 and the agent's answer T2, and the third round of dialogue in the first dialogue interface includes the user's question U1 and the agent's answer U2.

[0079] Figure 7B A second dialogue interface is shown, which shows two rounds of dialogue between an agent and a user, wherein the first round of dialogue in the second dialogue interface includes the agent's question D1 and the user's answer D2, and the second round of dialogue in the second dialogue interface includes the user's question E1 and the agent's answer E2.

[0080] Figure 7C A third dialogue interface is shown, which shows three rounds of dialogue between an agent and a user, wherein the first round of dialogue in the third dialogue interface includes the agent's question G1 and the user's answer G2, the second round of dialogue in the third dialogue interface includes the user's question H1 and the agent's answer H2, and the third round of dialogue in the third dialogue interface includes the user's question L1 and the agent's answer L2.

[0081] The computer device takes a group of question texts in the same conversation round in the conversation text within the preset time period as the first conversation text. Continuing with the above example, the first conversation text 1 may include the question text of the first round of dialogue in the conversation text within the preset time period, and the first conversation text 1 includes: question S1, question D1 and question G1; the first conversation text 2 may include the question text of the second round of dialogue in the conversation text within the preset time period, and the first conversation text 2 includes: question T1, question E1 and question H1; the first conversation text 3 may include the question text of the third round of dialogue in the conversation text within the preset time period, and the first conversation text 3 includes: question U1 and question L1.

[0082] In at least one embodiment of the present application, a computer device determines a second conversation text from conversation texts within a preset time period based on a conversation turn corresponding to a first conversation text, including: the computer device determines a target conversation turn according to the conversation turn corresponding to the first conversation text, and identifies question text and reply text in the target conversation turn from the conversation texts within the preset time period, and uses them as the second conversation text.

[0083] The target conversation round may be the previous conversation round of the conversation round corresponding to the first conversation text. For example, if the conversation round corresponding to the first conversation text is the second conversation round, the target conversation round is the first conversation round. For another example, if the conversation round corresponding to the first conversation text is the third conversation round, the target conversation round is the second conversation round.

[0084] Continuing with the above example, the first conversation text 2 includes: question T1, question E1 and question H1. Since the conversation turn corresponding to the first conversation text 2 is the second round of dialogue, the second conversation text can be the question text and reply text in the first round of dialogue. For example, the second conversation text corresponding to the first conversation text 2 includes: question S1 and answer S2, question D1 and answer D2, question G1 and answer G2; the first conversation text 3 includes: question U1, question L1. Since the conversation turn corresponding to the first conversation text 3 is the third round of dialogue, the second conversation text can be the question text and reply text in the second round of dialogue. For example, the second conversation text corresponding to the first conversation text 3 includes: question T1 and answer T2, question H1 and answer H2.

[0085] S602: Determine a target semantic element based on the semantic element of the first conversation text and the matching degree between the semantic element and the second conversation text.

[0086] S603: Generate a first conversation template of the first conversation text according to the target semantic element.

[0087] S604: Determine a target conversation template based on the first conversation template and user feedback information.

[0088] For details of steps S602-S604, please refer to the above Figure 2 The detailed description is not repeated here.

[0089] Since the text content and text intention in the same conversation turn in multiple conversation texts in the same scenario are similar, this embodiment obtains a group of question texts in the same conversation turn from the conversation texts within a preset time period as the first conversation text, and can combine multiple question texts to determine the target conversation template, thereby improving the quality of the target conversation template.

[0090] like Figure 8 As shown in FIG. 1 , it is a flowchart of screening initial elements provided by an embodiment of the present application. Figure 8 As shown, it specifically includes steps S801-S802:

[0091] S801: If the number of first conversation texts is N, select common semantic elements from the semantic elements of the N first conversation texts.

[0092] In at least one embodiment of the present application, the common semantic elements refer to the semantic elements contained in each question text.

[0093] S802: Determine the shared semantic elements with a matching degree greater than a preset threshold as initial semantic elements.

[0094] In at least one embodiment of the present application, the preset threshold can be set according to the matching requirement between the initial semantic element and the second conversation text, and the value of the preset threshold is positively correlated with the matching requirement. For example, the higher the matching requirement, the larger the preset threshold; the lower the matching requirement, the smaller the preset threshold. The second conversation text is the question text and the reply text of the previous round of the first conversation text. The matching degree can be determined based on the similarity distance between the semantic element of the first conversation text and the intention of the second conversation text.

[0095] This embodiment determines the common semantic elements with a matching degree greater than a preset threshold as the initial semantic elements, which can not only ensure that the initial semantic elements match the second conversation text, but also ensure that the initial semantic elements are important semantic elements in the first conversation text, thereby improving the rationality of the screening of the initial semantic elements.

[0096] like Fig. 9 As shown, it is a flow chart of a method for generating a session template provided by another embodiment of the present application. Fig. 9 As shown, steps S901-S908 are included:

[0097] S901, obtaining conversation text within a preset time period.

[0098] In at least one embodiment of the present application, the conversation text within the preset time period may be a text translated from the call audio between the agent or intelligent robot and the user, or the conversation text within the preset time period may be an interactive text between the agent or intelligent robot and the user. The conversation text within the preset time period may be an interactive text in a collection scenario or an interactive text in a telemarketing scenario.

[0099] S902: taking a group of question texts in the same conversation round in the conversation texts within a preset time period as the first conversation text.

[0100] The details of step S902 can be found in the detailed description of step S601 and will not be repeated here.

[0101] S903: Determine a target semantic element based on the semantic element of the first conversation text and the matching degree between the semantic element and the second conversation text.

[0102] S904: Generate a first conversation template of the first conversation text according to the target semantic element.

[0103] The details of steps S903-S904 can be referred to the detailed description of steps S201-S202, and will not be repeated here.

[0104] S905: Combine different first session templates to obtain a combined first session template.

[0105] In at least one embodiment of the present application, the combined first session template may include at least two first session templates. For example, the first session template includes template Q, template K and template V. The first session templates are combined to obtain the combined first session template: template Q+template K, template K+template V, template Q+template V, template Q+template K+template V.

[0106] S906: Perform text expansion on the first conversation template and the combined first conversation template respectively to obtain an expanded template.

[0107] S907: Generate a second conversation template based on the expanded template and the first conversation text.

[0108] S908: Based on the user's feedback information, select a target session template from the first session template or the second session template for retention.

[0109] The details of steps S906-S908 can be referred to the detailed description of steps S202-S203, and will not be repeated here.

[0110] In the conversation template generation method of the present embodiment, the target semantic element is screened out by the matching degree between the semantic element corresponding to the first conversation text and the second conversation text, which can ensure that the screened target semantic element matches the second conversation text, thereby improving the matching degree between the target conversation template and the second conversation text. The present application embodiment also screens the conversation template according to the feedback information, which can ensure the quality and utility of the screened target conversation template, which is conducive to the online customer service to interact with the user through the target conversation template, and improve the efficiency of business communication and business processing.

[0111] like Fig.10 , is a functional module diagram of a conversation template generation device provided by an embodiment of the present application. The conversation template generation device 11 includes a determination unit 110, a generation unit 111 and an identification unit 112. The module / unit referred to in the present application refers to a type of device that can be used by a processor (e.g. Fig.11 A series of computer readable instruction segments that can be obtained by the processor 1101 shown in the figure and can perform fixed functions and are stored in a memory (eg Fig.11 In the memory 1102 shown.

[0112] The determination unit 110 is used to determine the target semantic element based on the semantic element of the first conversation text and the matching degree between the semantic element and the second conversation text; the generation unit 111 is used to generate the first conversation template of the first conversation text according to the target semantic element; the determination unit 110 is also used to determine the target conversation template based on the first conversation template and the user's feedback information.

[0113] In one embodiment, the first conversation text is a group of question texts in the same conversation turn in the conversation text within a preset time period, and the determination unit 110 is further used to determine the second conversation text from the conversation text within the preset time period based on the conversation turn corresponding to the first conversation text.

[0114] In one embodiment, the determination unit 110 is specifically used to: determine the target conversation turn according to the conversation turn corresponding to the first conversation text; identify the question text and the reply text in the target conversation turn from the conversation text within a preset time period, and use them as the second conversation text.

[0115] In one embodiment, the determination unit 110 is specifically configured to: select the initial semantic element from the semantic elements of the first conversation text according to the matching degree; and determine the target semantic element from the initial semantic element according to the frequency of the initial semantic element in the first conversation text.

[0116] In one embodiment, the number of the first conversation texts is N, and the determination unit 110 is further configured to: filter out common semantic elements from the semantic elements of the N first conversation texts; and determine the common semantic elements with a matching degree greater than a preset threshold as initial semantic elements.

[0117] In one embodiment, the generation unit 111 is specifically used to: randomly combine target semantics to obtain a first semantic group; adjust the semantics of the first semantic group according to a preset semantic relationship to obtain a second semantic group; obtain the vocabulary corresponding to the second semantic group from a preset mapping dictionary, and generate a first conversation template based on the obtained vocabulary.

[0118] In one embodiment, the determining unit 110 is specifically configured to: determine a first template score of the first conversation template according to the feedback information; and determine a target conversation template from the first conversation template according to the first template score.

[0119] In one embodiment, the determination unit 110 is further specifically used to: perform text expansion on the first conversation template to obtain an expanded template; generate a second conversation template based on the expanded template and the first conversation text; determine a second template score of the second conversation template according to the feedback information; and determine a target conversation template from the second conversation template according to the second template score.

[0120] In one embodiment, the user feedback information includes feedback information of a first number of users; the determination unit 110 is further specifically used to: count a second number of feedback information containing positive emotional information in the feedback information; and determine a second template score based on the first number and the second number.

[0121] In one embodiment, the recognition unit 112 is used to identify semantic elements of text vocabulary based on the parts of speech of the text vocabulary in the first conversation text to obtain the semantic elements of the first conversation text; the determination unit 110 is also used to determine the matching degree based on the similarity distance between each semantic element and the intention of the second conversation text.

[0122] In multiple embodiments of the present application, the target semantic element is screened out by the matching degree between the semantic element corresponding to the first conversation text and the second conversation text, which can ensure that the screened target semantic element matches the second conversation text, thereby improving the matching degree between the target conversation template and the second conversation text. The embodiment of the present application also screens the conversation template according to the feedback information, which can ensure the quality and effectiveness of the screened target conversation template, which is conducive to the online customer service to interact with the user through the target conversation template, and improve the efficiency of business communication and business processing.

[0123] Fig.11 is a schematic diagram of the structure of a computer device for implementing a method for generating a session template provided in an embodiment of the present application. Optionally, Fig.11 The computer device 100 is shown for executing Figure 2-Figure 9 The method shown.

[0124] The computer device 100 includes at least one processor 1101 , a memory 1102 , and at least one network interface 1103 .

[0125] The processor 1101 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the scheme of the present application. For example, the processor 1101 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0126] The memory 1102 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 1102 exists independently and is connected to the processor 1101 via an internal connection 1104. Alternatively, the memory 1102 and the processor 1101 are optionally integrated together.

[0127] The network interface 1103 uses any transceiver-like device for communicating with other devices or communication networks. The network interface 1103 includes, for example, at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.

[0128] In some embodiments, the processor 1101 includes one or more CPUs, such as Fig.11 CPU0 and CPU1 are shown in the figure.

[0129] In some embodiments, the computer device 100 optionally includes multiple processors, such as Fig.11 1 and 1105. Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). The processor here optionally refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0130] In some embodiments, the computer device 100 further includes an internal connection 1104. The processor 1101, the memory 1102, and the at least one network interface 1103 are connected via the internal connection 1104. The internal connection 1104 includes a path to transmit information between the above components. Optionally, the internal connection 1104 is a single board or a bus. Optionally, the internal connection 1104 is divided into an address bus, a data bus, a control bus, etc.

[0131] In some embodiments, the computer device 100 further includes an input-output interface 1106. The input-output interface 1106 is connected to the internal connection 1104.

[0132] Optionally, the processor 1101 implements the method in the above embodiment by reading the program code 910 stored in the memory 1102, or the processor 1101 implements the method in the above embodiment by the program code stored internally. In the case where the processor 1101 implements the method in the above embodiment by reading the program code 910 stored in the memory 1102, the memory 1102 stores the program code for implementing the method provided in the embodiment of the present application.

[0133] For more details on how the processor 1101 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.

[0134] This embodiment also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer device, the computer device executes the above-mentioned related method steps to implement the conversation template generation method in the above-mentioned embodiment.

[0135] This embodiment also provides a computer program product. When the computer program product is run on a computer device, the computer device executes the above-mentioned related steps to implement the conversation template generation method in the above-mentioned embodiment.

[0136] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the session template generation method in the above-mentioned method embodiments.

[0137] Among them, the computer device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0138] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0139] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0140] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0141] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0143] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for generating a conversation template, It is characterized in that The method comprises: Determining a target semantic element based on the semantic element of the first conversation text and the matching degree between the semantic element and the second conversation text; Generating a first conversation template of the first conversation text according to the target semantic element; A target conversation template is determined based on the first conversation template and the user's feedback information.

2. The method for generating a conversation template according to claim 1, It is characterized in that The first conversation text is a group of question texts in the same conversation round in the conversation text within a preset time period, and the method further includes: Based on the conversation round corresponding to the first conversation text, a second conversation text is determined from the conversation texts within the preset time period.

3. The method for generating a conversation template according to claim 2, It is characterized in that The determining the second conversation text from the conversation texts within the preset time period based on the conversation round corresponding to the first conversation text includes: Determining a target conversation turn according to the conversation turn corresponding to the first conversation text; From the conversation texts within the preset time period, the question text and the reply text in the target conversation round are identified and used as the second conversation text.

4. The method for generating a conversation template according to claim 1, It is characterized in that The determining of the target semantic element based on the semantic element of the first conversation text and the matching degree between the semantic element and the second conversation text comprises: According to the matching degree, selecting the initial semantic element from the semantic elements of the first conversation text; A target semantic element is determined from the initial semantic elements according to the frequency of the initial semantic element in the first conversation text.

5. The method for generating a conversation template according to claim 4, It is characterized in that The number of the first conversation texts is N, and the selecting the initial semantic elements from the semantic elements of the first conversation texts according to the matching degree includes: Filter out common semantic elements from the semantic elements of the N first conversation texts; The shared semantic elements with a matching degree greater than a preset threshold are determined as initial semantic elements.

6. The method for generating a conversation template according to claim 1, It is characterized in that The step of generating a first conversation template of the first conversation text according to the target semantic element comprises: Randomly combining the target sememes to obtain a first sememe group; According to the preset semantic element relationship, the first semantic element group is semantically adjusted to obtain a second semantic element group; The vocabulary corresponding to the second semantic element group is obtained from a preset mapping dictionary, and a first conversation template is generated according to the obtained vocabulary.

7. The method for generating a conversation template according to claim 1, It is characterized in that The determining a target session template based on the first session template and the user's feedback information includes: determining a first template score for the first conversation template according to the feedback information; A target session template is determined from the first session templates according to the first template score.

8. The method for generating a conversation template according to claim 1, It is characterized in that The determining a target conversation template based on the first conversation template and the user's feedback information further includes: Performing text expansion on the first conversation template to obtain an expanded template; Generate a second conversation template based on the expanded template and the first conversation text; determining a second template score for the second session template according to the feedback information; A target session template is determined from the second session templates according to the second template score.

9. The method for generating a conversation template according to claim 8, It is characterized in that The user feedback information includes feedback information of a first number of users; and determining a second template score of the second session template according to the feedback information includes: Counting a second amount of feedback information that includes positive emotional information in the feedback information; A second template score is determined according to the first number and the second number.

10. The method for generating a conversation template according to claim 1, It is characterized in that The method further comprises: Based on the parts of speech of the text words in the first conversation text, the semantic elements of the text words are recognized to obtain the semantic elements of the first conversation text; The matching degree is determined according to the similarity distance between each semantic element and the intention of the second conversation text.

11. A conversation template generating device, It is characterized in that The device comprises: A determination unit, configured to determine a target semantic element based on the semantic element of the first conversation text and the matching degree between the semantic element and the second conversation text; A generating unit, configured to generate a first conversation template of the first conversation text according to the target semantic element; The determining unit is further configured to determine a target conversation template based on the first conversation template and user feedback information.

12. A computer device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the conversation template generation method according to any one of claims 1 to 10 when executing the computer program.

13. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the conversation template generation method according to any one of claims 1 to 10 is implemented.

14. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the conversation template generation method according to any one of claims 1 to 10 is implemented.