A method for multi-person identity interaction and memory based on large language model

By constructing and training the association sequence and fitting features of the large language model, the recognition and memory problems in multi-person identity interactions are solved, and accurate memory and backtracking of multi-person interactions are achieved, and the accuracy of output is improved.

CN118656459BActive Publication Date: 2024-12-10JIANGSU HUIZHI INTELLIGENT DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410687475.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-12-10
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

Existing large language models are difficult to accurately identify the objects participating in the interaction and output accurate results in multi-person identity interaction, especially in interactive scenarios where multiple parties participate.

Method used

By obtaining the initial input text set, generating the initial label and the initial value, building the association sequence, extracting the time features and correlation characteristics in the token set sequence, obtaining the fitted features of the historical input text set, and training to The fitting degree reaches a preset value to achieve memory and backtracking of multi-person interactions.

Benefits of technology

It realizes accurate memory and backtracking of different interactors in multi-person interaction scenarios, and improves the recognition and output accuracy of large language models in multi-party interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656459B_ABST
    Figure CN118656459B_ABST
Patent Text Reader

Abstract

The present invention provides a method for realizing multi-person identity interaction and memory based on a large prediction model, obtaining an initial input text set, generating an initial label and an initial value; constructing a time series and a token set sequence of the initial input text set corresponding to a session label; extracting a time feature in the time series and a correlation feature in the token set sequence to obtain a truncated feature selected according to the correlation feature in the time series according to a timestamp, obtaining a historical input text set about the initial input text set, and obtaining a fitting feature of the historical input text set to the initial input text set; when a new input occurs, verifying the correlation between the historical input text set and the initial input text set other than the truncated feature according to the fitting feature; and outputting a result. The present invention obtains identity memory by recording label values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field, and in particular relates to a method for realizing multi-person identity interaction and memory based on a large language model. Background Art

[0002] With the development of society, the rise of artificial intelligence has led to the birth of a series of large language models. Large language models refer to language models that are trained on large-scale text corpora and include at least tens of billions of parameters. They are designed to understand and generate human language, and through this large amount of text training, they can perform a wide range of interactive and generative tasks.

[0003] In the prior art, generally, the user's prompt words are used and the prompt words are abstracted into tokens so that the large language model can understand and remember the user's interaction behavior during an interaction process and generate short-term logical and recognizable interactions. However, although the interaction method using prompt word tokens can achieve relatively ideal dialogue and generative tasks with concise input, when the number of people participating in the interaction exceeds one or more, it is difficult for the large language model to accurately identify the objects participating in the interaction in the interaction with multiple parties and accurately output the results based on the input of multiple people.

[0004] In view of this, it is urgent to propose a method based on a large language model to achieve multi-identity interaction and memory, to realize interaction from multiple sources based on the existing large model, and to realize the memory and backtracking of different interactors according to the collection degree of the submitted text. Summary of the invention

[0005] The present invention provides a method for realizing multi-person identity interaction and memory based on a large language model, realizing interaction from multiple sources on the basis of an existing large model and realizing memory and backtracking of different interactors according to the collection degree of submitted texts.

[0006] In a first aspect of the present invention, a method for realizing multi-identity interaction based on a large language model is provided, comprising the following steps: S1, obtaining an initial input text set, generating an initial label and an initial value, and constructing an association sequence between the initial label and the initial value, wherein the initial value is a mapping of a token set corresponding to the input text set, and the initial label is a session label when the initial input text set is obtained;

[0007] S2. Constructing a time series and a token set sequence of the initial input text set corresponding to the session tag;

[0008] S3, extracting the time features in the time series and the correlation features in the token set sequence;

[0009] S4, obtaining a truncated feature selected according to the timestamp in the time series based on the relevance feature, obtaining a historical input text set about the initial input text set, and obtaining a fitting feature of the historical input text set to the initial input text set;

[0010] S5. When a new input occurs, the correlation between the historical input text set and the initial input text set excluding the truncated features is verified according to the fitting feature, and the fitting feature is written into the initial input text set;

