Conversation processing method and device, storage medium and electronic equipment

Respond to user inquiries in electronic devices through the large language model of knowledge question and answer, solving the problem that traditional dialogue processing cannot understand semantics, and achieving high-quality knowledge answers and intelligent dialogue processing.

CN118568220AInactive Publication Date: 2024-08-30SHENZHEN QIHOO INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410613201.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional dialogue processing methods cannot dynamically understand questions based on specific semantics, resulting in incorrect answers or inability to answer questions, which limits the practical application utility of dialogue processing scenarios in electronic devices.

Method used

The knowledge question and answer large language model is used to determine the target knowledge content by responding to the user's knowledge query data, and perform knowledge enlightenment transformation processing on it to generate target knowledge enlightenment content that guides thinking, and is used for intelligent object services to provide knowledge answers.

Benefits of technology

Effectively understand the semantics of knowledge queries, accurately match target knowledge content, improve the quality of knowledge content, avoid straightforward replies, optimize the dialogue processing process, and improve the level of intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568220A
    Figure CN118568220A
Patent Text Reader

Abstract

The embodiment of the invention discloses a dialogue processing method and device, a storage medium and electronic device.The method comprises the steps that in response to knowledge inquiry data input by a user for an intelligent object service, target knowledge content corresponding to the knowledge inquiry data is determined based on the knowledge inquiry data by adopting a knowledge question and answer large language model, and performing knowledge heuristic conversion processing on the target knowledge content to obtain target knowledge heuristic content, and controlling the intelligent object service to perform knowledge solution processing on the user based on the target knowledge heuristic content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a conversation processing method, device, storage medium and electronic device. Background Art

[0002] With the development of computer technology, electronic devices such as smart watches and smart bracelets are rapidly becoming popular. Electronic devices usually have the function of intelligent voice question and answer, and support the function of waking up the device through voice, including making calls, setting alarms, opening applications, playing music stories, etc., and can also conduct encyclopedia knowledge question and answer conversations to answer users' doubts in life. Summary of the invention

[0003] The present application provides a method, device, storage medium and electronic device for processing a conversation. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for processing a conversation, the method comprising:

[0005] In response to knowledge query data input by a user for a smart object service, a knowledge question and answer large language model is used to determine target knowledge content corresponding to the knowledge query data based on the knowledge query data, and a knowledge heuristic transformation process is performed on the target knowledge content to obtain target knowledge heuristic content;

[0006] The smart object service is controlled to provide knowledge answer processing to the user based on the target knowledge enlightenment content.

[0007] In a feasible implementation, the determining the target knowledge content corresponding to the knowledge query data using the knowledge question and answer large language model based on the knowledge query data, and performing knowledge inspiration transformation processing on the target knowledge content to obtain the target knowledge inspiration content of the guiding thinking type, includes:

[0008] Determine inquiry scenario description data for the user, and adjust the inquiry prompt words of the knowledge inquiry data based on the inquiry scenario description data to obtain knowledge inquiry data after the prompt words are adjusted;

[0009] Inputting the knowledge query data into a knowledge question answering large language model, controlling the knowledge question answering large language model to perform knowledge matching on the knowledge query data to obtain target knowledge content; and

[0010] Controlling the knowledge question-answering large language model to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type;

[0011] Control the knowledge question and answer large language model to output the target knowledge inspiration content to the smart object service.

[0012] In a feasible implementation manner, determining the inquiry scenario description data for the user includes:

[0013] Determining a knowledge inquiry topic for the user, user inquiry emotion information, and user attribute information;

[0014] Inputting the knowledge inquiry topic, the user inquiry emotion information and the user attribute information into the inquiry scenario description generation model to perform scenario description generation processing, and outputting inquiry scenario description data for the user;

[0015] The inquiry scenario description generation model is obtained by training the inquiry scenario description generation model using sample inquiry scenario data that has been labeled with inquiry scenario description tags. The sample inquiry scenario data includes sample knowledge inquiry topics, sample user inquiry emotion information, and sample user attribute information.

[0016] In a feasible implementation manner, the controlling the knowledge question and answer large language model to perform knowledge inspiration conversion processing on the target knowledge content to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type includes:

[0017] Control the knowledge question and answer large language model to perform knowledge inspiration topic pattern matching based on the inquiry scenario description data in the knowledge inquiry data to obtain a target knowledge inspiration topic, and use the target topic pattern configuration corresponding to the target knowledge inspiration topic to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into a target knowledge inspiration content of a guiding thinking type;

[0018] The target theme mode configuration includes guiding the user's thinking level, inspiring the content description style and inspiring the content composition structure.

[0019] In a feasible implementation manner, the method further includes:

[0020] Use the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario;

[0021] Acquire sample knowledge query data, and label the sample knowledge query data with knowledge inspiration content labels;

[0022] Using the sample knowledge query data to perform model transfer training on the initial knowledge question and answer large language model;

[0023] During the model transfer training process, the initial knowledge question and answer large language model is controlled based on the sample knowledge query data to determine the sample knowledge content corresponding to the sample knowledge query data, and the sample knowledge content is subjected to knowledge inspiration transformation processing to obtain predicted knowledge inspiration content, and the model parameters of the initial knowledge question and answer large language model are adjusted based on the predicted knowledge inspiration content and the knowledge inspiration content label to obtain the knowledge question and answer large language model after transfer training.

[0024] In a feasible implementation, it is characterized in that the use of the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario includes:

[0025] Get the basic large language model;

[0026] Based on the basic large language model, an initial knowledge question and answer large language model is created, which includes at least a knowledge question and answer scenario adaptation module and a large language generation module.

[0027] In a feasible implementation manner, adjusting the model parameters of the initial knowledge question and answer large language model based on the predicted knowledge inspiration content and the knowledge inspiration content label includes:

[0028] The comprehensive model loss is calculated based on the predicted knowledge inspiration content and the knowledge inspiration content label, and the model parameters of the knowledge question and answer scenario adaptation module in the initial knowledge question and answer large language model are adjusted based on the comprehensive model loss, and the model parameters of the large language generation module are controlled to remain unchanged.

[0029] In a second aspect, an embodiment of the present application provides a dialog processing device, the device comprising:

[0030] A content processing module, for responding to knowledge query data input by a user for a smart object service, determining target knowledge content corresponding to the knowledge query data by using a knowledge question-answering large language model based on the knowledge query data, and performing knowledge heuristic transformation processing on the target knowledge content to obtain target knowledge heuristic content;

[0031] The knowledge answering module is used to control the intelligent object service to provide knowledge answering processing to the user based on the target knowledge inspiration content.

[0032] In a feasible implementation manner, the content processing module includes:

[0033] A prompt adjustment unit, configured to determine inquiry scenario description data for the user, and adjust the inquiry prompt words of the knowledge inquiry data based on the inquiry scenario description data to obtain knowledge inquiry data after the prompt words are adjusted;

