Conversational interaction method, device and system based on large model

By evaluating the value index and possibility values ​​of conversation data and performing transient storage, the problem of information faults in large-scale dialogue interactions is solved, and the interaction experience and model efficiency are improved.

CN119311808AInactive Publication Date: 2025-01-14FIBRLINK NETWORKS

Patent Information

Application Number
CN202411868659.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The dialogue-based interaction method based on large models cannot effectively save conversational content that has been long-term or frequently changed topics, resulting in information failure and poor interaction experience.

Method used

By obtaining the value index and possibility value of the current conversation data, we judge whether to perform transient registration, use the transient registration parameters to determine the storage time, realize the attenuated transient cache of conversation data, and avoid information failure.

Benefits of technology

Effectively evaluate the value of conversation data, predict the possibility of subsequent context analysis, perform attenuated storage, avoid conversational faults caused by long-term or topic conversion, and improve interactive experience and model efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311808A_ABST
    Figure CN119311808A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric digital data processing, in particular to a dialogue type interaction method, device and system based on a large model. The method comprises the steps of obtaining dialogue data of a user and an interactive dialogue large model; combining the substantive significance weight of each vocabulary in the dialogue data of the current dialogue, the semantic similarity condition of each vocabulary and the same vocabulary in the dialogue data before the current dialogue, and the semantic similarity condition of the adjacent vocabulary of each vocabulary in the corresponding dialogue data and the corresponding vocabulary in the dialogue before the current dialogue; obtaining a value index of the current dialogue; according to the time difference of every two similar dialogues of the current dialogue and the similar condition of vocabularies in the current dialogue and the previous dialogue, obtaining a possibility value used for context analysis; and synthesizing the value index and the possibility value to determine a transient register parameter, judging whether to register the dialogue data of the current dialogue, and determining the register duration. According to the method, the problem of fault of large-model interactive dialogue is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a conversational interaction method, device and system based on a large model. Background Art

[0002] With the development of science and technology, artificial intelligence technology continues to advance, especially the emergence of large language models, which has brought great convenience to enterprises and people's lives. The conversational interaction of large models can provide services quickly and efficiently, helping enterprises save labor costs and improve operational efficiency. However, despite the many benefits of conversational interaction of large models, it still has some imperfections. For example, the model sometimes has misunderstandings or generates wrong responses, and cannot accurately process complex or ambiguous language expressions, resulting in an interactive experience that is not as good as expected.

[0003] Current large language models generate responses based on the context, but they do not have the ability to retain long-term memory or deep understanding. When the conversation is long or the topic changes frequently, the model may forget the previous conversation content, resulting in the answer being inconsistent with the previous context. The model can only reason based on limited context. After a certain number of characters or turns, it may not be able to effectively save all the key information in the conversation, resulting in a gap. Summary of the invention

[0004] In order to solve the problem that the existing conversational interaction method based on a large model cannot effectively save all key information in the conversation, resulting in a fault, the purpose of the present invention is to provide a conversational interaction method, device and system based on a large model. The technical solution adopted is as follows: In a first aspect, the present invention provides a conversational interaction method based on a large model, the method comprising the following steps: Obtain the conversation data of each conversation between the user and the interactive conversation model in the current time period; The value index of the conversation data of the current conversation is obtained by combining the substantive meaning weight of each word in the conversation data of the current conversation, the semantic similarity between each word and the same word in the conversation data before the current conversation, and the semantic similarity between the adjacent words of each word in the corresponding conversation data and the corresponding words in the conversation before the current conversation; Obtaining a probability value of the current conversation being used for context analysis based on a time difference between each two similar conversations of the current conversation and similarities between words in the current conversation and its previous conversation, wherein the similar conversations are selected from the previous conversations based on similarities between the conversation data of the current conversation and its previous conversation; and determining a transient storage parameter of the current conversation by combining the value index and the probability value; The transient storage parameter is used to determine whether to perform transient storage on the conversation data of the current conversation. If so, the corresponding storage duration is determined and the transient storage is performed.

[0005] Preferably, the method of combining the substantial meaning weight of each word in the conversation data of the current conversation, the semantic similarity between each word and the same word in the conversation data before the current conversation, and the semantic similarity between the adjacent words of each word in the corresponding conversation data and the corresponding words in the conversation before the current conversation to obtain the value index of the conversation data of the current conversation includes: For any word in the conversation data of the current conversation, record the same word in the conversation data of the conversation before the current conversation as the historical word of the word; record the two words adjacent to each historical word in the conversation data as the associated words of each historical word; According to the duration of the current time period, the substantive meaning weight of the candidate word, the similarity coefficient between the candidate word and all its historical words, the semantic similarity between the candidate word and all its historical words, the similarity coefficient between the adjacent words of the candidate word and its corresponding historical words, and the semantic similarity between the adjacent words of the candidate word and its corresponding historical words, the value index of the candidate word is obtained, wherein the candidate word is any word in the dialogue data of the current dialogue; The average value index of all words in the dialogue data of the current dialogue is determined as the value index of the dialogue data of the current dialogue.

