Question and answer method and equipment
By obtaining the fused feature vector of the account and the triples in the private knowledge graph, and combining them with the fine-tuned large model to provide responses, and mimicking the dialogue style of the target service account, the problem of the large model being unable to provide personalized services is solved, thereby improving service accuracy and customer experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, large models cannot provide personalized services when answering customer questions, resulting in low service accuracy.
By obtaining the fusion feature vector of the account and the triples in the private knowledge graph, the target triples with time requirements are selected, and the response is made in combination with the fine-tuned large model, which imitates the dialogue style of the target service account to achieve personalized service.
This enabled personalized responses to customers based on a large model, improving service accuracy and customer experience, and reducing customer churn.
Smart Images

Figure CN121809682A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a question and answer method and device. BACKGROUND
[0002] With the rise of large model technology, at present, the intelligent customer service system in the financial field mainly adopts the technical architecture of "rule matching + general large model external knowledge base" for question and answer processing. Among them, the technical process mainly includes: user input question -> system performs keyword intent recognition -> retrieves standard business documents (such as financial product brochures) related to the intent -> inputs the document as context into the general large model (Large Language Model, LLM) -> the large model generates a standard reply. For example, when the customer asks "recommend a financial product", the system replies: "Dear customer, we recommend XX product, with an annual yield of 3%."
[0003] This method of large model can only reply based on the obtained standard business documents, and cannot provide personalized services according to the characteristics of the customer, resulting in low service accuracy.
[0004] Therefore, how to use a large model to provide personalized services for the questions raised by customers has become a problem to be solved. SUMMARY
[0005] The embodiments of the present application provide a question and answer method and device based on the question and answer method and device, to solve the problem that the large model in the prior art cannot provide personalized services when replying to the questions raised by customers.
[0006] The embodiments of the present application provide a question and answer method, which comprises: If a question to be replied to input by an account is received, a fusion feature vector saved for the account is obtained, the fusion feature vector describing information of interest of the account; An account private knowledge graph that has been saved is obtained, the private knowledge graph including a plurality of entities, the entities having an association relationship connected by a relationship edge, and any relationship edge and the entities connected thereby forming a triple used to describe preferences, habits or information of interest of the account; Each triple in the private knowledge graph is filtered based on an activation weight corresponding to each relationship edge in the private knowledge graph, to obtain a target triple meeting a timeliness requirement, wherein the activation weight is used to describe the timeliness of the information described by the corresponding triple; The question to be replied to, the fusion feature vector and the information described by the target triple are input into a large model trained by fine-tuning, to obtain reply information of the question to be replied to.
[0007] Further, before inputting the to-be-answered question, the fused feature vector, and the information described by the target triple into the large model that has completed fine-tuning training, the method further includes: determining a target service account that serves the account; obtaining a model adjustment parameter saved for the target service account, wherein the model adjustment parameter is obtained after training the large model based on a conversation style of the target service account; adjusting parameters in the large model using the model adjustment parameter, so that the large model imitates the conversation style of the target service account when determining the reply information.
[0008] Further, the determination process of the model adjustment parameter corresponding to the target service account includes: obtaining training data and inputting the training data into the large model to obtain predicted reply information; determining a first loss value according to a deviation between the predicted reply information and standard reply information corresponding to the training data; determining a predicted style corresponding to the predicted reply information using a pre-trained conversation style recognition model; determining a second loss value according to a deviation between the predicted style and a standard style corresponding to the target service account, wherein the standard style is obtained by recognizing historical conversation information of the target service account using the conversation style recognition model; determining a target loss value according to the first loss value, the second loss value, and a preset weight, and performing LoRA fine-tuning on the large model based on the target loss value to obtain a target model; when a preset convergence condition is met, obtaining target parameters in the target model, and saving the target parameters as the model adjustment parameter of the target service account.
[0009] Further, the method further includes: sending the reply information to a terminal of an audit post for auditing; if a direct sending instruction is received, outputting the reply information.
[0010] Further, the method further includes: if a modified sending instruction is received, outputting a modified text carried in the modified sending instruction.
[0011] Further, the method further includes: determining an edit distance between the output final text and the reply information; determining a target reward value according to the edit distance and a preset sensitivity coefficient. The adjustment value is determined based on the target reward value, the confidence level of the response information determined by the large model, the learning rate, and the gradient direction. The parameters in the large model are adjusted based on the adjustment values.
[0012] Furthermore, the process of determining the fused feature vector of the account includes: Obtain multimodal data of the account, wherein the multimodal data includes the account's tags, the account's transaction data, and data from at least two dimensions of historical communication records; For each dimension of the multimodal data, determine the frequency of occurrence of the target keywords included in that dimension of the multimodal data within a set time period, and determine the information entropy of the data for that dimension based on the frequency of occurrence of each target keyword. Based on the information entropy corresponding to the data in each dimension, determine the weight corresponding to the data in each dimension. The fused feature vector is determined based on the feature vectors of the data in each dimension and their corresponding weights.
[0013] Furthermore, the method also includes: If the associated data of the account is received, extract the entities and relationships included in the associated data; The private knowledge graph of the account is updated based on the entity and the relationship.
[0014] Furthermore, the process of determining the activation weight corresponding to any relation edge in the private knowledge graph includes: Determine the occurrence time of the event corresponding to the relation edge, and the time difference between the current time and the occurrence time; Obtain the initial importance value pre-configured for the event; The activation weight corresponding to the relation edge is determined based on the initial importance value, the time difference, and the forgetting factor.
[0015] This application provides a question-answering device, the device comprising: The acquisition module is used to, if it receives an unanswered question input by an account, acquire the fusion feature vector saved for the account, the fusion feature vector describing the information that the account is interested in; acquire the saved private knowledge graph of the account, the private knowledge graph including multiple entities, entities with relationships are connected by relation edges, and any relation edge and the triple formed by it and the entity it is connected to describe the account's preferences, habits or interest information; The filtering module is used to filter each triple in the private knowledge graph based on the activation weight corresponding to each relation edge in the private knowledge graph, so as to obtain target triples that meet the timeliness requirements. The activation weight is used to describe the timeliness of the information described by the corresponding triple. The response module is used to input the question to be answered, the fused feature vector, and the information described by the target triple into the large model that has been fine-tuned and trained, so as to obtain the response information for the question to be answered.
[0016] Furthermore, the device also includes: The determination module is used to determine the target service account for the service account. The acquisition module is further configured to acquire model adjustment parameters saved for the target service account, wherein the model adjustment parameters are obtained by training the large model based on the dialogue style of the target service account; An adjustment module is used to adjust the parameters in the large model using the model adjustment parameters, so that the large model mimics the dialogue style of the target service account when determining the response information.
[0017] Furthermore, the acquisition module is also used to acquire training data and input the training data into the large model to obtain predicted response information; The determining module is further configured to: determine a first loss value based on the deviation between the predicted response information and the standard response information corresponding to the training data; determine the predicted style corresponding to the predicted response information using a pre-trained dialogue style recognition model; determine a second loss value based on the deviation between the predicted style and the standard style corresponding to the target service account, wherein the standard style is obtained by the dialogue style recognition model from the historical dialogue information of the target service account; determine a target loss value based on the first loss value, the second loss value, and a preset weight, and perform low-rank adaptive LoRA fine-tuning on the large model based on the target loss value to obtain a target model; and when a preset convergence condition is met, obtain the target parameters in the target model and save the target parameters as model adjustment parameters for the target service account.
[0018] Furthermore, the response module is also used to send the response information to the terminal of the reviewer for review; if a direct send instruction is received, the response information is output.
[0019] Furthermore, the response module is also used to output the modified text carried in the modified sending instruction if a modified sending instruction is received.
[0020] Furthermore, the determining module is also used to determine the edit distance between the final output text and the response information; determine a target reward value based on the edit distance and a preset sensitivity coefficient; determine an adjustment value based on the target reward value, the confidence level, learning rate, and gradient direction of the response information determined by the large model; and adjust the parameters in the large model based on the adjustment value.
[0021] Furthermore, the acquisition module is also used to acquire the multimodal data of the account, wherein the multimodal data includes the account's tags, the account's transaction data, and data from at least two dimensions of historical communication records; The determining module is further configured to, for each dimension of the multimodal data, determine the frequency of occurrence of the target keywords included in that dimension of the multimodal data within a set time period, determine the information entropy of that dimension of the data based on the frequency of occurrence of each target keyword, determine the weight corresponding to each dimension of the data based on the information entropy corresponding to each dimension of the data, and determine the fused feature vector based on the feature vector of each dimension of the data and the corresponding weight.
[0022] Furthermore, the adjustment module is also used to, if it receives associated data of the account, extract the entities and relationships included in the associated data; and update the private knowledge graph of the account according to the entities and relationships.
[0023] Furthermore, the determining module is also used to determine the occurrence time of the event corresponding to the relation edge, and the time difference between the current time and the occurrence time; obtain the initial importance value pre-configured for the event; and determine the activation weight corresponding to the relation edge based on the initial importance value, the time difference, and the forgetting factor.
[0024] This application also provides an electronic device, which includes a processor for executing a computer program stored in a memory to implement the steps of any of the question-and-answer methods described above.
[0025] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the question-and-answer methods described above.
[0026] This application also provides a computer program product, which includes computer program code that, when run on a computer, causes the computer to perform the steps of any of the question-and-answer methods described above.
[0027] In this embodiment, after receiving a question from an account, a fusion feature vector describing the information the account is interested in, and the account's private knowledge graph, are obtained. Each relation edge in the private knowledge graph and the triples formed by the entities they connect to describe the account's preferences, habits, or interests. Since the account's interests differ at different times, each relation edge in the private knowledge graph also has an activation weight. This activation weight describes the timeliness of the information described by the corresponding triple. Based on the activation weight of each relation edge, each triple in the private knowledge graph is filtered to obtain target triples that meet the timeliness requirements. Then, the question to be answered, the fusion feature vector, and the information described by the target triples are input into the finely tuned large model to obtain the answer information for the question. This allows the large model to consider both the information the account is interested in and the account's preferences and habits when answering questions, enabling targeted responses and personalized services. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A flowchart illustrating a question-and-answer process provided in an embodiment of this application; Figure 2 A schematic diagram of a question-and-answer process provided in an embodiment of this application; Figure 3 This is a schematic diagram of a question-and-answer device structure provided in an embodiment of this application; Figure 4 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art are within the scope of protection of this application.
[0031] The acquisition, transmission, storage, and use of data in this application all comply with the requirements of relevant national laws and regulations.
[0032] This application provides a question-answering method and device. In this method, if an unanswered question is received from an account, a fusion feature vector stored for the account is obtained, describing the information the account is interested in. A private knowledge graph of the account is also obtained, comprising multiple entities connected by relational edges. A triple formed by any relational edge and its connected entity describes the account's preferences, habits, or interests. Based on the activation weights corresponding to each relational edge in the private knowledge graph, each triple is filtered to obtain target triples that meet timeliness requirements. The activation weights describe the timeliness of the information described by the corresponding triples. Finally, the unanswered question, the fusion feature vector, and the information described by the target triples are input into a finely tuned large model to obtain the answer to the unanswered question.
[0033] To facilitate subsequent understanding, before introducing specific implementation methods, the definitions of some abbreviations and key terms involved in this application will be explained.
[0034] Natural Language Processing (NLP) is a branch of computer science and artificial intelligence that deals with the interaction between computers and human natural language.
[0035] Large Language Model (LLM): A language model composed of deep neural networks with a large number of parameters (such as the Transformer architecture), capable of handling various natural language tasks.
[0036] Low-Rank Adaptation (LoRA): A technique for efficient fine-tuning of large model parameters (PEFT) that freezes the weights of the pre-trained model and trains only the low-rank decomposition matrix to adapt to a specific task.
[0037] Knowledge Graph (KG): A data structure that stores entities and their relationships in the form of a graph structure (nodes and edges), used to describe concepts and their associations in the real world.
[0038] Digital Twin Agent: A virtual AI assistant that is trained based on the historical data of a specific real person and can mimic that person's language style, thinking logic, and knowledge background.
[0039] Implicit Interaction Data: refers to unstructured data generated in informal business processes, which typically contains customers' potential preferences and emotional states.
[0040] Relationship Manager (RM): A professional in a financial institution who is specifically responsible for maintaining relationships with high-net-worth clients.
[0041] Example 1: Figure 1 This application provides a flowchart illustrating a question-and-answer process, as shown in the embodiments below. Figure 1 As shown, the process includes the following steps: S101: If an unanswered question is received from an account, obtain the fusion feature vector stored for the account, the fusion feature vector describing the information that the account is interested in.
[0042] The question-and-answer method provided in this application is applied to electronic devices, such as servers, smart terminals, and PCs.
[0043] To ensure timely responses to customer inquiries, this embodiment of the application can receive pending questions input from any account in real time. The account can be any account linked to a customer. The pending question can be sent by the customer through that account. The pending question can be input by a customer using this electronic device, or it can be sent by another electronic device.
[0044] In order to provide more targeted services to accounts that send pending questions, in this embodiment of the application, if a pending question is received from an account, a fusion feature vector saved for that account can be obtained. This fusion feature vector describes the information that the account is interested in.
[0045] In this embodiment of the application, a questionnaire survey can be conducted periodically on customers who have already bound their accounts to inquire about the information they have been paying attention to recently. After obtaining the information that the account is paying attention to, the feature vector of the information can be extracted and the feature vector can be saved as a fused feature vector for the account.
[0046] S102: Obtain the saved private knowledge graph of the account. The private knowledge graph includes multiple entities. Entities with relationships are connected by relation edges. A triple formed by any relation edge and the entity it connects is used to describe the account's preferences, habits, or attention information.
[0047] To clearly describe the relevant information of each account, a private knowledge graph for each account can be stored in this embodiment. Each private knowledge graph includes multiple entities, and entities with relationships are connected using relational edges. In this embodiment, the triple formed by the entities connected by any relational edge is used to describe the corresponding account's preferences, habits, or areas of interest.
[0048] For example, after each survey questionnaire is received from an account, the responses can be analyzed to extract entities and relationships, thereby updating the account's private knowledge graph. For instance, if customer A of an account answers "I dislike complex financial terminology" in a survey, the analysis can extract the entities: "Customer A" and "financial terminology," and the relationship: "dislike." The resulting triple is: (Customer A) --[Dislike] --> (Financial Terminology). Alternatively, a pre-trained algorithm can be used to extract entities and relationships from a response, and then triples can be constructed based on the extracted entities and relationships.
[0049] In order to obtain more accurate response information, in this embodiment of the application, the private knowledge graph of the account that has been saved can also be obtained.
[0050] S103: Based on the activation weight corresponding to each relation edge in the private knowledge graph, each triple in the private knowledge graph is filtered to obtain target triples that meet the timeliness requirements, wherein the activation weight is used to describe the timeliness of the information described by the corresponding triple.
[0051] Because everyone's preferences, habits, and information interests are time-sensitive—for example, customer A was more concerned with postgraduate entrance exam information a year ago, but is currently more concerned with employment information—in this embodiment, a corresponding activation weight can be set for each relation edge in the private knowledge graph corresponding to any account. This activation weight can be used to describe the timeliness of the information described by the corresponding triple. In this embodiment, multiple time periods can be pre-divided, with different activation weights set for different time periods. For example, the time period can be within one week, greater than one week but less than one month, etc. In this embodiment, the target time period to which any relation edge belongs can be determined based on the time when it is added to the private knowledge graph, and the activation weight corresponding to the target time period can be determined as the activation weight corresponding to the relation edge.
[0052] In this embodiment, each triple in the private knowledge graph can be filtered based on the activation weight corresponding to each relation edge to obtain target triples that meet the timeliness requirements. In other words, recent relevant information about the account is obtained through activation weight filtering, allowing the larger model to provide more targeted responses.
[0053] For example, since the method for determining the activation weight is known, the weight threshold can be configured according to the required time frame, and then the triples corresponding to the relation edges with activation weights greater than the weight threshold can be determined as the target triples.
[0054] In this embodiment, unstructured information is transformed into reasonable knowledge, and the human "forgetting mechanism" is simulated to ensure that the decisions of the large model are based on the latest state of the customer.
[0055] S104: Input the information described by the question to be answered, the fused feature vector, and the target triplet into the large model that has been fine-tuned and trained to obtain the answer information for the question to be answered.
[0056] In this embodiment, the received question to be answered, the obtained fused feature vector, and the information described by the target triple can be input into a large model that has been fine-tuned and trained. This large model can be a large language model. Specifically, this large model can be a large model that has been pre-trained and fine-tuned based on data corresponding to the target domain. The target domain is the business domain to which the question-answering method is applied. The fine-tuned large model can be obtained based on traditional fine-tuning or on LoRa fine-tuning.
[0057] In this embodiment, the information described by the question to be answered, the fused feature vector, and the target triple can be added to a pre-configured prompt word template to obtain a prompt word. This prompt word is then input into a large model, which analyzes the question to be answered, considering the content of the information described by the fused feature vector and the target triple, to determine the corresponding answer information.
[0058] Based on the question-and-answer method provided in this application, targeted response information can be generated without the account manager needing to have a detailed understanding of the account information, effectively preventing customer churn.
[0059] In this embodiment, after receiving a question from an account, a fusion feature vector describing the information the account is interested in, and the account's private knowledge graph, are obtained. Each relation edge in the private knowledge graph and the triples formed by the entities they connect to describe the account's preferences, habits, or interests. Since the account's interests differ at different times, each relation edge in the private knowledge graph also has an activation weight. This activation weight describes the timeliness of the information described by the corresponding triple. Based on the activation weight of each relation edge, each triple in the private knowledge graph is filtered to obtain target triples that meet the timeliness requirements. Then, the question to be answered, the fusion feature vector, and the information described by the target triples are input into the finely tuned large model to obtain the answer information for the question. This allows the large model to consider both the information the account is interested in and the account's preferences and habits when answering questions, enabling targeted responses and personalized services.
[0060] Example 2: To enhance the customer experience, based on the above embodiments, in this embodiment of the application, before inputting the information described by the question to be answered, the fused feature vector, and the target triplet into the fine-tuned large model, the method further includes: Identify the target service account for the account described in the service; Obtain the model adjustment parameters saved for the target service account, wherein the model adjustment parameters are obtained by training the large model based on the dialogue style of the target service account; The parameters in the large model are adjusted using the model adjustment parameters so that the large model mimics the conversational style of the target service account when determining the response information.
[0061] In related technologies, when using large models for question-and-answer services, the responses generated by the large models are uniformly delivered in a "customer service tone," which can create a sense of distance for customers after receiving the responses. Therefore, to improve the customer experience, in this embodiment, the large model can be configured to mimic the speaking style of a specific account manager when generating responses.
[0062] Since the model parameters are fixed after training, in order for the large model to mimic the speaking style of the account manager when generating response information, in this embodiment of the application, model adjustment parameters can be stored for each account manager's account. These model parameter adjustment parameters are obtained by training the large model based on the corresponding account manager's dialogue style.
[0063] In this embodiment, before inputting the information described by the question to be answered, the fused feature vector, and the target triplet into the fine-tuned large model, the target service account for that account can be determined. In this embodiment, any account manager can be randomly selected from all account managers to serve the account's customers, and that account manager's account can be determined as the target service account. Alternatively, it can be determined which account manager previously served the account's customers, and that account manager's account can be determined as the target service account.
[0064] After identifying the target service account, the model parameters saved for that target service account can be obtained, and the parameters in the large model can be adjusted using these model parameters so that the large model mimics the dialogue style of the target service account when determining the response information.
[0065] To further enhance the customer experience, based on the above embodiments, in this embodiment, the process of determining the model adjustment parameters corresponding to the target service account includes: Acquire training data and input the training data into the large model to obtain predicted response information; A first loss value is determined based on the deviation between the predicted response information and the standard response information corresponding to the training data; The predicted style corresponding to the predicted response information is determined using a pre-trained dialogue style recognition model. A second loss value is determined based on the deviation between the predicted style and the standard style corresponding to the target service account, wherein the standard style is obtained by the dialogue style recognition model from the historical dialogue information of the target service account; Based on the first loss value, the second loss value, and the preset weights, a target loss value is determined, and the large model is fine-tuned using low-rank adaptive LoRA based on the target loss value to obtain the target model. When the preset convergence condition is met, the target parameters in the target model are obtained, and the target parameters are saved as model adjustment parameters for the target service account.
[0066] In order to determine the model adjustment parameters corresponding to the target service account, in this embodiment, training data can be obtained and input into a large model to obtain predicted response information. The data composition of this training data is consistent with the data composition input to the large model when determining the response information in the above embodiments.
[0067] After obtaining the predicted response information, a first loss value can be determined based on the deviation between the predicted response information and the standard response information corresponding to the training data. In this embodiment, the first loss value can be the cross-entropy loss value. This first loss value can determine the correctness of the business logic of the model's response obtained through training.
[0068] To enable the trained large model to mimic the conversational style of the target service account, in this embodiment, a pre-trained conversational style recognition model can be used to determine the predicted style corresponding to the predicted response information. For example, if the phrase "Hey bro, I think we can buy a product" is input into the style recognition model, the model can output the predicted style as: carefree, approachable, and likes to say "bro".
[0069] After obtaining the predicted style output by the style recognition model, a second loss value can be determined based on the deviation between the predicted style and the standard style corresponding to the target service account. The standard style can be obtained by the style recognition model from the historical dialogue information of the target service account. In other words, the standard style is determined based on the actual responses from the account manager of the target service account. In this embodiment, the Euclidean distance can be calculated based on the feature vector corresponding to the predicted style and the feature vector corresponding to the standard style, and this Euclidean distance can be determined as the second loss value.
[0070] In this embodiment, a corresponding weight can be pre-configured for each loss value, and then the target loss value is determined based on the first loss value, the second loss value, and the preset weight. Specifically, the target loss value can be determined based on the following formula:
[0071] in, This represents the first loss value; This represents the second loss value, i.e., the style loss; This indicates the preset weight, or style weight coefficient, used to balance content accuracy and style similarity.
[0072] in, ,in, Feature vectors representing the predicted style; The feature vectors representing the standard style.
[0073] Fine-tuning training typically involves fixing model parameters and training only the continuous prompt vectors (softprompts) of the input layer, focusing solely on content accuracy and lacking methods for quantifying and optimizing the abstract dimension of "style." Therefore, in this embodiment, after determining the target loss value, low-rank adaptation (LoRA) fine-tuning can be performed on the large model based on this target loss value to obtain the target model. In this embodiment, the large model already possessing business knowledge of the target domain (i.e., the fine-tuned large model described in the above embodiments) is used as the base large model, and LoRA fine-tuning is performed on this base large model. Specifically, the parameters of the base large model are frozen. Only train low-rank matrices The forward propagation formula is:
[0074] in, Used to provide knowledge in a target field, such as general financial knowledge; Used to provide personalized style biases for target service accounts.
[0075] To explain: The (general-purpose base) is like a standard financial textbook, responsible for providing accurate business knowledge (such as exchange rate data). It is static and unchanging, ensuring that the AI "understands the business"; while (Style bias) is like a "voice changer" or "filter" specifically designed to mimic the tone of the target service account. It's a specially trained plugin responsible for "correcting" the rigid text in textbooks into the conversational language of the target service account's account manager. The final output h is the result of the combination of both: possessing the professional intelligence of the large model and the personal emotional intelligence of the target service account's account manager.
[0076] Based on the training method of this application, if the predicted response information output by the target model is "Dear customer..." and Distance If the size increases, the model will be penalized.
[0077] If the predicted response output by the target model is, "Hey bro, just in time to save up for my nephew's tuition..." and Close distance The smaller the size, the more rewarded the model will be.
[0078] In this embodiment, a preset convergence condition is configured. When the preset convergence condition is met, the target parameters in the current target model can be obtained and saved as model adjustment parameters for the target service account. This target model can skillfully respond based on the customer manager's dialogue style of the target service account.
[0079] If the preset convergence condition is not met, the target model obtained at the moment can be used as the base model for the next training.
[0080] The preset convergence condition can be that the number of times the deviation between the predicted response information and the standard response information corresponding to the training data is less than a threshold is greater than a set number, or the number of times the deviation between the predicted style and the standard style corresponding to the target service account is less than a threshold is greater than a set number, or the number of iterations of model training reaches the set maximum number of iterations, etc. The specific embodiments of this application do not limit this.
[0081] In the embodiments of this application, the electronic device for training the large model can be the same device as the electronic device for question answering, or it can be a different device.
[0082] In this embodiment, style transfer LoRA fine-tuning based on dual-loss function introduces "style consistency loss" in model training, which forces the large model to fit the word choice and sentence construction habits of a specific real person while outputting correct business content.
[0083] The large model obtained by the model training method provided in this application is no longer a cold, impersonal robot, but a digital friend that can call you "brother" and remember "nephew studying abroad." This allows financial institutions to retain the most valuable "human touch" in their digital transformation, greatly enhancing customer loyalty.
[0084] In one possible implementation, LoRA fine-tuning could be skipped, and instead, a few historical replies from the target service account's account manager could be directly input into the general large model as few-shot cue words. However, this method has limited context length, cannot mimic deep-seated thought processes, and suffers from poor style stability, making it prone to "breaking character."
[0085] Example 3: To improve the accuracy of question-and-answer sessions, based on the above embodiments, the method in this application embodiment further includes: The response information will be sent to the reviewer's terminal for review; If a direct send instruction is received, the response information will be output.
[0086] Currently, large models are prone to producing "illusions." To avoid outputting incorrect response information, in this embodiment, after receiving the response information, it can be sent to the terminal of the reviewer for review. This reviewer can be pre-designated or a customer manager serving the account's customer. After receiving the response information, the reviewer can review its content. If the response information is determined to be correct, a direct send command can be sent. For example, the reviewer can click the "Direct Send" button displayed on the terminal. After detecting that the "Direct Send" button has been clicked, the terminal can send a direct send command to the electronic device.
[0087] After receiving a direct send instruction, the electronic device can directly output the response information.
[0088] If the staff member at the review station determines that the response is inappropriate, they can modify it. The staff member can click the "Modify" button displayed on the terminal to modify the response, and then click the "Send" button. Upon detecting that the "Send" button has been clicked, the terminal can send the modified text along with a modification command to the electronic device.
[0089] After receiving a modified transmission command, the electronic device can output the modified text carried in the modified transmission command.
[0090] In one possible implementation, the large model might be too arbitrary in generating response information, neglecting business compliance. Therefore, in this embodiment, a "compliance detection layer (Guardrails)" can be set up to force a rewrite when a violation promise is detected in the response information. For example, if the response information contains the keyword "guaranteed return," a violation promise can be identified. Alternatively, in this embodiment, the determination process of the third loss value can be enhanced in the formula for determining the target loss function. This third loss value is the "content compliance loss," determined based on whether the predicted response information contains violation information. For example, when the predicted response information contains violation information, the third loss value can be determined as a first value; when it does not contain violation information, the third loss value can be determined as a second value.
[0091] In this embodiment, the human-machine collaboration model leverages AI's 24 / 7 responsiveness while mitigating compliance risks associated with AI illusions through a "human review" process. Simultaneously, AI learns from the manager's modifying behavior, continuously evolving to ultimately achieve a leap in efficiency from "assistance" to "semi-managed" service.
[0092] Example 4: To further improve the accuracy of question-and-answer sessions, based on the above embodiments, the method in this application embodiment further includes: Determine the edit distance between the final output text and the response information; The target reward value is determined based on the edit distance and the preset sensitivity coefficient; The adjustment value is determined based on the target reward value, the confidence level of the response information determined by the large model, the learning rate, and the gradient direction. The parameters in the large model are adjusted based on the adjustment values.
[0093] If the reviewer modifies the response information, it indicates that the accuracy of the response information output by the large model is still relatively low. Therefore, in this embodiment, the large model can be fine-tuned and trained according to the degree of modification made by the reviewer to the response information.
[0094] In this embodiment, the levenshtein distance between the final output text and the response information output by the large model can be determined. This levenshtein distance can be understood as the minimum number of character editing operations required to modify the response information output by the large model into the final text. In other words, it is necessary to count the total number of insertion, deletion, and replacement operations required to modify the response information into the final text.
[0095] After determining the edit distance, the target reward value can be determined based on this edit distance and the preset sensitivity coefficient. Specifically, the target reward value can be calculated based on the following formula:
[0096] in, Indicates the target reward value; Indicates edit distance; This represents the sensitivity coefficient.
[0097] Specifically, if the reply message remains unchanged, then... Reward=1, meaning a full score reward. If the response information is significantly modified, then... If the value of is very large, then the Reward will approach 0, and a penalty needs to be imposed on the large model.
[0098] After determining the target reward value, in this embodiment of the application, the policy gradient algorithm can be used to update the parameters in the large model according to the target reward value.
[0099] In this embodiment of the application, an adjustment value can be determined based on the target reward value, the confidence level of the response information determined by the large model, the learning rate, and the gradient direction, and the parameters in the large model can be adjusted based on the adjustment value.
[0100] Specifically, the adjustment value can be determined based on the following formula. :
[0101] in, Indicates the adjustment value; η represents the set of trainable parameters of the current LoRA adapter in the large model (i.e., low-rank matrices A and B); η represents the learning rate. P(R) represents the gradient direction; final P(R) represents the confidence level, i.e., the generation probability. final The meaning of P(R) is how likely the large model is that it 'should' generate this response information given the current model parameters. final The role of P(R) in the formula is: the physical meaning of the entire gradient is to tell the model—since P(R) final If you have achieved a high target reward value, then please adjust the parameters and strive to increase P(R). final This probability value is used so that when the large model encounters the same situation again, it is more likely to say the 'right' statement again.
[0102] After determining the adjustment value, it can be used to replace the corresponding parameters in the large model. In this embodiment, the adjustment process actually involves adjusting the low-rank matrices A and B of the large model.
[0103] Specifically, suppose Manager Li changes his reply from "buy 2 million" to "buy 1 million, keep some funds." The electronic device will record this change, and the target reward value will decrease. In the next training iteration, the model parameter θ will be adjusted towards "more cautious (1 million)," thus more accurately capturing Manager Li's fund allocation logic in the future.
[0104] Example 5: To further improve the accuracy of question answering, based on the above embodiments, in this embodiment, the process of determining the fusion feature vector of the account includes: Obtain multimodal data of the account, wherein the multimodal data includes the account's tags, the account's transaction data, and data from at least two dimensions of historical communication records; For each dimension of the multimodal data, determine the frequency of occurrence of the target keywords included in that dimension of the multimodal data within a set time period, and determine the information entropy of the data for that dimension based on the frequency of occurrence of each target keyword. Based on the information entropy corresponding to the data in each dimension, determine the weight corresponding to the data in each dimension. The fused feature vector is determined based on the feature vectors of the data in each dimension and their corresponding weights.
[0105] Analysis of large amounts of data reveals that the value density of implicit customer interaction data (such as historical communication records) differs from that of explicit data (such as transaction records). In related technologies, the waste of "tacit knowledge" creates data silos. Analyzing only explicit transaction data (e.g., what was bought) while ignoring a large amount of implicit interaction data (e.g., "Mr. Wang doesn't like technical jargon") leads to low service accuracy. Therefore, in this embodiment, a fusion feature vector can be determined, and different weights can be assigned to data of different properties within the fusion feature vector.
[0106] In this embodiment of the application, multimodal data of an account can be obtained. This multimodal data includes at least two dimensions of data from the account's tags, transaction data, and historical communication records.
[0107] Specifically, multimodal data about target customers can be collected in real time through API interfaces. .in, This indicates transaction data, such as, "Mr. Wang's account received RMB 5 million yesterday." This refers to historical communication records, such as the historical communication records that Mr. Wang authorized to access, which included the message: "My son is going to London next month, and the exchange rate of the pound is worrying. What should I do?" This indicates the account's tags, such as: Mr. Wang drinks baijiu (Chinese liquor), dislikes complicated financial jargon, and prefers to hear definitive advice.
[0108] In this embodiment, for each dimension of multimodal data, the frequency of occurrence of target keywords within that dimension's data over a set time period can be determined. Based on the frequency of each target keyword, the information entropy of that dimension's data can be determined. The target keywords can be pre-saved or extracted from the data for that dimension, with each extracted keyword then designated as a target keyword. The set time period can be one day, the current conversation, or within one month, etc.
[0109] Specifically, the information entropy of data in any dimension can be calculated based on the following formula:
[0110] in, This represents the information entropy of data in dimension K; This indicates the frequency of the i-th target keyword in the multimodal data within a set time period; n represents the number of target keywords.
[0111] The calculation logic for this information entropy is: entropy value The smaller the value, the more concentrated and scarce the information contained in that dimension (such as specific personalized needs in chat logs).
[0112] To highlight implicit value, in this embodiment, the weight of each dimension's data can be determined based on the information entropy corresponding to the data in each dimension. Specifically, the weight of any dimension's data can be determined based on the following formula:
[0113] in, This represents the weights corresponding to the data in dimension K; The information entropy of data in dimension K.
[0114] in, (Numerator): Represents the information utility value of a single data source (e.g., data in dimension K). That is, subtract the disorder from 1 to obtain the "absolute score" of the data source.
[0115] (Denominator): Represents the summation operation, which adds up the total information entropy of all data in all dimensions involved in the calculation (from the 1st to the jth dimension).
[0116] The physical meaning of the denominator: This is the normalization factor, which is used to sum the information entropy of all dimensions of data to obtain a "total score".
[0117] The purpose of the denominator is to divide the "information entropy of a certain data" by the "total score," thereby converting the absolute score into a relative percentage and ensuring that all weights are ultimately allocated. The sum of them equals 1.
[0118] After obtaining the weights corresponding to the data in each dimension, the fusion feature vector can be determined based on the feature vectors of the data in each dimension and their corresponding weights.
[0119] Specifically, the fused feature vector can be determined based on the following formula:
[0120] in, Represents the fused feature vector; This indicates the weight of the data corresponding to dimension K (e.g., chat history weight = 0.78, transaction volume weight = 0.22). The feature vector represents the data of dimension K; K represents the number of dimensions obtained.
[0121] In this embodiment of the application, models such as BERT can be used to process the raw data. (e.g., "pound sterling exchange rate") is converted into a numerical vector that a computer can understand.
[0122] For example, the transaction data includes information such as "received 5 million", which has a low weight of only 0.22, and "received 5 million" usually refers to "financial management".
[0123] Historical communication records contain information such as "London," "pound sterling," and "anxious," which have a high weight of 0.78, and these keywords usually point to "foreign exchange risk."
[0124] The resulting fusion feature vector is then:
[0125] Because historical communication records were given nearly four times the weight, the final generated In mathematical space, this closely resembles the characteristic of "foreign exchange risk." Therefore, in subsequent reasoning, large models will ignore the general logic of "recommending large-denomination certificates of deposit" and instead output a precise strategy of "suggesting a forward exchange rate hedge in British pounds."
[0126] In this embodiment, a co-pilot mode of "response information - manual correction" is constructed based on the human-machine co-evolution mechanism of edit distance feedback. The manual modification behavior is used as a reward signal for reinforcement learning to achieve continuous alignment of model style.
[0127] In this embodiment, the multimodal latent feature fusion technology based on entropy weighting not only accesses transaction data but also innovatively accesses compliant archived historical communication records and account tags. Through the information entropy algorithm, it extracts "social attributes" and "emotional preferences" that are ignored by traditional systems.
[0128] Example 6: To further improve the accuracy of question-and-answer sessions, based on the above embodiments, the method in this application embodiment further includes: If the associated data of the account is received, extract the entities and relationships included in the associated data; The private knowledge graph of the account is updated based on the entity and the relationship.
[0129] In this embodiment, account-related data can be received in real time, and the account's private knowledge graph can be updated based on the entities and relationships in the received data. The account-related data can be any authorized data associated with the account. Since the related data is unstructured and extremely noisy, traditional NLP techniques struggle to accurately extract information. Therefore, in this embodiment, a large model can also be used to extract entities and relationships.
[0130] How to construct a knowledge graph based on the received data is an existing technology, and will not be described in detail in the embodiments of this application.
[0131] Specifically, a triplet can be added to Mr. Wang's private knowledge graph: (Mr. Wang) --[Children's Status]--> (Studying in the UK), (Mr. Wang) --[Current Pain Point]--> (Exchange Rate Fluctuation), (Mr. Wang) --[Communication Preference]--> (Rejection of Terminology / Simple and Direct).
[0132] Example 7: To further improve the accuracy of question answering, based on the above embodiments, in this embodiment, the process of determining the activation weight corresponding to any relation edge in the private knowledge graph includes: Determine the occurrence time of the event corresponding to the relation edge, and the time difference between the current time and the occurrence time; Obtain the initial importance value pre-configured for the event; The activation weight corresponding to the relation edge is determined based on the initial importance value, the time difference, and the forgetting factor.
[0133] To differentiate between new and old account preferences, in this embodiment of the application, each relation edge in the private knowledge graph has an activation weight.
[0134] In this embodiment, when determining the activation weight corresponding to any relation edge, the occurrence time of the event corresponding to that relation edge and the time difference between the current time and the occurrence time can be determined. The occurrence event corresponding to the relation edge can be the event in which the relation edge is created in the private knowledge graph, or the time when the associated data corresponding to the relation edge is collected. The unit of the time difference can be days. That is, the time difference describes the number of days between the current time and the occurrence of the event.
[0135] In this embodiment, an initial importance value configured for the event can be obtained, for example, 1.0. It should be noted that the initial importance values for different events can be the same or different.
[0136] After obtaining the initial importance value, the activation weight corresponding to the relation edge can be determined based on this initial importance value, the time difference, and the forgetting factor. The forgetting factor is used to control the rate of memory decay and is a constant, such as 0.1.
[0137] Specifically, the activation weight corresponding to the relation edge can be determined based on the following formula:
[0138] in, Indicates activation weight; Indicates the initial importance value; Indicates the current time; Indicates the time of occurrence; This indicates the time difference (in days) between the current time and the time of occurrence. This represents the forgetting factor.
[0139] If Mr. Wang inquired about "dollar investment" three years ago: due to the large time difference, the exponent term of 'e' is close to 0, then the information described by the corresponding relation edge and the triples of the connected nodes is invalid. If Mr. Wang mentioned "pound exchange rate" yesterday: due to the small time difference, the activation weight is close to 1.0; therefore, the information described by the corresponding relation edge and the triples of the connected nodes is active.
[0140] Example 8: The following is combined with Figure 2 The question-and-answer process of the embodiments of this application will be described. Figure 2 This is a schematic diagram of a question-and-answer process provided in an embodiment of this application.
[0141] Users (e.g., Mr. Wang) can enter a question, which will then become the question to be answered.
[0142] The Agent generates a draft response to the question by combining the user's private knowledge graph with a finely tuned, trained large model. This draft response is the answer information for the question to be answered as described in the above embodiments. The Agent can be understood as a digital avatar intelligent agent.
[0143] After receiving the draft response, it can be sent to the account manager's terminal (e.g., Manager Li) for manual confirmation or modification. The account manager reviews the draft response. If the electronic device receives a direct send instruction, it can send the draft response directly to the user. If the electronic device receives a modified send instruction, it indicates that content needs to be modified, and the revised text can be sent to the user.
[0144] If the account manager modifies the draft response, it indicates that the response information generated by the agent is inaccurate, triggering the feedback mechanism. Next, the target reward value is determined by calculating the edit distance, and an adjustment value is determined based on this target reward value. Then, a reinforcement learning reward model is implemented based on this adjustment value to update the model's parameters.
[0145] In this embodiment, the user's private knowledge graph is dynamically updated. Upon receiving the user's associated data, the private knowledge graph can be updated based on the entities and relationships included in the associated data, and the activation weights corresponding to the relationship edges are determined based on the Time Decay algorithm described in the above embodiments. The associated data can be multimodal data.
[0146] In this embodiment, the fine-tuned large model can be a "digital clone model" corresponding to the account manager. This model adds a LoRA adapter to the general large model, and the LoRA adapter is configured with the account manager's model adjustment parameters (i.e., style parameters). These style parameters are determined based on the first loss value and the second loss value described in the above embodiments.
[0147] Specifically, when the agent receives the user's current question X, it no longer relies solely on the literal meaning of the text, but directly loads the pre-determined fusion feature vector. As a core context embedding.
[0148] For example, if due to Historical communication records have a very high weighting, while transaction data has a lower weighting. Furthermore, the semantics of historical communication records are closer to "foreign exchange risk," while the semantics of transaction data are closer to "large-denomination certificates of deposit." Because... Implicit interaction data (historical communication records) has a very high weight, which forces the model to gravitate toward "foreign exchange risk" in the inference space, thereby shielding it from interference from general explicit business logic such as "large-denomination certificates of deposit".
[0149] Next, the agent accesses the user's constructed private knowledge graph. Based on the activation weight of each relation edge Timeliness filtering is applied to associated nodes. The agent only extracts... Knowledge in the "active state" that is close to 1.0 is automatically discarded. The near-zero "dormant" knowledge ensures that the generated recommendations do not contain outdated information.
[0150] Next, the aforementioned "fused feature vectors" and "activation state knowledge" are input into a large model fine-tuned with LoRA to generate a draft response with Manager Li's personal style. .
[0151] The question-and-answer method provided in this application adopts an "accompanying" human-machine collaboration mode to provide services.
[0152] In one possible implementation, rule-based tagging can also be used for profile matching. For example, each account can be manually tagged with "baijiu enthusiast" or "conservative," and response information can be generated using rule templates. However, this rule-based technology has inherent drawbacks, including the following: This approach is a single-point matching. Understanding "likes baijiu" is simple; just match the tag "[baijiu]" and then recommend related gifts or topics – it's linear. However, it doesn't understand logical transitions: "Although conservative, interested in tech stocks" is a complex logical combination. The rule system sees the 'conservative' tag and triggers the 'recommend deposit' rule; it sees the 'tech stocks' tag and triggers the 'recommend stocks' rule. These two rules conflict, causing the system to freeze or make incorrect decisions. It cannot understand the 'although...but...' logic of language like a larger model, thus failing to provide a compromise solution like 'buy low-risk tech funds'. Therefore, this alternative approach can only handle simple, either-or facts (like baijiu), and cannot address the complex, contradictory human needs.
[0153] Example 9: Based on the same inventive concept, embodiments of this application provide a question-and-answer device. Figure 3 Please refer to the schematic diagram of a question-and-answer device structure provided in this application embodiment. Figure 3 The device includes: The acquisition module 301 is used to, if it receives an unanswered question input by an account, acquire a fusion feature vector saved for the account, the fusion feature vector describing the information that the account is interested in; acquire a saved private knowledge graph of the account, the private knowledge graph including multiple entities, entities with relationships are connected by relation edges, and any relation edge and the triple formed by it and the entity it connects are used to describe the account's preferences, habits or interest information; The filtering module 302 is used to filter each triple in the private knowledge graph based on the activation weight corresponding to each relation edge in the private knowledge graph to obtain target triples that meet the timeliness requirements, wherein the activation weight is used to describe the timeliness of the information described by the corresponding triple. The response module 303 is used to input the question to be answered, the fused feature vector, and the information described by the target triple into the large model that has been fine-tuned and trained, so as to obtain the response information for the question to be answered.
[0154] In one possible implementation, the device further includes: Module 304 is used to determine the target service account for the service account; The acquisition module 301 is further configured to acquire model adjustment parameters saved for the target service account, wherein the model adjustment parameters are obtained by training the large model based on the dialogue style of the target service account; The adjustment module 305 is used to adjust the parameters in the large model using the model adjustment parameters, so that the large model mimics the dialogue style of the target service account when determining the response information.
[0155] In one possible implementation, the acquisition module 301 is further configured to acquire training data and input the training data into the large model to obtain predicted response information; The determining module 304 is further configured to: determine a first loss value based on the deviation between the predicted response information and the standard response information corresponding to the training data; determine the predicted style corresponding to the predicted response information using a pre-trained dialogue style recognition model; determine a second loss value based on the deviation between the predicted style and the standard style corresponding to the target service account, wherein the standard style is obtained by the dialogue style recognition model from the historical dialogue information of the target service account; determine a target loss value based on the first loss value, the second loss value, and a preset weight, and perform low-rank adaptive LoRA fine-tuning on the large model based on the target loss value to obtain a target model; and when a preset convergence condition is met, obtain the target parameters in the target model and save the target parameters as model adjustment parameters for the target service account.
[0156] In one possible implementation, the response module 303 is further configured to send the response information to the terminal of the reviewer for review; if a direct send instruction is received, the response information is output.
[0157] In one possible implementation, the response module 303 is further configured to output the modified text carried in the modified sending instruction if a modified sending instruction is received.
[0158] In one possible implementation, the determining module 304 is further configured to determine the edit distance between the output final text and the response information; determine a target reward value based on the edit distance and a preset sensitivity coefficient; determine an adjustment value based on the target reward value, the confidence level, learning rate, and gradient direction of the response information determined by the large model; and adjust the parameters in the large model based on the adjustment value.
[0159] In one possible implementation, the acquisition module 301 is further configured to acquire multimodal data of the account, wherein the multimodal data includes the account's tags, the account's transaction data, and data from at least two dimensions of historical communication records; The determining module 304 is further configured to, for each dimension of the multimodal data, determine the frequency of occurrence of the target keywords included in the data of that dimension within a set time period in the multimodal data; determine the information entropy of the data of that dimension based on the frequency of occurrence of each target keyword; determine the weight corresponding to the data of each dimension based on the information entropy corresponding to the data of each dimension; and determine the fused feature vector based on the feature vector of the data of each dimension and the corresponding weight.
[0160] In one possible implementation, the adjustment module 305 is further configured to, if it receives associated data of the account, extract the entities and relationships included in the associated data; and update the private knowledge graph of the account based on the entities and relationships.
[0161] In one possible implementation, the determining module 304 is further configured to determine the occurrence time of the event corresponding to the relation edge, and the time difference between the current time and the occurrence time; obtain an initial importance value pre-configured for the event; and determine the activation weight corresponding to the relation edge based on the initial importance value, the time difference, and the forgetting factor.
[0162] Example 10: Based on the same inventive concept, embodiments of this application provide an electronic device that can implement the steps of the data manipulation method described above. Figure 4 This application provides a schematic diagram of an electronic device structure, such as... Figure 4 As shown, it includes: processor 401, communication interface 402, memory 403 and communication bus 404, wherein processor 401, communication interface 402 and memory 403 communicate with each other through communication bus 404. The memory 403 stores a computer program. When the program is executed by the processor 401, the processor 401 performs the following steps: If an unanswered question is received from an account, the system retrieves the fusion feature vector stored for that account, which describes the information that the account is interested in. Obtain the saved private knowledge graph of the account. The private knowledge graph includes multiple entities. Entities with relationships are connected by relation edges. A triple formed by any relation edge and the entity it is connected to is used to describe the account's preferences, habits, or attention information. Based on the activation weight corresponding to each relation edge in the private knowledge graph, each triple in the private knowledge graph is filtered to obtain target triples that meet the timeliness requirements. The activation weight is used to describe the timeliness of the information described by the corresponding triple. The information described by the question to be answered, the fused feature vector, and the target triple is input into the large model that has been fine-tuned and trained to obtain the answer information for the question to be answered.
[0163] In one possible implementation, before inputting the information described by the question to be answered, the fused feature vector, and the target triple into the large model that has been fine-tuned and trained, the method further includes: Identify the target service account for the account described in the service; Obtain the model adjustment parameters saved for the target service account, wherein the model adjustment parameters are obtained by training the large model based on the dialogue style of the target service account; The parameters in the large model are adjusted using the model adjustment parameters so that the large model mimics the conversational style of the target service account when determining the response information.
[0164] In one possible implementation, the process of determining the model adjustment parameters corresponding to the target service account includes: Acquire training data and input the training data into the large model to obtain predicted response information; A first loss value is determined based on the deviation between the predicted response information and the standard response information corresponding to the training data; The predicted style corresponding to the predicted response information is determined using a pre-trained dialogue style recognition model. A second loss value is determined based on the deviation between the predicted style and the standard style corresponding to the target service account, wherein the standard style is obtained by the dialogue style recognition model from the historical dialogue information of the target service account; Based on the first loss value, the second loss value, and the preset weights, a target loss value is determined, and the large model is fine-tuned using low-rank adaptive LoRA based on the target loss value to obtain the target model. When the preset convergence condition is met, the target parameters in the target model are obtained, and the target parameters are saved as model adjustment parameters for the target service account.
[0165] In one possible implementation, the method further includes: The response information will be sent to the reviewer's terminal for review; If a direct send instruction is received, the response information will be output.
[0166] In one possible implementation, the method further includes: If a modified send instruction is received, the modified text carried in the modified send instruction will be output.
[0167] In one possible implementation, the method further includes: Determine the edit distance between the final output text and the response information; The target reward value is determined based on the edit distance and the preset sensitivity coefficient; The adjustment value is determined based on the target reward value, the confidence level of the response information determined by the large model, the learning rate, and the gradient direction. The parameters in the large model are adjusted based on the adjustment values.
[0168] In one possible implementation, the process of determining the fused feature vector of the account includes: Obtain multimodal data of the account, wherein the multimodal data includes the account's tags, the account's transaction data, and data from at least two dimensions of historical communication records; For each dimension of the multimodal data, determine the frequency of occurrence of the target keywords included in that dimension of the multimodal data within a set time period, and determine the information entropy of the data for that dimension based on the frequency of occurrence of each target keyword. Based on the information entropy corresponding to the data in each dimension, determine the weight corresponding to the data in each dimension. The fused feature vector is determined based on the feature vectors of the data in each dimension and their corresponding weights.
[0169] In one possible implementation, the method further includes: If the associated data of the account is received, extract the entities and relationships included in the associated data; The private knowledge graph of the account is updated based on the entity and the relationship.
[0170] In one possible implementation, the process of determining the activation weight corresponding to any relation edge in the private knowledge graph includes: Determine the occurrence time of the event corresponding to the relation edge, and the time difference between the current time and the occurrence time; Obtain the initial importance value pre-configured for the event; The activation weight corresponding to the relation edge is determined based on the initial importance value, the time difference, and the forgetting factor.
[0171] Since the principle of the above-mentioned electronic device in solving problems is similar to that of the question-and-answer method, the implementation of the above-mentioned electronic device can be found in the embodiments of the method, and repeated parts will not be described again.
[0172] The communication bus mentioned in the above-mentioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus. Communication interface 402 is used for communication between the above-mentioned electronic device and other devices. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.
[0173] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0174] Example 11: Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a processor. When the program runs on the processor, it causes the processor to perform the following steps: If an unanswered question is received from an account, the system retrieves the fusion feature vector stored for that account, which describes the information that the account is interested in. Obtain the saved private knowledge graph of the account. The private knowledge graph includes multiple entities. Entities with relationships are connected by relation edges. A triple formed by any relation edge and the entity it is connected to is used to describe the account's preferences, habits, or attention information. Based on the activation weight corresponding to each relation edge in the private knowledge graph, each triple in the private knowledge graph is filtered to obtain target triples that meet the timeliness requirements. The activation weight is used to describe the timeliness of the information described by the corresponding triple. The information described by the question to be answered, the fused feature vector, and the target triple is input into the large model that has been fine-tuned and trained to obtain the answer information for the question to be answered.
[0175] In one possible implementation, before inputting the information described by the question to be answered, the fused feature vector, and the target triple into the large model that has been fine-tuned and trained, the method further includes: Identify the target service account for the account described in the service; Obtain the model adjustment parameters saved for the target service account, wherein the model adjustment parameters are obtained by training the large model based on the dialogue style of the target service account; The parameters in the large model are adjusted using the model adjustment parameters so that the large model mimics the conversational style of the target service account when determining the response information.
[0176] In one possible implementation, the process of determining the model adjustment parameters corresponding to the target service account includes: Acquire training data and input the training data into the large model to obtain predicted response information; A first loss value is determined based on the deviation between the predicted response information and the standard response information corresponding to the training data; The predicted style corresponding to the predicted response information is determined using a pre-trained dialogue style recognition model. A second loss value is determined based on the deviation between the predicted style and the standard style corresponding to the target service account, wherein the standard style is obtained by the dialogue style recognition model from the historical dialogue information of the target service account; Based on the first loss value, the second loss value, and the preset weights, a target loss value is determined, and the large model is fine-tuned using low-rank adaptive LoRA based on the target loss value to obtain the target model. When the preset convergence condition is met, the target parameters in the target model are obtained, and the target parameters are saved as model adjustment parameters for the target service account.
[0177] In one possible implementation, the method further includes: The response information will be sent to the reviewer's terminal for review; If a direct send instruction is received, the response information will be output.
[0178] In one possible implementation, the method further includes: If a modified send instruction is received, the modified text carried in the modified send instruction will be output.
[0179] In one possible implementation, the method further includes: Determine the edit distance between the final output text and the response information; The target reward value is determined based on the edit distance and the preset sensitivity coefficient; The adjustment value is determined based on the target reward value, the confidence level of the response information determined by the large model, the learning rate, and the gradient direction. The parameters in the large model are adjusted based on the adjustment values.
[0180] In one possible implementation, the process of determining the fused feature vector of the account includes: Obtain multimodal data of the account, wherein the multimodal data includes the account's tags, the account's transaction data, and data from at least two dimensions of historical communication records; For each dimension of the multimodal data, determine the frequency of occurrence of the target keywords included in that dimension of the multimodal data within a set time period, and determine the information entropy of the data for that dimension based on the frequency of occurrence of each target keyword. Based on the information entropy corresponding to the data in each dimension, determine the weight corresponding to the data in each dimension. The fused feature vector is determined based on the feature vectors of the data in each dimension and their corresponding weights.
[0181] In one possible implementation, the method further includes: If the associated data of the account is received, extract the entities and relationships included in the associated data; The private knowledge graph of the account is updated based on the entity and the relationship.
[0182] In one possible implementation, the process of determining the activation weight corresponding to any relation edge in the private knowledge graph includes: Determine the occurrence time of the event corresponding to the relation edge, and the time difference between the current time and the occurrence time; Obtain the initial importance value pre-configured for the event; The activation weight corresponding to the relation edge is determined based on the initial importance value, the time difference, and the forgetting factor.
[0183] Example 12: Based on the same inventive concept, this application also provides a computer program product, which includes computer program code that, when run on a computer, causes the computer to execute any of the question-and-answer methods described above. Since the principle by which the above computer program product solves the problem is similar to that of the question-and-answer method, the implementation of the above computer program product can be referred to the implementation of the method, and repeated details will not be elaborated further.
[0184] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0186] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0187] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0188] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A question-and-answer method, characterized in that, The method includes: If an unanswered question is received from an account, the system retrieves the fusion feature vector stored for that account, which describes the information that the account is interested in. Obtain the saved private knowledge graph of the account. The private knowledge graph includes multiple entities. Entities with relationships are connected by relation edges. A triple formed by any relation edge and the entity it is connected to is used to describe the account's preferences, habits, or attention information. Based on the activation weight corresponding to each relation edge in the private knowledge graph, each triple in the private knowledge graph is filtered to obtain target triples that meet the timeliness requirements. The activation weight is used to describe the timeliness of the information described by the corresponding triple. The information described by the question to be answered, the fused feature vector, and the target triple is input into the large model that has been fine-tuned and trained to obtain the answer information for the question to be answered.
2. The method according to claim 1, characterized in that, Before inputting the information described by the question to be answered, the fused feature vector, and the target triple into the large model that has been fine-tuned and trained, the method further includes: Identify the target service account for the account described in the service; Obtain the model adjustment parameters saved for the target service account, wherein the model adjustment parameters are obtained by training the large model based on the dialogue style of the target service account; The parameters in the large model are adjusted using the model adjustment parameters so that the large model mimics the conversational style of the target service account when determining the response information.
3. The method according to claim 2, characterized in that, The process of determining the model adjustment parameters corresponding to the target service account includes: Acquire training data and input the training data into the large model to obtain predicted response information; A first loss value is determined based on the deviation between the predicted response information and the standard response information corresponding to the training data; The predicted style corresponding to the predicted response information is determined using a pre-trained dialogue style recognition model. A second loss value is determined based on the deviation between the predicted style and the standard style corresponding to the target service account, wherein the standard style is obtained by the dialogue style recognition model from the historical dialogue information of the target service account; Based on the first loss value, the second loss value, and the preset weights, a target loss value is determined, and the large model is fine-tuned using low-rank adaptive LoRA based on the target loss value to obtain the target model. When the preset convergence condition is met, the target parameters in the target model are obtained, and the target parameters are saved as model adjustment parameters for the target service account.
4. The method according to claim 1, characterized in that, The method further includes: The response information will be sent to the reviewer's terminal for review; If a direct send instruction is received, the response information will be output.
5. The method according to claim 4, characterized in that, The method further includes: If a modified send instruction is received, the modified text carried in the modified send instruction will be output.
6. The method according to claim 5, characterized in that, The method further includes: Determine the edit distance between the final output text and the response information; The target reward value is determined based on the edit distance and the preset sensitivity coefficient; The adjustment value is determined based on the target reward value, the confidence level of the response information determined by the large model, the learning rate, and the gradient direction. The parameters in the large model are adjusted based on the adjustment values.
7. The method according to claim 1, characterized in that, The process of determining the fused feature vector of the account includes: Obtain multimodal data of the account, wherein the multimodal data includes the account's tags, the account's transaction data, and data from at least two dimensions of historical communication records; For each dimension of the multimodal data, determine the frequency of occurrence of the target keywords included in that dimension of the multimodal data within a set time period, and determine the information entropy of the data for that dimension based on the frequency of occurrence of each target keyword. Based on the information entropy corresponding to the data in each dimension, determine the weight corresponding to the data in each dimension. The fused feature vector is determined based on the feature vectors of the data in each dimension and their corresponding weights.
8. The method according to claim 1, characterized in that, The method further includes: If the associated data of the account is received, extract the entities and relationships included in the associated data; The private knowledge graph of the account is updated based on the entity and the relationship.
9. The method according to claim 1, characterized in that, The process of determining the activation weight corresponding to any relation edge in the private knowledge graph includes: Determine the occurrence time of the event corresponding to the relation edge, and the time difference between the current time and the occurrence time; Obtain the initial importance value pre-configured for the event; The activation weight corresponding to the relation edge is determined based on the initial importance value, the time difference, and the forgetting factor.
10. An electronic device, characterized in that, The electronic device includes a processor that executes a computer program stored in a memory to implement the steps of the question-and-answer method as described in any one of claims 1-9.