[0034] A model processing unit, used for inputting the knowledge query data into a knowledge question and answer large language model, controlling the knowledge question and answer large language model to perform knowledge matching on the knowledge query data to obtain target knowledge content; and

[0035] The model processing unit is further used to control the knowledge question and answer large language model to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into target knowledge inspiration content of the guiding thinking type;

[0036] The model processing unit is also used to control the knowledge question and answer large language model to output the target knowledge inspiration content to the intelligent object service.

[0037] In a feasible implementation manner, the prompt adjustment unit is used to:

[0038] Determining a knowledge inquiry topic for the user, user inquiry emotion information, and user attribute information;

[0039] Inputting the knowledge inquiry topic, the user inquiry emotion information and the user attribute information into the inquiry scenario description generation model to perform scenario description generation processing, and outputting inquiry scenario description data for the user;

[0040] The inquiry scenario description generation model is obtained by training the inquiry scenario description generation model using sample inquiry scenario data that has been labeled with inquiry scenario description tags. The sample inquiry scenario data includes sample knowledge inquiry topics, sample user inquiry emotion information, and sample user attribute information.

[0041] In a feasible implementation manner, the model processing unit is further used for:

[0042] Control the knowledge question and answer large language model to perform knowledge inspiration topic pattern matching based on the inquiry scenario description data in the knowledge inquiry data to obtain a target knowledge inspiration topic, and use the target topic pattern configuration corresponding to the target knowledge inspiration topic to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into a target knowledge inspiration content of a guiding thinking type;

[0043] The target theme mode configuration includes guiding the user's thinking level, inspiring the content description style and inspiring the content composition structure.

[0044] In a feasible embodiment, the device is also used for:

[0045] Use the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario;

[0046] Acquire sample knowledge query data, and label the sample knowledge query data with knowledge inspiration content labels;

[0047] Using the sample knowledge query data to perform model transfer training on the initial knowledge question and answer large language model;

[0048] During the model transfer training process, the initial knowledge question and answer large language model is controlled based on the sample knowledge query data to determine the sample knowledge content corresponding to the sample knowledge query data, and the sample knowledge content is subjected to knowledge inspiration transformation processing to obtain predicted knowledge inspiration content, and the model parameters of the initial knowledge question and answer large language model are adjusted based on the predicted knowledge inspiration content and the knowledge inspiration content label to obtain the knowledge question and answer large language model after transfer training.

[0049] In a feasible implementation, the step of using the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario includes:

[0050] Get the basic large language model;

[0051] Based on the basic large language model, an initial knowledge question and answer large language model is created, which includes at least a knowledge question and answer scenario adaptation module and a large language generation module.

[0052] In a feasible implementation manner, adjusting the model parameters of the initial knowledge question and answer large language model based on the predicted knowledge inspiration content and the knowledge inspiration content label includes:

[0053] The comprehensive model loss is calculated based on the predicted knowledge inspiration content and the knowledge inspiration content label, and the model parameters of the knowledge question and answer scenario adaptation module in the initial knowledge question and answer large language model are adjusted based on the comprehensive model loss, and the model parameters of the large language generation module are controlled to remain unchanged.

[0054] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0055] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0056] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0057] In one or more embodiments of the present application, the user inputs knowledge query data for the smart object service, and the electronic device uses the knowledge question and answer large language model based on the knowledge query data to determine the target knowledge content corresponding to the knowledge query data, and performs knowledge heuristic transformation processing on the target knowledge content to obtain the target knowledge heuristic content, and controls the smart object service to perform knowledge answer processing to the user based on the target knowledge heuristic content. The use of the knowledge question and answer large language model can effectively understand the semantics of knowledge queries and accurately understand the user's query intention, so as to accurately match the target knowledge content. At the same time, it also performs heuristic content conversion based on the target knowledge content to obtain the target knowledge heuristic content, improves the quality of the final output knowledge content, avoids direct replies to matching results, inspires users to enable them to better master knowledge, and also optimizes the process of dialogue processing and improves the intelligence of dialogue processing. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0059] Figure 1 It is a flowchart of a dialogue processing method provided in an embodiment of the present application;

[0060] Figure 2 is a scene schematic diagram of a virtual object role provided in an embodiment of the present application;

[0061] Figure 3 This is a schematic diagram of a conversation interface of a smart object service provided by an embodiment of the present application;

[0062] Figure 4 It is a flowchart of another embodiment of the conversation processing method provided in the embodiment of the present application;

[0063] Figure 5 It is a flowchart of a model training method for a knowledge question and answer large language model provided in an embodiment of the present application;

[0064] Figure 6 is a structural diagram of a conversation processing device provided in an embodiment of the present application;

[0065] Figure 7 It is a structural diagram of a content processing module provided in an embodiment of the present application;

[0066] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0067] Fig. 9 It is a schematic diagram of the structure of the operating system and user space provided in the embodiment of the present application;

[0068] Fig.10 yes Fig. 9 The architecture diagram of the Android operating system;

[0069] Fig.11 yes Fig. 9 Architecture diagram of the IOS operating system. DETAILED DESCRIPTION

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

[0071] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0072] In the related technology, the traditional dialogue processing method has relatively large limitations. Traditional voice Q&A is usually based on pre-written voice Q&A rules, and the voice Q&A rules cannot understand questions and give responses based on specific semantics and dynamics, resulting in irrelevant answers or no answers. This not only brings trouble to users, but also limits the effectiveness of dialogue processing scenarios in the actual application of electronic devices.

[0073] The present application is described in detail below with reference to specific embodiments.

[0074] In one embodiment, Figure 1As shown, a dialogue processing method is proposed, which can be implemented by a computer program and can be run on a dialogue processing device based on the von Neumann system. The computer program can be integrated in an application or run as an independent tool application. The dialogue processing device can be an electronic device, including but not limited to: a smart watch, a personal computer, a tablet computer, a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, etc. Terminal devices in different networks can be called different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, 5G network or terminal device in future evolution network, etc. In some embodiments, the electronic device can also be a service platform;

[0075] Specifically, the dialogue processing method includes:

[0076] S102: In response to knowledge query data input by a user for a smart object service, determine target knowledge content corresponding to the knowledge query data using a knowledge question and answer large language model based on the knowledge query data, and perform knowledge heuristic transformation processing on the target knowledge content to obtain target knowledge heuristic content;

[0077] In this specification, smart object service is to use digital object technology to use virtual object characters as object images, and users can enter knowledge query data to the virtual object characters;

[0078] For example, Figure 2 As shown, Figure 2 It is a scene diagram of a virtual object role. After the user opens the smart object service (such as an intelligent voice assistant), the smart object service uses digital object technology to display multiple virtual object roles for the user to choose from, such as Figure 2 The virtual object characters are such as Badilon character, Monkey King character, Einstein character, etc. Each virtual object character corresponds to a different character timbre. Users can choose one of the provided virtual object characters. For example, users can choose to use the "Badilong character" as an assistant to start the smart object service with the "Badilong character" as the core of the dialogue. Figure 3 As shown, Figure 3 It is a diagram of a dialogue interface for an intelligent object service. When performing subsequent knowledge answering processing, the user can select the voice input button to input knowledge inquiry data for the "Buddy Dragon character". Further, the virtual object character is controlled to respond with the corresponding timbre and reply style of the "Buddy Dragon character".

[0079] In this specification, the smart object service is tasked with completing the user's knowledge query response. After the user inputs knowledge query data to the virtual object character, the smart object service uses a pre-trained knowledge question and answer large language model to perform dialogue processing on the knowledge query data entered by the user. It first matches the knowledge query data to obtain the target knowledge content, and then performs knowledge inspiration conversion on the target knowledge content to obtain the target knowledge inspiration content, thereby using the target knowledge inspiration content to provide knowledge answers to the user.

[0080] Indicatively, the knowledge inquiry data includes daily knowledge inquiries such as knowledge questions and answers, question analysis, and simple translation. The entire conversation processing supports voice control, such as calling mom, playing children's stories, setting alarms, opening applications, etc., which can be regarded as a skill knowledge inquiry.

[0081] Schematically, smart object services can be associated with knowledge bases, knowledge graphs, and networks. The knowledge base can be a local knowledge database and an online network knowledge database, etc.; further, for skill knowledge inquiries, the knowledge content corresponding to the skill knowledge inquiry knowledge base includes knowledge and skill processes, which can instruct the device to execute the knowledge and skill processes for skill processing, such as calling xx, playing children's stories, etc.

[0082] In this specification, at least the knowledge query data can be input into the knowledge question and answer big language model, and the knowledge query data can be regarded as the prompt word of the big model. The knowledge question and answer big language model is controlled to query the target knowledge content corresponding to the knowledge query data (such as querying from the knowledge base, knowledge graph and network associated with the smart object service), and then the target knowledge content is subjected to knowledge inspiration transformation processing to obtain the target knowledge inspiration content.

[0083] Indicatively, the target knowledge content can be understood as the standard target knowledge content obtained by the knowledge question answering language model by first matching the knowledge query data. Considering that it is not just a response to a knowledge query, the standard target knowledge content is usually a straightforward query result. In order to better enable users to master knowledge, the standard target knowledge content is subjected to an inspirational transformation process in the form of a statement content, and the target knowledge content is transformed into a target knowledge inspiration content. Compared with the target knowledge content in a straightforward form, the target knowledge inspiration content has a more vivid content statement and can better inspire users to think about knowledge. Usually, the target knowledge inspiration content contains questioning content and / or explanation content for all or part of the knowledge points;

[0084] Optionally, the target knowledge content is usually composed of one or more knowledge points, and the knowledge question and answer large language model performs knowledge inspiration transformation processing on the target knowledge content, which may be to identify key knowledge points among all knowledge points of the target knowledge content, and then perform knowledge content enhancement processing on the key knowledge points to obtain key knowledge point enhanced content; finally, generate target knowledge inspiration content consisting of knowledge points + "key knowledge point enhanced content"; in some implementation methods, the target knowledge inspiration content includes "key knowledge point enhanced content" for understanding and inspiring user thinking compared to the target knowledge content;

[0085] Key knowledge point enhanced content may be, for example: generating key knowledge point questioning content by questioning key knowledge points; and / or generating key knowledge point explanation content by questioning key knowledge points; and / or querying the knowledge base or knowledge graph for related knowledge points corresponding to key knowledge points to generate related knowledge point content, and so on.

[0086] In a feasible implementation, the knowledge question answering large language model may directly use the basic large language model.

[0087] In a feasible implementation, the knowledge question answering large language model can be obtained by training the model for the knowledge question answering scenario based on the basic large language model, which is an artificial intelligence content generation model designed to understand and generate human language. The basic large language model is trained on a large amount of data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, etc.

[0088] Optionally, the basic large language model can be an AIGC model on the public network;

[0089] Optionally, you can obtain a trained basic large language model and adapt the basic large language model to the knowledge question and answer scenario. First, obtain the basic large language model to create an initial knowledge question and answer large language model, and obtain sample knowledge query data in the new knowledge question and answer scenario. The sample knowledge query data is sample knowledge query data in the knowledge question and answer scenario. Use the sample knowledge query data to perform model fine-tuning training on the initial knowledge question and answer large language model. After the model fine-tuning training is completed, obtain the knowledge question and answer large language model adapted to the knowledge question and answer scenario.

[0090] S104: Control the smart object service to provide knowledge answer processing to the user based on the target knowledge inspiration content.

[0091] In some embodiments, the user terminal has an input function, which can be used for the user to input inquiry content. For example, typing input, voice input, etc. The service platform can be centralized or distributed. In some embodiments, the user terminal can send the knowledge inquiry data input by the user for the smart object service to the service platform. The service platform responds to the knowledge inquiry data input by the user for the smart object service, and uses the knowledge question and answer large language model based on the knowledge inquiry data to determine the target knowledge content corresponding to the knowledge inquiry data, and performs knowledge enlightenment conversion processing on the target knowledge content to obtain the target knowledge enlightenment content. Then the service platform sends the target knowledge enlightenment content to the user terminal, and the user terminal controls the smart object service to perform knowledge answer processing to the user based on the target knowledge enlightenment content.

[0092] In some embodiments, a user end (such as a smart terminal) receives knowledge query data input by a user for a smart object service. The user end responds to the knowledge query data input by the user for the smart object service, determines the target knowledge content corresponding to the knowledge query data based on the knowledge query data using a knowledge question and answer large language model, and performs knowledge heuristic transformation processing on the target knowledge content to obtain target knowledge heuristic content; then the user end controls the smart object service to provide knowledge answers to the user based on the target knowledge heuristic content.

[0093] In one or more embodiments of the present application, the user inputs knowledge query data for the smart object service, and the electronic device uses the knowledge question and answer large language model based on the knowledge query data to determine the target knowledge content corresponding to the knowledge query data, and performs knowledge heuristic transformation processing on the target knowledge content to obtain the target knowledge heuristic content, and controls the smart object service to perform knowledge answer processing to the user based on the target knowledge heuristic content. The use of the knowledge question and answer large language model can effectively understand the semantics of knowledge queries and accurately understand the user's query intention, so as to accurately match the target knowledge content. At the same time, it also performs heuristic content conversion based on the target knowledge content to obtain the target knowledge heuristic content, improves the quality of the final output knowledge content, avoids direct replies to matching results, inspires users to enable them to better master knowledge, and also optimizes the process of dialogue processing and improves the intelligence of dialogue processing.

[0094] See also Figure 4 , Figure 4 This is a flowchart of another embodiment of a conversation processing method proposed in this application. Specifically:

[0095] S202: determining inquiry scenario description data for the user, and adjusting inquiry prompt words of the knowledge inquiry data based on the inquiry scenario description data to obtain knowledge inquiry data after prompt words are adjusted;

[0096] The inquiry scenario description data can be understood as metadata describing the user's inquiry scenario. The inquiry scenario description data may include the inquiry topic, user inquiry emotion, user attributes (such as age, identity, knowledge level, etc.), and other data that can describe the user's inquiry scenario.

[0097] In this specification, by introducing the inquiry scene description data into the knowledge inquiry data originally input by the user to adjust the prompt words, the knowledge inquiry data finally input into the big model can contain the components describing the inquiry scene. The big model can be instructed to refer to the description of the inquiry scene to more accurately obtain information that matches the user's actual dialogue inquiry and perform better heuristic content conversion, thereby improving the efficiency and accuracy of knowledge inquiry. At the same time, this also helps to provide users with more personalized and targeted suggestions and guidance.

[0098] Exemplary: (Original) Knowledge Query Data: How to care for succulents?

[0099] Step 1: Determine the query scenario description data

[0100] First, it is possible to determine the query scenario description data for the specific query scenario of the user. The query scenario description data may be formed by collecting scenario-related data such as user context input data, system analysis data, or scenario options preset by the user. For example, the user may grow succulents at home, in the office, or in an outdoor garden. The user may be a beginner or have some experience.

[0101] Collect user context input data, system analysis data, or scenario-related data such as user preset scenario options to form query scenario description data,

[0102] Asking for scenario description data can be, for example: the user is growing succulents at home and this is his first attempt.

[0103] Step 2: Adjust the (original) knowledge query data prompt based on the query scenario description data;

[0104] According to the determined inquiry scenario description data, the prompt words of the knowledge inquiry data prompt may be adjusted to make it more specific and closer to the actual needs of the user. For example, the inquiry scenario description data may be supplemented to the knowledge inquiry data prompt based on the inquiry scenario description data.

[0105] After the prompt word is adjusted: How to start caring for succulents at home? Or what are the precautions for growing succulents at home for the first time?

[0106] Step 3: Forming adjusted knowledge query data

[0107] The adjusted prompt words are integrated into complete knowledge query data for subsequent knowledge question and answer large language model processing.

[0108] In one or more embodiments of the present specification, the prompt words can be adjusted from three dimensions: knowledge inquiry topic, user inquiry emotion information, and user attribute information. Specifically, the following method can be used to determine the inquiry scenario description data for the user:

[0109] A2: Determine the knowledge inquiry topic, user inquiry emotion information and user attribute information for the user;

[0110] The inquiry scenario description data can include multiple elements, among which the knowledge inquiry topic, user inquiry sentiment information and user attribute information are key components. These elements help the big model to more comprehensively understand the user's knowledge inquiry intention and knowledge inquiry background, thereby providing more accurate and personalized heuristic answers.

[0111] Schematically, the inquiry topic is the core content of the user's knowledge query, that is, the topic that the user wants to understand or solve the problem. The inquiry topic can be semantically extracted based on system analysis data or scenario-related data such as user-preset scenario options to determine the knowledge inquiry topic.

[0112] User inquiry emotions: User emotions may affect the way they ask questions and the type of answers they expect, which will to some extent assist in the decision-making of subsequent inspiration content conversion. For example, an anxious user may prefer a quick and clear solution, while a curious user may prefer detailed explanations and background information. User inquiry emotions can be output by inputting one or more data such as user input text, input voice, user inquiry scene images, etc. into the emotion analysis model;

[0113] Optionally, the sentiment analysis model can create an initial sentiment analysis model based on a machine learning model, collect sample sentiment analysis data and annotate user inquiry sentiment labels, use the sample sentiment analysis data to perform model training on the initial sentiment analysis model, determine the predicted user inquiry sentiment corresponding to the sample sentiment analysis data during the model training process, calculate the sentiment analysis loss based on the user inquiry sentiment label and the predicted user inquiry request using a model loss calculation formula in related technologies, use the situation analysis loss to adjust model parameters of the initial sentiment analysis model until the initial sentiment analysis model completes the model end training conditions, and obtains the sentiment analysis model;

[0114] Optionally, the sentiment analysis model can use a basic large language model.

[0115] User attribute information: including the user's age, gender, occupation, educational background, interests, etc. User attribute information can provide clues about the user's possible interests, knowledge level, and experience, thereby affecting the type of questions they ask and the depth of the answers they expect. For example, an experienced gardening enthusiast may ask more professional questions about plant cultivation, while a beginner may need more basic guidance on plant cultivation.

[0116] A4: inputting the knowledge inquiry topic, the user inquiry emotion information and the user attribute information into the inquiry scenario description generation model to perform scenario description generation processing, and outputting inquiry scenario description data for the user;

[0117] The inquiry scenario description generation model is obtained by training the inquiry scenario description generation model using sample inquiry scenario data that has been labeled with inquiry scenario description tags. The sample inquiry scenario data includes sample knowledge inquiry topics, sample user inquiry emotion information, and sample user attribute information.

[0118] Exemplarily, the following illustrates a model training process of a query scene description generation model, as follows:

[0119] Model creation: Create a query scenario description generation model based on the machine learning model;

[0120] Sample data acquisition: acquiring sample inquiry scenario data, which includes sample knowledge inquiry topics, sample user inquiry emotion information, and sample user attribute information;

[0121] Sample data labeling: Use expert services to label sample query scene data and query scene description labels;

[0122] Model training process: input the sample inquiry scene data into the initial inquiry scene description generation model for at least one round of model training. In each round of model training, the initial inquiry scene description generation model generates an inquiry scene description for the sample inquiry scene data to obtain a predicted inquiry scene description; based on the predicted inquiry scene description and the inquiry scene description label, a model loss function is used to determine a model loss value, and based on the model loss value, the model parameters of the initial inquiry scene description generation model are adjusted until the model training end condition is met to obtain the inquiry scene description generation model;

[0123] Optionally, the model loss function can be a hinge loss function, a cross entropy loss function, a contrast loss function, etc.

[0124] Optionally, the model training end condition of the model may include, for example, the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition can be determined based on actual conditions and is not specifically limited here.

[0125] It should be noted that the machine learning models involved in one or more embodiments of the present specification include but are not limited to the fitting of one or more machine learning models such as convolutional neural network (CNN) model, deep neural network (DNN) model, recurrent neural network (RNN) model, embedding model, gradient boosting decision tree (GBDT) model, logistic regression (LR) model, etc.

[0126] S204: inputting the knowledge query data into a knowledge question answering large language model, and controlling the knowledge question answering large language model to perform knowledge matching on the knowledge query data to obtain target knowledge content;

[0127] In this specification, at least the knowledge query data may be input into the knowledge question answering big language model, the knowledge query data may be regarded as the prompt word of the big model, the knowledge question answering big language model is controlled to query the target knowledge content corresponding to the knowledge query data (such as querying from the knowledge base, knowledge graph and network associated with the smart object service), and then the target knowledge content is subsequently subjected to knowledge inspiration transformation processing to obtain the target knowledge inspiration content;

