CN118051593A - Data processing method and device and electronic equipment - Google Patents

Data processing method and device and electronic equipment Download PDF

Info

Publication number
CN118051593A
CN118051593A CN202410210836.8A CN202410210836A CN118051593A CN 118051593 A CN118051593 A CN 118051593A CN 202410210836 A CN202410210836 A CN 202410210836A CN 118051593 A CN118051593 A CN 118051593A
Authority
CN
China
Prior art keywords
result
information
processed
task
tool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410210836.8A
Other languages
Chinese (zh)
Inventor
李成强
李志飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mobvoi Innovation Technology Co Ltd
Original Assignee
Mobvoi Innovation Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mobvoi Innovation Technology Co Ltd filed Critical Mobvoi Innovation Technology Co Ltd
Priority to CN202410210836.8A priority Critical patent/CN118051593A/en
Publication of CN118051593A publication Critical patent/CN118051593A/en
Pending legal-status Critical Current

Links

Landscapes

  • Machine Translation (AREA)

Abstract

The embodiment of the invention discloses a data processing method, a device and electronic equipment, wherein the configuration information comprises a first task and a second task, information to be processed is received, the first task is executed to obtain a first result corresponding to the information to be processed, the first result is used for representing a tool corresponding to the information to be processed, the second task is executed to obtain a second result corresponding to the information to be processed, the second result is used for representing intention classification of the information to be processed, and an intention recognition result corresponding to the information to be processed is determined according to the first result and the second result. Thus, the intention of the information to be processed can be accurately judged.

Description