[0006] Preferably, obtaining the similarity coefficient between two words includes: For any two words: If the semantic similarity between any two words is less than or equal to a preset similarity threshold, the similarity coefficient between the any two words is set to a preset first value; if the semantic similarity between any two words is greater than the preset similarity threshold, the similarity coefficient between the any two words is set to a preset second value; The preset first value is smaller than the preset second value.

[0007] Preferably, obtaining similar conversations to the current conversation includes: For any conversation before the current one: If the semantic similarity between any word in the conversation data of the conversation and any word in the conversation data of the current conversation is greater than a preset similarity threshold, the conversation is determined to be a similar conversation to the current conversation.

[0008] Preferably, obtaining the probability value of the current dialogue being used for context analysis according to the time difference between each two similar dialogues of the current dialogue and the similarity between the vocabulary in the current dialogue and the previous dialogue includes: The average value of the semantic similarity between all words in the current conversation and all words in each conversation before the current conversation is recorded as the comprehensive similarity value between the current conversation and its corresponding previous conversations; the negative correlation normalization result of the time interval between the current conversation and each previous conversation is used as the weight corresponding to each conversation before the current conversation; the corresponding comprehensive similarity value is weighted by using the weight to obtain the first feature value of each conversation before the current conversation; The time differences between all adjacent similar conversations of the current conversation and the first feature values ​​of all conversations before the current conversation are combined to obtain a probability value of the current conversation being used for context analysis.

[0009] Preferably, the step of determining the transient storage parameter of the current conversation by combining the value index and the possibility value includes: A normalized result of the product of the value index and the possibility value is determined as a transient registration parameter of the current session.

[0010] Preferably, the method of using the transient storage parameter to determine whether to perform transient storage on the conversation data of the current conversation, and if so, determining the corresponding storage duration and performing transient storage, comprises: If the transient storage parameter is less than the preset storage threshold, the conversation data of the current conversation is not temporarily stored; If the transient storage parameter is greater than or equal to the preset storage threshold, the product of the transient storage parameter of the current conversation and the preset storage duration is rounded up as the storage duration, and the conversation data of the current conversation is transiently stored.

[0011] Preferably, after determining whether to temporarily store the conversation data of the current conversation, the method further includes: Get the conversation data for the next conversation; An average value of the semantic similarities between all the words in the conversation data of the current conversation and all the words in the conversation data of the next conversation is recorded as a second average value; Calculating a first time interval between a next conversation and a current conversation; determining a parasitic decay parameter of the current conversation relative to a future conversation according to the first time interval and the second average value, wherein the first time interval is positively correlated with the parasitic decay parameter, and the second average value is negatively correlated with the parasitic decay parameter; The sum of the register attenuation parameter and the constant 1 is calculated; and the product of the sum and the transient register parameter of the current session is used as the updated transient register parameter of the current session.

[0012] In a second aspect, the present invention provides a conversational interaction device based on a big model, comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement a conversational interaction method based on a big model.

[0013] In a third aspect, the present invention further provides a conversational interaction system based on a large model, the system comprising: A data acquisition module is used to acquire the conversation data of each conversation between the user and the interactive conversation model in the current time period; A value index determination module is used to obtain the value index of the dialogue data of the current dialogue by combining the substantive meaning weight of each word in the dialogue data of the current dialogue, the semantic similarity between each word and the same word in the dialogue data before the current dialogue, and the semantic similarity between the adjacent words of each word in the corresponding dialogue data and the corresponding words in the dialogue before the current dialogue; a transient storage parameter determination module, configured to obtain a probability value of the current conversation being used for context analysis based on a time difference between each two similar conversations of the current conversation and a similarity between words in the current conversation and its previous conversation, wherein the similar conversations are selected from the previous conversations based on a similarity between the conversation data of the current conversation and its previous conversation; and determine a transient storage parameter of the current conversation by combining the value index and the probability value; The storage module is used to determine whether to temporarily store the conversation data of the current conversation using the temporary storage parameter, and if so, determine the corresponding storage duration and perform the temporary storage.

[0014] The present invention has at least the following beneficial effects: The present invention first evaluates the value of the conversation data of the current conversation based on the substantial meaning weight of each word in the conversation data of the current conversation, the semantic similarity between each word and the same word in the conversation data before the current conversation, and the semantic similarity between the adjacent words of each word in the corresponding conversation data and the corresponding words in the conversation before the current conversation, and obtains a value index. Then, based on the time difference between each two similar conversations of the current conversation and the similarity between the words in the current conversation and the conversation before the current conversation, it predicts whether there is a possibility of using high-value conversation behaviors for context analysis in the future, and performs attenuated conversation storage for historical conversations that may be subjected to context analysis in the future, so as to avoid the problem of conversation gaps caused by long time or topic conversion. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A flowchart of a conversational interaction method based on a large model provided by an embodiment of the present invention; Figure 2 A structural block diagram of a conversational interaction system based on a large model provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the conversational interaction method, device and system based on the big model proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.

[0018] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0019] The specific scheme of the conversational interaction method, device and system based on the big model provided by the present invention is described in detail below with reference to the accompanying drawings.

[0020] Implementation example of a conversational interaction method based on a large model: The specific scenario targeted by this embodiment is: in the process of using a large model for conversational interaction, when the conversation content is long or the topic changes frequently, there will be a problem that the answer is no longer consistent with the previous text due to information gap. In order to prevent key information from not being saved and information gaps occurring, this embodiment analyzes the conversation behavior between the user and the model, extracts conversation information with important significance, and predicts whether subsequent conversations may require contextual analysis through high-value interactive behaviors based on this key information. Historical conversations that may require contextual analysis are progressively stored and attenuated, thereby solving the information gap problem of the large model of interactive conversation.

[0021] This embodiment proposes a conversational interaction method based on a large model, such as Figure 1 As shown, the conversational interaction method based on the big model of this embodiment includes the following steps: Step S1, obtaining the conversation data of each conversation between the user and the interactive conversation model in the current time period.

[0022] The main purpose of this embodiment is to implement attenuated transient caching of valuable dialogue information when the user is in dialogue with the interactive dialogue model. Therefore, before completing the attenuated transient caching of dialogue information between the user and the interactive dialogue model, dialogue data needs to be collected first. The specific dialogue data collection process is as follows: first, the dialogue behavior between the interactive dialogue model and the user is divided, and a question from the user and an answer from the interactive dialogue model are regarded as a complete dialogue; then, the dialogue data of each dialogue in the current time period is collected. The current time is a set of all historical moments whose time interval with the current moment is less than or equal to the preset time length. In specific applications, the implementer can set the preset time length according to the specific situation. For each complete dialogue data, it is temporarily saved in the register for subsequent analysis and processing.

[0023] So far, this embodiment has collected the conversation data of multiple conversations between the user and the interactive conversation large model in the current time period.

[0024] Step S2, combining the substantive meaning weight of each word in the conversation data of the current conversation, the semantic similarity between each word and the same word in the conversation data before the current conversation, and the semantic similarity between the adjacent words of each word in the corresponding conversation data and the corresponding words in the conversation before the current conversation, to obtain the value index of the conversation data of the current conversation.

[0025] When a user is talking to an interactive dialogue model, in order to save computing power, the model will not retain all historical dialogue data when the conversation on the same topic is too long or when different topics are switched too frequently. As a result, when the user mentions a certain topic later, the model chooses to forget the historical dialogue and has no ability to answer the question in context, which makes the user feel unreal when talking to the interactive dialogue model. The unreality of the dialogue not only makes it impossible for the model to answer the user's conversation more effectively, but also makes the user experience extremely poor. Generally speaking, human thinking and associative ability are relatively active, and in the process of dialogue, the ability to transform topics is relatively strong, so a large amount of historical dialogue information is generated. When saving this historical dialogue information for subsequent context analysis, it is not realistic because the overall amount of computing involved is too large.

[0026] In response to the above problems, this embodiment proposes a method for temporarily storing high-value dialogue information in an attenuable manner, analyzing the dialogue data between the user and the interactive dialogue model within a period of time, using historical dialogue behaviors to predict the possibility of each dialogue behavior being acquired by context analysis in the future, and then obtaining high-value dialogue information for temporary storage, and then attenuating the temporarily stored high-value dialogue behaviors through newly added dialogue behaviors, so as to ensure that there will not be too many stored dialogues that will cause serious waste of the cost of the interactive dialogue model. Therefore, this embodiment will determine the value of each dialogue between the user and the interactive dialogue model and the temporary storage attenuation parameter.

[0027] In step S1, this embodiment collects the conversation data of multiple conversations between the user and the interactive conversation large model in the current time period, and analyzes the last conversation of all the collected conversations as the current conversation.

[0028] When the user is having a current conversation with the interactive conversation model, his main conversation behavior is a new conversation behavior derived from the historical conversation behavior or a continuation of the historical conversation behavior. In the same topic, different conversation sentences have different values. For example, some conversations are only for the purpose of supplementing or explaining a certain topic and are not the core point of the topic. In order to store less and more valuable conversation information in the temporary register, this embodiment analyzes all conversation data in the current time period, evaluates the value of the conversation data of the current conversation, and obtains the corresponding value index.

[0029] Specifically, since the conversation data is composed of multiple words, and the computational complexity of the model for semantic recognition and analysis of different words is much smaller than the semantic recognition of a whole sentence, using different words for analysis can further reduce the computational complexity. Therefore, a word segmentation algorithm is used to perform word segmentation processing on all conversation data acquired in the current time period to obtain multiple words. The word segmentation algorithm is a prior art and will not be described in detail here.

[0030] For any word in the conversation data of the current conversation, the same word as the word in the conversation data of the conversation before the current conversation is recorded as the historical word of the word, that is, multiple historical words of the word are obtained; the two words adjacent to each historical word in the conversation data are recorded as the associated words of each historical word. With this method, the historical words of each word in the conversation data of the current conversation and the associated words of the historical words of each word are obtained.

[0031] Next, a word in the conversation data of the current conversation is used as an example for explanation. The method provided in this embodiment can be used to process other words in the conversation data of the current conversation. Specifically, any word in the conversation data of the current conversation is recorded as a candidate word. If the semantic similarity between the candidate word and its historical words is less than or equal to the preset similarity threshold, the similarity coefficient between the candidate word and its historical words is set to the preset first value; if the semantic similarity between the candidate word and its historical words is greater than the preset similarity threshold, the similarity coefficient between the candidate word and its historical words is set to the preset second value; the preset first value is less than the preset second value; using this method, the similarity coefficient between the candidate word and each of its historical words can be obtained. In this embodiment, the preset first value is 0, and the preset second value is 1. In specific applications, the implementer can set it according to the specific situation.

[0032] The value index of the candidate word is obtained according to the length of the current time period, the substantive meaning weight of the candidate word, the similarity coefficient between the candidate word and all its historical words, the semantic similarity between the candidate word and all its historical words, the similarity coefficient between the adjacent words of the candidate word and its corresponding historical words, and the semantic similarity between the adjacent words of the candidate word and its corresponding historical words.

[0033] It should be noted that the substantive meaning weight of a word is obtained by using the AHP hierarchical analysis method. Conjunctions and adverbs have less substantive meaning in a sentence, so their substantive meaning weight is smaller. The AHP hierarchical analysis method is an existing technology and will not be described in detail here.

[0034] In this embodiment, a specific calculation formula for the value index is given. The value index of the jth word in the conversation data of the current conversation can be expressed as:

[0035] in, Represents the value index of the jth word in the conversation data of the current conversation, Indicates the duration of the current time period. Represents the substantive meaning weight of the jth word in the conversation data of the current conversation, represents the number of historical words of the jth word in the conversation data of the current conversation, Represents the similarity coefficient between the jth word in the conversation data of the current conversation and its nth historical word, Represents the semantic similarity between the jth word in the conversation data of the current conversation and its nth historical word, represents the similarity coefficient between the previous word of the j-th word in the conversation data of the current conversation and the previous word of the n-th historical word of the j-th word in the conversation data of the current conversation, represents the similarity coefficient between the next word of the j-th word in the conversation data of the current conversation and the next word of the n-th historical word of the j-th word in the conversation data of the current conversation, represents the semantic similarity between the previous word of the j-th word in the conversation data of the current conversation and the previous word of the n-th historical word of the j-th word in the conversation data of the current conversation, Indicates the semantic similarity between the next word of the j-th word in the conversation data of the current conversation and the previous word of the n-th historical word of the j-th word in the conversation data of the current conversation.

[0036] The value of the j-th word in the conversation data of the current conversation refers to the words with substantial meaning that appear in the conversation data of the current conversation. Words with the same semantics also appear in the moments before the current conversation, and the combination of fixed words that appear in the conversation data of the current conversation also appears in the moments before the current conversation. The more the above two logics appear in the moments before the current conversation, the longer the longest appearance interval, that is, the current time period, then it means that the j-th word in the conversation data of the current conversation is more likely to be a hot word. For the large model, it is a word with higher value for context analysis, that is, its value index is larger.

[0037] By using the above method, the value index of each word in the conversation data of the current conversation can be obtained. When the user is talking to the interactive conversation model, not every sentence is composed of a large number of valuable words. There are also some conversations that only contain a few high-value words. In order to avoid missing these high-value conversations, the average value index of all words in the conversation data of the current conversation is determined as the value index of the conversation data of the current conversation. The larger the value, the greater the value of the current conversation.

[0038] Step S3, obtaining a probability value of the current conversation being used for context analysis based on the time difference between each two similar conversations of the current conversation and the similarity between the vocabulary in the current conversation and its previous conversation, wherein the similar conversations are screened out from the previous conversations based on the similarity between the conversation data of the current conversation and its previous conversation; and determining the transient storage parameters of the current conversation by combining the value index and the probability value.

[0039] The sentences produced when the user converses with the interactive dialogue big model are not the more valuable they are, the more likely they are to be used for semantic analysis during context analysis in the future. For example, the user and the interactive dialogue big model argue too intensely about a topic before and after a certain moment, but there is no subsequent interaction. Even if these conversations have high local value, there is no need for temporary storage or only a small need for temporary storage. Therefore, in order to prevent the situation where each sentence of the conversation has high local value, this embodiment predicts the possibility of whether high-value conversations will be subjected to context analysis in the future.

[0040] Specifically, for any conversation before the current conversation: if the semantic similarity between any word in the conversation data of the conversation and any word in the conversation data of the current conversation is greater than a preset similarity threshold, then the conversation is determined to be a similar conversation to the current conversation. Using this method, each conversation before the current conversation is judged separately to screen out multiple similar conversations to the current conversation.

[0041] The average value of the semantic similarity between all words in the current conversation and all words in each conversation before the current conversation is recorded as the comprehensive similarity value between the current conversation and its previous corresponding conversations; the negative correlation normalization result of the time interval between the current conversation and its previous conversations is used as the weight corresponding to each conversation before the current conversation; the corresponding comprehensive similarity value is weighted by the weight to obtain the first feature value of each conversation before the current conversation. The time difference between all adjacent similar conversations of the current conversation and the first feature value of all conversations before the current conversation are combined to obtain the possibility value of the current conversation being used for context analysis.

[0042] In this embodiment, a specific calculation formula for the likelihood value is given, and the likelihood value of the current conversation being used for context analysis can be expressed as:

[0043] Among them, P represents the probability value of the current conversation being used for context analysis, M represents the number of similar conversations to the current conversation, represents the time of the mth similar conversation of the current conversation, represents the time of the m-1th similar conversation of the current conversation, e represents a natural constant, K represents the number of conversations before the current conversation, Indicates the time of the current conversation. represents the time of the kth conversation before the current conversation, represents the average value of the semantic similarity between all the words in the current conversation and all the words in the k-th conversation before the current conversation, that is, the comprehensive similarity between the current conversation and the k-th conversation before it; Represents the normalization function.

[0044] It should be noted that: in this embodiment, for any conversation, the start time of the conversation is taken as the time of the conversation. It is used to characterize the time difference between the m-1th similar conversation and the mth similar conversation of the current conversation. The larger the value, the greater the difference between the two. represents the time interval between the current conversation and its previous k-th conversation, Represents the negative correlation normalized result of the time interval between the current conversation and its previous k-th conversation, and uses this result as the weight corresponding to the k-th conversation before the current conversation. Indicates the first feature value of the kth conversation before the current conversation. The greater the time difference between adjacent similar conversations of the current conversation and the greater the first feature value of the conversation before the current conversation, it means that there are more regular similar conversations before the current conversation, and the more dense the similar conversations are before the current conversation, the greater the possibility that the current conversation will be analyzed for context in the future, that is, the greater the possibility value of the current conversation being used for context analysis.

[0045] For the interactive dialogue large model, the more valuable the sentences in the user's dialogue information are and the more likely they are to be analyzed in the future, the greater the need for temporary storage. Therefore, the transient storage parameters of the current dialogue are obtained by comprehensively considering the value index of the dialogue data of the current dialogue and the possibility of the current dialogue being used for context analysis.

[0046] The higher the value of the conversation data and the greater the possibility of being subjected to contextual analysis in the future, the larger the corresponding transient storage parameter should be; the larger the transient storage parameter is, that is, without considering the conversation storage attenuation parameter, the longer the conversation should be transiently stored.

[0047] Therefore, the normalized result of the product of the value index of the conversation data of the current conversation and the probability value of the current conversation being used for context analysis is determined as the transient storage parameter of the current conversation. There are many methods for normalizing data, such as linear normalization, etc., which will not be described in detail here.

[0048] So far, this embodiment has obtained the transient registration parameters of the current session.