[0128] S206: Controlling the knowledge question-answering large language model to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type;

[0129] Exemplarily, controlling the knowledge question answering big language model to perform knowledge heuristic transformation processing on the knowledge content is mainly based on the ability characteristics of the knowledge question answering big model and the application of the topic model of the heuristic method;

[0130] The ability and characteristics of the large knowledge question answering model: Due to its large parameter scale and complex network structure, it has a strong representation learning ability for knowledge question answering. This enables the large knowledge question answering model to learn rich language rules and topic patterns of heuristic methods, thereby gaining a deeper understanding of the semantic information in the knowledge content. The large knowledge question answering model can capture the contextual information in the knowledge content by training on a large-scale corpus.

[0131] Application of topic model of heuristic method: The topic model of heuristic method is a large model problem solving method based on experience, intuition or specific strategy. In the heuristic conversion of knowledge content, the knowledge question answering large model effectively uses the existing knowledge content. After completing the model training, the knowledge question large model has the ability to quickly convert the target knowledge content into inspiring knowledge inspiration content through heuristic methods under limited information and computing resources. These contents can often inspire users to think about knowledge and guide users to further explore related knowledge topics.

[0132] The knowledge heuristic transformation process of the knowledge question answering model: When a knowledge topic or question is given, the knowledge question answering model will first understand its semantics, contextual information and the matched target knowledge content, and perform knowledge heuristic topic pattern matching based on the inquiry scenario description data in the knowledge inquiry data to obtain the target knowledge heuristic topic. Then, the knowledge question answering model will use the target knowledge heuristic topic and its corresponding target topic pattern configuration to transform the target knowledge content into knowledge heuristic content that is related to the target knowledge heuristic topic and has an inspiring and guiding thinking type.

[0133] After the target knowledge content is converted into the target knowledge inspiration content that guides thinking, the target knowledge inspiration content can provide a series of information or viewpoints that are related to the original knowledge content but more inspiring, such as new thinking angles, unconsidered related factors, innovative solutions, etc., thereby providing users with a richer and deeper cognitive experience.

[0134] In a feasible implementation manner, the controlling the knowledge question and answer large language model to perform knowledge inspiration conversion processing on the target knowledge content to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type may be performed in the following manner:

[0135] Control the knowledge question and answer large language model to perform knowledge inspiration topic pattern matching based on the inquiry scenario description data in the knowledge inquiry data to obtain a target knowledge inspiration topic, and use the target topic pattern configuration corresponding to the target knowledge inspiration topic to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into a target knowledge inspiration content of a guiding thinking type;

[0136] Among them, the target theme mode configuration may include guiding the user's thinking level, inspiring the content description style, and inspiring the content composition structure.

[0137] S208: Control the knowledge question and answer large language model to output the target knowledge inspiration content to the smart object service.

[0138] For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here.

[0139] In the embodiment of the present application, the user inputs the knowledge inquiry data for the smart object service, and the electronic device uses the knowledge question and answer large language model based on the knowledge inquiry data to determine the target knowledge content corresponding to the knowledge inquiry data, and performs knowledge heuristic transformation processing on the target knowledge content to obtain the target knowledge heuristic content, and controls the smart object service to perform knowledge answer processing to the user based on the target knowledge heuristic content. The use of the knowledge question and answer large language model can effectively understand the semantics of the knowledge inquiry and accurately understand the user's inquiry intention, so as to accurately match the target knowledge content. At the same time, it also performs heuristic content conversion based on the target knowledge content to obtain the target knowledge heuristic content, improves the quality of the final output knowledge content, avoids direct reply to the matching results, inspires users to better master knowledge, and also optimizes the process of dialogue processing, and improves the intelligence of dialogue processing. In addition, the introduction of inquiry scene description data for prompt word adjustment can indicate that the large model reference description inquiry scene can more accurately obtain information that matches the user's actual dialogue inquiry and perform better heuristic content conversion, thereby improving the efficiency and accuracy of knowledge inquiry. At the same time, this also helps to provide users with more personalized and targeted suggestions and guidance.

[0140] See also Figure 5 , Figure 5 This is a flowchart of a model training method for a knowledge question and answer large language model proposed in this application. Specifically:

[0141] S302: Using the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario;

[0142] Optionally, a basic large language model is obtained; based on the basic large language model, an initial knowledge question and answer large language model is created, which includes at least a knowledge question and answer scenario adaptation module and a large language generation module.

[0143] A trained basic large language model can be obtained, and the basic large language model can be adapted to the knowledge question and answer scenario to obtain a knowledge question and answer large language model. Usually, the basic large language model is directly applied to dialogue responses in dialogue generation scenarios, which is difficult to adapt to new knowledge question and answer scenarios. Based on this, the basic large language model is first obtained to create an initial knowledge question and answer large language model, and sample data for the new knowledge question and answer scenario is obtained. Since the basic large language model is usually a trained open source AIGC model with content generation capabilities, it is necessary to adapt it to the knowledge question and answer scenario in this manual. Specifically, the sample data can be used to perform model fine-tuning training on the initial knowledge question and answer large language model, and after the model fine-tuning training is completed, a knowledge question and answer large language model adapted to the knowledge question and answer scenario is obtained.

[0144] Model creation: Obtain the basic big language model, create a knowledge question and answer scenario adaptation module for the knowledge question and answer scenario and a big language generation module based on the basic big language model, and form an initial knowledge question and answer big language model based on the big language generation module and the knowledge question and answer scenario adaptation module;

[0145] S304: Acquire sample knowledge query data, and label the sample knowledge query data with knowledge inspiration content labels;

[0146] Sample data acquisition: obtain sample knowledge query data, call expert services to label the sample knowledge query data with knowledge inspiration content labels; the sample knowledge query data is historical user knowledge query data and knowledge inspiration prompt word data based on knowledge question and answer needs in the knowledge question and answer scenario, and the source of the historical user knowledge query data can be a historical knowledge query database, the Internet, etc. The knowledge inspiration prompt word data can be a fixed template prompt word used to instruct the large language model to "first determine the knowledge content corresponding to the knowledge query data, and then perform knowledge inspiration transformation processing on the knowledge content to obtain knowledge inspiration content";

[0147] S306: Using the sample knowledge query data to perform model transfer training on the initial knowledge question and answer large language model;

[0148] S308: During the model transfer training process, the initial knowledge question and answer large language model is controlled based on the sample knowledge query data to determine the sample knowledge content corresponding to the sample knowledge query data, and the sample knowledge content is subjected to knowledge inspiration transformation processing to obtain predicted knowledge inspiration content, and the model parameters of the initial knowledge question and answer large language model are adjusted based on the predicted knowledge inspiration content and the knowledge inspiration content label to obtain the knowledge question and answer large language model after transfer training.