Data processing method and device and electronic equipment
Technical Field
The present invention relates to the field of artificial intelligence, and in particular, to a data processing method, apparatus and electronic device.
Background
Current intelligent question-answering systems are built using artificial intelligence techniques, aimed at understanding and answering questions posed by users. The intelligent question-answering system aims to improve the solution efficiency of the user to the questions and reduce the time cost of the user in the aspects of searching information and obtaining answers. The method mainly relies on natural language processing technology and machine learning algorithm, and by learning and analyzing large-scale text data, key information in the questions is automatically extracted and understood, and corresponding answers are found. The intelligent question and answer system can be widely applied to various fields such as online customer service, online education, intelligent home and the like.
However, existing intelligent question-answering systems generally obtain results directly based on user input, and only answer fixed questions or user dialogues, or perform some simple query task. In dialog systems that include complex task processing capabilities, the user's intent to ask may be free dialog, executing task instructions, or asking based on the usage of task instructions. This may make the results obtained by the intelligent question-answering system inconsistent with the user's intent in some scenarios.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a data processing method, apparatus, and electronic device, which can accurately determine the intention of the information to be processed.
In a first aspect, an embodiment of the present invention provides a data processing method, where the method includes:
acquiring configuration information, wherein the configuration information comprises a first task and a second task;
Receiving information to be processed;
Executing the first task to obtain a first result corresponding to the information to be processed, wherein the first result is used for representing a tool corresponding to the information to be processed;
executing the second task to obtain a second result corresponding to the information to be processed, wherein the second result is used for representing the intention classification of the information to be processed;
and determining an intention recognition result corresponding to the information to be processed according to the first result and the second result.
In some embodiments, the configuration information further includes a task entirety description.
In some embodiments, the first task includes a first task description and at least one first instance;
the first task description is used for indicating a processing model to obtain a first result corresponding to the information to be processed, and the first example is an example of the information to be processed and an example of the corresponding first result.
In some embodiments, the second task includes a second task description and at least one second instance;
the second task description is used for indicating the processing model to obtain a second result corresponding to the information to be processed, and the second example is an example of the information to be processed and an example of the second result corresponding to the information to be processed.
In some embodiments, the configuration information further includes an output format;
the determining, according to the first result and the second result, the intention recognition result corresponding to the information to be processed specifically includes:
And converting the first result and the second result into the output format to obtain the intention recognition result.
In some embodiments, the method further comprises:
and determining a processing result corresponding to the information to be processed according to the intention recognition result.
In some embodiments, the determining, according to the intention recognition result, a processing result corresponding to the information to be processed includes:
Determining a tool class of the first result;
And determining a processing result corresponding to the information to be processed according to the tool class of the first result and the second result.
In some embodiments, the second result includes a question-answer class and an instruction class, and the tool class includes a question-answer class and an instruction class;
The determining, according to the tool category of the first result and the second result, a processing result corresponding to the information to be processed includes:
Responding to the tool category of the second result and the first result as instruction categories, determining a target instruction corresponding to the information to be processed, and executing the target instruction;
Responsive to the second result and the first result being of a question-answer type, or responsive to the second result and the first result being of a different tool type, reply information is generated based on a predetermined manner.
In a second aspect, an embodiment of the present invention provides a data processing apparatus, including:
the configuration information acquisition unit is used for acquiring configuration information, wherein the configuration information comprises a first task and a second task;
the information receiving unit is used for receiving information to be processed;
The first task execution unit is used for executing the first task to obtain a first result corresponding to the information to be processed, and the first result is used for representing a tool corresponding to the information to be processed;
The second task execution unit is used for executing the second task to obtain a second result corresponding to the information to be processed, and the second result is used for representing the intention classification of the information to be processed;
And the result determining unit is used for determining an intention recognition result corresponding to the information to be processed according to the first result and the second result.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory storing one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in the first aspect.
According to the technical scheme, configuration information is obtained, the configuration information comprises a first task and a second task, information to be processed is received, the first task is executed to obtain a first result corresponding to the information to be processed, the first result is used for representing a tool corresponding to the information to be processed, the second task is executed to obtain a second result corresponding to the information to be processed, the second result is used for representing intention classification of the information to be processed, and an intention recognition result corresponding to the information to be processed is determined according to the first result and the second result. Thus, the intention of the information to be processed can be accurately judged.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the present invention with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a data processing system of an embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method of an embodiment of the present invention;
FIG. 3 is a schematic diagram of configuration information according to an embodiment of the present invention;
FIG. 4 is a flow chart of determining the information to be processed based on the intent recognition result in accordance with an embodiment of the present invention;
FIG. 5 is a flow chart of a method for determining a processing result according to a tool class of a first result and the second result according to an embodiment of the invention;
FIG. 6 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;
Fig. 7 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The present application is described below based on examples, but the present application is not limited to only these examples. In the following detailed description of the present application, certain specific details are set forth in detail. The present application will be fully understood by those skilled in the art without the details described herein. Well-known methods, procedures, flows, components and circuits have not been described in detail so as not to obscure the nature of the application.
Moreover, those of ordinary skill in the art will appreciate that the drawings are provided herein for illustrative purposes and that the drawings are not necessarily drawn to scale.
Unless the context clearly requires otherwise, the words "comprise," "comprising," and the like throughout the application are to be construed as including but not being exclusive or exhaustive; that is, it is the meaning of "including but not limited to".
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
The current intelligent question-answering system does not have a judgment part of the intention of the user when generating an answer corresponding to the question, so that the intention of the user cannot be accurately determined. For intelligent question-answering systems that contain instructions to perform tasks, the user's questions and answers may be misinterpreted as instructions in some particular situations, as well as instructions from the user. For example, for "how do text rendering operate? "this problem, the intelligent question-answering system may misunderstand that the user needs to color the text input later, so that the answer generated by the system does not meet the user's needs.
FIG. 1 is a schematic diagram of a data processing system in accordance with an embodiment of the present invention. As shown in fig. 1, the data processing system of the embodiment of the present invention includes a server 1 and a user terminal 2. Wherein the server 1 is a server configured with a processing model, and the user terminal 2 is a terminal device used by a user.
Firstly, the configuration of the server is carried out, specifically, the server 1 receives the configuration information, analyzes the configuration information to obtain specific contents therein, and learns or understands the execution flow according to the configuration information. After the server configuration is completed, the user terminal 2 receives the information to be processed input by the user and sends the information to be processed to the server 1, and after the server 1 receives the information to be processed, the information to be processed is processed according to the learned or understood execution flow to obtain a processing result, and the processing result is returned to the user terminal 2.
The server may be a single server or a server cluster formed by a plurality of servers.
The user terminal may be implemented by a client device used by a user, for example, a mobile phone, a tablet computer, a notebook computer, a desktop computer, a wearable device (e.g., a smart watch, a smart bracelet, etc.), and so on.
It should be understood that, in the embodiment of the present invention, the processing of the information to be processed of the user is illustrated by the interaction between the user terminal and the server, but the embodiment of the present invention is not limited thereto. For example, in some embodiments, the processing model may be directly configured on the dedicated data processing terminal side, where the user terminal receives configuration information input by the user, parses the configuration information to obtain specific content therein, and learns or understands the execution flow according to the configuration information. After the configuration is completed, the special data processing terminal side receives information to be processed input by a user, and processes the information to be processed according to the learned or understood execution flow to obtain a processing result.
Wherein the processing model is a natural language processing model. The method can be realized by a large language model, and has the functions of natural language understanding and generation.
The user terminal can be realized through a client device with a natural language processing module.
Fig. 2 is a flowchart of a data processing method according to an embodiment of the present invention, and the data processing method shown in fig. 2 may be applied to a server or a dedicated data processing terminal as in fig. 1. As shown in fig. 2, the data processing method includes the following steps:
step S100, acquiring configuration information.
The configuration information is a relevant configuration for the process model. The configuration information includes at least a first task and a second task. The first task is an instruction judging task and is used for judging instructions to be used, and the second task is a classification judging task and is used for acquiring the type of the task of the information to be processed.
In some embodiments, the configuration information may be set to a template format of a template. A template of promt refers to a specific input format or template that is used to guide the model in learning and prediction. Campt is a piece of text that is used to guide or excite a model to generate a specific response. In particular, the text of the prompt may be a question, a description, a beginning of a dialog, or other type of input, with the purpose of providing a model with a definite direction that directs the model to understand what output should be generated. For example, if the model is required to generate a piece of text about "favorite animals", the following campt may be used: "please describe your favorite animal, including its appearance, habit, and why you like it. "through the design of promt, the ability of a pre-trained language model can be utilized more effectively, generating more accurate, more relevant outputs.
In general, the template of the promt is debugged and optimized according to the requirements of the target task, the understanding and output capabilities of the model. In order to enhance the processing capacity of the model for tasks, it is also possible to test, debug and optimize the model by using the template, and finally apply the model to the actual scene. In the embodiment of the invention, the intention recognition module invokes the data processing function of the processing model to complete the first task and the second task by constructing a template of the prompt, the template is divided into four parts, specifically as shown in fig. 3, and the configuration information includes a task overall description 31, a first task 32, a second task 33, and an output format 34. The format in the template for campt is as follows:
"""\
task overall description
First task
Second task
Output format
"""
Wherein the task entirety description 31 is used to describe the entire task flow for the process model. For example, the task entirety description 31 may be "you are an intelligent assistant, your task is to intelligently select the appropriate way to respond to the user based on the user's < < dialogue record > > and < < QUERY >. You need to accomplish two related tasks: ".
Thus, the process model may understand, through task entirety description 31, that the flow that needs to be performed includes: based on the user < < dialogue record > and < < QUERY >, an appropriate way is intelligently selected to respond to the user and two related tasks need to be completed. The dialogue record is a historical chat record of the user and the intelligent question-answering system, and the QUERY is information to be processed which is input by the user at the time.
The first task 32 includes a first task description and at least one first example, where the first task description is used to instruct the processing model to obtain a first result corresponding to the information to be processed, and the first example is an example of the information to be processed and an example of the corresponding first result. That is, the first task description is used to tell the processing model about the specific content of the first task, and the first example is the correspondence between the user input and the processing result of the first task. For example, the first task may be in the form of:
task1:
You need to select the specific instruction tool that best suits the current conversation, or use the default tool txt.
The specific instruction tools are as follows:
literary-talent-a text-mining and color-rendering tool. The method is used for improving the literature and the collection, beautifying and moisturizing the text.
Simplify _language, a concise language tool. For conciseing text content, text is expressed as a popular and intelligible utterance.
Copywrite _extraction tool. For speech recognition of a given video link to extract the text therein.
The style rewrite tool. For overwriting text with another style.
Content_summary: content summary tool. For summarizing the text content.
Translator translation tools. For translating text.
Content_ INTERPRETATE content interpretation tool. For interpreting the text content.
Video_parameter: video parsing tool. For parsing the video of a given link for download by the user.
Error_recovery: error correction tool. For correcting spelling errors and grammar errors
Content_ abridge text abbreviation tool. For abbreviation of text
The default tools are as follows:
txt, knowledge base question-answering tool. The method is used for inquiring the knowledge base and the documents and responding. Or answer to the chat content.
Task1 example:
QUERY how the text is rendered
TOOL:txt
QUERY to moisten the speech
TOOL:literary_talent
What is the popular and easy to understand expression of this paragraph?
TOOL:simplify_language
Query help me extract a text file
TOOL:copywrite_extraction
QUERY, help me rewrite to Hu Xi in style
TOOL:article_transform
QUERY summary of the section
TOOL:content_summary
QUERY I hungry how to speak English
TOOL:translator
QUERY explaining the words given
TOOL:content_interpretate
QUERY help me parse a video
TOOL:video_parse
QUERY correction of a one-time spelling error
TOOL:error_recovery
QUERY help me write the text more simply
TOOL:content_abridge
As shown above, the processing model may learn, according to the first task description, that the task needs to be performed is: the particular instruction tool that best suits the current conversation is selected, or a default tool txt is used, along with a specific functional description of the particular instruction tool. Meanwhile, each first example includes QUERY and corresponding TOOL. Wherein, QUERY is the information input by the user, TOOL is the processing result obtained by the first task according to the information input by the user.
The second task 33 includes a second task description and at least one second example, where the second task description is used to instruct the processing model to obtain a second result corresponding to the information to be processed, and the second example is an example of the information to be processed and an example of the second result corresponding to the information to be processed. That is, the second task description is used to tell the processing model about the specific content of the second task, and the second example is the correspondence between the user input and the processing result of the second task. For example, the second task may be in the form of:
task2:
You need to determine if the intent (intent) of the current dialog is instruct or qa
Instructions, which may be executed by a particular instruction tool
Qa, knowledge base questions and answers, using default knowledge base text to answer user questions, or let you explain the usage of a certain instruction tool, corresponding to default tool txt.
Task2 example:
QUERY-help me rewrite to an exaggerated and fun style
INTENT:instruct
QUERY how the rewrite tool is used
INTENT:qa
QUERY how to express the session in a simple language
INTENT:instruct
Use of QUERY concise language tool
INTENT:qa
What is artificial intelligence?
INTENT:qa
As shown above, the processing model may learn, according to the second task description, that the task needs to be performed is: it is determined whether the intent classification of the current dialog is instruct (instruction class) or qa (question-answer class). Meanwhile, each second example includes a QUERY and a corresponding INENT. Wherein, QUERY is the information input by the user, INTENT is the processing result obtained by the second task according to the information input by the user.
The output format 34 is used to instruct the processing model to output the corresponding content according to a predetermined format. Wherein the output format includes an output format description and a third example. Wherein the output format describes a format for indicating output information of the processing model. The third example is an example of information to be processed and an example of its corresponding output format. The output format may be as follows:
output format requirement >
Returning markdown code with JSON object format as follows:
The following are examples of output formats that assist the processing model in understanding what the output formats are in particular:
Example
A dialogue:
human how to use translation tools
OUTPUT:
{"intent":"qa","tool":"txt"}
A dialogue:
Human help me to moisten one's text
OUTPUT:
{"intent":"instruct","tool":"literary_talent"}
A dialogue:
human brief the writing of this section
OUTPUT:
{"intent":"instruct","tool":"simplify_language"}
A dialogue:
Human [ text extraction ]
OUTPUT:
{"intent":"instruct","tool":"copywrite_extraction"}
A dialogue:
Human help me rewrite to exaggerate and fun style
OUTPUT:
{"intent":"instruct","tool":"article_transform"}
A dialogue:
Human summarize the content given below
OUTPUT:
{"intent":"instruct","tool":"content_summary"}
A dialogue:
human translation of the following text into English
OUTPUT:
{"intent":"instruct","tool":"translator"}
A dialogue:
Human description of the following paragraphs
OUTPUT:
{"intent":"instruct","tool":"content_interpretate"}
A dialogue:
Human [ video parsing ]
OUTPUT:
{"intent":"instruct","tool":"video_parse"}
A dialogue:
Human checking the grammar of the session
OUTPUT:
{"intent":"instruct","tool":"error_recovery"}
A dialogue:
human will be abbreviated in the following paragraphs
OUTPUT:
{"intent":"instruct","tool":"content_abridge"}
Thus, by providing the configuration information to the process model, the process model can learn or understand tasks to be performed according to the configuration information and output contents in a predetermined format.
Step S200, receiving information to be processed.
The information to be processed is content to be processed, and may be any one or more of text information, voice information, picture information and video information. The information input mode can be various, and can be input in a window of the intelligent question-answering system, can be selected according to prompts in the window of the intelligent question-answering system, and can be content input from another device, and the embodiment of the invention does not limit the content.
Step S300, executing the first task to obtain a first result corresponding to the information to be processed, where the first result is used to characterize a tool corresponding to the information to be processed.
The first result is a result obtained by processing the information to be processed according to a first task in the configuration information by the processing model, the first task specifically comprises a first task description and a first example, the first task description is used for describing the first task to the processing model, namely, the processing model is instructed to obtain the first result corresponding to the information to be processed, and the processing model is used for helping the processing model to better understand the first task.
The following is the whole procedure for performing the first task:
First, the processing model understands the operation to be executed by the part of the first task in the template according to the part, and then processes the information to be processed by using the corresponding function. Specifically, the tool to be used is determined according to the content input by the user, the tool to be used is judged through the function, the judgment is performed based on the content input by the user, the algorithm of the model and preset rules, and finally, a first result is obtained.
In some embodiments, the first result is a name of a tool. For example, a text-mining rendering tool (literary _ talent) for enhancing text, beautifying and rendering text, a concise language tool (simplify _language) for simplifying text content, expressing text as a popular and intelligible utterance, a translation tool (translator) for translating text, a knowledge base question-answering tool (txt) for querying a knowledge base, document, and answering. The knowledge base question-answering tool is a default tool of the system.
Step S400, executing the second task to obtain a second result corresponding to the information to be processed, where the second result is used to characterize the intent classification of the information to be processed.
The second result is a result obtained by processing the information to be processed according to a second task in the configuration information by the processing model, and the second task specifically comprises a second task description and a second example, wherein the second task description is used for describing the second task to the processing model, namely, indicating the processing model to obtain the second result corresponding to the information to be processed, and the second example is used for helping the processing model to better understand the second task.
The following is the whole process of performing the second task:
Similar to the first task, the processing model understands the operation to be performed by the portion of the second task in the template according to the portion, and then processes the information to be processed using the corresponding function. Specifically, the user intention is determined according to the content input by the user, namely, the user intention of the information to be processed is judged, the judgment is carried out based on the content input by the user, the algorithm of the model and the preset rule, and finally, a second result is obtained.
In some embodiments, the second result includes an instruction class and a question-answer class. The instruction class is a command sentence, the processing model carries out corresponding operation according to the command, the question-answer class is a question to be answered, and the processing model needs to answer the question. For example, the information to be processed is "help me translate the following: xxx ", the second result is an instruction class, the information to be processed is" what day today ", and the second result is a question-answer class.
And S500, determining an intention recognition result corresponding to the information to be processed according to the first result and the second result.
The determining the intention recognition result is to output a first result and a second result according to a preset format. In some embodiments, the configuration information further includes an output format, at which time the first result and the second result are converted to the output format to obtain the intent recognition result.
In some embodiments, after the intention recognition result is obtained through step S500, the data processing method further includes:
And step 600, determining a processing result corresponding to the information to be processed according to the intention recognition result.
Fig. 4 is a flowchart of determining the information to be processed according to the intention recognition result according to an embodiment of the present invention, as shown in fig. 4, the determining the information to be processed according to the intention recognition result includes the following steps:
Step S610, determining a tool class of the first result.
The tool class of the first result comprises two classes, namely an instruction class and a question-answer class, wherein the instruction class tool is used for executing a corresponding instruction to complete corresponding operation to obtain an output result, and the question-answer class tool is used for obtaining the output result according to the input problem and the language model.
The instruction type tools comprise a text and mining color-rendering tool (literary _ talent), a concise language tool (simplify _language), a translation tool (translator) and the like, and the question-answering type tools are knowledge base question-answering tools.
Step S620, determining a processing result corresponding to the information to be processed according to the tool class of the first result and the second result.
The processing result corresponding to the information to be processed is determined together according to the tool class and the second result obtained in the step S610, and the processing result is an answer output according to the text of the information to be processed.
Specifically, in response to the tool category of the second result and the first result being an instruction category, determining a target instruction corresponding to the information to be processed, and executing the target instruction. Responsive to the second result and the first result being of a question-answer type, or responsive to the second result and the first result being of a different tool type, reply information is generated based on a predetermined manner. That is, the reply information is generated based on a predetermined manner in response to the second result and the tool class of the first result being a question-answer class, or in response to the second result being an instruction class and the tool class of the first result being a question-answer class, or in response to the second result being a question-answer class and the tool class of the first result being an instruction class.
FIG. 5 is a flow chart of determining a processing result according to the tool class of the first result and the second result according to the embodiment of the invention. As shown in fig. 5, the determining the processing result corresponding to the information to be processed according to the tool class of the first result and the second result includes the following steps:
Step S621, judging whether the first result is an instruction type.
If so, step S622 is entered.
If not, the process advances to step S624.
Step S622, determining whether the second result is an instruction type.
If so, step S623 is entered.
If not, the process advances to step S624.
Step S623, determining a target instruction corresponding to the information to be processed, and executing a related instruction.
Specifically, the parameters of the target instruction are extracted, and an API interface is called to obtain the result. The manner of calling the API interface to obtain the result may be to call a large language model, or may use a program to process, which is not limited in the embodiment of the present invention.
Specifically, executing the related instruction, namely calling a corresponding instruction module according to the name of the instruction, and operating the information to be processed through the instruction module to obtain a reply. For example, if the information to be processed is the text "help me translate the following into english: i's happy, the target instruction corresponding to the information to be processed is to use the translation tool (translator) to translate the word "I's happy", that is, call the translation tool module and process the content to be translated in the text information to generate a reply, which is "I'm version happy" in this example. If the information to be processed is "help me moisten the following sentences: i like to learn ", at this time, the target instruction corresponding to the information to be processed is to use a text and a character rendering tool (literary _ talent) to render the sentence" I like to learn ", and in this example, the reply can be multiple, for example," school is the estuary of our soul, I craziness is in the ocean of knowledge ".
Finally, the content to be output is generated by the instruction class tool.
Step S624, generating reply information based on a preset mode.
Specifically, information retrieval is performed by combining a knowledge base and a search tool, the searched information is sent to a large language model in the form of a template of the template, and the large language model generates replies according to the template of the template. Knowledge base question-answering tools need to build a huge knowledge base, including knowledge and information in various fields, understand questions or sentences input by users by using natural language processing technology, and use a large language model for corresponding processing and answering.
Compared with the traditional technical scheme of the intention recognition module, the embodiment of the invention increases the part for distinguishing the intention, namely distinguishing the intention of the user as question and answer or instruction, and can judge the intention of the user more accurately. For example, a user input "how to use the translation function of a certain software? If the method of instruction judgment is only used, the method may be wrongly distributed to the translation tool (translator) to translate the text, and if the technical scheme of the embodiment of the invention is used, when judgment is performed, the second result is a question-answer type, and the answer part of the knowledge base question-answer tool is entered, so that the user intention can be better judged.
According to the embodiment of the invention, the configuration information comprises a first task and a second task, the information to be processed is received, the first task is executed to obtain a first result corresponding to the information to be processed, the first result is used for representing a tool corresponding to the information to be processed, the second task is executed to obtain a second result corresponding to the information to be processed, the second result is used for representing the intention classification of the information to be processed, and the intention recognition result corresponding to the information to be processed is determined according to the first result and the second result. Thus, the intention of the information to be processed can be accurately judged.
FIG. 6 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention. As shown in fig. 6, the data processing apparatus includes a configuration information acquisition unit 61, an information reception unit 62, a first task execution unit 63, a second task execution unit 64, and a result determination unit 65. The configuration information obtaining unit 61 is configured to obtain configuration information, where the configuration information includes a first task and a second task. The information receiving unit 62 is for receiving information to be processed. The first task execution unit 63 is configured to execute the first task to obtain a first result corresponding to the information to be processed, where the first result is used to characterize a tool corresponding to the information to be processed. The second task execution unit 64 is configured to execute the second task to obtain a second result corresponding to the information to be processed, where the second result is used to characterize the intent classification of the information to be processed. The result determining unit 65 is configured to determine an intention recognition result corresponding to the information to be processed according to the first result and the second result.
In some embodiments, the configuration information further includes a task entirety description.
In some embodiments, the first task includes a first task description and at least one first instance;
the first task description is used for indicating a processing model to obtain a first result corresponding to the information to be processed, and the first example is an example of the information to be processed and an example of the corresponding first result.
In some embodiments, the second task includes a second task description and at least one second instance;
the second task description is used for indicating the processing model to obtain a second result corresponding to the information to be processed, and the second example is an example of the information to be processed and an example of the second result corresponding to the information to be processed.
In some embodiments, the configuration information further includes an output format;
the result determining unit specifically comprises:
And converting the first result and the second result into the output format to obtain the intention recognition result.
In some embodiments, the apparatus further comprises:
And the processing result determining unit is used for determining the processing result corresponding to the information to be processed according to the intention recognition result.
In some embodiments, the processing result determining unit includes:
a first result determination subunit configured to determine a tool category of the first result;
And the processing result generation subunit is used for determining a processing result corresponding to the information to be processed according to the tool class of the first result and the second result.
In some embodiments, the second result includes a question-answer class and an instruction class, and the tool class includes a question-answer class and an instruction class;
Wherein the processing result generation subunit includes:
the instruction execution module is used for responding to the tool category of the second result and the first result as an instruction category, determining a target instruction corresponding to the information to be processed and executing the target instruction;
And the question-answering module is used for responding to the fact that the tool category of the second result and the tool category of the first result are question-answering, or responding to the fact that the tool category of the second result and the tool category of the first result are different, and generating reply information based on a preset mode.
According to the embodiment of the invention, the configuration information comprises a first task and a second task, the information to be processed is received, the first task is executed to obtain a first result corresponding to the information to be processed, the first result is used for representing a tool corresponding to the information to be processed, the second task is executed to obtain a second result corresponding to the information to be processed, the second result is used for representing the intention classification of the information to be processed, and the intention recognition result corresponding to the information to be processed is determined according to the first result and the second result. Thus, the intention of the information to be processed can be accurately judged.
Fig. 7 is a schematic diagram of an electronic device according to an embodiment of the invention. As shown in fig. 7, the electronic device shown in fig. 7 is a general address query device, which includes a general computer hardware structure including at least a processor 71 and a memory 72. The processor 71 and the memory 72 are connected by a bus 73. The memory 72 is adapted to store instructions or programs executable by the processor 71. The processor 71 may be a separate microprocessor or a collection of one or more microprocessors. Thus, the processor 71 performs the process flow of the embodiment of the present invention described above to realize the processing of data and the control of other devices by executing the instructions stored in the memory 72. Bus 73 connects the above components together, as well as to display controller 74 and display devices and input/output (I/O) devices 75. Input/output (I/O) devices 75 may be a mouse, keyboard, modem, network interface, touch input device, somatosensory input device, printer, and other devices known in the art. Typically, an input/output device 75 is connected to the system through an input/output (I/O) controller 76.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus (device) or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may employ a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each of the flows in the flowchart may be implemented by computer program instructions.
These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows.
These computer program instructions may also be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows.
Another embodiment of the present invention is directed to a non-volatile storage medium storing a computer readable program for causing a computer to perform some or all of the method embodiments described above.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by specifying relevant hardware by a program, where the program is stored in a storage medium, and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments of the application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, and various modifications and variations may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method of data processing, the method comprising:
acquiring configuration information, wherein the configuration information comprises a first task and a second task;
Receiving information to be processed;
Executing the first task to obtain a first result corresponding to the information to be processed, wherein the first result is used for representing a tool corresponding to the information to be processed;
executing the second task to obtain a second result corresponding to the information to be processed, wherein the second result is used for representing the intention classification of the information to be processed;
and determining an intention recognition result corresponding to the information to be processed according to the first result and the second result.
2. The method of claim 1, wherein the configuration information further comprises a task entirety description.
3. The method of claim 1, wherein the first task comprises a first task description and at least one first instance;
the first task description is used for indicating a processing model to obtain a first result corresponding to the information to be processed, and the first example is an example of the information to be processed and an example of the corresponding first result.
4. The method of claim 1, wherein the second task comprises a second task description and at least one second instance;
the second task description is used for indicating the processing model to obtain a second result corresponding to the information to be processed, and the second example is an example of the information to be processed and an example of the second result corresponding to the information to be processed.
5. The method of claim 1, wherein the configuration information further comprises an output format;
the determining, according to the first result and the second result, the intention recognition result corresponding to the information to be processed specifically includes:
And converting the first result and the second result into the output format to obtain the intention recognition result.
6. The method according to claim 1, wherein the method further comprises:
and determining a processing result corresponding to the information to be processed according to the intention recognition result.
7. The method according to claim 6, wherein the determining the processing result corresponding to the information to be processed according to the intention recognition result includes:
Determining a tool class of the first result;
And determining a processing result corresponding to the information to be processed according to the tool class of the first result and the second result.
8. The method of claim 7, wherein the second result comprises a question-answer class and an instruction class, and the tool class comprises a question-answer class and an instruction class;
The determining, according to the tool category of the first result and the second result, a processing result corresponding to the information to be processed includes:
Responding to the tool category of the second result and the first result as instruction categories, determining a target instruction corresponding to the information to be processed, and executing the target instruction;
Responsive to the second result and the first result being of a question-answer type, or responsive to the second result and the first result being of a different tool type, reply information is generated based on a predetermined manner.
9. A data processing apparatus, the apparatus comprising:
the configuration information acquisition unit is used for acquiring configuration information, wherein the configuration information comprises a first task and a second task;
the information receiving unit is used for receiving information to be processed;
The first task execution unit is used for executing the first task to obtain a first result corresponding to the information to be processed, and the first result is used for representing a tool corresponding to the information to be processed;
The second task execution unit is used for executing the second task to obtain a second result corresponding to the information to be processed, and the second result is used for representing the intention classification of the information to be processed;
And the result determining unit is used for determining an intention recognition result corresponding to the information to be processed according to the first result and the second result.
10. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any of claims 1-8.
CN202410210836.8A 2024-02-23 2024-02-23 Data processing method and device and electronic equipment Pending CN118051593A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410210836.8A CN118051593A (en) 2024-02-23 2024-02-23 Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410210836.8A CN118051593A (en) 2024-02-23 2024-02-23 Data processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN118051593A true CN118051593A (en) 2024-05-17