[0049] Step S4, using the transient storage parameter to determine whether to perform transient storage on the conversation data of the current conversation, if so, determining the corresponding storage duration and performing transient storage.

[0050] In this embodiment, the transient storage parameter of the current session is obtained in step S3. The larger the transient storage parameter is, the more session data should be stored and the longer the transient storage time should be.

[0051] Therefore, if the transient storage parameter of the current conversation is less than the preset storage threshold, it is considered that it is not worth being temporarily stored, and the conversation data of the current conversation is not temporarily stored; if the transient storage parameter of the current conversation is greater than or equal to the preset storage threshold, it is considered that it is worth being temporarily stored, and the product of the transient storage parameter of the current conversation and the preset storage duration is rounded up as the storage duration, and the conversation data of the current conversation is temporarily stored. The preset storage duration is set by the implementer according to the specific situation. In this embodiment, the preset storage threshold is 0.8, and in specific applications, the implementer can set it according to the specific situation.

[0052] Although some conversations are stored and it can be predicted that the conversation will be used in the future, it is impossible to know the specific popularity of future use. Therefore, through the analysis of future behavior, it is necessary to update the transient storage parameters. When the conversation is used in the future, the more active the application of the conversation semantics is, the more it is necessary to further extend the storage time of the conversation to ensure that there is no information gap in the conversation. The less active the application of the conversation semantics is, the more it is necessary to further decay the storage time of the conversation to ensure the reduction of the calculation amount of the large model. Therefore, the conversation storage decay parameters are obtained based on the conversation data between the user and the interactive conversation large model after the current conversation.

[0053] Specifically, the conversation data of the next conversation is obtained; the average value of the semantic similarity between all words in the conversation data of the current conversation and all words in the conversation data of the next conversation is recorded as the second average value; it should be noted that: for any word in the conversation data of the current conversation, there is a semantic similarity between the word and each word in the conversation data of the next conversation, and the method for calculating the semantic similarity is a prior art and will not be described in detail here. The first time interval between the next conversation and the current conversation is calculated; according to the first time interval and the second average value, the storage decay parameter of the current conversation relative to the future conversation is determined, the first time interval is positively correlated with the storage decay parameter, and the second average value is negatively correlated with the storage decay parameter.

[0054] Among them, a positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by actual application; a negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtractive relationship, a division relationship, etc., which is determined by actual application.

[0055] In this embodiment, a specific calculation formula for the storage attenuation parameter is given. The storage attenuation parameter of the current session relative to the future session can be expressed as:

[0056] Where F represents the storage attenuation parameter of the current dialogue relative to the future dialogue, Indicates the time of the next conversation. Indicates the time of the current conversation. represents the average value of the semantic similarity between all the words in the conversation data of the current conversation and all the words in the conversation data of the next conversation, that is, the second average value; e represents a natural constant, Indicates the preset first adjustment parameter.

[0057] Indicates the time interval between the next conversation and the current conversation, that is, the first time interval. When the first time interval is smaller and the second average value is larger, it means that the semantic application of the conversation at the current moment is active for the conversation at the future moment, so the corresponding transient storage time should be extended, that is, the storage attenuation parameter of the current conversation relative to the future conversation is smaller.

[0058] By using each transient register statement, after each new conversation ends, the corresponding historical conversation register attenuation parameter is obtained, and the transient register parameter is updated.

[0059] Calculate the sum of the register attenuation parameter and the constant 1; and use the product of the sum and the transient register parameter of the current session as the updated transient register parameter of the current session. The updated transient register parameter of the current session can be expressed as:

[0060] Wherein, S represents the updated transient storage parameter of the current dialogue, U represents the transient storage parameter of the current dialogue, and F represents the storage attenuation parameter of the current dialogue relative to the future dialogue.

[0061] After each conversation ends, the transient storage time of each transient storage statement is re-acquired to complete the transient storage update of the transient storage statement.

[0062] At this point, the method provided in this embodiment has been used to complete the storage of the dialogue data between the user and the interactive dialogue large model.

[0063] This embodiment first evaluates the value of the conversation data of the current conversation based on the substantive meaning weight of each word in the conversation data of the current conversation, the semantic similarity between each word and the same word in the conversation data before the current conversation, and the semantic similarity between the adjacent words of each word in the corresponding conversation data and the corresponding words in the conversation before the current conversation, and obtains a value index. Then, based on the time difference between each two similar conversations of the current conversation and the similarity between the words in the current conversation and the conversation before it, it predicts whether there is a possibility of using high-value conversation behaviors for context analysis in the future, and performs attenuated conversation storage for historical conversations that may be subjected to context analysis in the future, so as to avoid conversation gaps caused by long time or topic conversion.