[0149] Model transfer training process: input sample knowledge query data into the initial knowledge question and answer large language model for at least one round of model training to obtain predicted knowledge inspiration content, calculate the model comprehensive loss based on the predicted knowledge inspiration content and the knowledge inspiration content label, adjust the model parameters of the knowledge question and answer scene adaptation module in the initial knowledge question and answer large language model based on the comprehensive model loss, and control the model parameters of the large language generation module to remain unchanged. Until the model training end conditions are met to obtain the large language generation module and the knowledge question and answer scene adaptation module, complete the model fusion of the large language generation module and the knowledge question and answer scene adaptation module, and obtain a trained knowledge question and answer large language model.

[0150] Model fusion of the large language generation module and the knowledge question and answer scenario adaptation module: the model structure layer weights of the knowledge question and answer scenario adaptation module and the large language generation module are weighted and fused. By determining the target model structure layer corresponding to the model structure layer weight in the large language generation module, the model structure layer parameters of the target model structure layer are parameter-fused with the model structure layer weights. The model structure layer weights of the knowledge question and answer scenario adaptation module may only partially correspond to and have model structure layer weights in all model structure layers in the basic large language model. By completing the model structure layer parameter update based on the model structure layer weights for this part of the target model structure layer, the reference update process of all model structure layer weights is completed by analogy, thereby obtaining the knowledge question and answer large language model.

[0151] Optionally, the model training end condition of the model may include, for example, the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition can be determined based on actual conditions and is not specifically limited here.

[0152] In one or more embodiments of the present application, the above-mentioned method can be used to train a large language model of knowledge documents. The knowledge question and answer large language model can effectively understand the semantics of knowledge queries and accurately understand the user's query intentions, thereby accurately matching the target knowledge content. At the same time, heuristic content conversion is performed based on the target knowledge content to obtain target knowledge inspiration content, thereby improving the quality of the final output knowledge content, avoiding direct replies to matching results in a straightforward manner, inspiring users to better master knowledge, and optimizing the dialogue processing process, thereby improving the intelligence of dialogue processing.

[0153] The following will be combined Figure 6 , the dialogue processing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 6 The dialogue processing device shown is used to execute the present application Figure 1 to Figure 5 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 to Figure 5 The embodiment shown.

[0154] See also Figure 6 , which shows a schematic diagram of the structure of the dialogue processing device of an embodiment of the present application. The dialogue processing device 1 can be implemented as all or part of the device through software, hardware or a combination of both. According to some embodiments, the dialogue processing device 1 includes a content processing module 11 and a knowledge answering module 12, which are specifically used to:

[0155] The content processing module 11 is used to respond to the knowledge query data input by the user for the smart object service, determine the target knowledge content corresponding to the knowledge query data by using the knowledge question and answer large language model based on the knowledge query data, and perform knowledge heuristic transformation processing on the target knowledge content to obtain the target knowledge heuristic content;

[0156] The knowledge answering module 12 is used to control the intelligent object service to provide knowledge answering processing to the user based on the target knowledge inspiration content.

[0157] Optional, such as Figure 7 As shown, the content processing module 11 includes:

[0158] A prompt adjustment unit 111 is used to determine inquiry scenario description data for the user, and adjust the inquiry prompt words of the knowledge inquiry data based on the inquiry scenario description data to obtain knowledge inquiry data after the prompt words are adjusted;

[0159] The model processing unit 112 is used to input the knowledge query data into the knowledge question answering large language model, and control the knowledge question answering large language model to perform knowledge matching on the knowledge query data to obtain target knowledge content; and

[0160] The model processing unit 112 is further used to control the knowledge question and answer large language model to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into target knowledge inspiration content of the guiding thinking type;

[0161] The model processing unit 112 is also used to control the knowledge question and answer large language model to output the target knowledge inspiration content to the intelligent object service.

[0162] Optionally, the prompt adjustment unit 111 is used to:

[0163] Determining a knowledge inquiry topic for the user, user inquiry emotion information, and user attribute information;

[0164] Inputting the knowledge inquiry topic, the user inquiry emotion information and the user attribute information into the inquiry scenario description generation model to perform scenario description generation processing, and outputting inquiry scenario description data for the user;

[0165] The inquiry scenario description generation model is obtained by training the inquiry scenario description generation model using sample inquiry scenario data that has been labeled with inquiry scenario description tags. The sample inquiry scenario data includes sample knowledge inquiry topics, sample user inquiry emotion information, and sample user attribute information.

[0166] Optionally, the model processing unit 112 is further configured to:

[0167] Control the knowledge question and answer large language model to perform knowledge inspiration topic pattern matching based on the inquiry scenario description data in the knowledge inquiry data to obtain a target knowledge inspiration topic, and use the target topic pattern configuration corresponding to the target knowledge inspiration topic to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into a target knowledge inspiration content of a guiding thinking type;

[0168] The target theme mode configuration includes guiding the user's thinking level, inspiring the content description style and inspiring the content composition structure.

[0169] Optionally, the device 1 is also used for:

[0170] Use the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario;

[0171] Acquire sample knowledge query data, and label the sample knowledge query data with knowledge inspiration content labels;

[0172] Using the sample knowledge query data to perform model transfer training on the initial knowledge question and answer large language model;

[0173] During the model transfer training process, the initial knowledge question and answer large language model is controlled based on the sample knowledge query data to determine the sample knowledge content corresponding to the sample knowledge query data, and the sample knowledge content is subjected to knowledge inspiration transformation processing to obtain predicted knowledge inspiration content, and the model parameters of the initial knowledge question and answer large language model are adjusted based on the predicted knowledge inspiration content and the knowledge inspiration content label to obtain the knowledge question and answer large language model after transfer training.

[0174] Optionally, the device 1 is also used for:

[0175] Get the basic large language model;

[0176] Based on the basic large language model, an initial knowledge question and answer large language model is created, which includes at least a knowledge question and answer scenario adaptation module and a large language generation module.

[0177] Optionally, the device 1 is also used for:

[0178] The comprehensive model loss is calculated based on the predicted knowledge inspiration content and the knowledge inspiration content label, and the model parameters of the knowledge question and answer scenario adaptation module in the initial knowledge question and answer large language model are adjusted based on the comprehensive model loss, and the model parameters of the large language generation module are controlled to remain unchanged.

[0179] It should be noted that the dialogue processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the dialogue processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the dialogue processing device provided in the above embodiment and the dialogue processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0180] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0181] In one or more embodiments of the present application, the user inputs knowledge query data for the smart object service, and the electronic device uses the knowledge question and answer large language model based on the knowledge query data to determine the target knowledge content corresponding to the knowledge query data, and performs knowledge heuristic transformation processing on the target knowledge content to obtain the target knowledge heuristic content, and controls the smart object service to perform knowledge answer processing to the user based on the target knowledge heuristic content. The use of the knowledge question and answer large language model can effectively understand the semantics of knowledge queries and accurately understand the user's query intention, so as to accurately match the target knowledge content. At the same time, it also performs heuristic content conversion based on the target knowledge content to obtain the target knowledge heuristic content, improves the quality of the final output knowledge content, avoids direct replies to matching results, inspires users to enable them to better master knowledge, and also optimizes the process of dialogue processing and improves the intelligence of dialogue processing.