Family

ID=91053526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410210836.8A Pending CN118051593A (en) 2024-02-23 2024-02-23 Data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN118051593A (en)

Similar Documents

Publication Publication Date Title
CN110462730B (en) Facilitating end-to-end communication with automated assistants in multiple languages
US10937413B2 (en) Techniques for model training for voice features
US9805718B2 (en) Clarifying natural language input using targeted questions
CN111367490B (en) Voice playing method and device and electronic equipment
CN112262430A (en) Automatically determining language for speech recognition of a spoken utterance received via an automated assistant interface
CN104488027A (en) Speech processing system and terminal device
CN107844470B (en) Voice data processing method and equipment thereof
CN108304387B (en) Method, device, server group and storage medium for recognizing noise words in text
CN109543021B (en) Intelligent robot-oriented story data processing method and system
CN112131360A (en) Intelligent multi-turn dialogue customization method and system
CN114757176A (en) Method for obtaining target intention recognition model and intention recognition method
US11907665B2 (en) Method and system for processing user inputs using natural language processing
CN113535144A (en) Natural language programming method, device, equipment and storage medium
CN115186080A (en) Intelligent question-answering data processing method, system, computer equipment and medium
CN111158648B (en) Interactive help system development method based on live-action semantic understanding and platform thereof
CN116821290A (en) Multitasking dialogue-oriented large language model training method and interaction method
RU2344492C2 (en) Dynamic support of pronunciation for training in recognition of japanese and chinese speech
CN114430832A (en) Data processing method and device, electronic equipment and storage medium
CN111475129A (en) Method and equipment for displaying candidate homophones through voice recognition
US20190279623A1 (en) Method for speech recognition dictation and correction by spelling input, system and storage medium
CN118051593A (en) Data processing method and device and electronic equipment
CN111240787A (en) Interactive help method and system based on real scene semantic understanding
WO2020068858A9 (en) Techniques for language model training for a reference language
CN117273014B (en) Cross-domain semantic analysis method based on transfer learning
CN111104118A (en) AIML-based natural language instruction execution method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination