Seat talk-skill association method and device, storage medium and electronic equipment

By obtaining and matching the input content and historical session content in the current session, and using the trained model to screen the target speech, the problem of low accuracy and time-consuming speech association in the existing technology is solved, and more efficient and accurate speech association is achieved.

CN119719260APending Publication Date: 2025-03-28GUANGZHOU SHIRONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311248258.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, the accuracy of speech association is low and time-consuming, making it difficult to effectively support the conversation between the agent and the user.

Method used

By obtaining the input content in the current session, the agent session and the user session of the history round, matching the candidate speech, and inputting them into the trained model, filtering out the target speeches related to the logic of the user session.

Benefits of technology

Improve the accuracy and efficiency of speech associations, ensuring that the agent can quickly obtain a response consistent with the user's session logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719260A_ABST
    Figure CN119719260A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a seat speech and skill association method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring input contents of seat personnel in a current round in a current session, first session contents of the seat personnel in a plurality of historical rounds before the current round and second session contents of a user in a plurality of historical rounds before the current round; matching a plurality of candidate verbal skills from a verbal skill library according to the input content, the first session content and the second session content; inputting each candidate verbal skill and the second session content into a trained verbal skill association model to obtain a preset number of target verbal skill; and recommending the preset number of target verbal skills to the seat personnel, thereby improving the accuracy and efficiency of seat verbal skill association.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, device, storage medium and electronic device for agent speech association. Background Art

[0002] In recent years, as a medium for remote customer service, intelligent customer service systems have become an indispensable tool for agents in their daily work. Among them, the speech association function is an important module of the intelligent customer service system.

[0003] Script association refers to the process of associating relevant scripts based on the content input by the agent during the conversation between the agent and the user, making it easier for the agent to reply to the user based on the relevant scripts.

[0004] In the related art, the accuracy of the agent's speech given by speech association is low, and the speech association process is time-consuming. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present application provides a method, device, storage medium and electronic device for agent speech association, which can improve the accuracy and efficiency of agent speech association.

[0006] According to a first aspect of an embodiment of the present application, a method for associating agent speech is provided, comprising the following steps:

[0007] Obtaining the input content of the agent in the current round in the current session, the first session content of the agent in several historical rounds before the current round, and the second session content of the user in several historical rounds before the current round;

[0008] According to the input content, the first conversation content and the second conversation content, a number of candidate conversations are matched from the conversation database;

[0009] Input each candidate speech and the second conversation content into the trained speech association model to obtain a preset number of target speech;

[0010] Recommend a preset number of target scripts to agents.

[0011] According to a second aspect of an embodiment of the present application, there is provided a seat speech association device, comprising:

[0012] An input content acquisition module is used to acquire the input content of the agent in the current round in the current session, the first session content of the agent in several historical rounds before the current round, and the second session content of the user in several historical rounds before the current round;

[0013] A candidate speech matching module, used to match a number of candidate speech from the speech library according to the input content, the first conversation content and the second conversation content;

[0014] A target speech acquisition module is used to input each candidate speech and the second conversation content into the trained speech association model to obtain a preset number of target speeches;

[0015] The target script recommendation module is used to recommend a preset number of target scripts to agents.

[0016] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including a display, a processor and a memory; the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned agent speech association method.

[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the agent speech association method as described above is implemented.

[0018] The embodiment of the present application obtains the input content of the agent in the current round in the current conversation, the first conversation content of the agent in several historical rounds before the current round, and the second conversation content of the user in several historical rounds before the current round; according to the input content, the first conversation content, and the second conversation content, a number of candidate conversations are matched from the conversation library; each candidate conversation and the second conversation content are input into the trained conversation association model to obtain a preset number of target conversations; and a preset number of target conversations are recommended to the agent. The present application matches candidate conversations from the conversation library through the input content of the agent in the current round in the current conversation, the agent conversation in the historical round, and the user conversation in the historical round. Furthermore, through the trained conversation association model, the target conversation that is logically related to the user conversation is screened out from the candidate conversations, thereby improving the accuracy of the agent conversation association. Since the model parameter amount of the trained conversation association model is small, the reasoning process of conversation association is strengthened, and the efficiency of the agent conversation association is improved.

[0019] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

[0020] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a flow chart of an agent speech association method shown in one embodiment of the present application;

[0022] Figure 2This is a flow chart before step S20 in the agent speech association method according to one embodiment of the present application;

[0023] Figure 3 This is a flowchart of step S20 in the agent speech association method according to one embodiment of the present application;

[0024] Figure 4 This is a flow chart before step S30 in the agent speech association method according to one embodiment of the present application;

[0025] Figure 5 This is a flowchart of step S34 in the agent speech association method according to one embodiment of the present application;

[0026] Figure 6 This is a flowchart of step S30 in the agent speech association method according to one embodiment of the present application;

[0027] Figure 7 This is a schematic block diagram of the structure of an agent speech association device shown in one embodiment of the present application;

[0028] Figure 8 The present invention is a block diagram showing the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0030] It should be clear that the described embodiments are only 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 the embodiments of the present application.

[0031] When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. The singular forms of "a", "said" and "the" used in the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. The words "if" / "if" used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0032] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0033] The application environment of the agent speech association method provided in the embodiment of the present application includes an agent speech association device.

[0034] The agent speech association method provided in the embodiment of the present application can be executed by an agent speech association device, which can be implemented by software and / or hardware, and can be composed of two or more physical entities, or one physical entity. The agent speech association device can be any electronic device with an agent speech association application installed, and the electronic device can be a computer, a mobile phone, a tablet, or an interactive tablet and other smart devices.

[0035] The agent speech association method of the embodiment of the present application can be applied to online customer service scenarios. In the process of implementing the present invention, the inventor found that in the related art, the accuracy of the agent speech given by speech association is low, and the speech association process is time-consuming.

[0036] To this end, the present application matches candidate speech from the speech library through the input content of the agent in the current round, the agent conversation in the historical round, and the user conversation in the historical round. Furthermore, through the trained speech association model, the target speech that is logically related to the user conversation is screened out from the candidate speech, thereby improving the accuracy of the agent speech association. Since the model parameters of the trained speech association model are small, the reasoning process of speech association is strengthened, and the efficiency of the agent speech association is improved.

[0037] Based on this, the present application proposes a method, device, storage medium and electronic device for agent speech association.

[0038] See also Figure 1 The agent speech association method provided in the embodiment of the present application includes the following steps:

[0039] S10: Acquire input content of the agent in the current round in the current conversation, first conversation content of the agent in several historical rounds before the current round, and second conversation content of the user in several historical rounds before the current round.

[0040] Among them, the current conversation is a real-time conversation between the seat staff and the user. The current conversation may include multiple rounds of conversation content of the seat staff and multiple rounds of conversation content of the user. The current conversation may also include only one round of conversation content of the seat staff or one round of conversation content of the user.

[0041] In an embodiment of the present application, the input content of the agent in the current round may be the text content entered by the agent in the agent input box of the agent conversation interface. The first conversation content of the agent in several historical rounds before the current round may include but is not limited to the agent conversation content of the previous round before the current round, the agent conversation content of the previous two rounds before the current round, and the agent conversation content of the previous three rounds before the current round. The second conversation content of the user in several historical rounds before the current round may include but is not limited to the user conversation content of the previous round before the current round, the user conversation content of the previous two rounds before the current round, and the user conversation content of the previous three rounds before the current round.

[0042] S20: According to the input content, the first conversation content and the second conversation content, a number of candidate speeches are matched from the speech library.

[0043] In an embodiment of the present application, a first candidate speech can be matched from the speech library according to the input content. A second candidate speech can be matched from the speech library according to the first conversation content. A third candidate speech can be matched from the speech library according to the second conversation content. Based on the first candidate speech, the second candidate speech, and the third candidate speech, several candidate speech are obtained.

[0044] S30: Input each candidate speech and the second conversation content into the trained speech association model to obtain a preset number of target speeches.

[0045] Among them, the trained speech association model is used to associate the agent's speech based on the user conversation content, reflecting the reasoning logic between the user conversation content and the agent's speech.

[0046] In the embodiment of the present application, it is necessary to associate the agent's speech with the agent's input content in the current round, and reply to the user's conversation content in the previous round before the current round through the associated agent's speech.

[0047] To this end, each candidate speech and the second conversation content are input into the trained speech association model, which can filter out the target speech that has a strong reasoning logic with the second conversation content from the candidate speech summary.

[0048] S40: Recommend a preset number of target scripts to the agents.

[0049] In the embodiment of the present application, a preset number of target words are recommended to the agent, who can view the target words and reply to the user. The agent can also modify the target words and reply to the user with the modified target words.

[0050] By using the embodiment of the present application, the input content of the agent in the current round, the first conversation content of the agent in several historical rounds before the current round, and the second conversation content of the user in several historical rounds before the current round are obtained; according to the input content, the first conversation content, and the second conversation content, several candidate conversations are matched from the conversation library; each candidate conversation and the second conversation content are input into the trained conversation association model to obtain a preset number of target conversations; and the preset number of target conversations are recommended to the agent. The present application matches candidate conversations from the conversation library through the input content of the agent in the current round, the agent conversation in the historical round, and the user conversation in the historical round in the current conversation. Furthermore, through the trained conversation association model, the target conversation that is logically related to the user conversation is screened out from the candidate conversations, thereby improving the accuracy of the agent conversation association. Since the model parameter amount of the trained conversation association model is small, the reasoning process of conversation association is strengthened, and the efficiency of the agent conversation association is improved.

[0051] In an alternative embodiment, see Figure 2 , before step S20, including steps S21 to S24, which are specifically as follows:

[0052] S21: Obtain source data of several question-answer pairs.

[0053] The question-and-answer data includes, but is not limited to, historical conversations between several agents and several users, question-and-answer document files in the form of dialogues, and question-and-answer logs.

[0054] S22: extracting from each question-answer pair source data several consecutive rounds of agent conversations, several rounds of user conversations, and the first round of agent conversation after several rounds of agent conversations have ended.

[0055] The question-and-answer source data includes multiple rounds of agent conversations and multiple rounds of user conversations. Specifically, after a round of agent conversations in the question-and-answer source data ends, a round of user conversations begins. After a round of user conversations, a new round of agent conversations begins.

[0056] In the embodiment of the present application, three consecutive rounds of agent conversations and three consecutive rounds of user conversations can be extracted from each question-answer pair source data, and the first round of agent conversations can be understood as the next round of agent conversations after three consecutive rounds of agent conversations. For example, the question-answer pair source data includes A1-B1-A2-B2-A3-B3-A4, where A1, A2, and A3 are three consecutive rounds of agent conversations, B1, B2, and B3 are three consecutive rounds of user conversations, and A4 is the next round of agent conversations after three consecutive rounds of agent conversations.

[0057] S23: performing word segmentation and word sampling on several rounds of agent conversations to obtain a first feature sequence; performing word segmentation and word sampling on several rounds of user conversations to obtain a second feature sequence; performing word segmentation on the first round of agent conversations to obtain a third feature sequence.

[0058] Among them, the domain vocabulary or dictionary can be used to segment and sample the agent conversation and the user conversation to obtain a feature sequence. For example, for the sentence "How to download audio and video calls in the online course learning machine", after segmenting the words using the domain vocabulary, and then sampling the words based on the domain vocabulary, the keyword sequence is obtained: "online course learning machine, download, audio and video, call".

[0059] In the embodiment of the present application, three consecutive rounds of agent conversations are segmented and sampled to obtain three agent keyword sequences, which are then concatenated to obtain a first feature sequence. Three consecutive rounds of user conversations are segmented and sampled to obtain three user keyword sequences, which are then concatenated to obtain a second feature sequence. The first round of agent conversations are segmented but not sampled, and the complete sentences in the first round of agent conversations are retained to obtain a third feature sequence.

[0060] S24: Generate a speech library according to the first feature sequence, the second feature sequence and the third feature sequence corresponding to each question-answer pair source data.

[0061] In an embodiment of the present application, the first feature sequence, the second feature sequence, and the third feature sequence corresponding to a question-answer pair source data may be combined into a speech document to obtain a plurality of speech documents, and the plurality of speech documents may be indexed and numbered to obtain a speech library. The speech document may be an ES (Elasticsearch, search data analysis engine) document.

[0062] By obtaining several rounds of agent conversations, several rounds of user conversations, and the first round of agent conversations after several rounds of agent conversations from the question-answer source data, a speech script library can be automatically and quickly generated.

[0063] In an alternative embodiment, see Figure 3 The speech library includes a number of speech documents, each of which stores a first feature sequence, a second feature sequence, and a third feature sequence corresponding to a question-answer pair source data. Step S20 includes steps S211 to S215, which are as follows:

[0064] S211: Perform similarity matching between the first conversation content and the first feature sequence of each speech document in the speech library to obtain a first score.

[0065] In an embodiment of the present application, the first conversation content may be segmented and sampled to obtain a first keyword sequence corresponding to the first conversation content, and a literal matching method may be used to calculate a similarity score between the first feature sequence of each speech document and the first keyword sequence to obtain a first score. The literal matching method includes but is not limited to the bm25 and td-tif methods.

[0066] S212: Perform similarity matching between the second conversation content and the second feature sequence of each speech document in the speech library to obtain a second score.

[0067] In an embodiment of the present application, the second conversation content can be segmented and sampled to obtain a second keyword sequence corresponding to the second conversation content, and a literal matching method can be used to calculate the similarity score between the second feature sequence of each speech document and the second keyword sequence to obtain a second score.

[0068] S213: Perform similarity matching between the input content and the third feature sequence of each speech document in the speech library to obtain a third score.

[0069] In an embodiment of the present application, the input content can be segmented to obtain a third keyword sequence corresponding to the input content, and a literal matching method can be used to calculate the similarity score between the third feature sequence of each speech document and the third keyword sequence to obtain a third score.

[0070] S214: Perform weighted summation on the first score, the second score, and the third score to obtain a fourth score.

[0071] In the embodiment of the present application, a first weight may be set for the first score, a second weight may be set for the second score, and a third weight may be set for the third score. According to the first weight, the second weight, and the third weight, the first score, the second score, and the third score are weighted and summed to obtain a fourth score. The first weight, the second weight, and the third weight may be different, and the sum of the first weight, the second weight, and the third weight is 1.

[0072] S215: The third feature sequences in the speech documents whose fourth scores are ranked before a preset number are used as several candidate speech documents to be matched and obtained from the speech library.

[0073] In an embodiment of the present application, after obtaining a number of fourth scores, the fourth scores are sorted, and the third feature sequences in a number of speech documents with higher fourth scores are used as a preset number of candidate speech.

[0074] By calculating the similarity scores between the first conversation content, the second conversation content and the input content and the first feature sequence, the second feature sequence and the third feature sequence of the speech document in the speech library, a preset number of candidate speech can be automatically and quickly obtained.

[0075] In an alternative embodiment, see Figure 4 , before step S30, including steps S31 to S34, which are specifically as follows:

[0076] S31: Obtain a sample training corpus set; wherein the sample training corpus set includes several sample training corpora and a label value corresponding to each sample training corpus; the sample training corpus includes a positive sample training corpus and a negative sample training corpus; the positive sample training corpus is the conversation content of the agents in adjacent rounds in the historical conversation and the conversation content of the users; the negative sample training corpus is the conversation content of the agents in non-adjacent rounds randomly sampled in the historical conversation and the conversation content of the users; the label value corresponding to each sample training corpus includes a first label value corresponding to the positive sample training corpus and a second label value corresponding to the negative sample training corpus.

[0077] The first tag value is 1, and the second tag value is 0.

[0078] In the embodiment of the present application, each (user-agent) dialogue sentence of the historical conversation is used, for example, A1-B1, A2-B2, A3-B3 are selected for splicing to obtain positive sample training corpus. A random agent sentence is selected to splice A3 and B1 as negative sample training corpus.

[0079] S32: According to a number of sample training corpora and a first loss function, the first speech association model is trained to obtain a trained first speech association model and sample scores corresponding to the number of sample training corpora.

[0080] Among them, the first loss function is a binary cross entropy loss function. The label values ​​in the binary cross entropy loss function are 0 and 1. Specifically, the first loss function expression is:

[0081] hard_loss(pt, label)=-(1-label)ln(1-pt)-label*ln pt

[0082] Among them, label represents the label value of the first loss function hard_loss, and pt represents the model prediction value.