[0182] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 5 The specific execution process of the dialogue processing method in the embodiment shown can be found in Figure 1 to Figure 5 The specific description of the illustrated embodiment will not be repeated here.

[0183] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 5 The specific execution process of the dialogue processing method in the embodiment shown can be found in Figure 1 to Figure 5 The specific description of the illustrated embodiment will not be repeated here.

[0184] Please refer to Figure 8, which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150.

[0185] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0186] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems. The data storage area may also store data created by the electronic device during use, such as a phone book, audio and video data, chat record data, etc.

[0187] See also Fig. 9 As shown, the memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, different application scenarios in the same third-party application also have different requirements for system resources. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.

[0188] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0189] Taking the Android operating system as an example, the programs and data stored in the memory 120 are as follows: Fig.10As shown, the memory 120 may store a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, wherein the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to the operating system space, and the application layer 380 belongs to the user space. The Linux kernel layer 320 provides underlying drivers for various hardware of electronic devices, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, etc. The system runtime library layer 340 provides the main feature support for the Android system through some C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D drawing support, and the Webkit library provides browser kernel support, etc. The system runtime library layer 340 also provides an Android runtime library (Android runtime), which mainly provides some core libraries that allow developers to use Java language to write Android applications. The application framework layer 360 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application runs in the application layer 380. These applications can be native applications that come with the operating system, such as contact applications, text messaging applications, clock applications, camera applications, etc.; they can also be third-party applications developed by third-party developers, such as game applications, instant messaging applications, photo beautification applications, etc.

[0190] Taking the operating system as an IOS system as an example, the programs and data stored in the memory 120 are as follows: Fig.11As shown, the IOS system includes: a core operating system layer 420 (Core OS layer), a core service layer 440 (Core Services layer), a media layer 460 (Media layer), and a touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes the operating system kernel, drivers, and underlying program frameworks, which provide functions closer to the hardware for use by the program framework located in the core service layer 440. The core service layer 440 provides system services and / or program frameworks required by the application, such as the foundation framework, account framework, advertising framework, data storage framework, network connection framework, geographic location framework, motion framework, etc. The media layer 460 provides audio-visual interfaces for the application, such as graphics and image related interfaces, audio technology related interfaces, video technology related interfaces, and wireless playback (AirPlay) interfaces for audio and video transmission technologies. The touchable layer 480 provides various commonly used interface-related frameworks for application development, and the touchable layer 480 is responsible for the user's touch interaction operations on the electronic device. For example, local notification service, remote push service, advertising framework, game tool framework, message user interface (UI) framework, user interface UIKit framework, map framework, etc.

[0191] exist Fig.11 Among the frameworks shown, the frameworks related to most applications include but are not limited to: the basic framework in the core service layer 440 and the UIKit framework in the touchable layer 480. The basic framework provides many basic object classes and data types, provides the most basic system services for all applications, and has nothing to do with UI. The classes provided by the UIKit framework are basic UI class libraries for creating touch-based user interfaces. iOS applications can provide UIs based on the UIKit framework, so it provides the basic architecture of applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, etc.

[0192] Among them, the method and principle of implementing data communication between third-party applications and the operating system in the IOS system can be referred to the Android system, and this application will not go into details here.

[0193] Among them, the input device 130 is used to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screen displays, which are used to receive touch operations on or near the user using any suitable object such as a finger or a touch pen, and to display the user interface of each application. The touch screen display is usually set on the front panel of the electronic device. The touch screen display can be designed as a full screen, a curved screen or a special-shaped screen. The touch screen display can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.

[0194] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.

[0195] In the embodiment of the present application, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiment of the present application.

[0196] The electronic device of the embodiment of the present application may also be equipped with a display device, which may be any device capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), etc. The user may use the display device on the electronic device 101 to view displayed text, images, videos and other information. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.

[0197] exist Figure 8 In the electronic device shown, which may be a smart terminal, the processor 110 may be used to call the application stored in the memory 120 and specifically perform the following operations:

[0198] In response to knowledge query data input by a user for a smart object service, a knowledge question and answer large language model is used to determine target knowledge content corresponding to the knowledge query data based on the knowledge query data, and a knowledge heuristic transformation process is performed on the target knowledge content to obtain target knowledge heuristic content;

[0199] The smart object service is controlled to provide knowledge answer processing to the user based on the target knowledge enlightenment content.

[0200] In one embodiment, the processor 110 performs the following operations when determining the target knowledge content corresponding to the knowledge query data using the knowledge question and answer large language model based on the knowledge query data, and performing knowledge inspiration transformation processing on the target knowledge content to obtain the target knowledge inspiration content of the guiding thinking type:

[0201] Determine inquiry scenario description data for the user, and adjust the inquiry prompt words of the knowledge inquiry data based on the inquiry scenario description data to obtain knowledge inquiry data after the prompt words are adjusted;

[0202] Inputting the knowledge query data into a knowledge question answering large language model, controlling the knowledge question answering large language model to perform knowledge matching on the knowledge query data to obtain target knowledge content; and

[0203] Controlling the knowledge question-answering large language model to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type;

[0204] Control the knowledge question and answer large language model to output the target knowledge inspiration content to the smart object service.

[0205] In one embodiment, the processor 110 performs the following operations when determining the query scenario description data for the user:

[0206] Determining a knowledge inquiry topic for the user, user inquiry emotion information, and user attribute information;

[0207] Inputting the knowledge inquiry topic, the user inquiry emotion information and the user attribute information into the inquiry scenario description generation model to perform scenario description generation processing, and outputting inquiry scenario description data for the user;

[0208] The inquiry scenario description generation model is obtained by training the inquiry scenario description generation model using sample inquiry scenario data that has been labeled with inquiry scenario description tags. The sample inquiry scenario data includes sample knowledge inquiry topics, sample user inquiry emotion information, and sample user attribute information.

[0209] In one embodiment, the processor 110 performs the following operations when executing the control of the knowledge question and answer large language model to perform knowledge inspiration conversion processing on the target knowledge content to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type:

[0210] The knowledge question and answer large language model is controlled to perform knowledge inspiration topic pattern matching based on the inquiry scenario description data in the knowledge inquiry data to obtain a target knowledge inspiration topic, and the target knowledge content is subjected to knowledge inspiration conversion processing using the target topic pattern configuration corresponding to the target knowledge inspiration topic, so as to convert the target knowledge content into a target knowledge inspiration content of a guiding thinking type.

[0211] In one embodiment, the processor 110 further performs the following operations when executing the dialog processing method:

[0212] Use the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario;

[0213] Acquire sample knowledge query data, and label the sample knowledge query data with knowledge inspiration content labels;

[0214] Using the sample knowledge query data to perform model transfer training on the initial knowledge question and answer large language model;