[0064] An embodiment of a conversational interaction device based on a large model: A conversational interaction device based on a big model in this embodiment includes a memory and a processor, and the processor executes a computer program stored in the memory to implement the conversational interaction method based on the big model described above.

[0065] An embodiment of a conversational interaction system based on a large model: like Figure 2 As shown, the figure shows a structural block diagram of a conversational interaction system based on a large model, the system includes a data acquisition module, a value index determination module, a transient storage parameter determination module and a storage module; The data acquisition module is used to acquire the conversation data of each conversation between the user and the interactive conversation model in the current time period; A value index determination module is used to obtain the value index of the dialogue data of the current dialogue by combining the substantive meaning weight of each word in the dialogue data of the current dialogue, the semantic similarity between each word and the same word in the dialogue data before the current dialogue, and the semantic similarity between the adjacent words of each word in the corresponding dialogue data and the corresponding words in the dialogue before the current dialogue; a transient storage parameter determination module, configured to obtain a probability value of the current conversation being used for context analysis based on a time difference between each two similar conversations of the current conversation and a similarity between words in the current conversation and its previous conversation, wherein the similar conversations are selected from the previous conversations based on a similarity between the conversation data of the current conversation and its previous conversation; and determine a transient storage parameter of the current conversation by combining the value index and the probability value; The storage module is used to determine whether to temporarily store the conversation data of the current conversation using the temporary storage parameter, and if so, determine the corresponding storage duration and perform the temporary storage.

[0066] It should be understood that Figure 2 The structural block diagram of a conversational interactive system based on a large model and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art can understand that the above-mentioned method and system can be implemented using computer executable instructions and / or included in a processor control code, for example, such codes are provided on a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The system and its modules of this specification can not only be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software (for example, firmware).

[0067] For more details about the above modules, please refer to other places in this manual and will not be repeated here.

[0068] In other embodiments, a medium is also provided, wherein the medium stores at least one program executable by a computer, and when the at least one program is executed by a computer, the computer executes the steps of the conversational interaction method based on the big model in the above-mentioned embodiment, and the medium may be a computer-readable storage medium.

[0069] Among them, the provided devices, systems, and media are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0070] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A conversational interaction method based on a large model, characterized in that: The method comprises the following steps: Obtain the conversation data of each conversation between the user and the interactive conversation model in the current time period; The value index of the conversation data of the current conversation is obtained by combining the substantive meaning weight of each word in the conversation data of the current conversation, the semantic similarity between each word and the same word in the conversation data before the current conversation, and the semantic similarity between the adjacent words of each word in the corresponding conversation data and the corresponding words in the conversation before the current conversation; Obtaining a probability value of the current conversation being used for context analysis based on a time difference between each two similar conversations of the current conversation and similarities between words in the current conversation and its previous conversation, wherein the similar conversations are selected from the previous conversations based on similarities between the conversation data of the current conversation and its previous conversation; and determining a transient storage parameter of the current conversation by combining the value index and the probability value; The transient storage parameter is used to determine whether to perform transient storage on the conversation data of the current conversation. If so, the corresponding storage duration is determined and the transient storage is performed.

2. The conversational interaction method based on a large model according to claim 1, characterized in that: The method combines the substantive meaning weight of each word in the conversation data of the current conversation, the semantic similarity between each word and the same word in the conversation data before the current conversation, and the semantic similarity between the adjacent words of each word in the corresponding conversation data and the corresponding words in the conversation before the current conversation to obtain the value index of the conversation data of the current conversation, including: For any word in the conversation data of the current conversation, record the same word in the conversation data of the conversation before the current conversation as the historical word of the word; record the two words adjacent to each historical word in the conversation data as the associated words of each historical word; According to the duration of the current time period, the substantive meaning weight of the candidate word, the similarity coefficient between the candidate word and all its historical words, the semantic similarity between the candidate word and all its historical words, the similarity coefficient between the adjacent words of the candidate word and its corresponding historical words, and the semantic similarity between the adjacent words of the candidate word and its corresponding historical words, the value index of the candidate word is obtained, wherein the candidate word is any word in the dialogue data of the current dialogue; The average value index of all words in the dialogue data of the current dialogue is determined as the value index of the dialogue data of the current dialogue.

3. The conversational interaction method based on a large model according to claim 2 is characterized in that: The similarity coefficient between two words is obtained, including: For any two words: If the semantic similarity between any two words is less than or equal to a preset similarity threshold, the similarity coefficient between the any two words is set to a preset first value; if the semantic similarity between any two words is greater than the preset similarity threshold, the similarity coefficient between the any two words is set to a preset second value; The preset first value is smaller than the preset second value.