[0083] In the embodiment of the present application, the sample training corpus is input into the first speech association model, the first loss of the first speech association model is calculated according to the first loss function, and whether the first speech association model converges is determined based on the first loss. If the first speech association model converges, a trained first speech association model is obtained. In addition, the trained first speech association model can output the sample score of each sample training corpus.

[0084] S33: compress the trained first speech association model to obtain a second speech association model.

[0085] In the embodiment of the present application, the trained first speech association model includes an input layer, a hidden layer, and an output layer. The input layer and the output layer of the trained first speech association model are retained, a preset number of hidden layers are removed, and the model parameters of the input layer, the remaining hidden layers, and the output layer are kept unchanged to obtain the second speech association model.

[0086] S34: According to a number of sample training corpora, labels corresponding to the number of sample training corpora, sample scores corresponding to the number of sample training corpora, a first loss function and a second loss function, a second speech association model is trained to obtain a trained speech association model.

[0087] Among them, the second loss function is a binary cross entropy loss function. In the binary cross entropy loss function, the label value is the sample score corresponding to the sample training corpus, and the value is between 0 and 1. Specifically, the second loss function expression is:

[0088] soft_loss(pt,logis teacher )=-(1-logis teacher )ln(1-pt)-logis teacher *ln pt

[0089] Among them, logis teacher It represents the label value of the second loss function soft_loss, and pt represents the model prediction value.

[0090] In an embodiment of the present application, the second speech association model is distilled and trained using the first loss function and the second loss function to obtain a trained speech association model, so that the speech association ability of the trained speech association model can inherit the trained first speech association model and improve the work efficiency of speech association.

[0091] The first speech association model is first trained through sample training corpus, and based on the trained first speech association model, the second speech association model is distilled and trained, so that the trained speech association model can be automatically and quickly obtained.

[0092] In an alternative embodiment, see Figure 5 , step S34, including steps S31 to S34, are as follows:

[0093] S341: traverse the label value of each sample training corpus and the corresponding sample score;

[0094] S342: If the difference between the label value corresponding to the current sample training corpus and the sample score corresponding to the current sample training corpus is within a preset value range, training the second speech association model according to the first loss function;

[0095] S343: If the difference between the label corresponding to the current sample training corpus and the sample score corresponding to the current sample training corpus is not within a preset value range, weighted summing the first loss function and the second loss function to obtain a third loss function; and training the second speech association model according to the third loss function;

[0096] S344: until the number of training times reaches the preset number, a trained speech association model is obtained.

[0097] In the embodiment of the present application, the loss function expression for training the second speech association model is as follows:

[0098]

[0099] Among them, label represents the label corresponding to the current sample training corpus, logis teacher represents the sample score corresponding to the current sample training corpus, m represents the difference between the label value corresponding to the current sample training corpus and the sample score corresponding to the current sample training corpus, (-1, -0.5) ∪ (0.5, 1) represents the preset numerical range, and ω represents the weight.

[0100] If m∈(-1,-0.5)∪(0.5,1), it means that the sample training corpus is the sample training corpus that has been misclassified by the trained first speech association model. Then, for the misclassified sample training corpus, only the hard_loss loss function is used for model training. This avoids training the second speech association model when the trained first speech association model is misclassified.

[0101] like This indicates that the trained first speech association model is correctly classified. The second speech association model is trained using the weighted third loss function of the hard_loss and soft_loss loss functions.

[0102] By defining the loss function of distillation training, the trained speech association model can be obtained automatically and quickly.

[0103] In an alternative embodiment, see Figure 6 , step S30, including steps S301 to S304, are as follows:

[0104] S301: Perform word segmentation and word sampling on the second conversation content to obtain a feature sequence;

[0105] S302: Concatenate the feature sequence with each candidate speech to obtain a number of concatenated sequences;

[0106] S303: input each concatenated sequence into a trained speech association model to obtain a number of scores;

[0107] S304: Sort the scores and select the candidate speech with scores before a preset number as the target speech.

[0108] In the embodiment of the present application, the second conversation content may include multiple rounds of user dialogues, and only the user dialogues of the previous round of the current round may be segmented and sampled to obtain a feature sequence. The logical correlation score between each candidate speech and the feature sequence is calculated through the trained speech association model, and the scores are sorted to obtain a preset number of target speeches.