[0011] S6, after updating the fitting feature, checking the similarity of the previous fitting feature, if the similarity is within a threshold, writing the new initial label as an identifier into the unit of the old initial label;

[0012] S7. Output the results.

[0013] Furthermore, after executing S4, the following step is also included: when obtaining the fitting feature, training is performed through a forward neural network until the fitting degree of the fitting feature reaches a preset value.

[0014] Furthermore, when the forward neural network is trained, the following steps are included:

[0015] When a new iteration cycle starts, the number of iterations is reset to zero, the iteration threshold is set, and the iteration parameters are set according to the single token fit and collective token fit in the fitting features;

[0016] Get the fitting characteristics and iteration parameters for the next iteration;

[0017] Determine whether the number of iterations reaches the threshold or whether the fitting feature reaches the threshold;

[0018] If yes, the loop ends and the fitting feature output this time is used as the final fitting feature.

[0019] Furthermore, the forward neural network model performs fine-tuning between each iteration, including the following steps:

[0020] Generate a first sequence including token mapping and initial tags;

[0021] Generate a second sequence including token mapping and initial value;

[0022] generating a third sequence including consecutive token mappings;

[0023] Common features are obtained from two adjacent iterations, and the common features include:

[0024] The first feature is the number of identical token mappings and the number of identical initial tags in the first sequence;

[0025] The second feature is the number of identical token mappings and the number of identical initial values ​​in the second sequence;

[0026] The third feature is the continuity of the third sequence with the same token mapping;

[0027] Establishing a first eigenvector between the first sequence and the second sequence, wherein the first eigenvector is a data fit between the first feature and the third feature;

[0028] Establishing a second eigenvector between the first sequence and the third sequence, wherein the second eigenvector is a data fit between the first feature and the third feature;

[0029] Establishing a third eigenvector between the second sequence and the third sequence, wherein the third eigenvector is a data fit between the second feature and the third feature;

[0030] The first eigenvector, the second eigenvector and the third eigenvector are used as three-dimensional input vectors of the neural network model;

[0031] Decay the three-dimensional input vector with a preset learning rate decay rate;

[0032] Inversely adjust the first sequence, the second sequence and the third sequence according to the attenuated three-dimensional input vector;

[0033] The adjusted first, second and third sequences are used as inputs for the next iteration.

[0034] A second aspect of the present invention is a system for implementing multi-person identity interaction and memory based on a language model, which is suitable for implementing the method of the first aspect of the present invention, comprising:

[0035] A first acquisition module is configured to acquire an initial input text set;

[0036] A second acquisition module is configured to acquire a historical input text set;

[0037] The storage module is configured to store the large language model.

[0038] According to a third aspect of the present invention, an electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is suitable for implementing a method when executing the program.

[0039] A fourth aspect of the present invention is a storage medium having a computer program stored thereon, which, when executed by a processor, is suitable for implementing a method.

[0040] The above technical solution of the present invention has the following advantages compared with the prior art:

[0041] The present invention realizes interaction from multiple sources on the basis of an existing large language model by training the token aggregation degree and realizes memory and backtracking of different interactors according to the submitted text aggregation degree. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 Schematic diagram of a system provided by an embodiment of the present invention.

[0043] Figure 2 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0045] Embodiment 1

[0046] The embodiment of the present disclosure provides a method for realizing multi-identity interaction based on a large language model, comprising the following steps: S1, obtaining an initial input text set, generating an initial label and an initial value, and constructing an association sequence between the initial label and the initial value, wherein the initial value is a mapping of a token set corresponding to the input text set, and the initial label is a session label when the initial input text set is obtained;

[0047] S2. Constructing a time series and a token set sequence of the initial input text set corresponding to the session tag;

[0048] S3, extracting the time features in the time series and the correlation features in the token set sequence;

[0049] S4, obtaining a truncated feature selected according to the timestamp in the time series based on the relevance feature, obtaining a historical input text set about the initial input text set, and obtaining a fitting feature of the historical input text set to the initial input text set;

[0050] S5. When a new input occurs, the correlation between the historical input text set and the initial input text set excluding the truncated features is verified according to the fitting feature, and the fitting feature is written into the initial input text set;