[0215] During the model transfer training process, the initial knowledge question and answer large language model is controlled based on the sample knowledge query data to determine the sample knowledge content corresponding to the sample knowledge query data, and the sample knowledge content is subjected to knowledge inspiration transformation processing to obtain predicted knowledge inspiration content, and the model parameters of the initial knowledge question and answer large language model are adjusted based on the predicted knowledge inspiration content and the knowledge inspiration content label to obtain the knowledge question and answer large language model after transfer training.

[0216] In one embodiment, the processor 110 performs the following operations when executing the step of using the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario:

[0217] Get the basic large language model;

[0218] Based on the basic large language model, an initial knowledge question and answer large language model is created, which includes at least a knowledge question and answer scenario adaptation module and a large language generation module.

[0219] In one embodiment, the processor 110 performs the following operations when performing the step of adjusting the model parameters of the initial knowledge question and answer large language model based on the predicted knowledge inspiration content and the knowledge inspiration content label:

[0220] The comprehensive model loss is calculated based on the predicted knowledge inspiration content and the knowledge inspiration content label, and the model parameters of the knowledge question and answer scenario adaptation module in the initial knowledge question and answer large language model are adjusted based on the comprehensive model loss, and the model parameters of the large language generation module are controlled to remain unchanged.

[0221] In one or more embodiments of the present application, the user inputs knowledge query data for the smart object service, and the electronic device uses the knowledge question and answer large language model based on the knowledge query data to determine the target knowledge content corresponding to the knowledge query data, and performs knowledge heuristic transformation processing on the target knowledge content to obtain the target knowledge heuristic content, and controls the smart object service to perform knowledge answer processing to the user based on the target knowledge heuristic content. The use of the knowledge question and answer large language model can effectively understand the semantics of knowledge queries and accurately understand the user's query intention, so as to accurately match the target knowledge content. At the same time, it also performs heuristic content conversion based on the target knowledge content to obtain the target knowledge heuristic content, improves the quality of the final output knowledge content, avoids direct replies to matching results, inspires users to enable them to better master knowledge, and also optimizes the process of dialogue processing and improves the intelligence of dialogue processing.

[0222] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0223] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for processing a conversation, characterized in that: The method comprises: In response to knowledge query data input by a user for a smart object service, a knowledge question and answer large language model is used to determine target knowledge content corresponding to the knowledge query data based on the knowledge query data, and a knowledge heuristic transformation process is performed on the target knowledge content to obtain target knowledge heuristic content; The smart object service is controlled to provide knowledge answer processing to the user based on the target knowledge enlightenment content.

2. The method according to claim 1, characterized in that The step of determining the target knowledge content corresponding to the knowledge query data by using the knowledge question answering large language model based on the knowledge query data, and performing knowledge inspiration transformation processing on the target knowledge content to obtain the target knowledge inspiration content of the guiding thinking type includes: Determine inquiry scenario description data for the user, and adjust the inquiry prompt words of the knowledge inquiry data based on the inquiry scenario description data to obtain knowledge inquiry data after the prompt words are adjusted; Inputting the knowledge query data into a knowledge question answering large language model, controlling the knowledge question answering large language model to perform knowledge matching on the knowledge query data to obtain target knowledge content; and Controlling the knowledge question-answering large language model to perform knowledge inspiration conversion processing on the target knowledge content, so as to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type; Control the knowledge question and answer large language model to output the target knowledge inspiration content to the smart object service.

3. The method according to claim 2, characterized in that The determining of the inquiry scenario description data for the user includes: Determining a knowledge inquiry topic for the user, user inquiry emotion information, and user attribute information; Inputting the knowledge inquiry topic, the user inquiry emotion information and the user attribute information into the inquiry scenario description generation model to perform scenario description generation processing, and outputting inquiry scenario description data for the user; The inquiry scenario description generation model is obtained by training the inquiry scenario description generation model using sample inquiry scenario data that has been labeled with inquiry scenario description tags. The sample inquiry scenario data includes sample knowledge inquiry topics, sample user inquiry emotion information, and sample user attribute information.

4. The method according to claim 2, characterized in that: The controlling the knowledge question-answering large language model to perform knowledge inspiration conversion processing on the target knowledge content to convert the target knowledge content into target knowledge inspiration content of a thinking-guiding type includes: The knowledge question and answer large language model is controlled to perform knowledge inspiration topic pattern matching based on the inquiry scenario description data in the knowledge inquiry data to obtain a target knowledge inspiration topic, and the target knowledge content is subjected to knowledge inspiration conversion processing using the target topic pattern configuration corresponding to the target knowledge inspiration topic, so as to convert the target knowledge content into a target knowledge inspiration content of a guiding thinking type.

5. The method according to claim 1, characterized in that The method further comprises: Use the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario; Acquire sample knowledge query data, and label the sample knowledge query data with knowledge inspiration content labels; Using the sample knowledge query data to perform model transfer training on the initial knowledge question and answer large language model; During the model transfer training process, the initial knowledge question and answer large language model is controlled based on the sample knowledge query data to determine the sample knowledge content corresponding to the sample knowledge query data, and the sample knowledge content is subjected to knowledge inspiration transformation processing to obtain predicted knowledge inspiration content, and the model parameters of the initial knowledge question and answer large language model are adjusted based on the predicted knowledge inspiration content and the knowledge inspiration content label to obtain the knowledge question and answer large language model after transfer training.

6. The method according to claim 5, characterized in that The method of using the basic large language model to create an initial knowledge question answering large language model for the knowledge question answering scenario includes: Get the basic large language model; Based on the basic large language model, an initial knowledge question and answer large language model is created, which includes at least a knowledge question and answer scenario adaptation module and a large language generation module.

7. The method according to claim 6, characterized in that The adjusting model parameters of the initial knowledge question and answer large language model based on the predicted knowledge inspiration content and the knowledge inspiration content label includes: The comprehensive model loss is calculated based on the predicted knowledge inspiration content and the knowledge inspiration content label, and the model parameters of the knowledge question and answer scenario adaptation module in the initial knowledge question and answer large language model are adjusted based on the comprehensive model loss, and the model parameters of the large language generation module are controlled to remain unchanged.

8. A dialogue processing device, characterized in that: The device comprises: A content processing module, for responding to knowledge query data input by a user for a smart object service, determining target knowledge content corresponding to the knowledge query data by using a knowledge question-answering large language model based on the knowledge query data, and performing knowledge heuristic transformation processing on the target knowledge content to obtain target knowledge heuristic content; The knowledge answering module is used to control the intelligent object service to provide knowledge answering processing to the user based on the target knowledge inspiration content.

9. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Conversation processing method and device, storage medium and electronic equipment

    CN117131179A

  • Concealed knowledge guide dialogue generation method and system based on dialogue thinking chain

    CN117972058A

  • System and method for natural language processing for quality assurance for constructed-response tests

    WO2024020674A1