[0109] By inputting the second conversation content and several candidate speeches into the trained speech association model, a preset number of target speeches can be automatically and quickly obtained.

[0110] The present application also provides a device embodiment that can be used to execute the contents of the agent speech association method in the embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the contents of the agent speech association method in the embodiment of the present application.

[0111] See also Figure 7 , a seat speech association device 5 disclosed in an embodiment of the present application includes:

[0112] An input content acquisition module 51 is used to acquire the input content of the agent in the current round in the current conversation, the first conversation content of the agent in several historical rounds before the current round, and the second conversation content of the user in several historical rounds before the current round;

[0113] A candidate speech matching module 52 is used to match a number of candidate speech from a speech library according to the input content, the first conversation content and the second conversation content;

[0114] A target speech acquisition module 53 is used to input each candidate speech and the second conversation content into the trained speech association model to obtain a preset number of target speech;

[0115] The target speech recommendation module 54 is used to recommend a preset number of target speeches to the agents.

[0116] The agent speech association device provided in the above embodiment and the agent speech association method provided in the embodiment of the present application belong to the same concept. For details on the implementation process, please refer to steps S10 to S40 of the method embodiment, which will not be repeated here.

[0117] The present application also provides a device embodiment that can be used to execute the contents of the agent speech association method in the embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the contents of the agent speech association method in the embodiment of the present application.

[0118] See also Figure 8 The present application also provides an electronic device 300, which can be a computer, a seat speech association device, etc. In an exemplary embodiment of the present application, the electronic device 300 is a seat speech association device, which includes: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, a user interface 304 and at least one communication bus 305.

[0119] The user interface 304 is mainly used to provide an input interface for the user and obtain data input by the user. Optionally, the user interface may also include a standard wired interface or a wireless interface.

[0120] The network interface 303 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0121] The communication bus 305 is used to realize the connection and communication between these components.

[0122] Among them, the processor 301 may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor can integrate one or more combinations of central processing unit (Central Processing Unit, CPU), image processor (Graphics Processing Unit, GPU) and modem. Among them, the CPU mainly processes the operating system, user interface and application program, etc.; the GPU is responsible for rendering and drawing the content to be displayed by the display layer; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented by a single chip.

[0123] Among them, the memory 302 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory may also be optionally at least one storage device located away from the aforementioned processor. As Figure 8 As shown, the memory as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application program.

[0124] The processor can be used to call the application of the agent speech association method of the agent speech association device stored in the memory, and specifically execute the method steps of the above-mentioned embodiment. The specific execution process can refer to the specific description shown in the method embodiment, which will not be repeated here.

[0125] The present application also provides a computer-readable storage medium on which a computer program is stored, and the instructions are suitable for being loaded by a processor and executing the method steps of the above-mentioned embodiment. The specific execution process can refer to the specific description shown in the embodiment, and will not be repeated here. The device where the storage medium is located can be a personal computer, a laptop computer, a smart phone, a tablet computer, a picture director device and other electronic devices.

[0126] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.

[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.

[0130] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0131] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0132] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0133] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0134] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A seat speech association method, characterized in that: The steps include: Acquire input content of the agent in the current round in the current session, first session content of the agent in several historical rounds before the current round, and second session content of the user in several historical rounds before the current round; According to the input content, the first conversation content and the second conversation content, a plurality of candidate speeches are matched from a speech library; Input each of the candidate speech and the second conversation content into the trained speech association model to obtain a preset number of target speech; The preset number of target scripts are recommended to the agent.

2. The agent speech association method according to claim 1 is characterized by: Before the step of inputting each of the candidate speech and the second conversation content into the trained speech association model to obtain a preset number of target speech, the method includes: Obtain a sample training corpus set; wherein the sample training corpus set includes a number of sample training corpora and a label value corresponding to each of the sample training corpora; the sample training corpora include positive sample training corpora and negative sample training corpora; the positive sample training corpora are conversation contents of agents in adjacent rounds in historical conversations and conversation contents of users; the negative sample training corpora are conversation contents of agents in non-adjacent rounds randomly sampled in historical conversations and conversation contents of users; the label value corresponding to each of the sample training corpora includes a first label value corresponding to the positive sample training corpus and a second label value corresponding to the negative sample training corpus; According to the sample training corpora and the first loss function, the first speech association model is trained to obtain the trained first speech association model and the sample scores corresponding to the sample training corpora; Performing model compression on the trained first speech association model to obtain a second speech association model; According to the sample training corpora, the labels corresponding to the sample training corpora, the sample scores corresponding to the sample training corpora, the first loss function and the second loss function, the second speech association model is trained to obtain a trained speech association model.

3. The agent speech association method according to claim 2 is characterized by: The step of training the second speech association model according to the sample training corpora, the labels corresponding to the sample training corpora, the sample scores corresponding to the sample training corpora, the first loss function and the second loss function to obtain the trained speech association model includes: Traversing the label value and the corresponding sample score of each of the sample training corpus; If the difference between the label value corresponding to the current sample training corpus and the sample score corresponding to the current sample training corpus is within a preset value range, weighted summing the first loss function and the second loss function is performed to obtain a third loss function; and the second speech association model is trained according to the third loss function; If the difference between the label corresponding to the current sample training corpus and the sample score corresponding to the current sample training corpus is not within the preset numerical range, training the second speech association model according to the second loss function; Until the number of training times reaches the preset number, a trained speech association model is obtained.

4. The agent speech association method according to any one of claims 1 to 3, characterized in that: The step of inputting each of the candidate speech and the second conversation content into the trained speech association model to obtain a preset number of target speech includes: Performing word segmentation and word sampling on the second conversation content to obtain a feature sequence; Splicing the feature sequence with each of the candidate speech words respectively to obtain a plurality of splicing sequences; Input each of the spliced ​​sequences into a trained speech association model to obtain a number of scores; The scores are sorted, and the candidate speech with scores before a preset number is taken as the target speech.

5. The agent speech association method according to any one of claims 1 to 3, characterized in that: Before the step of matching a plurality of candidate speech words from a speech word library according to the input content, the first conversation content and the second conversation content, the step includes: Obtain source data of several question-answer pairs; Extracting from each of the question-answer pair source data several consecutive rounds of agent conversations, several rounds of user conversations, and the first round of agent conversations after the several rounds of agent conversations are completed; Perform word segmentation and word sampling on the several rounds of agent conversations to obtain a first feature sequence; perform word segmentation and word sampling on the several rounds of user conversations to obtain a second feature sequence; perform word segmentation on the first round of agent conversations to obtain a third feature sequence; A speech library is generated according to the first feature sequence, the second feature sequence and the third feature sequence corresponding to each question-answer pair source data.

6. The agent speech association method according to claim 5 is characterized by: The speech library includes a plurality of speech documents, each of which stores the first feature sequence, the second feature sequence, and the third feature sequence corresponding to the question-answer pair source data; The step of matching a plurality of candidate speech scripts from a speech script library according to the input content, the first conversation content, and the second conversation content includes: Performing similarity matching between the first conversation content and the first feature sequence of each of the speech documents in the speech library to obtain a first score; Performing similarity matching between the second conversation content and the second feature sequence of each of the speech documents in the speech library to obtain a second score; Performing similarity matching between the input content and the third feature sequence of each speech document in the speech library to obtain a third score; Performing a weighted summation on the first score, the second score, and the third score to obtain a fourth score; The third feature sequences in the speech documents whose fourth scores are ranked before a preset number are used as several candidate speeches obtained by matching from the speech library.

7. A seat speech association device, characterized in that: include: An input content acquisition module, used to acquire the input content of the agent in the current round in the current conversation, the first conversation content of the agent in several historical rounds before the current round, and the second conversation content of the user in several historical rounds before the current round; A candidate speech matching module, used to match a number of candidate speech from a speech library according to the input content, the first conversation content and the second conversation content; A target speech acquisition module, used for inputting each of the candidate speech and the second conversation content into a trained speech association model to obtain a preset number of target speech; The target speech recommendation module is used to recommend the preset number of target speech to the agent.

8. An electronic device comprising a display, a processor and a memory; characterized in that: The memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the agent speech association method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the agent speech association method as described in any one of claims 1 to 6 is implemented.