4. The conversational interaction method based on a large model according to claim 1, characterized in that: Get similar conversations to the current conversation, including: For any conversation before the current one: If the semantic similarity between any word in the conversation data of the conversation and any word in the conversation data of the current conversation is greater than a preset similarity threshold, the conversation is determined to be a similar conversation to the current conversation.

5. The conversational interaction method based on a large model according to claim 1, characterized in that: The method of obtaining a probability value of the current dialogue being used for context analysis based on the time difference between each two similar dialogues of the current dialogue and the similarity between the vocabulary in the current dialogue and the previous dialogue includes: The average value of the semantic similarity between all words in the current conversation and all words in each conversation before the current conversation is recorded as the comprehensive similarity value between the current conversation and its corresponding previous conversations; the negative correlation normalization result of the time interval between the current conversation and each previous conversation is used as the weight corresponding to each conversation before the current conversation; the corresponding comprehensive similarity value is weighted by using the weight to obtain the first feature value of each conversation before the current conversation; The time differences between all adjacent similar conversations of the current conversation and the first feature values ​​of all conversations before the current conversation are combined to obtain a probability value of the current conversation being used for context analysis.

6. The conversational interaction method based on a large model according to claim 1, characterized in that: The step of determining the transient registration parameter of the current conversation by combining the value index and the possibility value includes: A normalized result of the product of the value index and the possibility value is determined as a transient registration parameter of the current session.

7. The conversational interaction method based on a large model according to claim 1, characterized in that: The method of using the transient storage parameter to determine whether to perform transient storage on the conversation data of the current conversation, and if so, determining the corresponding storage duration and performing transient storage, includes: If the transient storage parameter is less than the preset storage threshold, the conversation data of the current conversation is not temporarily stored; If the transient storage parameter is greater than or equal to the preset storage threshold, the product of the transient storage parameter of the current conversation and the preset storage duration is rounded up as the storage duration, and the conversation data of the current conversation is transiently stored.

8. The conversational interaction method based on a large model according to claim 1, characterized in that: After determining whether to temporarily store the conversation data of the current conversation, the method further includes: Get the conversation data for the next conversation; An average value of the semantic similarities between all the words in the conversation data of the current conversation and all the words in the conversation data of the next conversation is recorded as a second average value; Calculating a first time interval between a next conversation and a current conversation; determining a parasitic decay parameter of the current conversation relative to a future conversation according to the first time interval and the second average value, wherein the first time interval is positively correlated with the parasitic decay parameter, and the second average value is negatively correlated with the parasitic decay parameter; The sum of the register attenuation parameter and the constant 1 is calculated; and the product of the sum and the transient register parameter of the current session is used as the updated transient register parameter of the current session.

9. A conversational interaction device based on a large model, comprising a memory and a processor, characterized in that: The processor executes the computer program stored in the memory to implement the large model-based conversational interaction method as described in any one of claims 1-8.

10. A conversational interaction system based on a large model, characterized in that: The system comprises: A data acquisition module is used to acquire the conversation data of each conversation between the user and the interactive conversation model in the current time period; A value index determination module is used to obtain the value index of the dialogue data of the current dialogue by combining the substantive meaning weight of each word in the dialogue data of the current dialogue, the semantic similarity between each word and the same word in the dialogue data before the current dialogue, and the semantic similarity between the adjacent words of each word in the corresponding dialogue data and the corresponding words in the dialogue before the current dialogue; a transient storage parameter determination module, configured to obtain a probability value of the current conversation being used for context analysis based on a time difference between each two similar conversations of the current conversation and a similarity between words in the current conversation and its previous conversation, wherein the similar conversations are selected from the previous conversations based on a similarity between the conversation data of the current conversation and its previous conversation; and determine a transient storage parameter of the current conversation by combining the value index and the probability value; The storage module is used to determine whether to temporarily store the conversation data of the current conversation using the temporary storage parameter, and if so, determine the corresponding storage duration and perform the temporary storage.

Citation Information

Patent Citations

  • Semantic recognition method and device based on self-updating NLP and medium

    CN118133843A

  • Satellite-based network traffic prediction method and electronic equipment

    CN118200204A

  • Human-computer interaction method, device and equipment based on historical dialogues and storage medium

    CN118940842A

  • Method and device for tracking dialogue state in goal-oriented dialogue system

    US20220382995A1

Cited By

  • Real-time interactive online Chinese language learning platform

    CN120315598A

  • A real-time interactive online Chinese language learning platform

    CN120315598B