Data processing method, device and equipment
Through data processing methods in the fields of education and information, combined with intention analysis models and multiple response strategies, personalized learning content is generated, and the problem of single and boring traditional learning methods is solved, and learning effect and user interest is improved.
Patent Information
- Application Number
- CN202411996668.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-18
AI Technical Summary
In the field of education and information, traditional learning methods are single and boring, resulting in low user interest in learning and increasing learning costs.
By providing a data processing method, it receives the problem data input by the user, obtains the corresponding context data, uses the intent analysis model to determine the user's intent information, and selects an answer strategy based on the information (such as a question-and-answer model, cache or preset query database) to generate answer data, and finally outputs the answer in text or voice form.
It improves the accuracy and fun of the learning content, reduces the cost of users' learning related knowledge, and enhances users' learning interest and literacy.
Smart Images

Figure CN119849636A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to a data processing method, device and equipment. Background Art
[0002] In various educational fields (such as financial education (such as education on privacy protection, education on fraud risks, education on financial management or insurance, etc.) or audio and video production education, etc.), various information fields or self-service fields of various service industries, users usually learn in traditional ways, including learning by watching videos, reading pictures and texts, etc. However, the above learning methods are single and boring, users have low learning interest, and will increase the learning cost of users for related knowledge. For this reason, it is necessary to provide a better business learning method that can not only help users learn related knowledge and improve their literacy, but also stimulate users' interest in learning and reduce their learning cost for related knowledge. Summary of the invention
[0003] The purpose of the embodiments of this specification is to provide a better business learning method, which can not only help users learn relevant knowledge and improve their literacy, but also stimulate users' interest in learning and reduce their learning costs for relevant knowledge.
[0004] In order to implement the above technical solution, the embodiments of this specification are implemented as follows: A data processing method provided by an embodiment of the present specification comprises: receiving question data input by a user. Obtaining context data corresponding to the question data input by the user, and based on the question data and the context data corresponding to the question data, determining user intent information corresponding to the question data through an intent analysis model, wherein the user intent information is used to indicate a method for determining an answer to the question data. Based on the question data and the context data corresponding to the question data, determining answer data corresponding to the question data through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question-answering model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Outputting the determined answer data in the form of text data and / or voice data.
[0005] A data processing device provided in an embodiment of the present specification comprises: a question receiving module for receiving question data input by a user. A user intention determination module for obtaining context data corresponding to the question data input by the user, and based on the question data and the context data corresponding to the question data, determining user intention information corresponding to the question data through an intention analysis model, wherein the user intention information is used to indicate a method for determining an answer to the question data. An answer determination module for determining answer data corresponding to the question data through an answer strategy corresponding to the user intention information, based on the question data and the context data corresponding to the question data, wherein the answer strategy includes at least one or more of an answer strategy based on a large question-answering model, an answer strategy based on a cache, and an answer strategy based on a preset query database. An answer output module for outputting the determined answer data in the form of text data and / or voice data.
[0006] A data processing device provided in an embodiment of the present specification includes: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor: receives question data input by a user. Obtain context data corresponding to the question data input by the user, and determine user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate the method used to determine the answer to the question data. Based on the question data and the context data corresponding to the question data, determine the answer data corresponding to the question data through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question-answering model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Output the determined answer data in the form of text data and / or voice data.
[0007] The embodiments of this specification also provide a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when executed by the processor: Receive question data input by the user. Obtain context data corresponding to the question data input by the user, and based on the question data and the context data corresponding to the question data, determine the user intention information corresponding to the question data through an intention analysis model, and the user intention information is used to indicate the method used to determine the answer to the question data. Based on the question data and the context data corresponding to the question data, determine the answer data corresponding to the question data through the answer strategy corresponding to the user intention information, and the answer strategy includes at least one or more of an answer strategy based on a large question and answer model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Output the determined answer data in the form of text data and / or voice data.
[0008] The embodiments of this specification also provide a computer program product, including a computer program, which implements the following process when executed by a processor: receiving question data input by a user. Obtaining context data corresponding to the question data input by the user, and based on the question data and the context data corresponding to the question data, determining user intent information corresponding to the question data through an intent analysis model, wherein the user intent information is used to indicate a method for determining an answer to the question data. Based on the question data and the context data corresponding to the question data, determining answer data corresponding to the question data through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question-answering model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Outputting the determined answer data in the form of text data and / or voice data. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor. Figure 1 This is an embodiment of a data processing method of this specification; Figure 2 This is a page diagram of an intelligent learning assistant in this manual; Figure 3 Another data processing method embodiment of this specification; Figure 4 A schematic diagram of a data processing process of this specification; Figure 5 This is another data processing method embodiment of the present specification; Figure 6 This is another data processing method embodiment of the present specification; Figure 7 This is a processing diagram of an ASR method in this specification; Figure 8 This is another data processing method embodiment of the present specification; Fig. 9 This is a schematic diagram of the structure of an intelligent learning assistant system in this manual; Fig.10 This is an embodiment of a data processing device of the present specification; Fig.11 This is an embodiment of a data processing device in this specification. DETAILED DESCRIPTION
[0010] The embodiments of this specification provide a data processing method, device and equipment.
[0011] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0012] The embodiments of this specification provide a method for building an intelligent learning assistant based on a machine learning model. In various educational fields (such as financial education or audio and video production education, etc.), various information fields, or self-service fields in various service industries, users usually learn in traditional ways, including learning by watching videos, reading pictures and texts, etc. However, the above learning methods are single and boring, the user's learning interest is low, and it will increase the user's learning cost for related knowledge. In order to stimulate the user's interest in learning and reduce the user's learning cost for related knowledge, an intelligent learning assistant can be built to help users learn related knowledge and improve their literacy. In practical applications, a question-and-answer style reimbursement information filling intelligent assistant was constructed, which includes a system vector database, a reimbursement tool library, a dialogue management module, a reimbursement large language model and an information filling module. The system vector database is used to support the retrieval enhancement generation of the reimbursement large language model; the reimbursement tool library stores various tool interfaces for processing reimbursement information; the reimbursement large language model is used to generate multiple rounds of inquiry information according to the tools in the reimbursement tool library, and recognize the reply information entered by the user to obtain the reimbursement information; the dialogue management module is used to control the entire dialogue process according to the preset reimbursement strategy; the information filling module is used to call the corresponding tools from the reimbursement tool library to process the reimbursement information, so as to obtain the filling content required for filling out the form, and automatically fill the filling content into the reimbursement form to realize the automatic filling of the reimbursement form. In addition, an intelligent question-and-answer assistant system for the railway industry is constructed, which includes an industry large model instruction fine-tuning module to collect railway industry-related knowledge as a railway industry instruction question-and-answer dataset, and uses the ultra-large-scale language model Qwen-7b model to fine-tune the instruction question-and-answer dataset to create an intelligent assistant for automatically collecting railway industry-related knowledge; the industry knowledge vector library construction module obtains knowledge documents through the instructions issued by the instruction question-and-answer dataset in the intelligent assistant, parses the knowledge documents for formatting and text clipping, and stores them in a vector database; the question retrieval module extracts text content that matches the question content from the vector database based on the question raised by the user; the answer generation module substitutes the text content into the large language model LLM to obtain an answer based on the text content, so that the intelligent effect can be achieved by quickly generating answers through the use of large model technology.
[0013] However, in the above method, for the user's natural language, the user intention expressed by different natural language content is often different, and even the same natural language content, different tone or context, the user intention expressed will also be different. Therefore, there is no judgment of user intention in the above method, which may cause the final output result to be inaccurate. In addition, the complete dialogue or context before and after the user inputs data into the model can play a key role in judging the user's true intention, and the lack of relevant context data in the above method further causes the accuracy of the final output result to be low. In addition, the above-mentioned intelligent assistant question-and-answer interactive link is complex, involving interaction with large models, speech recognition and other services, which takes a long time. To this end, the embodiment of this specification provides a better way to build an intelligent learning assistant to improve the accuracy of the final output result, to help users learn relevant knowledge and improve the user's literacy. For specific processing, please refer to the specific content in the following embodiment.
[0014] like Figure 1 As shown, an embodiment of this specification provides a data processing method, and the execution subject of the method can be a terminal device or a server, etc., wherein the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (specifically such as a smart watch, a car-mounted device, etc.), etc., wherein the server can be an independent server, or a server cluster composed of multiple servers, etc., and the server can be a background server for financial services or online shopping services, or a background server for an application, etc. In this embodiment, the execution subject is taken as an example for detailed description. For the case where the execution subject is a terminal device, please refer to the following server situation processing, which will not be repeated here. The method can specifically include the following steps: In step S102, question data input by a user is received.
[0015] Among them, the question data can be data of any question, for example, the question data can be "Will bond funds be "closed" during holidays?", or the question data can be "What conditions should individual investors meet to participate in XXX securities trading?", etc., which can be set according to actual conditions, and the embodiments of this specification do not limit this.
[0016] In implementation, in various educational fields (such as financial education (such as investor education, etc.) or audio and video production education, etc.), various information fields or self-service fields of various service industries, when a user needs to know the answer data corresponding to a certain question data, he can start the intelligent learning assistant through the terminal device and obtain the question and answer page through the intelligent learning assistant, such as Figure 2As shown, the question and answer page may include an input box for question data, an output box for answer data, a confirmation button, a cancel button, etc. The user can ask a specified question to the intelligent learning assistant, and the intelligent learning assistant can analyze and answer the question asked by the user. Specifically, the user can enter the question data to be queried in the input box for question data in the above question and answer page of the intelligent learning assistant. After the input is completed, the user can click the confirmation button. At this time, the user's terminal device can obtain the question data entered in the input box for question data through the intelligent learning assistant, and can send the question data to the server through the intelligent learning assistant, and the server can receive the question data entered by the user.
[0017] In step S104, context data corresponding to the question data input by the user is obtained, and based on the question data and the context data corresponding to the question data, user intention information corresponding to the question data is determined through an intention analysis model. The user intention information is used to indicate the method used to determine the answer to the question data.
[0018] Among them, the context data corresponding to the question data can be data for information interaction with the user within a first preset time period before the user inputs the question data (which can be a time period of 5 minutes or 3 minutes before the user inputs the question data, or a specified time period before the user inputs the question data, specifically, for example, if the user inputs the question data at 10 o'clock, the first preset time period can also be 9:55:00-9:58:00, etc.) and / or a second preset time period after the user inputs the question data (which can be a time period of 2 minutes or 4 minutes after the user inputs the question data, or a specified time period before the user inputs the question data, specifically, for example, if the user inputs the question data at 10 o'clock, the second preset time period can also be 10:02:00-10:07:00, etc.). In addition, in actual applications, the context data corresponding to the question data can also be relevant data involved in the process of executing the business corresponding to the question data, or the context data corresponding to the question data can also be relevant data in the process of running the application corresponding to the question data, etc., which can be set specifically according to actual conditions, and the embodiments of this specification are not limited to this. The intent analysis model can be used to determine the method required to answer user questions, such as using a large model to answer user questions, or using a specified knowledge database to answer user questions. The intent analysis model can be constructed through a variety of different algorithms or machine learning networks. For example, the intent analysis model can be constructed through semantic analysis algorithms, word vector analysis algorithms, etc., or through convolutional neural networks, recurrent neural networks, BERT or large language models, etc. The specific settings can be based on actual conditions.
[0019] In implementation, considering that different natural language contents often express different user intentions, and even the same natural language content, different tones or contexts may express different user intentions, therefore, in order to improve the accuracy of the final output result, the user's true intention can be judged in combination with the context data corresponding to the question data input by the user. To this end, the context data corresponding to the question data input by the user can be obtained, and specifically, the corresponding data can be obtained based on a pre-set first preset time period, a second preset time period, the business corresponding to the question data being executed, or the application corresponding to the question data being run, and other relevant data, and the obtained data can be used as the context data corresponding to the question data.
[0020] A pre-trained intent analysis model can be directly obtained, or the architecture of the intent analysis model can be constructed through a specified algorithm or machine learning network. Then, a certain number of training samples can be obtained, and the training samples can be used to train the intent analysis model to obtain a trained intent analysis model, etc. After that, the question data and the context data corresponding to the question data can be input into the above-mentioned intent analysis model. Through the intent analysis model, the user's true intention is analyzed and judged based on the question data and the context data corresponding to the question data, and the method used to determine the answer to the question data is obtained, thereby determining the user intent information corresponding to the question data.
[0021] It should be noted that in actual applications, the context data corresponding to the question data input by the user may not exist. For example, the user does not have any information interaction with the intelligent learning assistant (or server) within a preset time period before and after entering the question data, or does not have any information interaction with the intelligent learning assistant (or server) during the process of executing the business corresponding to the question data or running the application corresponding to the question data. At this time, there is no context data corresponding to the question data input by the user. In the above case, the user intent information corresponding to the question data can be determined directly based on the question data through the intent analysis model. Specifically, the question data can be input into the intent analysis model to obtain the corresponding output result, that is, the user intent information corresponding to the question data.
[0022] In step S106, based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data is determined by the answer strategy corresponding to the user intention information, and the answer strategy includes at least one or more of an answer strategy based on a question-answer big model, an answer strategy based on a cache, and an answer strategy based on a preset query database.
[0023] Among them, the question-answering big model can be constructed by BERT or a big language model, etc., and can be set specifically according to actual conditions. The question-answering big model can be a big model used to answer questions raised by users. The question-answering big model can be a trained big model directly obtained from a specified database, or it can be an architecture of a question-answering big model constructed by a specified algorithm and / or machine learning network, and then the question-answering big model is trained by a large amount of sample data to obtain a trained question-answering big model, which can be set specifically according to actual conditions. The answering strategy based on the question-answering big model can be a strategy for answering questions raised by users through the question-answering big model. The cache-based answering strategy can be a strategy for answering questions raised by users based on specified cache data. In addition, the cache can include multiple types, such as setting corresponding caches (or cache intervals) according to different uses, functions or businesses, etc. The preset query database can be a pre-set database for querying specified data, and the answering strategy based on the preset query database can be a strategy for answering questions raised by users based on the specified query database.
[0024] In implementation, if the answering strategy includes an answering strategy based on a question-answering big model, corresponding prompt information Prompt can be generated based on the question data and the context data corresponding to the question data, the prompt information Prompt can be input into the question-answering big model, and the question-answering big model can be guided by the prompt information Prompt to generate answer data corresponding to the question data. If the answering strategy includes an answering strategy based on a cache or an answering strategy based on a preset query database, the question data and the context data corresponding to the question data can be used as a query basis to query the corresponding result in the cache or preset query database. Specifically, the question data and the context data corresponding to the question data can be vectorized to obtain a vector corresponding to the question data and a vector corresponding to the context data corresponding to the question data. The vector corresponding to the question data and the vector corresponding to the context data corresponding to the question data can be fused to obtain a corresponding query vector. The similarity between the query vector and the vector corresponding to the question data stored in the cache or preset query database can be calculated. The stored question data corresponding to the similarity greater than the preset threshold can be obtained from the similarity calculated above (or the stored question data corresponding to the maximum similarity can be obtained, etc.), and the answer data corresponding to the question data can be determined from the stored question data obtained above.
[0025] The answer data corresponding to the question data can be obtained by a certain specified method. In actual applications, in order to reduce the time consumption of obtaining the answer data corresponding to the question data, a cache-based answer strategy or a preset query database-based answer strategy can be used in advance to determine the answer data corresponding to the question data. The specific processing process can refer to the above-mentioned related content. If the cache-based answer strategy or the preset query database-based answer strategy can determine the answer data corresponding to the question data, the answer data corresponding to the question data can be quickly obtained, thereby greatly reducing the time consumption of obtaining the answer data corresponding to the question data. If the cache-based answer strategy or the preset query database-based answer strategy cannot determine the answer data corresponding to the question data, the answer strategy based on the question-answering large model can be used to generate the answer data corresponding to the question data.
[0026] In step S108, the determined answer data is output in the form of text data and / or voice data.
[0027] In implementation, in order to enable users to better learn relevant knowledge (such as designated financial knowledge), the above-mentioned determined answer data can be output in a corresponding manner according to different needs of users. Specifically, the determined answer data can be sent to the intelligent learning assistant in the terminal device in the form of text data, and the answer data in text form can be displayed to the user through the intelligent learning assistant. In addition, the determined answer data can be converted into voice data, and the determined answer data can be sent to the intelligent learning assistant in the terminal device in the form of voice data, and the answer data in voice form can be played to the user through the intelligent learning assistant.
[0028] The embodiments of the present specification provide a data processing method, which obtains context data corresponding to the question data input by the user upon receiving question data input by the user, and determines the user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate the method used to determine the answer to the question data. Then, based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data can be determined through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question and answer model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Finally, the determined answer data can be output in the form of text data and / or voice data. In this way, the context data corresponding to the question data input by the user is introduced, including in the analysis and identification stage of the user intent and the determination stage of the answer data, thereby improving the accuracy of answer data generation. In addition, in the process of answer data generation, a cache mechanism can be added to reduce the time consumption of the answer data determination process, and the question and answer response time of similar question data is greatly reduced.
[0029] In practical applications, the specific processing methods of the above step S106 can be varied. An optional processing method is provided below, such as Figure 3 As shown, the processing may specifically include the following steps S1062 to S1066.
[0030] In step S1062, if the user intention information indicates that the answer data of the question data is generated by the question and answer big model, then based on the question data, a search is performed in the answer cache corresponding to the question and answer big model to determine whether there is first cached question data that matches the question data.
[0031] In implementation, Figure 4 As shown, after identifying the user intention and obtaining the user intention information, the corresponding response strategy can be executed according to different user intention information to return the corresponding answer data. Among them, for a specified business field or a highly professional dialogue scenario, the user intention often tends to answer the questions raised by the user through the question and answer big model to generate more professional answer data that better meets the user's requirements. Based on this, if in a specified business field or a highly professional dialogue scenario or the user intention information indicates that the answer data of the question data is generated through the question and answer big model, the answer data corresponding to the question data can be generated through the response strategy based on the question and answer big model. Specifically, in order to reduce the link time consumption, a caching mechanism can be added, that is, the historical question and answer data of the question and answer big model can be cached, and the above-mentioned historical question and answer data can be stored in the answer cache corresponding to the question and answer big model. When the user intention information indicates that the answer data of the question data is generated through the question and answer big model, it can be first searched in the answer cache corresponding to the question and answer big model based on the question data to see whether there is a first cached question data matching the question data.
[0032] In step S1064, if there is first cached question data matching the question data in the answer cache corresponding to the question and answer large model, the first cached answer data corresponding to the first cached question data found in the answer cache corresponding to the question and answer large model is used as the answer data corresponding to the question data.
[0033] In step S1066, if the first cached question data matching the question data does not exist in the answer cache corresponding to the question and answer big model, the answer data corresponding to the question data is generated by the question and answer big model based on the question data and the context data corresponding to the question data.
[0034] During implementation, if the first cached question data matching the question data does not exist in the answer cache corresponding to the question and answer big model, the answer data corresponding to the question data is generated by the question and answer big model based on the question data and the context data corresponding to the question data, wherein the specific processing process of generating the answer data corresponding to the question data by the question and answer big model based on the question data and the context data corresponding to the question data can be found in the relevant content of the above-mentioned step S106 and will not be repeated here.
[0035] In practical applications, in step S1066, there are many specific processing methods for generating answer data corresponding to the question data through the question-answering model based on the question data and the context data corresponding to the question data. An optional processing method is provided below, such as Figure 5 As shown, the processing may specifically include the following steps S10662 to S10666.
[0036] In step S10662, the above question data is converted into an embedding vector to obtain a question vector corresponding to the question data.
[0037] In implementation, in addition to the above-mentioned method, based on the question data and the context data corresponding to the question data, the question and answer big model can generate the answer data corresponding to the question data. In addition, the RAG (Retrieval-Augmented Generation) method can also be used to generate the answer data corresponding to the question data based on the question data and the context data corresponding to the question data. RAG refers to optimizing the output data of the question and answer big model so that it can reference an authoritative knowledge base other than the sample data source to optimize the output data of the question and answer big model before generating the answer data. Specifically, Figure 4 As shown, the above problem data can be input into an embedding model or an embedding algorithm to convert the above problem data into an embedding vector, thereby obtaining a problem vector corresponding to the problem data.
[0038] In step S10664, based on the above question vector, knowledge fragment data whose similarity with the question vector is greater than a preset similarity threshold is obtained from a preset vector knowledge base.
[0039] The vector knowledge base includes a plurality of different knowledge shard data and their corresponding shard vectors. The vector knowledge base can be an authoritative knowledge base other than the source of sample data in RAG. The vector knowledge base can be set according to the business or field to which the sample data belongs. For example, the vector knowledge base can be constructed by other data in the business or field to which the sample data belongs, or the vector knowledge base can be constructed by data in other businesses or fields other than the business or field to which the sample data belongs. The specific setting can be based on the actual situation. The similarity threshold can be set according to the actual situation, such as 80% or 90%.
[0040] In implementation, Figure 4 As shown, a similarity algorithm (such as a cosine similarity algorithm, a Euclidean distance algorithm, etc.) can be pre-selected, and the similarity algorithm can be used to calculate the similarity between each shard vector in the vector knowledge base and the problem vector. The obtained similarity value can be compared with a similarity threshold, and a similarity value greater than the similarity threshold can be obtained. The corresponding shard vector can be determined based on the obtained similarity value greater than the similarity threshold, and the knowledge shard data corresponding to the determined shard vector can be obtained, thereby realizing the recall of knowledge shard data similar to the problem vector from the vector knowledge base.
[0041] In step S10666, prompt information is generated based on the knowledge segmentation data and the above-mentioned question data, and the prompt information and the context data corresponding to the question data are input into the question-answering big model to generate answer data corresponding to the above-mentioned question data.
[0042] In implementation, Figure 4 As shown, the knowledge segmentation data and the related information in the above question data can be filled into the pre-set prompt information template to generate the corresponding prompt information Prompt. In order to more accurately answer the questions raised by the user, a multi-round conversation mechanism can be added, and the user's conversation history record can be written into the context of the request-response large model as the context data corresponding to the question data. Then, the prompt information Prompt and the context data corresponding to the question data can be input into the question-answering large model, and the prompt information Prompt and the context data corresponding to the question data can be used to guide the question-answering large model to generate the answer data corresponding to the above question data.
[0043] In actual applications, the answer data corresponding to the question data generated by the question-answering big model can be written into the answer cache corresponding to the question-answering big model.
[0044] In implementation, Figure 4As shown, the answer data corresponding to the question data generated by the question and answer big model can be directly written into the answer cache corresponding to the question and answer big model, or the user's satisfaction with the answer data corresponding to the question data generated by the question and answer big model can be collected (which can be determined according to a preset satisfaction feedback mechanism, or by detecting whether the user re-enters question data with a similarity between the question data greater than a first preset threshold within a preset time length (such as 10 minutes or 30 minutes, etc.)), if it is determined that the user's satisfaction with the answer data corresponding to the question data generated by the question and answer big model is higher than the second preset threshold, the answer data corresponding to the question data generated by the question and answer big model can be written into the answer cache corresponding to the question and answer big model, otherwise the answer data corresponding to the question data generated by the question and answer big model is deleted.
[0045] In practical applications, the specific processing methods of the above step S106 can be various, and an optional processing method is provided below, such as Figure 4 As shown, it may specifically include the following contents: if the user intention information indicates that the answer data of the above-mentioned question data is determined through data cache or query database, then the target stored question data matching the question data is searched from the data cache or query database, and the stored answer data corresponding to the target stored question data found in the data cache or query database is used as the answer data corresponding to the question data.
[0046] Among them, the data cache can be different from the answer cache corresponding to the above-mentioned question-and-answer big model. The data cache can be a cache set up for other query methods other than the question-and-answer big model (such as query methods through search engines or query methods based on locally stored data, etc.). The data cache and answer cache can be pre-configured according to actual conditions. In addition, the query database can also be pre-configured according to actual conditions, and the specific settings can be based on actual conditions.
[0047] In practical applications, the specific processing methods for determining the user intention information corresponding to the question data through the intention analysis model based on the question data and the context data corresponding to the question data in the above step S104 can be various. An optional processing method is provided below, such as Figure 6 As shown, the processing may specifically include the following steps S10402 to S10410.
[0048] In step S10402, if the above-mentioned question data and / or the context data corresponding to the question data contain voice data, audio noise reduction processing is performed on the voice data to obtain noise-reduced voice data, and sentence processing is performed on the noise-reduced voice data to obtain multiple voice sentences corresponding to the voice data.
[0049] In implementation, if the above-mentioned question data and / or the context data corresponding to the question data contain voice data, the voice data therein may be converted into text data. There are multiple ways to convert voice data into text data. For example, voice data may be converted into text data by ASR (Automatic Speech Recognition), wherein the goal of ASR is to convert the vocabulary content in human voice data into computer-readable data (such as binary code, character sequence, etc.), specifically, Figure 7 The figure shows a processing diagram of the ASR method. If the above-mentioned problem data and / or the context data corresponding to the problem data contain voice data, the ASR service can be called. The voice data therein can be authenticated by the ASR service. After the service authentication, the voice data can be format converted to convert the format of the voice data into a specified format. At the same time, a model can be selected. The VAD (Voice Activity Detection) model (a signal processing model used to identify whether there is human voice data in an audio stream or a video stream) can be selected. Then, the voice data can be subjected to audio noise reduction processing by the VAD model to obtain noise-reduced voice data, and the noise-reduced voice data can be subjected to sentence processing by the VAD model to obtain multiple voice sentences corresponding to the voice data. In the process of sentence processing of the noise-reduced voice data by the VAD model, the voice data can also be normalized by joint modeling (Shared Encoding) and window partitioning can be performed.
[0050] In step S10404, the frequency spectrum representation information corresponding to each speech sentence is obtained, and the frequency spectrum representation information is input into the acoustic model to obtain the phoneme information or word information corresponding to the frequency spectrum representation information.
[0051] In implementation, Figure 7 As shown, feature extraction processing can be performed on each speech sentence, so as to obtain the spectrum characteristics that can characterize the speech data through feature dimension reduction and standardization processing, and obtain the spectrum representation information corresponding to each speech sentence. Then, the spectrum representation information can be input into the acoustic model to obtain the phoneme information or word information corresponding to the spectrum representation information.
[0052] In step S10406, based on the phoneme information or word information corresponding to the spectral representation information, the association information and the occurrence probability between different words in each speech sentence are determined through a pre-trained language model.
[0053] In implementation, Figure 7As shown, based on the phoneme information or word information corresponding to the spectral representation information, the association information and occurrence probability between different words in each speech sentence are captured through a pre-trained language model to improve the recognition accuracy.
[0054] In step S10408, based on the association information and occurrence probabilities between different words in each speech sentence, the speech data is converted into text data through preset dictionary data to obtain converted data.
[0055] In implementation, Figure 7 As shown in the figure, the final model output result can be combined with the preset dictionary data through decoding processing to give corresponding readable text data. Finally, post-processing can be performed through inverse text regularization, punctuation processing, etc., and finally the above-mentioned voice data can be converted into text data to obtain converted data.
[0056] In step S10410, the conversion data, as well as the remaining data in the above-mentioned question data and the context data corresponding to the question data except the above-mentioned voice data are input into the intention analysis model to obtain the user intention information corresponding to the question data.
[0057] In implementation, the conversion data, as well as the remaining data in the above-mentioned question data and the context data corresponding to the question data except the above-mentioned voice data, can be spliced in chronological order, and the spliced data can be input into the intent analysis model to obtain the user intent information corresponding to the question data.
[0058] It should be noted that in order to improve the accuracy of recognition, the intent analysis model can adopt a large language model. Based on this, natural language intent recognition can be performed through the large language model. The prompt information engineering of the large language model can be utilized. Different user intent information can return different encodings. The spliced data (including the converted data, and the remaining data in the above-mentioned question data and the context data corresponding to the question data except the above-mentioned voice data) is input into the large language model. After the large language model completes the reasoning, it returns the encoding corresponding to this user intent information.
[0059] In practical applications, the specific processing methods of the above step S108 can be varied. An optional processing method is provided below, such as Figure 8 As shown, the processing may specifically include the following steps S1082 to S1086.
[0060] In step S1082, the above-mentioned question data, the context data corresponding to the question data, the answer data corresponding to the question data determined by the answer strategy corresponding to the user intention information, and the interactive information in the process of determining the answer data corresponding to the question data by the answer strategy corresponding to the user intention information are written into the preset database.
[0061] In implementation, Figure 4 As shown, a designated database can be pre-set to store relevant data of information interaction between users and the server through an intelligent learning assistant. Based on this, the above-mentioned question data, the context data corresponding to the question data, the answer data corresponding to the question data determined by the answer strategy corresponding to the user intention information, and the interaction information in the process of determining the answer data corresponding to the question data by the answer strategy corresponding to the user intention information can be written into the preset database.
[0062] In step S1084, based on the above question data, answer data corresponding to the question data is polled from a preset database through a preset user question query interface.
[0063] In implementation, since the process of the server generating corresponding answer data after the user inputs the question data may take a long time (about several seconds), the interface can be designed as an offline task interface. Two interfaces can be set, namely, a user question submission interface and a user question query interface. The user input question data can be submitted through the user question submission interface, and the server can immediately return data including the question and answer identifier. The intelligent learning assistant can poll the user question query interface through the question and answer identifier and other data to obtain the answer data and other data that needs to be displayed from the server.
[0064] In step S1086, the answer data corresponding to the polled question data is converted into voice data, and the converted answer data and the answer data corresponding to the queried question data are output.
[0065] In implementation, Figure 4 As shown, the answer data corresponding to the polled question data can be converted into voice data through TTS (Text To Speech), and the converted answer data and the answer data corresponding to the queried question data can be obtained. The intelligent learning assistant can play the converted answer data and display the answer data corresponding to the queried question data.
[0066] Based on the above processing, an intelligent learning assistant system can be constructed, such as Fig. 9As shown, the intelligent learning assistant system may include a terminal device intelligent learning assistant, a front-end subsystem, a back-end subsystem, a question-answering model, etc. In addition, the back-end system is also connected to a preset database and a knowledge base, or the preset database and the knowledge base may also be set in the back-end system. In addition, the back-end system is also provided with a TTS service or connected to a TTS service, etc., and the front-end system is also provided with an ASR service or connected to an ASR service, etc., wherein the front-end subsystem, the back-end subsystem and the question-answering model may be set in a server. Based on the above system structure, the user may input question data and context data corresponding to the question data (which may also include voice data) through the terminal device intelligent learning assistant, and the terminal device intelligent learning assistant inputs the question data and the context data corresponding to the question data into the front-end subsystem, and the front-end subsystem recognizes and processes the voice data therein through the ASR service to obtain text data corresponding to the voice data. The front-end subsystem can send the textual question data and the contextual data corresponding to the question data to the back-end subsystem in the form of a question-answering request. The back-end subsystem determines the user intention information based on the textual question data and the contextual data corresponding to the question data, and determines the answer data corresponding to the question data through the answer strategy corresponding to the user intention information based on the textual question data and the contextual data corresponding to the question data, combined with the preset database, knowledge base and question-answering big model. The answer data corresponding to the question data can be converted into voice data through the TTS service to obtain the converted answer data. The back-end subsystem returns the converted answer data and the answer data corresponding to the question data to the front-end subsystem. The front-end subsystem drives the terminal device intelligent learning assistant to obtain the converted answer data and the answer data corresponding to the question data. The terminal device intelligent learning assistant displays the answer data corresponding to the question data to the user and plays the converted answer data. In actual applications, the business knowledge education of users is realized through the front-end and back-end subsystems, and the front-end and back-end subsystems can be deployed to the cloud to provide the above-mentioned education services to different terminal devices, so as to realize the information interaction of users on different terminal devices. Through the above methods, users can learn relevant business knowledge and improve their business literacy. For example, for financial education business, the above methods can be used to help users learn financial knowledge and improve their financial literacy.
[0067] In practical applications, the intent analysis model and the question-answering model are multimodal models, which are used to process data in multiple different modalities, including one or more of text, images, and audio.
[0068] The embodiments of the present specification provide a data processing method, which obtains context data corresponding to the question data input by the user upon receiving question data input by the user, and determines the user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate the method used to determine the answer to the question data. Then, based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data can be determined through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question and answer model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Finally, the determined answer data can be output in the form of text data and / or voice data. In this way, the context data corresponding to the question data input by the user is introduced, including in the analysis and identification stage of the user intent and the determination stage of the answer data, thereby improving the accuracy of answer data generation. In addition, in the process of answer data generation, a cache mechanism can be added to reduce the time consumption of the answer data determination process, and the question and answer response time of similar question data is greatly reduced.
[0069] In addition, in the process of ASR recognizing speech data, the VAD model is introduced to segment the speech data, and then ASR recognition is performed on the speech sentences one by one, thereby improving the efficiency of speech recognition. In addition, through mechanisms such as ASR, VAD model, large language model, RAG, TTS and front-end and back-end subsystems, a complete set of intelligent learning assistant construction methods is provided, which can be applied to various professional fields. In the process of TTS driving the intelligent learning assistant, the link time consumption is optimized through parallelization and asynchronous calling mechanisms, which can achieve quasi-real-time intelligent learning assistant rendering.
[0070] The above is a data processing method provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a data processing device, such as Fig.10 shown.
[0071] The data processing device comprises: a question receiving module 1001, a user intention determining module 1002, an answer determining module 1003 and an answer output module 1004, wherein: The question receiving module 1001 receives question data input by the user; The user intention determination module 1002 obtains context data corresponding to the question data input by the user, and determines user intention information corresponding to the question data through an intention analysis model based on the question data and the context data corresponding to the question data, wherein the user intention information is used to indicate a method for determining an answer to the question data; The answer determination module 1003 determines the answer data corresponding to the question data based on the question data and the context data corresponding to the question data and through the answer strategy corresponding to the user intention information, wherein the answer strategy at least includes one or more of an answer strategy based on a question-answering big model, an answer strategy based on a cache, and an answer strategy based on a preset query database; The answer output module 1004 outputs the determined answer data in the form of text data and / or voice data.
[0072] In the embodiment of this specification, the answer determination module 1003 includes: A search unit, if the user intention information indicates that answer data for the question data is generated by the question-answering big model, searches, based on the question data, in the answer cache corresponding to the question-answering big model to see whether there is first cached question data that matches the question data; A first answer determination unit, if there is first cached question data matching the question data in the answer cache corresponding to the question and answer large model, then using first cached answer data corresponding to the first cached question data found in the answer cache corresponding to the question and answer large model as answer data corresponding to the question data; The second answer determination unit generates answer data corresponding to the question data through the question and answer big model based on the question data and the context data corresponding to the question data if there is no first cached question data matching the question data in the answer cache corresponding to the question and answer big model.
[0073] In an embodiment of the present specification, the second answer determination unit converts the question data into an embedded vector to obtain a question vector corresponding to the question data; based on the question vector, obtains knowledge fragment data whose similarity with the question vector is greater than a preset similarity threshold from a preset vector knowledge base; generates prompt information based on the knowledge fragment data and the question data, inputs the prompt information and context data corresponding to the question data into the question-answering big model, and generates answer data corresponding to the question data.
[0074] In the embodiment of this specification, the device further includes: A writing module writes the answer data corresponding to the question data generated by the question-answering big model into the answer cache corresponding to the question-answering big model.
[0075] In the embodiment of the present specification, the answer determination module 1003, if the user intention information indicates that the answer data of the question data is to be determined through a data cache or a query database, searches the data cache or the query database for target stored question data that matches the question data, and uses the stored answer data corresponding to the target stored question data found in the data cache or the query database as the answer data corresponding to the question data.
[0076] In the embodiment of this specification, the user intention determination module 1002 includes: A sentence segmentation unit, if the question data and / or the context data corresponding to the question data include speech data, performs audio noise reduction processing on the speech data to obtain noise-reduced speech data, and performs sentence segmentation processing on the noise-reduced speech data to obtain a plurality of speech sentences corresponding to the speech data; An acoustic processing unit, which obtains frequency spectrum representation information corresponding to each speech sentence, inputs the frequency spectrum representation information into an acoustic model, and obtains phoneme information or word information corresponding to the frequency spectrum representation information; A language processing unit, based on the phoneme information or word information corresponding to the spectral representation information, determines the association information and occurrence probability between different words in each speech sentence through a pre-trained language model; A conversion unit, based on the association information and occurrence probability between different words in each speech sentence, converts the speech data into text data through preset dictionary data to obtain conversion data; The intention analysis unit inputs the conversion data, the question data and the remaining data in the context data corresponding to the question data except the voice data into the intention analysis model to obtain the user intention information corresponding to the question data.
[0077] In the embodiment of this specification, the answer output module 1004 includes: A writing unit, writing the question data, the context data corresponding to the question data, the answer data corresponding to the question data determined by the answer strategy corresponding to the user intention information, and the interaction information in the process of determining the answer data corresponding to the question data by the answer strategy corresponding to the user intention information into a preset database; A polling unit, based on the question data, polls answer data corresponding to the question data from the preset database through a preset user question query interface; The output unit converts the answer data corresponding to the polled question data into voice data, and outputs the converted answer data and the answer data corresponding to the queried question data.
[0078] In the embodiments of this specification, the intent analysis model and the question-answering model are multimodal models, and the multimodal model is used to process data of multiple different modalities, wherein the multiple different modalities include one or more of text, image and audio.
[0079] The embodiments of the present specification provide a data processing device, which obtains context data corresponding to the question data input by the user upon receiving question data input by the user, and determines the user intent information corresponding to the question data through an intention analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate the method used to determine the answer to the question data. Then, based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data can be determined through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question and answer model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Finally, the determined answer data can be output in the form of text data and / or voice data. In this way, the context data corresponding to the question data input by the user is introduced, including in the analysis and identification stage of the user intent and the determination stage of the answer data, thereby improving the accuracy of answer data generation. In addition, in the process of answer data generation, a cache mechanism can be added to reduce the time consumption of the answer data determination process, and the question and answer response time of similar question data is greatly reduced.
[0080] In addition, in the process of ASR recognizing speech data, the VAD model is introduced to segment the speech data, and then ASR recognition is performed on the speech sentences one by one, thereby improving the efficiency of speech recognition. In addition, through mechanisms such as ASR, VAD model, large language model, RAG, TTS and front-end and back-end subsystems, a complete set of intelligent learning assistant construction methods is provided, which can be applied to various professional fields. In the process of TTS driving the intelligent learning assistant, the link time consumption is optimized through parallelization and asynchronous calling mechanisms, which can achieve quasi-real-time intelligent learning assistant rendering.
[0081] The above is a data processing device provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a data processing device, such as Fig.11 shown.
[0082] The data processing device may provide a terminal device or a server, etc. for the above-mentioned embodiments.
[0083] The data processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 1101 and memory 1102, and the memory 1102 may store one or more storage applications or data. Among them, the memory 1102 may be a short-term storage or a persistent storage. The application stored in the memory 1102 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the data processing device. Furthermore, the processor 1101 may be configured to communicate with the memory 1102 and execute a series of computer executable instructions in the memory 1102 on the data processing device. The data processing device may also include one or more power supplies 1103, one or more wired or wireless network interfaces 1104, one or more input and output interfaces 1105, and one or more keyboards 1106.
[0084] Specifically in this embodiment, the data processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the data processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following: Receive question data input by the user; Obtaining context data corresponding to the question data input by the user, and determining user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate a method for determining an answer to the question data; Based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data is determined by the answer strategy corresponding to the user intention information, wherein the answer strategy at least includes one or more of an answer strategy based on a question-answering big model, an answer strategy based on a cache, and an answer strategy based on a preset query database; The determined answer data is output in the form of text data and / or voice data.
[0085] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the data processing device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0086] The embodiments of the present specification provide a data processing device, which obtains context data corresponding to the question data input by the user upon receiving question data input by the user, and determines the user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate the method adopted to determine the answer to the question data. Then, based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data can be determined through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question and answer model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Finally, the determined answer data can be output in the form of text data and / or voice data. In this way, the context data corresponding to the question data input by the user is introduced, including in the analysis and identification stage of the user intent and the determination stage of the answer data, thereby improving the accuracy of answer data generation. In addition, in the process of answer data generation, a cache mechanism can be added to reduce the time consumption of the answer data determination process, and the question and answer response time of similar question data is greatly reduced.
[0087] Furthermore, based on the above Figures 1 to 9 In one embodiment, the present specification further provides a storage medium for storing computer executable instruction information. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instruction information stored in the storage medium is executed by the processor, the following process can be implemented: Receive question data input by the user; Obtaining context data corresponding to the question data input by the user, and determining user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate a method for determining an answer to the question data; Based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data is determined by the answer strategy corresponding to the user intention information, wherein the answer strategy at least includes one or more of an answer strategy based on a question-answering big model, an answer strategy based on a cache, and an answer strategy based on a preset query database; The determined answer data is output in the form of text data and / or voice data.
[0088] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0089] The embodiments of the present specification provide a storage medium, which obtains context data corresponding to the question data input by the user upon receiving the question data input by the user, and determines the user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate the method adopted to determine the answer to the question data. Then, based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data can be determined through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question and answer model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Finally, the determined answer data can be output in the form of text data and / or voice data. In this way, the context data corresponding to the question data input by the user is introduced, including in the analysis and identification stage of the user intent and the determination stage of the answer data, thereby improving the accuracy of answer data generation. In addition, in the process of answer data generation, a cache mechanism can be added to reduce the time consumption of the answer data determination process, and the question and answer response time of similar question data is greatly reduced.
[0090] Furthermore, based on the above Figures 1 to 9 In one or more embodiments of the present specification, a computer program product is provided, including a computer program. When the computer program in the computer program product is executed by a processor, the following process can be implemented: Receive question data input by the user; Obtaining context data corresponding to the question data input by the user, and determining user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate a method for determining an answer to the question data; Based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data is determined by the answer strategy corresponding to the user intention information, wherein the answer strategy at least includes one or more of an answer strategy based on a question-answering big model, an answer strategy based on a cache, and an answer strategy based on a preset query database; The determined answer data is output in the form of text data and / or voice data.
[0091] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned computer program product embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0092] The embodiments of the present specification provide a computer program product, which obtains context data corresponding to the question data input by the user upon receiving question data input by the user, and determines the user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate the method used to determine the answer to the question data. Then, based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data can be determined through an answer strategy corresponding to the user intent information, wherein the answer strategy includes at least one or more of an answer strategy based on a large question and answer model, an answer strategy based on a cache, and an answer strategy based on a preset query database. Finally, the determined answer data can be output in the form of text data and / or voice data. In this way, the context data corresponding to the question data input by the user is introduced, including in the analysis and identification stage of the user intent and the determination stage of the answer data, thereby improving the accuracy of answer data generation. In addition, in the process of answer data generation, a cache mechanism can be added to reduce the time consumption of the answer data determination process, and the question and answer response time of similar question data is greatly reduced.
[0093] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0094] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0095] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0096] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0097] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0098] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0099] The embodiments of this specification are described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable fraud case serial and parallel device to produce a machine, so that the instructions executed by the processor of the computer or other programmable fraud case serial and parallel device generate instructions for implementing the processes in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0100] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable fraud case serial and parallel device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0101] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0102] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0103] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0104] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0105] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0106] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Furthermore, one or more embodiments of this specification may be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0107] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0108] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0109] The above description is only an embodiment of this specification and is not intended to limit this document. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this specification.
Claims
1. A data processing method, the method comprising: Receive question data input by the user; Obtaining context data corresponding to the question data input by the user, and determining user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate a method for determining an answer to the question data; Based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data is determined by the answer strategy corresponding to the user intention information, wherein the answer strategy at least includes one or more of an answer strategy based on a question-answering big model, an answer strategy based on a cache, and an answer strategy based on a preset query database; The determined answer data is output in the form of text data and / or voice data.
2. The method according to claim 1, wherein the determining the answer data corresponding to the question data based on the question data and the context data corresponding to the question data and by the answer strategy corresponding to the user intention information comprises: If the user intention information indicates that answer data for the question data is generated by the question-answering big model, then based on the question data, searching in the answer cache corresponding to the question-answering big model whether there is first cached question data that matches the question data; If there is first cached question data matching the question data in the answer cache corresponding to the question-answering large model, the first cached answer data corresponding to the first cached question data found in the answer cache corresponding to the question-answering large model is used as the answer data corresponding to the question data; If there is no first cached question data matching the question data in the answer cache corresponding to the question and answer big model, answer data corresponding to the question data is generated by the question and answer big model based on the question data and the context data corresponding to the question data.
3. The method according to claim 2, wherein the step of generating answer data corresponding to the question data by using the question-answering big model based on the question data and the context data corresponding to the question data comprises: Convert the problem data into an embedding vector to obtain a problem vector corresponding to the problem data; Based on the question vector, obtaining knowledge fragmentation data whose similarity with the question vector is greater than a preset similarity threshold from a preset vector knowledge base; Prompt information is generated based on the knowledge segment data and the question data, and context data corresponding to the prompt information and the question data are input into the question-answering big model to generate answer data corresponding to the question data.
4. The method according to claim 2, further comprising: The answer data corresponding to the question data generated by the question-answering large model is written into the answer cache corresponding to the question-answering large model.
5. The method according to claim 1, wherein the determining the answer data corresponding to the question data based on the question data and the context data corresponding to the question data and by the answer strategy corresponding to the user intention information comprises: If the user intention information indicates that the answer data of the question data is determined by means of a data cache or a query database, target stored question data matching the question data is searched from the data cache or the query database, and the stored answer data corresponding to the target stored question data found in the data cache or the query database is used as the answer data corresponding to the question data.
6. The method according to claim 1, wherein determining the user intention information corresponding to the question data through an intention analysis model based on the question data and the context data corresponding to the question data comprises: If the question data and / or the context data corresponding to the question data include speech data, performing audio noise reduction processing on the speech data to obtain noise-reduced speech data, and performing sentence processing on the noise-reduced speech data to obtain a plurality of speech sentences corresponding to the speech data; Acquire frequency spectrum representation information corresponding to each speech sentence, input the frequency spectrum representation information into the acoustic model, and obtain phoneme information or word information corresponding to the frequency spectrum representation information; Based on the phoneme information or word information corresponding to the spectral representation information, determining the association information and the occurrence probability between different words in each speech sentence through a pre-trained language model; Based on the association information and occurrence probabilities between different words in each speech sentence, the speech data is converted into text data through preset dictionary data to obtain converted data; The conversion data, as well as the question data and the remaining data in the context data corresponding to the question data except the voice data are input into the intention analysis model to obtain user intention information corresponding to the question data.
7. The method according to claim 1, wherein the step of outputting the determined answer data in the form of text data and / or voice data comprises: Writing the question data, the context data corresponding to the question data, the answer data corresponding to the question data determined by the answer strategy corresponding to the user intention information, and the interaction information in the process of determining the answer data corresponding to the question data by the answer strategy corresponding to the user intention information into a preset database; Based on the question data, querying answer data corresponding to the question data from the preset database through a preset user question query interface; The answer data corresponding to the polled question data are converted into voice data, and the converted answer data and the answer data corresponding to the queried question data are output.
8. According to the method according to claim 1, the intention analysis model and the question-answering big model are multimodal big models, and the multimodal big model is used to process data of multiple different modalities, and the multiple different modalities include one or more of text, image and audio.
9. A data processing device, comprising: A question receiving module receives question data input by the user; A user intention determination module, which obtains context data corresponding to the question data input by the user, and determines user intention information corresponding to the question data through an intention analysis model based on the question data and the context data corresponding to the question data, wherein the user intention information is used to indicate a method for determining an answer to the question data; An answer determination module determines answer data corresponding to the question data based on the question data and context data corresponding to the question data and through an answer strategy corresponding to the user intention information, wherein the answer strategy includes at least one or more of an answer strategy based on a question-answering big model, an answer strategy based on a cache, and an answer strategy based on a preset query database; The answer output module outputs the determined answer data in the form of text data and / or voice data.
10. A data processing device, comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Receive question data input by the user; Obtaining context data corresponding to the question data input by the user, and determining user intent information corresponding to the question data through an intent analysis model based on the question data and the context data corresponding to the question data, wherein the user intent information is used to indicate a method for determining an answer to the question data; Based on the question data and the context data corresponding to the question data, the answer data corresponding to the question data is determined by the answer strategy corresponding to the user intention information, wherein the answer strategy at least includes one or more of an answer strategy based on a question-answering big model, an answer strategy based on a cache, and an answer strategy based on a preset query database; The determined answer data is output in the form of text data and / or voice data.
Citation Information
Cited By
Data processing method and system
CN121542373A