[0051] S6, after updating the fitting feature, checking the similarity of the previous fitting feature, if the similarity is within a threshold, writing the new initial label as an identifier into the unit of the old initial label;

[0052] S7. Output the results.

[0053] Furthermore, after executing S4, the following step is also included: when obtaining the fitting feature, training is performed through a forward neural network until the fitting degree of the fitting feature reaches a preset value.

[0054] Furthermore, when the forward neural network is trained, the following steps are included:

[0055] When a new iteration cycle starts, the number of iterations is reset to zero, the iteration threshold is set, and the iteration parameters are set according to the single token fit and collective token fit in the fitting features;

[0056] Get the fitting characteristics and iteration parameters for the next iteration;

[0057] Determine whether the number of iterations reaches the threshold or whether the fitting feature reaches the threshold;

[0058] If yes, the loop ends and the fitting feature output this time is used as the final fitting feature.

[0059] Furthermore, the forward neural network model performs fine-tuning between each iteration, including the following steps:

[0060] Generate a first sequence including token mapping and initial tags;

[0061] Generate a second sequence including token mapping and initial value;

[0062] generating a third sequence including consecutive token mappings;

[0063] Common features are obtained from two adjacent iterations, and the common features include:

[0064] The first feature is the number of identical token mappings and the number of identical initial tags in the first sequence;

[0065] The second feature is the number of identical token mappings and the number of identical initial values ​​in the second sequence;

[0066] The third feature is the continuity of the third sequence with the same token mapping;

[0067] Establishing a first eigenvector between the first sequence and the second sequence, wherein the first eigenvector is a data fit between the first feature and the third feature;

[0068] Establishing a second eigenvector between the first sequence and the third sequence, wherein the second eigenvector is a data fit between the first feature and the third feature;

[0069] Establishing a third eigenvector between the second sequence and the third sequence, wherein the third eigenvector is a data fit between the second feature and the third feature;

[0070] The first eigenvector, the second eigenvector and the third eigenvector are used as three-dimensional input vectors of the neural network model;

[0071] Decay the three-dimensional input vector with a preset learning rate decay rate;

[0072] Inversely adjust the first sequence, the second sequence and the third sequence according to the attenuated three-dimensional input vector;

[0073] The adjusted first, second and third sequences are used as inputs for the next iteration.

[0074] The embodiment of the present disclosure is used to determine the similarity of each feature extracted by text input in other interactions during iterative training. The texts of the interaction sources are considered to have the same meaning only when each associated feature between each sequence reaches a preset value. The degree of fitting is fuzzy through iterative training, and the training is stopped when the degree of fitting reaches a preset value gradually according to the increase in learning rate and sample size.

[0075] In a second aspect of the embodiments of the present disclosure, a system for implementing multi-person identity interaction and memory based on a language model is provided. Figure 1 As shown, including:

[0076] A first acquisition module is configured to acquire an initial input text set;

[0077] A second acquisition module is configured to acquire a historical input text set;

[0078] The storage module is configured to store the large language model.

[0079] The present invention extracts various features about token mapping after truncating the initial input with a specific timestamp as a truncation feature during the interaction process, and vectorizes the data formed between the various features and inputs them into a forward neural network to obtain various fitting features between the texts when the truncated feature is used as the segmentation. When the fitting feature reaches a preset similarity threshold, the interaction when the truncated feature is used as the segmentation is considered to be the same interaction, and the initial value and the initial label are verified at the same time to determine the interaction object, and through the above-mentioned fitting method, the interaction from other sources is compared with the features in the recorded interaction to determine the similarity between the interaction and the recorded interaction, and some features are written into the token mapping to achieve memory in multi-person interaction.

[0080] Embodiment 2

[0081] Combination Figure 2 As shown, an embodiment of the present disclosure provides a device including a processor 30 and a memory 31 .

[0082] Optionally, the device may further include a communication interface (CommunicationInterface) 32 and a bus 33. The processor 30, the communication interface 32, and the memory 31 may communicate with each other through the bus 33. The communication interface 32 may be used for information transmission. The processor 30 may call the logic instructions in the memory 31 to execute the method of the above embodiment.

[0083] An embodiment of the present disclosure provides a storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the above method.

[0084] The above-mentioned storage medium may be a transient computer-readable storage medium or a non-transient computer-readable storage medium. Non-transient storage media include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, and may also be a transient storage medium.

[0085] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

Claims

1. A method for realizing multi-person identity interaction and memory based on a large language model, characterized in that: The steps include: S1. Obtain an initial input text set, generate an initial label and an initial value, and construct an association sequence between the initial label and the initial value, wherein the initial value is a mapping of a corresponding token set in the input text set, and the initial label is a session label when the initial input text set is obtained; S2. Constructing a time series and a token set sequence of the initial input text set corresponding to the session tag; S3, extracting the time features in the time series and the correlation features in the token set sequence; S4, obtaining a truncated feature selected according to the timestamp in the time series based on the relevance feature, obtaining a historical input text set about the initial input text set, and obtaining a fitting feature of the historical input text set to the initial input text set; When the fitting feature is obtained, the forward neural network is trained until the fitting degree of the fitting feature reaches a preset value; When the forward neural network is trained, the following steps are included: When a new iteration cycle starts, the number of iterations is reset to zero, the iteration threshold is set, and the iteration parameters are set according to the single token fit and collective token fit in the fitting features; Get the fitting characteristics and iteration parameters for the next iteration; Determine whether the number of iterations reaches the threshold or whether the fitting feature reaches the threshold; If yes, the loop ends and the fitting feature output this time is used as the final fitting feature; S5. When a new input occurs, the correlation between the historical input text set and the initial input text set excluding the truncated features is verified according to the fitting feature, and the fitting feature is written into the initial input text set; S6, after updating the fitting feature, verify the similarity of the previous fitting feature, if the similarity is within the threshold, write the new initial label as an identifier into the unit of the old initial label; when the fitting feature reaches the preset similarity threshold, it is considered that the interaction when the truncated feature is used as the segmentation is the same interaction, and the initial value and the initial label are verified at the same time to determine the interaction object, and through the above fitting method, the interaction from other sources is compared with the features in the recorded interaction to determine the similarity between the interaction and the recorded interaction, and the features are written into the token mapping to achieve memory in multi-person interaction; S7. Output the results.

2. The method for realizing multi-person identity interaction and memory based on a large language model according to claim 1, characterized in that: The forward neural network model is fine-tuned between each iteration, which includes the following steps: Generate a first sequence including token mapping and initial tags; Generate a second sequence including token mapping and initial value; generating a third sequence including consecutive token mappings; Common features are obtained from two adjacent iterations, and the common features include: The first feature is the number of identical token mappings and the number of identical initial tags in the first sequence; The second feature is the number of identical token mappings and the number of identical initial values ​​in the second sequence; The third feature is the continuity of the third sequence with the same token mapping; Establishing a first eigenvector between the first sequence and the second sequence, wherein the first eigenvector is a data fit between the first feature and the third feature; Establishing a second eigenvector between the first sequence and the third sequence, wherein the second eigenvector is a data fit between the first feature and the third feature; Establishing a third eigenvector between the second sequence and the third sequence, wherein the third eigenvector is a data fit between the second feature and the third feature; The first eigenvector, the second eigenvector and the third eigenvector are used as three-dimensional input vectors of the neural network model; Decay the three-dimensional input vector with a preset learning rate decay rate; Inversely adjust the first sequence, the second sequence and the third sequence according to the attenuated three-dimensional input vector; The adjusted first, second and third sequences are used as inputs for the next iteration.

3. A system for multi-person identity interaction and memory based on a large language model, suitable for implementing the method as claimed in any one of claims 1-2, characterized in that: include: A first acquisition module is configured to acquire an initial input text set; A second acquisition module is configured to acquire a historical input text set; The storage module is configured to store the large language model.

4. An electronic device, characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method is suitable for implementing the method according to any one of claims 1 to 2.

5. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is suitable for implementing the method according to any one of claims 1-2.