CN117291185A - Task processing method, entity identification method and task processing data processing method - Google Patents
Task processing method, entity identification method and task processing data processing method Download PDFInfo
- Publication number
- CN117291185A CN117291185A CN202311047348.1A CN202311047348A CN117291185A CN 117291185 A CN117291185 A CN 117291185A CN 202311047348 A CN202311047348 A CN 202311047348A CN 117291185 A CN117291185 A CN 117291185A
- Authority
- CN
- China
- Prior art keywords
- task
- text
- sample
- format
- target
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 329
- 238000000034 method Methods 0.000 title claims abstract description 98
- 238000003672 processing method Methods 0.000 title claims abstract description 55
- 238000012549 training Methods 0.000 claims abstract description 76
- 230000015654 memory Effects 0.000 claims description 7
- 239000000523 sample Substances 0.000 description 525
- 238000000605 extraction Methods 0.000 description 47
- 230000008569 process Effects 0.000 description 36
- 239000013074 reference sample Substances 0.000 description 28
- 230000008451 emotion Effects 0.000 description 20
- 230000006870 function Effects 0.000 description 14
- 230000007246 mechanism Effects 0.000 description 14
- 239000013598 vector Substances 0.000 description 14
- 238000013136 deep learning model Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 9
- 230000000873 masking effect Effects 0.000 description 8
- 239000000284 extract Substances 0.000 description 7
- 238000003058 natural language processing Methods 0.000 description 7
- 230000008901 benefit Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 238000013527 convolutional neural network Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000002457 bidirectional effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000006403 short-term memory Effects 0.000 description 2
- 238000013256 Gubra-Amylin NASH model Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000033228 biological regulation Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/253—Grammatical analysis; Style critique
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
- G06N3/0455—Auto-encoder networks; Encoder-decoder networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/09—Supervised learning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Machine Translation (AREA)
Abstract
本说明书实施例提供任务处理方法、实体识别方法及任务处理的数据处理方法,其中所述任务处理方法包括:接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息;基于目标文本和任务信息,构建符合第一格式的指令文本;基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。使用任务信息对应特定格式的输入和输出进行训练,模型具有高通用性和高任务处理精度,提升了任务处理的通用性和任务处理精度。
Embodiments of this specification provide a task processing method, an entity recognition method and a data processing method for task processing. The task processing method includes: receiving the target text input by the front end and the task information of the target task selected for the target text; based on the target text and Task information, construct an instruction text that conforms to the first format; based on the instruction text, use a task processing model to perform the target task on the target text, and generate a task execution result that conforms to the second format, wherein the task processing model is based on the sample instruction text of the first format It is obtained by training with the label result text of the second format. The sample instruction text includes sample task text and sample task information. The second format is determined based on the sample task information and the label text corresponding to the sample task information. Using task information to correspond to input and output in specific formats for training, the model has high versatility and high task processing accuracy, which improves the versatility and task processing accuracy of task processing.
Description
技术领域Technical field
本说明书实施例涉及文本处理技术领域,特别涉及一种任务处理方法。The embodiments of this specification relate to the technical field of text processing, and in particular to a task processing method.
背景技术Background technique
随着深度学习技术的不断发展,以自然语言理解(NLU,Natural LanguageUnderstanding)和自然语言生成(NLG,Natural Language Generation)为代表的自然语言处理(NLP,Natural Language Processing)得到长足进步。With the continuous development of deep learning technology, natural language processing (NLP, Natural Language Processing) represented by natural language understanding (NLU, Natural Language Understanding) and natural language generation (NLG, Natural Language Generation) has made great progress.
目前,在多种类型的任务细分场景下,基于大规模高质量的样本数据,对深度学习模型进行预先训练,使得训练得到的任务处理模型具有极高的任务处理精度。然而,任务处理模型的模型性能,与预先训练过程中样本数据的规模、样本数据的质量、模型的训练方法、软硬件资源等直接相关。即使上述直接相关的条件都得到满足,训练得到具有出色模型性能的任务处理模型,然而,在实际应用过程中,如何充分利用模型性能,不仅实现多种类型的任务细分场景下泛化的任务处理,具有高通用性,且在任一任务细分场景下,具有高任务处理精度,是一个亟需解决的问题。因此,亟需一种具有高通用性和高精度的任务处理方法。Currently, in various types of task segmentation scenarios, deep learning models are pre-trained based on large-scale high-quality sample data, so that the trained task processing models have extremely high task processing accuracy. However, the model performance of the task processing model is directly related to the size of the sample data during the pre-training process, the quality of the sample data, the model training method, software and hardware resources, etc. Even if the above directly related conditions are met and a task processing model with excellent model performance is obtained through training, however, in the actual application process, how to make full use of the model performance not only to achieve generalized tasks in multiple types of task segmentation scenarios Processing, with high versatility and high task processing accuracy in any task subdivision scenario, is an urgent problem that needs to be solved. Therefore, a task processing method with high versatility and high accuracy is urgently needed.
发明内容Contents of the invention
有鉴于此,本说明书实施例提供了一种任务处理方法。本说明书一个或者多个实施例同时涉及另一种任务处理方法,一种实体识别方法,一种任务处理的数据处理方法,一种任务处理装置,另一种任务处理装置,一种实体识别装置,一种任务处理的数据处理装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,以解决现有技术中存在的技术缺陷。In view of this, embodiments of this specification provide a task processing method. One or more embodiments of this specification also relate to another task processing method, an entity recognition method, a task processing data processing method, a task processing device, another task processing device, and an entity recognition device. , a data processing device for task processing, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the existing technology.
本说明书一个实施例中,提供了一种任务处理方法,包括:In one embodiment of this specification, a task processing method is provided, including:
接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息;Receive the target text input by the front end and the task information of the target task selected for the target text;
基于目标文本和任务信息,构建符合第一格式的指令文本;Based on the target text and task information, construct an instruction text that conforms to the first format;
基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。Based on the instruction text, the task processing model is used to perform the target task on the target text and generate a task execution result that conforms to the second format. The task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. The sample The instruction text includes sample task text and sample task information, and the second format is determined based on the sample task information and the label text corresponding to the sample task information.
本说明书一个实施例中,接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息;基于目标文本和任务信息,构建符合第一格式的指令文本;基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。任务处理模型是基于第一格式的样本指令文本和第二格式的标签结果文本预先经过监督训练得到,学习到了第一格式的输入指令文本和第二格式的输出结果,在第二格式为基于样本任务信息和样本任务信息对应的标签文本确定的情况下,任务处理模型可以根据指令文本的任务信息,生成与该任务信息和对应的标签文本相对应的符合第二格式的任务执行结果,在对不同任务信息下对目标文本执行目标任务的同时,任务处理模型具有对特定任务信息的细化处理能力,即任务处理具有高通用性和高任务处理精度。In one embodiment of this specification, the target text input by the front end and the task information of the target task selected for the target text are received; based on the target text and the task information, an instruction text conforming to the first format is constructed; based on the instruction text, a task processing model is used to The target text executes the target task and generates a task execution result that conforms to the second format. The task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. The sample instruction text includes sample task text and sample task. information, the second format is determined based on the sample task information and the label text corresponding to the sample task information. The task processing model is obtained through supervised training in advance based on the sample instruction text in the first format and the label result text in the second format. It has learned the input instruction text in the first format and the output result in the second format. In the second format, it is based on the sample. When the task information and the label text corresponding to the sample task information are determined, the task processing model can generate a task execution result in the second format corresponding to the task information and the corresponding label text based on the task information of the instruction text. While performing target tasks on target text under different task information, the task processing model has the ability to refine specific task information, that is, task processing has high versatility and high task processing accuracy.
附图说明Description of drawings
图1是本说明书一个实施例提供的一种任务处理方法的流程图;Figure 1 is a flow chart of a task processing method provided by an embodiment of this specification;
图2是本说明书一个实施例提供的另一种任务处理方法的流程图;Figure 2 is a flow chart of another task processing method provided by an embodiment of this specification;
图3是本说明书一个实施例提供的一种实体识别方法的流程图;Figure 3 is a flow chart of an entity recognition method provided by an embodiment of this specification;
图4是本说明书一个实施例提供的一种任务处理的数据处理方法的流程图;Figure 4 is a flow chart of a data processing method for task processing provided by an embodiment of this specification;
图5是本说明书一个实施例提供的一种任务处理方法的前端界面示意图;Figure 5 is a schematic diagram of the front-end interface of a task processing method provided by an embodiment of this specification;
图6是本说明书一个实施例提供的一种应用于搜索引擎的任务处理方法的处理过程流程图;Figure 6 is a process flow chart of a task processing method applied to a search engine provided by an embodiment of this specification;
图7是本说明书一个实施例提供的一种任务处理装置的结构示意图;Figure 7 is a schematic structural diagram of a task processing device provided by an embodiment of this specification;
图8是本说明书一个实施例提供的另一种任务处理装置的结构示意图;Figure 8 is a schematic structural diagram of another task processing device provided by an embodiment of this specification;
图9是本说明书一个实施例提供的一种实体识别装置的结构示意图;Figure 9 is a schematic structural diagram of an entity identification device provided by an embodiment of this specification;
图10是本说明书一个实施例提供的一种任务处理的数据处理装置的结构示意图;Figure 10 is a schematic structural diagram of a data processing device for task processing provided by an embodiment of this specification;
图11是本说明书一个实施例提供的一种计算设备的结构框图。Figure 11 is a structural block diagram of a computing device provided by an embodiment of this specification.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本说明书。但是本说明书能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本说明书内涵的情况下做类似推广,因此本说明书不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described here. Those skilled in the art can make similar extensions without violating the connotation of this specification. Therefore, this specification is not limited by the specific implementation disclosed below.
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the one or more embodiments of this specification. As used in one or more embodiments of this specification and the appended claims, the singular forms "a," "the" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used in one or more embodiments of this specification refers to and includes any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be called the second, and similarly, the second may also be called the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determining."
此外,需要说明的是,本说明书一个或多个实施例所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。In addition, it should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, etc.) involved in one or more embodiments of this specification , displayed data, etc.), are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding Operation portal for users to choose to authorize or deny.
本说明书一个或多个实施例中,大模型是指具有大规模模型参数的深度学习模型,通常包含上亿、上百亿、上千亿、上万亿甚至十万亿以上的模型参数。大模型又可以称为基石模型/基础模型(Foundation Model),通过大规模无标注的语料进行大模型的预训练,产出亿级以上参数的预训练模型,这种模型能适应广泛的下游任务,模型具有较好的泛化能力,例如大规模语言模型(Large Language Model,LLM)、多模态预训练模型(multi-modal pre-training model)等。In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually includes hundreds of millions, tens of billions, hundreds of billions, trillions or even more than ten trillion model parameters. The large model can also be called the cornerstone model/foundation model. It is pre-trained through large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks. , the model has good generalization ability, such as large-scale language model (Large Language Model, LLM), multi-modal pre-training model (multi-modal pre-training model), etc.
大模型在实际应用时,仅需少量样本对预训练模型进行微调即可应用于不同的任务中,大模型可以广泛应用于自然语言处理(Natural Language Processing,简称NLP)、计算机视觉等领域,具体可以应用于如视觉问答(Visual QuestionAnswering,简称VQA)、图像描述(Image Caption,简称IC)、图像生成等计算机视觉领域任务,以及基于文本的情感分类、文本摘要生成、机器翻译等自然语言处理领域任务,大模型主要的应用场景包括数字助理、智能机器人、搜索、在线教育、办公软件、电子商务、智能设计等。In practical applications, large models only require a small number of samples to fine-tune the pre-trained model and can be used in different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, It can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Caption (IC), and image generation, as well as natural language processing fields such as text-based sentiment classification, text summary generation, and machine translation. Tasks, the main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
首先,对本说明书一个或多个实施例涉及的名词术语进行解释。First, terminology used in one or more embodiments of this specification will be explained.
自然语言理解(NLU,Natural Language Understanding):深度学习模型理解自然语言的任务的总称,具体是将自然语言转换为深度学习模型可理解的特征向量,并以此进一步处理应用,包括语法分析、语义分析、实体识别抽取、文本分类等。自然语言理解是自然语言处理的重要基础,是各类系统如信息管理系统、自动化办公系统、搜索引擎、推荐系统等的底层技术。一般地,深度学习模型依赖于预训练的样本输入和样本输出,来学习理解自然语言理解任务的任务内容。Natural Language Understanding (NLU, Natural Language Understanding): The general term for the task of deep learning models to understand natural language. Specifically, it converts natural language into feature vectors that can be understood by deep learning models, and uses this to further process applications, including syntax analysis and semantics. Analysis, entity recognition extraction, text classification, etc. Natural language understanding is an important foundation for natural language processing and is the underlying technology for various systems such as information management systems, automated office systems, search engines, recommendation systems, etc. Generally, deep learning models rely on pre-trained sample inputs and sample outputs to learn to understand the task content of natural language understanding tasks.
开放域模型(Open Domain Model):没有领域(任务场景)限制的通用模型,具有高通用性。Open Domain Model: A universal model with no domain (task scenario) restrictions and high versatility.
CNN(Convolutional Neural Networks,卷积神经网络)模型:一种具有前向传播和反向传播的多层深度学习模型,具有对特征数据进行处理的卷积核(filter)。CNN (Convolutional Neural Networks, convolutional neural network) model: a multi-layer deep learning model with forward propagation and back propagation, and a convolution kernel (filter) that processes feature data.
RNN(Recurrent Neural Network,循环神经网络)模型:一种在向量表征的处理方向进行递归且各中间层按链式连接的递归深度学习模型。RNN (Recurrent Neural Network) model: a recursive deep learning model that performs recursion in the processing direction of vector representation and connects each intermediate layer in a chain.
LSTM(Long Short Term Memory,长短时记忆网络)模型:一种具有记忆长短期信息的能力的深度学习模型,具有对特征数据进行处理的卷积核(filter)。LSTM (Long Short Term Memory, long short-term memory network) model: a deep learning model with the ability to memorize long-term and short-term information, and has a convolution kernel (filter) for processing feature data.
Transformer(翻译)模型:一种基于注意力机制的深度学习模型,通过注意力机制提取、分析数据的特征。Transformer (translation) model: a deep learning model based on the attention mechanism, which extracts and analyzes the characteristics of the data through the attention mechanism.
BERT(Bidirectional Encoder Representation from Transformers,双向编码表征翻译)模型:一种双向注意力编码表征功能的深度学习模型。BERT (Bidirectional Encoder Representation from Transformers, Bidirectional Encoder Representation Translation) model: a deep learning model of bidirectional attention encoding representation function.
RoBERTa(ARobustly Optimized BERTPretrainingApproach,强力优化BERT方法)模型:一种具有字符级和词级混合编码、动态掩码机制的BERT衍生模型。RoBERTa (ARobustly Optimized BERTPretrainingApproach, powerfully optimized BERT method) model: a BERT-derived model with character-level and word-level mixed encoding and dynamic masking mechanism.
GAN(GenerativeAdversarial Network,生成对抗模型):包含一个生成器(Generator)和一个判别器(Discriminator),通过对生成器和判别器的交替训练,得到高准确度的生成器。GAN (Generative Adversarial Network, Generative Adversarial Network): It contains a generator (Generator) and a discriminator (Discriminator). Through alternate training of the generator and the discriminator, a high-accuracy generator is obtained.
目前,由于自然语言理解重要性和应用的广泛性,自然语言理解一直是重点研发的方向。尤其自BERT模型诞生后,自然语言理解取得长足进步。在各类细分任务场景中,基于大规模高质量的样本数据,采用监督学习的自然语言理解模型达到了极高的精度。但是,监督模型高昂的定制成本(样本数据标注成本、模型研发成本等)限制了它的应用范围。除了需求相对固定,有大规模使用可以摊薄成本的场景外,对于成本敏感、样本数据标注难度大、需求变化快的场景,很难实际落地。因此,研究者一直致力于探索一种不受领域限制的通用模型,即开放域模型,在多种类型的任务细分场景下,都有着较高的任务处理精度。At present, due to the importance and wide application of natural language understanding, natural language understanding has always been a key research and development direction. Especially since the birth of the BERT model, natural language understanding has made great progress. In various subdivided task scenarios, based on large-scale high-quality sample data, the natural language understanding model using supervised learning has achieved extremely high accuracy. However, the high customization cost of the supervision model (sample data annotation cost, model development cost, etc.) limits its application scope. In addition to scenarios where demand is relatively fixed and large-scale use can dilute costs, it is difficult to implement scenarios where cost is sensitive, sample data labeling is difficult, and demand changes rapidly. Therefore, researchers have been committed to exploring a general model that is not subject to domain restrictions, that is, an open domain model, which has high task processing accuracy in various types of task segmentation scenarios.
然而,受限于当前开放域模型的参数规模(一般为109级别),模型的泛化性不足。随着大规模语言模型,特别是生成式大规模语言模型的出现,用户只需仔细描述自己的需求,无需标注大量样本数据对模型进行训练,即可以获得相对可靠的任务执行结果。但是,生成式大规模语言模型存在以下问题:However, limited by the parameter scale of the current open domain model (generally 10 9 levels), the generalization of the model is insufficient. With the emergence of large-scale language models, especially generative large-scale language models, users can obtain relatively reliable task execution results by carefully describing their needs without labeling a large amount of sample data to train the model. However, generative large-scale language models suffer from the following problems:
1、成本问题,自然语言理解任务作为基础性任务,其调用量巨大,长期的调用成本甚至超过了专门研发监督模型的成本。2、数据安全问题,对于一些数据安全管理严格的场景,是不能从外部调用分布式部署的生成式大规模语言模型。3、推理速度问题,生成式大规模语言模型的接的并发数和响应时间很难支持自然语言理解这一类基础任务大规模的实时调用请求。4、生成式大规模语言模型的任务处理精度受到指令文本影响很大,对于不同任务需要对应设计指令文本的格式样式。5、模型输出的可解析性与稳定性差,生成式大规模语言模型的输出为自然语言形式,没有严格的格式约束,给下游任务的使用造成困难。6、闭源模型无法结合沉淀的项目数据深度定制,通用模型难以满足高任务处理精度需求的任务场景。1. Cost issue. As a basic task, the natural language understanding task has a huge amount of calls. The long-term call cost even exceeds the cost of specially developing a supervision model. 2. Data security issues. For some scenarios with strict data security management, the generative large-scale language model of distributed deployment cannot be called from the outside. 3. Inference speed problem. The concurrency and response time of generative large-scale language models are difficult to support large-scale real-time call requests for basic tasks such as natural language understanding. 4. The task processing accuracy of the generative large-scale language model is greatly affected by the instruction text. For different tasks, the format style of the instruction text needs to be designed correspondingly. 5. The parsability and stability of the model output are poor. The output of the generative large-scale language model is in the form of natural language without strict format constraints, which makes it difficult to use in downstream tasks. 6. Closed-source models cannot be deeply customized based on accumulated project data, and general models cannot meet task scenarios that require high task processing accuracy.
针对以上问题,在图1说明书实施例中提供了一种任务处理方法,采用多任务统一预先训练的方式,训练任务处理模型,且固定了指令文本的格式和结果文本的格式,克服了上述1-6的问题,且在多种自然语言理解任务上,具有通用性,产生了类似于应用编程接口(API,Application Programming Interface)的友好使用方式。In response to the above problems, a task processing method is provided in the embodiment of the description in Figure 1, which uses a multi-task unified pre-training method to train a task processing model, and fixes the format of the instruction text and the format of the result text, overcoming the above 1 -6 problem, and is universal in a variety of natural language understanding tasks, resulting in a friendly usage method similar to an application programming interface (API, Application Programming Interface).
在本说明书中,提供了一种任务处理方法,本说明书同时涉及另一种任务处理方法,一种实体识别方法,一种任务处理的数据处理方法,一种任务处理装置,另一种任务处理装置,一种实体识别装置,一种任务处理的数据处理装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,在下面的实施例中逐一进行详细说明。In this specification, a task processing method is provided. This specification also relates to another task processing method, an entity recognition method, a task processing data processing method, a task processing device, and another task processing method. The device, an entity recognition device, a data processing device for task processing, a computing device, a computer-readable storage medium and a computer program are described in detail one by one in the following embodiments.
参见图1,图1示出了本说明书一个实施例提供的一种任务处理方法的流程图,包括如下具体步骤:Referring to Figure 1, Figure 1 shows a flow chart of a task processing method provided by an embodiment of this specification, including the following specific steps:
步骤102:接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息。Step 102: Receive the target text input by the front end and the task information of the target task selected for the target text.
本说明书实施例应用于具有多种任务处理功能的应用的客户端、服务端或者应用平台,该客户端、服务端或者应用平台上部署具有多种任务处理功能的深度学习模型,即任务处理模型。前端为用户登录的该具有多种任务处理功能的应用前端或者应用平台前端。用户可以在该前端手动输入目标文本,也可以在该前端获取目标文本,以实现目标文本的输入。前端上可以设置有多种任务的任务信息,用户通过点选或者拖拽的方式实现目标任务的任务信息的选择,用户也可以通过输入目标任务的任务信息实现选择,在此不作限定。The embodiments of this specification are applied to the client, server or application platform of an application with multiple task processing functions. A deep learning model with multiple task processing functions, that is, a task processing model, is deployed on the client, server or application platform. . The front end is the application front end or application platform front end with multiple task processing functions that the user logs in to. The user can manually input the target text in the front end, or obtain the target text in the front end to realize the input of the target text. Task information for multiple tasks can be set on the front end. The user can select the task information of the target task by clicking or dragging. The user can also select the task information by inputting the task information of the target task, which is not limited here.
目标文本为待执行任务处理的自然语言文本,可以为至少一个语句,也可以为至少一个词语。例如,目标文本为“我不开心”。The target text is the natural language text to be processed by the task, which can be at least one sentence or at least one word. For example, the target text is "I am unhappy".
目标任务为需要执行的文本处理任务,为一种自然语言理解任务,包括但不限于:实体识别(实体抽取)、事件识别(事件抽取)、问题答案识别(问题答案抽取)等识别抽取任务,以及主题分类、意图分类、情感分类等文本分类任务。目标任务的任务信息为目标任务的任务特征信息,为一种自然语言文本,目标任务的任务信息表征了目标任务的任务特征,包括但不限于:任务类型、标签类型和任务执行逻辑。例如,对目标文本“我不开心”,选择目标任务为情感分类,目标任务的任务信息为“分类:情感”。The target task is a text processing task that needs to be performed, which is a natural language understanding task, including but not limited to: entity recognition (entity extraction), event recognition (event extraction), question answer recognition (question answer extraction) and other recognition and extraction tasks. As well as text classification tasks such as topic classification, intent classification, and sentiment classification. The task information of the target task is the task characteristic information of the target task, which is a natural language text. The task information of the target task represents the task characteristics of the target task, including but not limited to: task type, label type and task execution logic. For example, for the target text "I am not happy", select the target task as emotion classification, and the task information of the target task is "Classification: Emotion".
示例性地,用户A登录具有识别抽取功能和文本分类功能的多功能集成应用平台,T平台的前端,在前端输入目标文本“A地真热”,并从识别抽取任务中选择地点实体的目标任务,针对该目标文本所选择的目标任务的任务信息为“抽取:地点”。For example, user A logs into the front-end of the T platform, a multi-functional integrated application platform with recognition and extraction functions and text classification functions, inputs the target text "A is really hot" in the front-end, and selects the target of the location entity from the recognition and extraction task. Task, the task information of the target task selected for this target text is "Extraction: Location".
接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息,为后续构建第一格式的指令文本奠定了数据基础。Receiving the target text input by the front end and the task information of the target task selected for the target text lays a data foundation for the subsequent construction of the instruction text in the first format.
步骤104:基于目标文本和任务信息,构建符合第一格式的指令文本。Step 104: Based on the target text and task information, construct an instruction text that conforms to the first format.
指令文本为直接输入任务处理模型的自然语言文本指令,指令文本用于引导任务处理模型理解目标任务的任务内容,并以此对目标文本执行任务信息对应的目标任务,生成对应输出格式的输出结果。一般地,指令文本具有对应的格式样式,通过特定格式样式的限定,使得模型清楚理解目标任务,并以此对目标文本执行目标任务。例如,指令文本的格式样式为“副词+形容词+名词;文本风格标签,文本风格示例”,就通过副词、形容词和名词的文本语法层面,并通过文本风格标签和文本风格示例的文本风格层面,使得模型清楚理解目标任务的任务内容和输出格式。The instruction text is a natural language text instruction that is directly input into the task processing model. The instruction text is used to guide the task processing model to understand the task content of the target task, and use it to execute the target task corresponding to the task information on the target text, and generate an output result corresponding to the output format. . Generally, the instruction text has a corresponding format style. Through the limitation of the specific format style, the model can clearly understand the target task and perform the target task on the target text. For example, the format style of the instruction text is "adverb + adjective + noun; text style tag, text style example", through the text syntax level of adverbs, adjectives, and nouns, and through the text style level of text style tags and text style examples, This enables the model to clearly understand the task content and output format of the target task.
第一格式为对应目标任务的指令文本的文本指令格式,第一格式基于预先训练过程中的样本任务文本和样本任务信息确定并被任务处理模型所学习到,在应用过程中,以第一格式样式输入指令文本,第一格式样式包括:控制符(输入,任务),用于引导任务处理模型理解指令文本的含义以及控制任务处理模型的任务执行。第一格式样式包括目标文本和任务信息,本说明书实施例中,第一格式样式为:输入:目标文本;任务信息。例如,目标任务为人名实体识别抽取,第一格式样式为“输入:目标文本;抽取:人名”。The first format is a text instruction format corresponding to the instruction text of the target task. The first format is determined based on the sample task text and sample task information in the pre-training process and is learned by the task processing model. During the application process, the first format is The style input instruction text, the first format style includes: control symbol (input, task), used to guide the task processing model to understand the meaning of the instruction text and control the task execution of the task processing model. The first format style includes target text and task information. In the embodiment of this specification, the first format style is: input: target text; task information. For example, if the target task is name entity recognition and extraction, the first format style is "Input: target text; Extraction: person name".
基于目标文本和任务信息,构建符合第一格式的指令文本,具体方式为:基于目标文本和任务信息,按照第一格式样式,构建符合第一格式的指令文本。Based on the target text and task information, construct an instruction text that conforms to the first format. The specific method is: based on the target text and task information, and according to the first format style, construct an instruction text that conforms to the first format.
示例性地,基于目标文本“A地真热”和任务信息“抽取:地点”,按照第一格式样式“输入:目标文本;任务信息”,构建符合第一格式的指令文本:输入:A地真热;抽取:地点。For example, based on the target text "A place is really hot" and the task information "Extract: location", according to the first format style "input: target text; task information", an instruction text conforming to the first format is constructed: input: A place Really hot; extraction: location.
基于目标文本和任务信息,构建符合第一格式的指令文本,使得后续任务处理模型可以更为准确地理解目标任务的任务内容,为后续生成高精度的任务执行结果奠定了格式基础。Based on the target text and task information, an instruction text that conforms to the first format is constructed, so that the subsequent task processing model can more accurately understand the task content of the target task, laying a format foundation for subsequent generation of high-precision task execution results.
步骤106:基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。Step 106: Based on the instruction text, use the task processing model to perform the target task on the target text and generate a task execution result that conforms to the second format, wherein the task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. It is obtained that the sample instruction text includes sample task text and sample task information, and the second format is determined based on the sample task information and the label text corresponding to the sample task information.
任务处理模型为具有多种任务处理功能的深度学习模型,具有自然语言生成能力,可以基于不同任务的任务信息执行对应的任务,生成特定格式的任务执行结果。任务处理模型包括但不限于:CNN模型、RNN模型、LSTM模型、Transformer模型、BERT模型、RoBERTa模型和GAN模型。任务处理模型为一种生成式小规模语言模型(参数规模一般为1012级别GB),相比于生成式大规模语言模型(参数规模一般为1015级别),可以被部署在客户端、服务端或者应用平台上,无需部署在外置的分布式集群上。任务处理模型经过预先训练,即经过预训练(Pre-train)和/或微调(Fine-tune)。本说明书实施例中,任务处理模型为一种生成式语言模型,采用自然语言生成的方式处理自然语言理解任务,为了让生成式语言模型可以理解自然语言理解任务的任务内容,需要用第一格式对输入的指令文本进行限定,为了让生成式语言模型输出特定格式的自然语言理解的输出结果,需要用第二格式对输出结果进行限定,使得具有多种任务处理功能的任务处理模型,可以准确执行自然语言理解任务。The task processing model is a deep learning model with multiple task processing functions and has natural language generation capabilities. It can execute corresponding tasks based on task information of different tasks and generate task execution results in a specific format. Task processing models include but are not limited to: CNN model, RNN model, LSTM model, Transformer model, BERT model, RoBERTa model and GAN model. The task processing model is a generative small-scale language model (the parameter size is generally 10 12 GB). Compared with the generative large-scale language model (the parameter size is generally 10 15 GB), it can be deployed on the client and service On the client or application platform, there is no need to deploy it on an external distributed cluster. The task processing model is pre-trained, that is, pre-trained (Pre-train) and/or fine-tuned (Fine-tune). In the embodiment of this specification, the task processing model is a generative language model, which uses natural language generation to process natural language understanding tasks. In order for the generative language model to understand the task content of the natural language understanding task, the first format needs to be used To limit the input instruction text, in order for the generative language model to output the output result of natural language understanding in a specific format, it is necessary to use a second format to limit the output result, so that the task processing model with multiple task processing functions can accurately Perform natural language understanding tasks.
任务执行结果为对目标文本执行目标任务的自然语言文本结果,为任务处理模型生成的输入结果。The task execution result is the natural language text result of performing the target task on the target text, and is the input result generated by the task processing model.
第二格式为对应目标任务的任务执行结果的文本格式,第二格式基于预先训练过程中的样本任务信息和样本任务信息对应的标签文本确定并被任务处理模型所学习到,在应用过程中,以第二格式样式输出任务执行结果,第二格式样式包括:控制符(输出),用于引导任务处理模型生成任务执行结果。具体的第二格式样式为:输出:任务信息:预测文本。例如,目标任务为人名实体识别抽取,第二格式样式为“输出:人名:人名实体”。The second format is a text format corresponding to the task execution result of the target task. The second format is determined based on the sample task information in the pre-training process and the label text corresponding to the sample task information and is learned by the task processing model. During the application process, The task execution result is output in a second format, and the second format includes: a control symbol (output), which is used to guide the task processing model to generate the task execution result. The specific second format style is: output: task information: predicted text. For example, the target task is to identify and extract person's name entities, and the second format style is "output: person's name: person's name entity".
样本任务文本为样本任务的待执行任务处理的自然语言文本。样本任务信息表征了样本任务的任务特征。样本任务为预先训练的文本处理任务,为多种自然语言理解任务。例如,样本任务为情感分类,情感分类的样本任务文本为“我不开心”,情感分类的样本任务信息为“分类:情感”。The sample task text is the natural language text of the sample task to be executed. The sample task information characterizes the task characteristics of the sample task. The sample tasks are pre-trained text processing tasks and various natural language understanding tasks. For example, the sample task is emotion classification, the sample task text of emotion classification is "I am not happy", and the sample task information of emotion classification is "Classification: Emotion".
标签文本为任务处理的执行对象文本,为任务处理即预先训练过程中样本任务信息对应的文本。例如,样本任务为情感分类,情感分类的样本任务文本为“我不开心”,情感分类的样本任务信息为“分类:情感”,对应的标签文本为“不开心”。The label text is the execution object text of the task processing, which is the text corresponding to the sample task information in the task processing, that is, the pre-training process. For example, the sample task is emotion classification, the sample task text of emotion classification is "I am not happy", the sample task information of emotion classification is "Category: Emotion", and the corresponding label text is "Unhappy".
在任务处理模型的预先训练过程中,第一格式的样本指令文本作为训练样本,第二格式的标签结果文本作为标签样本,对任务处理模型进行监督训练。第一格式是基于样本任务文本和样本任务信息确定的,第二格式是基于样本任务信息和样本任务信息对应的标签文本确定的。任务处理模型经过这样的监督训练,学习到了不同样本指令文本的第一格式和对应的标签结果文本的第二格式,在步骤106中,任务处理模型通过输入的符合第一格式的指令文本,理解并执行目标任务,并对应生成符合第二格式的任务执行结果。第二格式通过对目标任务的约束,提升了输出结果的可解释性和稳定性,方便后续下游任务的使用。During the pre-training process of the task processing model, the sample instruction text in the first format is used as a training sample, and the label result text in the second format is used as a label sample to perform supervised training on the task processing model. The first format is determined based on the sample task text and the sample task information, and the second format is determined based on the sample task information and the label text corresponding to the sample task information. After such supervised training, the task processing model has learned the first format of different sample instruction texts and the second format of the corresponding label result text. In step 106, the task processing model understands the input instruction text that conforms to the first format. And execute the target task, and correspondingly generate the task execution result that conforms to the second format. The second format improves the interpretability and stability of the output results by constraining the target tasks, and facilitates the use of subsequent downstream tasks.
基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,具体方式为:将指令文本输入任务处理模型,基于指令文本的上下文,生成任务信息对应的预测文本,基于任务信息和预测文本,确定符合第二格式的任务执行结果。其中,基于上下文生成预测文本,是通过编解码方式,即对指令文本进行特征编码,得到指令文本的特征向量,基于上下文解码机制,对特征向量进行解码,生成预测文本。上下文机制可以为注意力掩码机制,也可以为对角掩蔽机制。具体为基于指令文本的特征向量中之前的token来预测下一个位置的token。其中,基于任务信息和预测文本,确定符合第二格式的任务执行结果,具体方式为:基于任务信息和预测文本,按照第二格式样式,构建符合第二格式的任务执行结果。Based on the instruction text, use the task processing model to perform the target task on the target text, and generate task execution results that conform to the second format. The specific method is: input the instruction text into the task processing model, and based on the context of the instruction text, generate prediction text corresponding to the task information. , based on the task information and predicted text, determine the task execution result that conforms to the second format. Among them, generating predictive text based on context is through encoding and decoding, that is, feature encoding is performed on the instruction text to obtain the feature vector of the instruction text. Based on the context decoding mechanism, the feature vector is decoded to generate predictive text. The context mechanism can be an attention masking mechanism or a diagonal masking mechanism. Specifically, the token at the next position is predicted based on the previous token in the feature vector of the instruction text. Among them, based on the task information and the predicted text, the task execution result that conforms to the second format is determined. The specific method is: based on the task information and the predicted text, according to the second format style, a task execution result that conforms to the second format is constructed.
示例性地,任务处理模型为基于识别抽取任务和文本分类任务的第一格式的样本指令文本和第二格式的标签结果文本训练得到的Transformer模型,任务处理模型具有识别抽取和文本分类的功能。将指令文本“输入:A地真热;抽取:地点”输入任务处理模型,对指令文本进行特征编码,得到指令文本的特征向量Feature,基于对角掩蔽机制,对特征向量解码,生成任务信息“抽取:地点”对应的预测文本“A地”,基于任务信息和预测文本,按照第二格式样式“输出:任务信息:预测文本”,构建符合第二格式的任务执行结果:输出:地点:A地。Exemplarily, the task processing model is a Transformer model trained based on the sample instruction text in the first format and the label result text in the second format of the recognition extraction task and the text classification task, and the task processing model has the functions of recognition extraction and text classification. Input the instruction text "Input: A ground is really hot; Extract: Location" into the task processing model, perform feature encoding on the instruction text, and obtain the feature vector Feature of the instruction text. Based on the diagonal masking mechanism, the feature vector is decoded to generate task information. Extract the predicted text "A place" corresponding to "location", based on the task information and predicted text, according to the second format style "output: task information: predicted text", and construct a task execution result that conforms to the second format: output: location: A land.
本说明书实施例中,接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息;基于目标文本和任务信息,构建符合第一格式的指令文本;基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。任务处理模型是基于第一格式的样本指令文本和第二格式的标签结果文本预先经过监督训练得到,学习到了第一格式的输入指令文本和第二格式的输出结果,在第二格式为基于样本任务信息和样本任务信息对应的标签文本确定的情况下,任务处理模型可以根据指令文本的任务信息,生成与该任务信息和对应的标签文本相对应的符合第二格式的任务执行结果,在对不同任务信息下对目标文本执行目标任务的同时,任务处理模型具有对特定任务信息的细化处理能力,即任务处理具有高通用性和高任务处理精度。In the embodiment of this specification, the target text input by the front end and the task information of the target task selected for the target text are received; based on the target text and the task information, an instruction text that conforms to the first format is constructed; based on the instruction text, a task processing model is used to process the target The text executes the target task and generates a task execution result that conforms to the second format. The task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. The sample instruction text includes sample task text and sample task information. , the second format is determined based on the sample task information and the label text corresponding to the sample task information. The task processing model is obtained through supervised training in advance based on the sample instruction text in the first format and the label result text in the second format. It has learned the input instruction text in the first format and the output result in the second format. In the second format, it is based on the sample. When the task information and the label text corresponding to the sample task information are determined, the task processing model can generate a task execution result in the second format corresponding to the task information and the corresponding label text based on the task information of the instruction text. While performing target tasks on target text under different task information, the task processing model has the ability to refine specific task information, that is, task processing has high versatility and high task processing accuracy.
在本说明书一种可选实施例中,目标任务的任务信息包括任务类型和标签类型;In an optional embodiment of this specification, the task information of the target task includes task type and label type;
对应地,步骤106包括如下具体步骤:Correspondingly, step 106 includes the following specific steps:
将指令文本输入任务处理模型,基于标签类型,对目标文本执行任务类型对应的目标任务,生成标签类型对应的预测文本,并基于标签类型和预测文本确定符合第二格式的任务执行结果。Input the instruction text into the task processing model, perform the target task corresponding to the task type on the target text based on the label type, generate the predicted text corresponding to the label type, and determine the task execution result that conforms to the second format based on the label type and the predicted text.
任务信息表征了目标任务的任务特征,以此确定了第一格式和第二格式,对于任务处理模型的输入和输出进行限定,使得任务处理模型准确理解了目标任务的任务内容并得到特定格式的输出结果。进一步地,任务信息可以细分出任务类型和标签对象,表征任务方式特征和任务对象特征。The task information represents the task characteristics of the target task, thereby determining the first format and the second format, and limiting the input and output of the task processing model, so that the task processing model accurately understands the task content of the target task and obtains a specific format. Output results. Furthermore, the task information can be subdivided into task types and label objects to characterize task method characteristics and task object characteristics.
任务类型为目标任务的任务方式,即任务执行方式的类型。标签类型为目标任务的任务对象,即标签文本的类型。例如,对于地点实体识别抽取任务,任务类型为识别抽取,标签类型为地点,需要对目标文本中地点这一标签类型的标签文本执行识别抽取。任务类型和标签类型都是预先设定的,用户在输入目标文本,根据要对目标文本执行的目标任务对应选择的。The task type is the task mode of the target task, that is, the type of task execution mode. The label type is the task object of the target task, that is, the type of label text. For example, for a location entity recognition and extraction task, the task type is recognition extraction and the label type is location. It is necessary to perform recognition extraction on the label text of the label type location in the target text. The task type and label type are preset. When the user inputs the target text, the user selects the target task according to the target text to be performed.
本说明书实施例中,第一格式样式包括:控制符(输入,任务);目标文本;任务类型;标签类型。具体的第一格式样式为:输入:目标文本;任务类型:标签类型。In the embodiment of this specification, the first format style includes: control symbol (input, task); target text; task type; label type. The specific first format style is: input: target text; task type: label type.
由于本说明书实施例中,任务处理模型是一种生成式语言模型,其对于自然语言理解任务,是通过自然语言生成的方式执行的,因而,需要对应生成预测文本,而不是像自然语言理解的方式,直接输出任务执行结果。Since in the embodiment of this specification, the task processing model is a generative language model, which performs natural language understanding tasks in a natural language generation manner, therefore, it is necessary to generate predictive text accordingly, rather than natural language understanding. method to directly output the task execution results.
将指令文本输入任务处理模型,基于标签类型,对目标文本执行任务类型对应的目标任务,生成标签类型对应的预测文本,具体方式为:将指令文本输入任务处理模型,基于标签类型和指令文本的上下文,生成标签类型对应的预测文本。Input the instruction text into the task processing model, based on the tag type, perform the target task corresponding to the task type on the target text, and generate the predicted text corresponding to the tag type. The specific method is: input the instruction text into the task processing model, based on the tag type and the instruction text Context, generate predictive text corresponding to the label type.
示例性地,将指令文本“输入:A地真热;抽取:地点”输入任务处理模型,对指令文本进行特征编码,得到指令文本的特征向量Feature,基于标签类型“地点”和对角掩蔽机制,对目标文本“A地真热”执行任务类型“抽取”对应的抽取任务,生成对应的预测文本“A地”,并基于任务信息和预测文本,按照第二格式样式“输出:任务信息:预测文本”,确定符合第二格式的任务执行结果:输出:地点:A地。For example, the instruction text "Input: A ground is really hot; Extract: location" is input into the task processing model, the instruction text is feature-encoded, and the feature vector Feature of the instruction text is obtained, based on the label type "location" and the diagonal masking mechanism , execute the extraction task corresponding to the task type "Extraction" on the target text "A place is really hot", generate the corresponding predicted text "A place", and based on the task information and predicted text, according to the second format style "Output: task information: "Predictive text", determine the task execution result that conforms to the second format: Output: Location: A.
将指令文本输入任务处理模型,基于标签类型,对目标文本执行任务类型对应的目标任务,生成标签类型对应的预测文本,并基于标签类型和预测文本确定符合第二格式的任务执行结果。通过任务类型和标签类型,使得任务处理模型更为细化理解了目标任务的任务内容,生成符合第二格式的任务执行结果,进一步提升了任务处理精度。Input the instruction text into the task processing model, perform the target task corresponding to the task type on the target text based on the label type, generate the predicted text corresponding to the label type, and determine the task execution result that conforms to the second format based on the label type and the predicted text. Through the task type and label type, the task processing model understands the task content of the target task in a more detailed manner, generates task execution results that conform to the second format, and further improves the task processing accuracy.
在本说明书一种可选实施例中,在步骤106之前,还包括如下具体步骤:In an optional embodiment of this specification, before step 106, the following specific steps are also included:
获取多种样本任务的样本任务文本和样本任务信息;Obtain sample task text and sample task information for various sample tasks;
基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本;Based on the sample task text and sample task information, construct a sample instruction text that conforms to the first format;
基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本;Based on the sample task information and the sample label text corresponding to the sample task information, determine the second format and the label result text that conforms to the second format;
基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本;Based on the sample instruction text, use the task processing model to execute the corresponding sample task on the sample task text, and generate a prediction result text that conforms to the second format;
基于预测结果文本和标签结果文本,对任务处理模型进行训练,在达到预设训练结束条件的情况下,获得训练完成的任务处理模型。Based on the prediction result text and label result text, the task processing model is trained, and when the preset training end conditions are reached, the trained task processing model is obtained.
样本任务为预先训练的文本处理任务,为多种自然语言理解任务。样本任务文本为样本任务的待执行任务处理的自然语言文本,可以为至少一个语句,也可以为至少一个词语。样本任务信息为样本任务的任务特征信息,为一种自然语言文本,样本任务信息表征了样本任务的任务特征,包括但不限于:任务类型、标签类型和任务执行逻辑。样本任务文本和样本任务信息可以为从开源样本集中获取的,也可以为从历史任务处理数据集中收集得到的,还可以为人工构建得到的。The sample tasks are pre-trained text processing tasks and various natural language understanding tasks. The sample task text is the natural language text processed by the sample task to be executed, which can be at least one sentence or at least one word. The sample task information is the task characteristic information of the sample task, which is a kind of natural language text. The sample task information represents the task characteristics of the sample task, including but not limited to: task type, label type and task execution logic. Sample task text and sample task information can be obtained from open source sample sets, collected from historical task processing data sets, or manually constructed.
样本指令文本为预先训练过程中直接输入任务处理模型的自然语言文本指令,样本指令文本用于预先训练过程中引导任务处理模型理解样本任务的任务内容,并以此对样本任务文本执行样本任务信息对应的样本任务,生成对应输出格式的输出结果。在任务处理模型的预先训练过程中,第一格式的样本指令文本作为训练样本。The sample instruction text is a natural language text instruction that is directly input into the task processing model during the pre-training process. The sample instruction text is used to guide the task processing model to understand the task content of the sample task during the pre-training process, and use it to execute the sample task information on the sample task text. The corresponding sample task generates output results in the corresponding output format. In the pre-training process of the task processing model, the sample instruction text in the first format is used as a training sample.
样本标签文本为预先训练过程中样本任务的执行对象文本,即样本任务信息对应的文本。例如,样本任务为情感分类,标签文本为情感词语。标签结果文本为预先训练过程中用于衡量任务处理模型的任务执行效果的标签自然语言文本结果。在任务处理模型的预先训练过程中,第二格式的标签结果文本作为标签样本。预测结果文本为预先训练过程中任务处理模型对样本任务文本执行样本任务的自然语言文本结果,为任务处理模型生成的输出结果。The sample label text is the execution object text of the sample task during the pre-training process, that is, the text corresponding to the sample task information. For example, the sample task is emotion classification, and the label text is emotion words. The labeled result text is the labeled natural language text result used to measure the task execution effect of the task processing model during the pre-training process. During the pre-training process of the task processing model, the label result text in the second format is used as a label sample. The prediction result text is the natural language text result of the task processing model performing the sample task on the sample task text during the pre-training process, and is the output result generated by the task processing model.
预设训练结束条件为预先设定的任务处理模型训练结束的判断条件,包括但不限于:预设迭代次数、预设损失值阈值、预设训练收敛条件。The preset training end conditions are preset judgment conditions for the end of task processing model training, including but not limited to: preset iteration times, preset loss value thresholds, and preset training convergence conditions.
基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本,具体方式为:基于样本任务文本和样本任务信息,按照第一格式样式,构建符合第一格式的样本指令文本。Based on the sample task text and sample task information, construct a sample instruction text that conforms to the first format. The specific method is: based on the sample task text and sample task information, and according to the first format style, construct a sample instruction text that conforms to the first format.
基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本,具体方式为:基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式,基于样本任务信息和样本任务信息对应的样本标签文本,按照第二格式样式,构建符合第二格式的标签结果文本。Based on the sample task information and the sample label text corresponding to the sample task information, determine the second format and the label result text that conforms to the second format. The specific method is: based on the sample task information and the sample label text corresponding to the sample task information, determine the second format , based on the sample task information and the sample label text corresponding to the sample task information, according to the second format style, construct a label result text that conforms to the second format.
基于预测结果文本和标签结果文本,对任务处理模型进行训练,具体方式为:基于预测结果文本和标签结果文本,计算得到损失值,基于损失值,调整任务处理模型的模型参数。其中,损失值为预测结果文本和标签结果文本之间的差异度,包括但不限于:余弦损失值、交叉熵损失值、向量距离损失值,调整参数的方法为梯度下降法。Based on the prediction result text and the label result text, the task processing model is trained. The specific method is: based on the prediction result text and the label result text, the loss value is calculated, and based on the loss value, the model parameters of the task processing model are adjusted. Among them, the loss value is the difference between the prediction result text and the label result text, including but not limited to: cosine loss value, cross entropy loss value, vector distance loss value, and the method of adjusting parameters is the gradient descent method.
示例性地,获取识别抽取任务(实体抽取、事件抽取、问题答案抽取)和文本分类任务(主题分类、意图分类、情感分类)的样本任务文本和样本任务信息,每一类各100个。基于样本任务文本和样本任务信息,按照第一格式样式“输入:样本任务文本;样本任务信息”,构建符合第一格式的样本指令文本。基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式:输出:样本任务信息:样本标签文本或者预测结果文本,基于样本任务信息和样本任务信息对应的样本标签文本,按照第二格式样式“输出:样本任务信息:样本标签文本或者预测结果文本”,构建符合第二格式的标签结果文本。将样本指令文本输入Transformer模型,对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本。基于预测结果文本和标签结果文本,计算得到损失值Loss,基于损失值,调整任务处理模型的模型参数,在达到预设训练收敛条件的情况下,获得训练完成的任务处理模型。For example, sample task texts and sample task information of recognition extraction tasks (entity extraction, event extraction, question answer extraction) and text classification tasks (topic classification, intent classification, emotion classification) are obtained, 100 for each category. Based on the sample task text and sample task information, according to the first format style "input: sample task text; sample task information", a sample instruction text that conforms to the first format is constructed. Based on the sample task information and the sample label text corresponding to the sample task information, determine the second format: output: sample task information: sample label text or prediction result text, based on the sample task information and the sample label text corresponding to the sample task information, according to the second format Format style "Output: sample task information: sample label text or prediction result text" constructs label result text that conforms to the second format. Input the sample instruction text into the Transformer model, execute the corresponding sample task on the sample task text, and generate prediction result text that conforms to the second format. Based on the prediction result text and label result text, the loss value Loss is calculated. Based on the loss value, the model parameters of the task processing model are adjusted. When the preset training convergence conditions are reached, the trained task processing model is obtained.
获取多种样本任务的样本任务文本和样本任务信息;基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本;基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本;基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本;基于预测结果文本和标签结果文本,对任务处理模型进行训练,在达到预设训练结束条件的情况下,获得训练完成的任务处理模型。基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本,基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本,基于样本指令文本和标签结果文本,对任务处理模型进行了在多种样本任务的样本任务信息约束下的训练,使得任务处理模型具有对不同任务的任务处理能力,任务处理模型具有高通用性,同时,通过第一格式和第二格式的固定格式约束下的训练,使得任务处理模型具有对各样本任务的细化任务处理能力,任务处理模型具有高任务处理精度。Obtain sample task text and sample task information of multiple sample tasks; based on the sample task text and sample task information, construct a sample instruction text that conforms to the first format; based on the sample task information and sample label text corresponding to the sample task information, determine the second format and label result text that conforms to the second format; based on the sample instruction text, use the task processing model to perform the corresponding sample task on the sample task text, and generate prediction result text that conforms to the second format; based on the prediction result text and label result text, The task processing model is trained, and when the preset training end conditions are reached, the trained task processing model is obtained. Based on the sample task text and the sample task information, construct a sample instruction text that conforms to the first format. Based on the sample task information and the sample label text corresponding to the sample task information, determine the second format and the label result text that conforms to the second format. Based on the sample instruction Text and label result text, the task processing model is trained under the constraints of sample task information of multiple sample tasks, so that the task processing model has task processing capabilities for different tasks. The task processing model has high versatility. At the same time, through Training under the fixed format constraints of the first format and the second format enables the task processing model to have detailed task processing capabilities for each sample task, and the task processing model has high task processing accuracy.
在本说明书一种可选实施例中,基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本,包括如下具体步骤:In an optional embodiment of this specification, based on the sample instruction text, a task processing model is used to execute the corresponding sample task on the sample task text, and a prediction result text that conforms to the second format is generated, including the following specific steps:
将样本指令文本输入任务处理模型,基于样本指令文本的上下文,生成样本任务信息对应的预测文本,并基于样本任务信息和预测文本,确定符合第二格式的预测结果文本。The sample instruction text is input into the task processing model, based on the context of the sample instruction text, a prediction text corresponding to the sample task information is generated, and based on the sample task information and the prediction text, a prediction result text that conforms to the second format is determined.
符合第一格式的样本指令文本可以视为一个自然语言文本语句,基于文本语句的上下文,生成预测文本,并以此确定符合第二格式的预测结果文本。The sample instruction text that conforms to the first format can be regarded as a natural language text statement. Based on the context of the text statement, a prediction text is generated, and a prediction result text that conforms to the second format is determined.
预测文本为预先训练过程中任务处理模型直接生成的样本任务信息对应的自然语言文本结果,为任务处理模型生成的输出结果。例如,样本任务信息为“抽取:地点”,预测文本为“B地”。The predicted text is the natural language text result corresponding to the sample task information directly generated by the task processing model during the pre-training process, and is the output result generated by the task processing model. For example, the sample task information is "Extraction: location" and the predicted text is "B location".
基于样本指令文本的上下文,生成样本任务信息对应的预测文本,是通过编解码方式,即对样本指令文本进行特征编码,得到样本指令文本的特征向量,基于上下文解码机制,对特征向量进行解码,生成预测文本。上下文机制可以为注意力掩码机制,也可以为对角掩蔽机制。具体为基于指令文本的特征向量中之前的token来预测下一个位置的token。Based on the context of the sample instruction text, the prediction text corresponding to the sample task information is generated through encoding and decoding, that is, feature encoding is performed on the sample instruction text to obtain the feature vector of the sample instruction text, and the feature vector is decoded based on the context decoding mechanism. Generate predictive text. The context mechanism can be an attention masking mechanism or a diagonal masking mechanism. Specifically, the token at the next position is predicted based on the previous token in the feature vector of the instruction text.
基于样本任务信息和预测文本,确定符合第二格式的预测结果文本,具体方式为:基于样本任务信息和预测文本,按照第二格式样式,构建符合第二格式的预测结果文本。Based on the sample task information and the predicted text, determine the prediction result text that conforms to the second format. The specific method is: based on the sample task information and the prediction text, according to the second format style, construct the prediction result text that conforms to the second format.
示例性地,将样本指令文本输入任务处理模型,对样本指令文本进行特征编码,得到样本指令文本的特征向量SampleFeature,基于对角掩蔽机制,对特征向量解码,生成样本任务信息对应的预测文本,基于任务信息和预测文本,按照第二格式样式“输出:任务信息:预测文本”,构建符合第二格式的预测结果文本。For example, input the sample instruction text into the task processing model, perform feature encoding on the sample instruction text, and obtain the feature vector SampleFeature of the sample instruction text. Based on the diagonal masking mechanism, the feature vector is decoded to generate prediction text corresponding to the sample task information. Based on the task information and the predicted text, according to the second format style "output: task information: predicted text", a prediction result text that conforms to the second format is constructed.
将样本指令文本输入任务处理模型,基于样本指令文本的上下文,生成样本任务信息对应的预测文本,并基于样本任务信息和预测文本,确定符合第二格式的预测结果文本。通过上下文生成预测文本的方式,提升了确定的预测结果文本的准确度,提升了模型的训练效果。The sample instruction text is input into the task processing model, based on the context of the sample instruction text, a prediction text corresponding to the sample task information is generated, and based on the sample task information and the prediction text, a prediction result text that conforms to the second format is determined. The method of generating prediction text through context improves the accuracy of the determined prediction result text and improves the training effect of the model.
在本说明书一种可选实施例中,在获取多种样本任务的样本任务文本和样本任务信息之后,还包括如下具体步骤:In an optional embodiment of this specification, after obtaining the sample task text and sample task information of multiple sample tasks, the following specific steps are also included:
根据样本任务文本的数量分布,按照预设的数量平衡策略,对样本任务文本进行筛选。According to the quantity distribution of sample task texts, the sample task texts are screened according to the preset quantity balance strategy.
由于样本任务的样本任务文本在数量分布上不平衡,例如,实体识别抽取任务的样本任务文本数量较多,造成实体识别抽取任务的样本过采样,文本分类任务的样本任务文本数量较少,造成文本分类任务的样本欠采样,训练得到的任务处理模型对于实体识别任务具有较高的任务处理精度,而对文本分类任务具有较低的任务处理精度,任务处理的通用性下降,且任务处理精度下降。为了防止这一问题,本说明书实施例汇总,按照预设的数量平衡策略,对样本任务文本进行筛选。Due to the unbalanced quantity distribution of the sample task text of the sample task, for example, the number of sample task texts of the entity recognition extraction task is large, resulting in oversampling of the samples of the entity recognition extraction task, and the number of sample task texts of the text classification task is small, resulting in The samples of text classification tasks are undersampled. The trained task processing model has higher task processing accuracy for entity recognition tasks, but lower task processing accuracy for text classification tasks. The versatility of task processing decreases, and the task processing accuracy decline. In order to prevent this problem, the embodiments of this specification are summarized to filter sample task texts according to a preset quantity balance strategy.
预设数量平衡策略为针对样本任务文本的数量分布设置的分布平衡的衡量条件,包括但不限于:针对样本任务类型的数量平衡策略和针对样本标签类型的数量平衡策略。The preset quantity balance strategy is a measurement condition for distribution balance set for the quantity distribution of sample task texts, including but not limited to: quantity balance strategies for sample task types and quantity balance strategies for sample label types.
示例性地,样本任务包括:识别抽取任务(实体、事件、问题答案)和文本分类任务(主题分类、意图分类、情感分类),共两个大类六个小类。预设数量平衡策略为每个小类100个样本任务文本。根据六个小类的样本任务的样本任务文本的数量分布,按照上述数量平衡策略,对样本任务文本进行筛选,得到每个小类100个样本任务文本,共600个样本任务文本。For example, the sample tasks include: identification and extraction tasks (entities, events, question answers) and text classification tasks (topic classification, intent classification, emotion classification), with a total of two major categories and six sub-categories. The default quantity balancing strategy is 100 sample task texts for each subcategory. According to the quantity distribution of sample task texts of the six sub-categories, and according to the above quantity balance strategy, the sample task texts were screened to obtain 100 sample task texts for each sub-category, for a total of 600 sample task texts.
根据样本任务文本的数量分布,按照预设的数量平衡策略,对样本任务文本进行筛选。提升了任务处理模型的训练效果,提升了任务处理的通用性和任务处理精度。According to the quantity distribution of sample task texts, the sample task texts are screened according to the preset quantity balance strategy. It improves the training effect of the task processing model, improves the versatility and accuracy of task processing.
在本说明书一种可选实施例中,样本任务信息包括样本任务类型;In an optional embodiment of this specification, the sample task information includes sample task types;
对应地,根据样本任务文本的数量分布,按照预设的数量平衡策略,对样本任务文本进行筛选,包括如下具体步骤:Correspondingly, based on the quantity distribution of sample task texts and according to the preset quantity balance strategy, the sample task texts are screened, including the following specific steps:
根据样本任务类型,确定各样本任务类型的样本任务文本的数量分布;According to the sample task type, determine the quantity distribution of sample task texts for each sample task type;
根据各样本任务类型的样本任务文本的数量分布,按照预设的第一数量平衡策略,对样本任务文本进行筛选,其中,第一数量平衡策略为针对样本任务类型的数量平衡策略。According to the quantity distribution of sample task texts of each sample task type, the sample task texts are screened according to a preset first quantity balance strategy, where the first quantity balance strategy is a quantity balance strategy for the sample task type.
样本任务类型为样本任务的任务方式,即任务执行方式的类型,包括但不限于:识别抽取和文本分类。The sample task type is the task method of the sample task, that is, the type of task execution method, including but not limited to: recognition extraction and text classification.
第一数量平衡策略为针对样本任务类型的数量平衡策略。本说明书实施例中,第一数量平衡策略为任一样本任务类型的样本任务文本数量不超过第一预设阈值M。The first quantity balancing strategy is a quantity balancing strategy for the sample task type. In the embodiment of this specification, the first quantity balancing strategy is that the number of sample task texts of any sample task type does not exceed the first preset threshold M.
示例性地,根据样本任务类型,确定各样本任务类型的样本任务文本的数量分布:识别抽取任务:400个,文本分类任务:380个。第一数量平衡策略为任一样本任务类型的样本任务文本数量不超过第一预设阈值300个,对样本任务文本进行筛选,得到300个识别抽取任务的样本任务文本和300个文本分类任务的样本任务文本。For example, according to the sample task type, the quantity distribution of sample task texts of each sample task type is determined: identification and extraction tasks: 400, text classification tasks: 380. The first quantity balancing strategy is that the number of sample task texts of any sample task type does not exceed the first preset threshold of 300. The sample task texts are screened to obtain 300 sample task texts of the identification and extraction tasks and 300 sample task texts of the text classification task. Sample task text.
根据样本任务类型,确定各样本任务类型的样本任务文本的数量分布;根据各样本任务类型的样本任务文本的数量分布,按照预设的第一数量平衡策略,对样本任务文本进行筛选,其中,第一数量平衡策略为针对样本任务类型的数量平衡策略。提升了任务处理模型在不同任务类型上的通用性和在不同任务类型上的任务处理精度。According to the sample task type, determine the quantity distribution of sample task texts of each sample task type; according to the quantity distribution of sample task texts of each sample task type, filter the sample task texts according to the preset first quantity balance strategy, where, The first quantity balancing strategy is a quantity balancing strategy for the sample task type. Improved the versatility of the task processing model on different task types and the task processing accuracy on different task types.
在本说明书一种可选实施例中,样本任务信息包括样本标签类型;In an optional embodiment of this specification, the sample task information includes sample label type;
对应地,根据样本任务文本的数量分布,按照预设的数量平衡策略,对样本任务文本进行筛选,包括如下具体步骤:Correspondingly, based on the quantity distribution of sample task texts and according to the preset quantity balance strategy, the sample task texts are screened, including the following specific steps:
根据样本标签类型,确定各样本标签类型对应的样本任务文本的数量分布;According to the sample label type, determine the quantity distribution of sample task texts corresponding to each sample label type;
根据确定各样本标签类型对应的样本任务文本的数量分布,按照预设的第二数量平衡策略,对样本任务文本进行筛选,其中,第二数量平衡策略为针对样本标签类型的数量平衡策略。Based on the determination of the quantity distribution of sample task texts corresponding to each sample label type, the sample task texts are screened according to a preset second quantity balance strategy, where the second quantity balance strategy is a quantity balance strategy for sample label types.
样本标签类型为样本任务的任务对象,即样本标签文本的类型,包括但不限于:实体抽取(地点实体抽取、人名实体抽取)、事件抽取、问题答案抽取、主题分类、意图分类、情感分类。The sample label type is the task object of the sample task, that is, the type of sample label text, including but not limited to: entity extraction (location entity extraction, person name entity extraction), event extraction, question and answer extraction, topic classification, intention classification, and emotion classification.
第二数量平衡策略为针对样本标签类型的数量平衡策略。本说明书实施例中,第二数量平衡策略为任一样本标签类型的样本任务文本数量不超过第二预设阈值K。The second quantity balancing strategy is a quantity balancing strategy for sample label types. In the embodiment of this specification, the second quantity balancing strategy is that the number of sample task texts of any sample label type does not exceed the second preset threshold K.
示例性地,根据样本标签类型,确定各样本标签类型的样本任务文本的数量分布:地点实体抽取:120个,人名实体抽取:150个,事件抽取:80个,问题答案抽取:90个,主题分类:110个,意图分类:130个,情感分类:100个。第二数量平衡策略为任一样本标签类型的样本任务文本数量不超过第二预设阈值75个,对样本任务文本进行筛选,得到75个地点实体抽取的样本任务文本、75个人名实体抽取的样本任务文本、75个事件抽取的样本任务文本、75个问题答案抽取的样本任务文本、75个主题分类的样本任务文本,75个意图分类的样本任务文本、75个情感分类的样本任务文本。Illustratively, according to the sample tag type, the quantity distribution of sample task texts of each sample tag type is determined: location entity extraction: 120, person name entity extraction: 150, event extraction: 80, question answer extraction: 90, topic Categories: 110, intent categories: 130, emotion categories: 100. The second quantity balancing strategy is that the number of sample task texts of any sample label type does not exceed the second preset threshold of 75. The sample task texts are filtered to obtain sample task texts extracted from 75 location entities and 75 sample task texts extracted from personal name entities. Sample task text, 75 sample task texts for event extraction, 75 sample task texts for question answer extraction, 75 sample task texts for topic classification, 75 sample task texts for intent classification, and 75 sample task texts for emotion classification.
根据样本标签类型,确定各样本标签类型对应的样本任务文本的数量分布;根据确定各样本标签类型对应的样本任务文本的数量分布,按照预设的第二数量平衡策略,对样本任务文本进行筛选,其中,第二数量平衡策略为针对样本标签类型的数量平衡策略。提升了任务处理模型在不同标签类型上的通用性和在不同标签类型上的任务处理精度。According to the sample label type, determine the quantity distribution of sample task texts corresponding to each sample label type; based on determining the quantity distribution of sample task texts corresponding to each sample label type, filter the sample task texts according to the preset second quantity balance strategy , where the second quantity balancing strategy is a quantity balancing strategy for sample label types. Improved the versatility of the task processing model on different label types and the accuracy of task processing on different label types.
在本说明书一种可选实施例中,样本任务信息包括目标样本任务信息和参考样本任务信息,目标样本任务信息和参考样本任务信息之间存在语义关联关系,样本任务文本包括目标样本任务信息对应的样本标签文本;In an optional embodiment of this specification, the sample task information includes target sample task information and reference sample task information, there is a semantic association between the target sample task information and the reference sample task information, and the sample task text includes the corresponding target sample task information. sample label text;
相应地,基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本,包括如下具体步骤:Accordingly, based on the sample task text and sample task information, construct a sample instruction text that conforms to the first format, including the following specific steps:
基于样本任务文本、目标样本任务信息和参考样本任务信息,构建符合第一格式的样本指令文本;Based on the sample task text, target sample task information and reference sample task information, construct a sample instruction text that conforms to the first format;
相应地,基于样本任务信息和样本任务文本中样本任务信息对应的样本标签文本,确定第二格式并构建符合第二格式的标签结果文本,包括如下具体步骤:Accordingly, based on the sample task information and the sample label text corresponding to the sample task information in the sample task text, determining the second format and constructing a label result text that conforms to the second format includes the following specific steps:
基于目标样本任务信息和目标样本任务信息对应的样本标签文本,确定第二格式并构建符合第二格式的正标签结果文本;Based on the target sample task information and the sample label text corresponding to the target sample task information, determine the second format and construct a positive label result text that conforms to the second format;
基于参考样本任务信息和参考样本任务信息对应的干扰标签文本,构建符合第二格式的负标签结果文本;Based on the reference sample task information and the interference label text corresponding to the reference sample task information, construct a negative label result text that conforms to the second format;
基于正标签结果文本和负标签结果文本,确定标签结果文本。Based on the positive label result text and the negative label result text, the label result text is determined.
如果样本任务信息只为针对样本任务的正确任务特征信息,即与样本标签文本对应,例如,如果样本任务信息只包含“抽取:地点”,而不包含“分类”、“人名”、“事件”等其他错误的样本任务信息,任务处理模型会被引导只生成一种预测文本,而无论样本任务信息是否为正确的。因而,为了消除这样的影响,在预先训练过程中,需要加入一定的干扰负例,提升任务处理模型的抗干扰性。If the sample task information is only the correct task feature information for the sample task, that is, it corresponds to the sample label text, for example, if the sample task information only contains "Extraction: Location" and does not include "Classification", "Personal Name", and "Event" For other incorrect sample task information, the task processing model will be guided to generate only one type of predicted text, regardless of whether the sample task information is correct. Therefore, in order to eliminate such effects, certain interference negative examples need to be added during the pre-training process to improve the anti-interference performance of the task processing model.
目标样本任务信息为样本任务的正确任务特征信息,参考样本任务信息为样本任务的错误任务特征信息,为一种干扰信息。本说明书实施例,为了提升模型的抗干扰性,目标样本任务信息和参考样本任务信息之间具有语义相似度,例如,目标样本任务信息为“地点”,参考样本任务信息为“方向”。参考样本任务信息可以为从获取的多种样本任务的样本任务信息中选取的,选取的原则为兼顾高频样本任务和低频样本任务(即长尾样本任务)。The target sample task information is the correct task characteristic information of the sample task, and the reference sample task information is the incorrect task characteristic information of the sample task, which is a kind of interference information. In the embodiment of this specification, in order to improve the anti-interference performance of the model, there is semantic similarity between the target sample task information and the reference sample task information. For example, the target sample task information is "location" and the reference sample task information is "direction". The reference sample task information can be selected from the sample task information of multiple sample tasks obtained, and the selection principle is to take into account both high-frequency sample tasks and low-frequency sample tasks (ie, long-tail sample tasks).
正标签结果文本为用于正向衡量任务处理模型的任务执行效果的标签自然语言文本结果。负标签结果文本为用于负向衡量任务处理模型的任务执行效果的标签自然语言文本结果。The positive label result text is the label natural language text result used to positively measure the task execution effect of the task processing model. The negative label result text is the label natural language text result used to negatively measure the task execution effect of the task processing model.
基于样本任务文本、目标样本任务信息和参考样本任务信息,构建符合第一格式的样本指令文本,具体方式为:基于样本任务文本、目标样本任务信息和参考样本任务信息,按照第一格式样式,构建符合第一格式的样本指令文本。Based on the sample task text, target sample task information and reference sample task information, construct a sample instruction text that conforms to the first format. The specific method is: based on the sample task text, target sample task information and reference sample task information, according to the first format style, Construct sample instruction text conforming to the first format.
基于目标样本任务信息和目标样本任务信息对应的样本标签文本,确定第二格式并构建符合第二格式的正标签结果文本,具体方式为:基于目标样本任务信息和目标样本任务信息对应的样本标签文本,确定第二格式,并基于目标样本任务信息和目标样本任务信息对应的样本标签文本,按照第二格式样式,构建符合第二格式的正标签结果文本。Based on the target sample task information and the sample label text corresponding to the target sample task information, determine the second format and construct a positive label result text that conforms to the second format. The specific method is: based on the target sample task information and the sample label corresponding to the target sample task information. Text, determine the second format, and based on the target sample task information and the sample label text corresponding to the target sample task information, construct a positive label result text that conforms to the second format according to the second format style.
基于参考样本任务信息和参考样本任务信息对应的干扰标签文本,构建符合第二格式的负标签结果文本,具体方式为:基于参考样本任务信息和参考样本任务信息对应的干扰标签文本,按照第二格式样式,构建符合第二格式的负标签结果文本。Based on the reference sample task information and the interference label text corresponding to the reference sample task information, construct a negative label result text that conforms to the second format. The specific method is: based on the reference sample task information and the interference label text corresponding to the reference sample task information, according to the second format Format style, construct negative label result text that conforms to the second format.
基于正标签结果文本和负标签结果文本,确定标签结果文本,具体方式为:拼接正标签结果文本和负标签结果文本,得到标签结果文本。Based on the positive label result text and the negative label result text, the label result text is determined. The specific method is: splicing the positive label result text and the negative label result text to obtain the label result text.
示例性地,样本任务文本为“A地真热”,样本标签文本为“A地”,干扰标签文本为“无”,目标样本任务信息为“抽取:地点”,参考样本任务信息为“抽取:人名”。基于样本任务文本、目标样本任务信息和参考样本任务信息,按照第一格式样式“输入:样本任务文本;目标样本任务信息,参考样本任务信息”,构建符合第一格式的样本指令文本:输入:A地真热;抽取:地点,人名。基于目标样本任务信息和目标样本任务信息对应的样本标签文本,确定第二格式:输出:样本任务信息:样本标签文本,基于目标样本任务信息和目标样本任务信息对应的样本标签文本,按照第二格式样式,构建符合第二格式的正标签结果文本:输出:地点:A地。基于参考样本任务信息和参考样本任务信息对应的干扰标签文本,按照第二格式样式,构建符合第二格式的负标签结果文本:输出:人名:无。拼接正标签结果文本和负标签结果文本,得到标签结果文本:输出:地点:A地;人名:无。For example, the sample task text is "A place is really hot", the sample label text is "A place", the interference label text is "None", the target sample task information is "Extraction: Location", and the reference sample task information is "Extraction :Person's name". Based on the sample task text, target sample task information and reference sample task information, according to the first format style "Input: sample task text; target sample task information, reference sample task information", construct a sample instruction text that conforms to the first format: Input: A: The place is really hot; extract: location, name. Based on the target sample task information and the sample label text corresponding to the target sample task information, determine the second format: output: sample task information: sample label text, based on the target sample task information and the sample label text corresponding to the target sample task information, according to the second Format style, construct positive label result text that conforms to the second format: Output: Location: A. Based on the reference sample task information and the interference label text corresponding to the reference sample task information, according to the second format style, a negative label result text that conforms to the second format is constructed: Output: Name: None. Splice the positive label result text and the negative label result text to get the label result text: Output: Location: A; Name: None.
基于样本任务文本、目标样本任务信息和参考样本任务信息,构建符合第一格式的样本指令文本;基于目标样本任务信息和目标样本任务信息对应的样本标签文本,确定第二格式并构建符合第二格式的正标签结果文本;基于参考样本任务信息和参考样本任务信息对应的干扰标签文本,构建符合第二格式的负标签结果文本;基于正标签结果文本和负标签结果文本,确定标签结果文本。消除了任务处理模型的任务理解偏置,避免了固定格式的输入输出约束,降低模型的任务处理性能。Based on the sample task text, target sample task information and reference sample task information, construct a sample instruction text that conforms to the first format; based on the target sample task information and the sample label text corresponding to the target sample task information, determine the second format and construct a second format that conforms to the second format format of the positive label result text; based on the reference sample task information and the interference label text corresponding to the reference sample task information, construct a negative label result text that conforms to the second format; based on the positive label result text and the negative label result text, determine the label result text. It eliminates the task understanding bias of the task processing model, avoids fixed format input and output constraints, and reduces the task processing performance of the model.
在本说明书一种可选实施例中,在基于指令文本,利用任务处理模型对目标文本执行目标任务之前,还包括如下具体步骤:In an optional embodiment of this specification, before using the task processing model to perform the target task on the target text based on the instruction text, the following specific steps are also included:
获取微调任务的微调任务文本和微调任务信息;Get the fine-tuning task text and fine-tuning task information of the fine-tuning task;
基于微调任务文本和微调任务信息,构建符合第一格式的微调指令文本;Based on the fine-tuning task text and the fine-tuning task information, construct a fine-tuning instruction text that conforms to the first format;
基于微调任务信息和微调任务文本中微调任务信息对应的对象文本,确定第二格式并构建符合第二格式的标签结果文本;Based on the fine-tuning task information and the object text corresponding to the fine-tuning task information in the fine-tuning task text, determine the second format and construct a label result text that conforms to the second format;
基于微调指令文本,利用训练完成的任务处理模型对微调任务文本执行对应的微调任务,生成符合第二格式的预测结果文本;Based on the fine-tuning instruction text, use the trained task processing model to perform the corresponding fine-tuning task on the fine-tuning task text, and generate a prediction result text that conforms to the second format;
基于预测结果文本和标签结果文本,调整任务处理模型的模型参数,在达到预设微调结束条件的情况下,获得微调完成的任务处理模型。Based on the prediction result text and the label result text, the model parameters of the task processing model are adjusted, and when the preset fine-tuning end conditions are reached, the task processing model that is fine-tuned is obtained.
上述任务处理模型的预先训练过程中,可以使用远程监督构造的大规模弱监督样本数据,完成对任务处理模型的继续预训练。虽然一定程度上提升了任务处理模型的通用性和任务处理精度,但是在细化任务场景下任务处理精度还存在提升空间,此时可以使用专家构造的小规模强监督样本数据(高质量标注样本数据),完成对任务处理模型的微调。During the pre-training process of the above task processing model, large-scale weakly supervised sample data constructed by remote supervision can be used to complete the continued pre-training of the task processing model. Although the versatility and task processing accuracy of the task processing model have been improved to a certain extent, there is still room for improvement in task processing accuracy in detailed task scenarios. In this case, small-scale strongly supervised sample data (high-quality annotated samples) constructed by experts can be used data) to complete the fine-tuning of the task processing model.
微调任务为用于微调的文本处理任务,为多种自然语言理解任务。微调任务文本为微调任务的待执行任务处理的自然语言文本,可以为至少一个语句,也可以为至少一个词语。微调任务信息为微调任务的任务特征信息,为一种自然语言文本,微调任务信息表征了微调任务的任务特征,包括但不限于:任务类型、标签类型和任务执行逻辑。微调任务文本和微调任务信息为专家构造得到的高质量标注样本数据。Fine-tuning tasks are text processing tasks used for fine-tuning and are various natural language understanding tasks. The text of the fine-tuning task is the natural language text processed by the task to be executed in the fine-tuning task, which can be at least one sentence or at least one word. The fine-tuning task information is the task characteristic information of the fine-tuning task, which is a natural language text. The fine-tuning task information represents the task characteristics of the fine-tuning task, including but not limited to: task type, label type and task execution logic. Fine-tuning task text and fine-tuning task information are high-quality annotated sample data constructed by experts.
微调指令文本为微调过程中直接输入任务处理模型的自然语言文本指令,微调指令文本用于微调过程中引导任务处理模型理解微调任务的任务内容,并以此对微调任务文本执行微调任务信息对应的微调任务,生成对应输出格式的输出结果。在任务处理模型的微调过程中,第一格式的微调指令文本作为微调样本。The fine-tuning instruction text is a natural language text instruction that is directly input to the task processing model during the fine-tuning process. The fine-tuning instruction text is used to guide the task processing model to understand the task content of the fine-tuning task during the fine-tuning process, and use this to execute the fine-tuning task information corresponding to the fine-tuning task text. Fine-tune the task to generate output results corresponding to the output format. During the fine-tuning process of the task processing model, the fine-tuning instruction text in the first format is used as a fine-tuning sample.
微调标签文本为微调过程中微调任务的执行对象文本,即微调任务信息对应的文本。例如,微调任务为情感分类,标签文本为情感词语。标签结果文本为微调过程中用于衡量任务处理模型的任务执行效果的标签自然语言文本结果。在任务处理模型的微调过程中,第二格式的标签结果文本作为标签样本。预测结果文本为微调过程中任务处理模型对微调任务文本执行微调任务的自然语言文本结果,为任务处理模型生成的输出结果。The fine-tuning label text is the execution object text of the fine-tuning task during the fine-tuning process, that is, the text corresponding to the fine-tuning task information. For example, the fine-tuning task is emotion classification, and the label text is emotion words. The labeled result text is the labeled natural language text result used to measure the task execution effect of the task processing model during the fine-tuning process. During the fine-tuning process of the task processing model, the label result text in the second format is used as a label sample. The prediction result text is the natural language text result of the fine-tuning task performed by the task processing model on the fine-tuning task text during the fine-tuning process, and is the output result generated by the task processing model.
预设训练结束条件为预先设定的任务处理模型训练结束的判断条件,包括但不限于:预设迭代次数、预设损失值阈值、预设训练收敛条件。The preset training end conditions are preset judgment conditions for the end of task processing model training, including but not limited to: preset iteration times, preset loss value thresholds, and preset training convergence conditions.
微调的具体实现方式与上述预先训练的实现方式类似,具体参见上述预先训练过程,在此不再赘述。The specific implementation method of fine-tuning is similar to the implementation method of the above-mentioned pre-training. For details, please refer to the above-mentioned pre-training process, which will not be described again here.
获取微调任务的微调任务文本和微调任务信息;基于微调任务文本和微调任务信息,构建符合第一格式的微调指令文本;基于微调任务信息和微调任务文本中微调任务信息对应的对象文本,确定第二格式并构建符合第二格式的标签结果文本;基于微调指令文本,利用训练完成的任务处理模型对微调任务文本执行对应的微调任务,生成符合第二格式的预测结果文本;基于预测结果文本和标签结果文本,调整任务处理模型的模型参数,在达到预设微调结束条件的情况下,获得微调完成的任务处理模型。进一步提升了任务处理模型的通用性和任务处理精度。Obtain the fine-tuning task text and fine-tuning task information of the fine-tuning task; based on the fine-tuning task text and the fine-tuning task information, construct a fine-tuning instruction text that conforms to the first format; based on the fine-tuning task information and the object text corresponding to the fine-tuning task information in the fine-tuning task text, determine the first two formats and construct a label result text that conforms to the second format; based on the fine-tuning instruction text, use the trained task processing model to perform the corresponding fine-tuning task on the fine-tuning task text, and generate a prediction result text that conforms to the second format; based on the prediction result text and Label the result text, adjust the model parameters of the task processing model, and obtain the task processing model after the fine-tuning is completed when the preset fine-tuning end conditions are reached. The versatility and task processing accuracy of the task processing model are further improved.
参见图2,图2示出了本说明书一个实施例提供的另一种任务处理方法的流程图,该方法应用于云侧设备,包括如下具体步骤:Referring to Figure 2, Figure 2 shows a flow chart of another task processing method provided by an embodiment of this specification. This method is applied to cloud-side devices and includes the following specific steps:
步骤202:接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息。Step 202: Receive the target text input by the front end and the task information of the target task selected for the target text.
步骤204:基于目标文本和任务信息,构建符合第一格式的指令文本。Step 204: Based on the target text and task information, construct an instruction text that conforms to the first format.
步骤206:基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。Step 206: Based on the instruction text, use the task processing model to perform the target task on the target text and generate a task execution result that conforms to the second format, wherein the task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. It is obtained that the sample instruction text includes sample task text and sample task information, and the second format is determined based on the sample task information and the label text corresponding to the sample task information.
步骤208:反馈任务执行结果至前端。Step 208: Feed back the task execution results to the front end.
云侧设备为多种任务处理功能的应用的服务端所在的网络云设备,为一种虚拟设备,该云侧设备上部署具有多种任务处理功能的深度学习模型,即任务处理模型。前端为用户登录的该具有多种任务处理功能的应用前端或者应用平台前端。云侧设备和端侧设备通过网络传输信道连接,进行数据传输。云侧设备的算力性能高于端侧设备。The cloud-side device is a network cloud device where the server for applications with multiple task processing functions is located. It is a virtual device. A deep learning model with multiple task processing functions, that is, a task processing model, is deployed on the cloud-side device. The front end is the application front end or application platform front end with multiple task processing functions that the user logs in to. Cloud-side devices and end-side devices are connected through network transmission channels for data transmission. The computing performance of cloud-side devices is higher than that of end-side devices.
需要说明的是,步骤202至步骤208已在上述图1实施例中进行详细说明,在此不再赘述。It should be noted that steps 202 to 208 have been described in detail in the above-mentioned embodiment of FIG. 1 and will not be described again here.
本说明书实施例中,接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息;基于目标文本和任务信息,构建符合第一格式的指令文本;基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定;反馈任务执行结果至前端。任务处理模型是基于第一格式的样本指令文本和第二格式的标签结果文本预先经过监督训练得到,学习到了第一格式的输入指令文本和第二格式的输出结果,在第二格式为基于样本任务信息和样本任务信息对应的标签文本确定的情况下,任务处理模型可以根据指令文本的任务信息,生成与该任务信息和对应的标签文本相对应的符合第二格式的任务执行结果,在对不同任务信息下对目标文本执行目标任务的同时,任务处理模型具有对特定任务信息的细化处理能力,即任务处理具有高通用性和高任务处理精度,并且,利用了云侧设备的高算力的优点,降低了任务处理的成本,提升了任务处理的效率。In the embodiment of this specification, the target text input by the front end and the task information of the target task selected for the target text are received; based on the target text and the task information, an instruction text that conforms to the first format is constructed; based on the instruction text, a task processing model is used to process the target The text executes the target task and generates a task execution result that conforms to the second format. The task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. The sample instruction text includes sample task text and sample task information. , the second format is determined based on the sample task information and the label text corresponding to the sample task information; the task execution results are fed back to the front end. The task processing model is obtained through supervised training in advance based on the sample instruction text in the first format and the label result text in the second format. It has learned the input instruction text in the first format and the output result in the second format. In the second format, it is based on the sample. When the task information and the label text corresponding to the sample task information are determined, the task processing model can generate a task execution result in the second format corresponding to the task information and the corresponding label text based on the task information of the instruction text. While performing target tasks on target text under different task information, the task processing model has the ability to refine specific task information, that is, task processing has high versatility and high task processing accuracy, and takes advantage of the high computing power of cloud-side devices. With the advantages of power, it reduces the cost of task processing and improves the efficiency of task processing.
在本说明书一种可选实施例中,在步骤106之后,还包括如下具体步骤:In an optional embodiment of this specification, after step 106, the following specific steps are also included:
反馈任务执行结果至前端;Feedback task execution results to the front end;
接收前端发送的执行结果反馈,其中,执行结果反馈为基于任务执行结果生成的;Receive execution result feedback sent by the front end, where the execution result feedback is generated based on the task execution result;
基于执行结果反馈,调整任务处理模型的模型参数。Based on the execution result feedback, the model parameters of the task processing model are adjusted.
前端在接收到反馈的任务执行结果后,可以基于任务执行结果,进一步生成执行结果反馈,通过交互的方式,完成对任务处理模型的进一步调整。After receiving the feedback task execution results, the front end can further generate execution result feedback based on the task execution results, and complete further adjustments to the task processing model through interaction.
示例性地,反馈任务执行结果“输出:地点:B地”至前端,用户A基于任务执行结果生成执行结果反馈:输出地点应该为A地,接收前端发送的执行结果反馈,基于执行结果反馈,调整任务处理模型的模型参数。For example, the task execution result "Output: Location: Location B" is fed back to the front end. User A generates execution result feedback based on the task execution result: the output location should be location A, receives the execution result feedback sent by the front end, and based on the execution result feedback, Adjust the model parameters of the task processing model.
反馈任务执行结果至前端;接收前端发送的执行结果反馈,其中,执行结果反馈为基于任务执行结果生成的;基于执行结果反馈,调整任务处理模型的模型参数。通过交互的形式,实现对任务处理模型的模型参数的进一步调整,进一步提升了任务处理模型的任务处理精度。Feed back the task execution results to the front end; receive the execution result feedback sent by the front end, where the execution result feedback is generated based on the task execution result; adjust the model parameters of the task processing model based on the execution result feedback. Through interaction, the model parameters of the task processing model can be further adjusted, further improving the task processing accuracy of the task processing model.
参见图3,图3示出了本说明书一个实施例提供的一种实体识别方法的流程图,包括如下具体步骤:Referring to Figure 3, Figure 3 shows a flow chart of an entity recognition method provided by an embodiment of this specification, including the following specific steps:
步骤302:接收前端输入的目标文本以及针对目标文本所选择识别任务的识别任务信息。Step 302: Receive the target text input by the front end and the recognition task information of the selected recognition task for the target text.
步骤304:基于目标文本和识别任务信息,构建符合第一格式的指令文本。Step 304: Based on the target text and recognition task information, construct an instruction text that conforms to the first format.
步骤306:基于指令文本,利用任务处理模型对目标文本执行识别任务,生成符合第二格式的实体识别结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务文本中样本任务信息对应的对象文本确定。Step 306: Based on the instruction text, use the task processing model to perform a recognition task on the target text and generate an entity recognition result that conforms to the second format, wherein the task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. It is obtained that the sample instruction text includes sample task text and sample task information, and the second format is determined based on the sample task information and the object text corresponding to the sample task information in the sample task text.
本说明书实施例与上述图1说明书实施例出于同一发明构思,步骤302至步骤306的具体方式参见上述步骤102至步骤106,在此不再赘述。The embodiment of this description is based on the same inventive concept as the above-mentioned embodiment of FIG. 1. For the specific method of step 302 to step 306, please refer to the above-mentioned step 102 to step 106, which will not be described again here.
本说明书实施例中,接收前端输入的目标文本以及针对目标文本所选择目标任务的识别任务信息;基于目标文本和识别任务信息,构建符合第一格式的指令文本;基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的实体识别结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。任务处理模型是基于第一格式的样本指令文本和第二格式的标签结果文本预先经过监督训练得到,学习到了第一格式的输入指令文本和第二格式的输出结果,在第二格式为基于样本任务信息和样本任务信息对应的标签文本确定的情况下,任务处理模型可以根据指令文本的识别任务信息,生成与该识别任务信息和对应的标签文本相对应的符合第二格式的实体识别结果,在对不同任务信息下对目标文本执行目标任务的同时,任务处理模型具有对特定识别任务信息的细化实体识别能力,具有高通用性和高实体识别精度。In the embodiment of this specification, the target text input by the front end and the recognition task information of the target task selected for the target text are received; based on the target text and the recognition task information, an instruction text that conforms to the first format is constructed; based on the instruction text, a task processing model is used Perform the target task on the target text to generate an entity recognition result that conforms to the second format. The task processing model is trained based on the sample instruction text in the first format and the label result text in the second format. The sample instruction text includes sample task text and sample Task information, the second format is determined based on the sample task information and the label text corresponding to the sample task information. The task processing model is obtained through supervised training in advance based on the sample instruction text in the first format and the label result text in the second format. It has learned the input instruction text in the first format and the output result in the second format. In the second format, it is based on the sample. When the label text corresponding to the task information and the sample task information is determined, the task processing model can generate an entity recognition result in the second format corresponding to the recognition task information and the corresponding label text based on the recognition task information of the instruction text, While performing target tasks on target text under different task information, the task processing model has the ability to refine entity recognition for specific recognition task information, and has high versatility and high entity recognition accuracy.
参见图4,图4示出了本说明书一个实施例提供的一种任务处理的数据处理方法的流程图,应用于云侧设备,包括如下具体步骤:Referring to Figure 4, Figure 4 shows a flow chart of a data processing method for task processing provided by an embodiment of this specification. It is applied to cloud-side devices and includes the following specific steps:
步骤402:获取多种样本任务的样本任务文本和样本任务信息。Step 402: Obtain sample task text and sample task information of multiple sample tasks.
步骤404:基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本。Step 404: Based on the sample task text and the sample task information, construct a sample instruction text that conforms to the first format.
步骤406:基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本。Step 406: Based on the sample task information and the sample label text corresponding to the sample task information, determine the second format and the label result text that conforms to the second format.
步骤408:基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本。Step 408: Based on the sample instruction text, use the task processing model to execute the corresponding sample task on the sample task text, and generate a prediction result text that conforms to the second format.
步骤410:基于预测结果文本和标签结果文本,对任务处理模型进行训练,在达到预设训练结束条件的情况下,获得训练完成的任务处理模型。Step 410: Train the task processing model based on the prediction result text and the label result text, and obtain the trained task processing model when the preset training end conditions are met.
步骤412:将任务处理模型发送至端侧设备。Step 412: Send the task processing model to the end-side device.
云侧设备为提供模型训练功能的网络云侧设备,为一种虚拟设备。端侧设备为提供多种任务处理功能的终端设备,是一种实体设备。端侧设备和云侧设备之间通过网络信道连接,进行数据传输。云侧设备的算力性能、存储容量高于端侧设备。The cloud-side device is a network cloud-side device that provides model training functions and is a virtual device. The terminal device is a terminal device that provides multiple task processing functions and is a physical device. The end-side device and the cloud-side device are connected through network channels for data transmission. The computing performance and storage capacity of cloud-side devices are higher than those of end-side devices.
本说明书实施例与上述图1实施例出于同一发明构思,步骤402至步骤410的具体方式,参见上述图1实施例中对任务处理模型预先训练的实施例,在此不再赘述。The embodiment of this description is based on the same inventive concept as the above-mentioned embodiment of FIG. 1. For the specific method from step 402 to step 410, refer to the embodiment of pre-training the task processing model in the above-mentioned embodiment of FIG. 1, which will not be described again here.
本说明书实施例中,获取多种样本任务的样本任务文本和样本任务信息;基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本;基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本;基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本;基于预测结果文本和标签结果文本,对任务处理模型进行训练,在达到预设训练结束条件的情况下,获得训练完成的任务处理模型;将任务处理模型发送至端侧设备。基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本,基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本,基于样本指令文本和标签结果文本,对任务处理模型进行了在多种样本任务的样本任务信息约束下的训练,使得任务处理模型具有对不同任务的任务处理能力,任务处理模型具有高通用性,同时,通过第一格式和第二格式的固定格式约束下的训练,使得任务处理模型具有对各样本任务的细化任务处理能力,任务处理模型具有高任务处理精度,将训练过程在云侧设备执行,利用了云侧设备的高算力、大存储的优点,降低了任务处理的成本,提升了任务处理模型的训练效率和训练效果。In the embodiment of this specification, sample task text and sample task information of multiple sample tasks are obtained; based on the sample task text and sample task information, a sample instruction text that conforms to the first format is constructed; based on the sample task information and the sample corresponding to the sample task information Label text, determine the second format and the label result text that conforms to the second format; based on the sample instruction text, use the task processing model to perform the corresponding sample task on the sample task text, and generate the prediction result text that conforms to the second format; based on the prediction result text and label the result text, train the task processing model, and obtain the trained task processing model when the preset training end conditions are met; send the task processing model to the end-side device. Based on the sample task text and the sample task information, construct a sample instruction text that conforms to the first format. Based on the sample task information and the sample label text corresponding to the sample task information, determine the second format and the label result text that conforms to the second format. Based on the sample instruction Text and label result text, the task processing model is trained under the constraints of sample task information of multiple sample tasks, so that the task processing model has task processing capabilities for different tasks. The task processing model has high versatility. At the same time, through The training under the fixed format constraints of the first format and the second format enables the task processing model to have detailed task processing capabilities for each sample task. The task processing model has high task processing accuracy. The training process is executed on the cloud side device, using It takes advantage of the high computing power and large storage of cloud-side devices, reduces the cost of task processing, and improves the training efficiency and effect of task processing models.
图5示出了本说明书一个实施例提供的一种任务处理方法的前端界面示意图,如图5所示:Figure 5 shows a schematic diagram of the front-end interface of a task processing method provided by an embodiment of this specification, as shown in Figure 5:
在任务处理平台的前端界面,包含输入和输出显示区域、任务选择区域和输入框。输入和输出显示区域显示输入任务处理模型的符合第一格式的指令文本和输出的符合第二格式的任务执行结果(结果文本)。任务选择区域显示有可供选择的任务:抽取和分类两种任务类型,以及地点实体、人名实体、事件、问题答案、主题分类、意图分类、情感分类和问答任务的标签类型。在输入框中输入目标文本:A地真热,点选任务选择区域的任务类型:抽取,再点选标签类型:地点实体,最后点选“输入”控件,在输入和输出显示区域,显示符合第一格式的指令文本:输入:A地真热;抽取:地点,基于指令文本,利用任务处理模型对目标文本执行地点实体抽取任务,生成符合第二格式的任务执行结果:输出:地点:A地,将该任务执行结果显示在输入和输出显示区域。The front-end interface of the task processing platform includes input and output display areas, task selection areas, and input boxes. The input and output display areas display instruction text conforming to the first format of the input task processing model and output task execution results (result text) conforming to the second format. The task selection area displays available tasks: extraction and classification task types, as well as label types for location entities, name entities, events, question answers, topic classification, intent classification, emotion classification, and question and answer tasks. Enter the target text in the input box: A Ground Is Really Hot, click on the task type in the task selection area: Extraction, then click on the label type: Location Entity, and finally click on the "Input" control. In the input and output display areas, the display matches Instruction text in the first format: input: A ground is really hot; extraction: location, based on the instruction text, use the task processing model to perform the location entity extraction task on the target text, and generate a task execution result that conforms to the second format: output: location: A Ground, the task execution results are displayed in the input and output display areas.
下述结合附图6,以本说明书提供的任务处理方法在搜索引擎的应用为例,对所述任务处理方法进行进一步说明。其中,图6示出了本说明书一个实施例提供的一种应用于搜索引擎的任务处理方法的处理过程流程图,包括如下具体步骤:The task processing method provided in this specification is further described below with reference to Figure 6, taking the application of the task processing method provided in this specification in a search engine as an example. Among them, Figure 6 shows a process flow chart of a task processing method applied to a search engine provided by an embodiment of this specification, including the following specific steps:
步骤602:获取多种样本任务的样本任务文本和样本任务信息。Step 602: Obtain sample task text and sample task information of multiple sample tasks.
步骤604:基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本。Step 604: Based on the sample task text and the sample task information, construct a sample instruction text that conforms to the first format.
步骤606:基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本。Step 606: Based on the sample task information and the sample label text corresponding to the sample task information, determine the second format and the label result text that conforms to the second format.
步骤608:基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本。Step 608: Based on the sample instruction text, use the task processing model to execute the corresponding sample task on the sample task text, and generate a prediction result text that conforms to the second format.
步骤610:基于预测结果文本和标签结果文本,对任务处理模型进行训练,在达到预设训练结束条件的情况下,获得训练完成的任务处理模型。Step 610: Train the task processing model based on the prediction result text and the label result text, and obtain the trained task processing model when the preset training end conditions are met.
步骤612:接收前端输入的目标文本以及针对目标文本所选择搜索任务的任务信息。Step 612: Receive the target text input by the front end and the task information of the search task selected for the target text.
步骤614:基于目标文本和任务信息,构建符合第一格式的指令文本。Step 614: Based on the target text and task information, construct an instruction text that conforms to the first format.
步骤616:基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果。Step 616: Based on the instruction text, use the task processing model to perform the target task on the target text, and generate a task execution result that conforms to the second format.
步骤618:确定任务执行结果为搜索关键词。Step 618: Determine the task execution result to be the search keyword.
步骤620:基于搜索关键词,调用搜索引擎,搜索得到对应的搜索结果并反馈至前端。Step 620: Based on the search keywords, call the search engine, search to obtain the corresponding search results and feed them back to the front end.
本说明书实施例中,采用多任务统一预先训练的方式,训练任务处理模型,且固定了指令文本的格式和结果文本的格式,用固定格式的任务执行结果作为搜索关键词进行搜索,提升了搜索效率和搜索准确度,提升了用户的搜索体验。In the embodiment of this specification, a multi-task unified pre-training method is used to train the task processing model, and the format of the instruction text and the format of the result text are fixed. The task execution results in the fixed format are used as search keywords to search, which improves the search Efficiency and search accuracy improve the user’s search experience.
与上述方法实施例相对应,本说明书还提供了任务处理装置实施例,图7示出了本说明书一个实施例提供的一种任务处理装置的结构示意图。如图7所示,该装置包括:Corresponding to the above method embodiments, this specification also provides an embodiment of a task processing device. Figure 7 shows a schematic structural diagram of a task processing device provided by an embodiment of this specification. As shown in Figure 7, the device includes:
第一接收模块702,被配置为接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息;The first receiving module 702 is configured to receive the target text input by the front end and the task information of the target task selected for the target text;
第一构建模块704,被配置为基于目标文本和任务信息,构建符合第一格式的指令文本;The first building module 704 is configured to construct instruction text that conforms to the first format based on the target text and task information;
第一生成模块706,被配置为基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定。The first generation module 706 is configured to use a task processing model to perform a target task on the target text based on the instruction text, and generate a task execution result that conforms to the second format, where the task processing model is based on the sample instruction text in the first format and the second format. The label result text of the format is obtained by training. The sample instruction text includes sample task text and sample task information. The second format is determined based on the sample task information and the label text corresponding to the sample task information.
可选地,目标任务的任务信息包括任务类型和标签类型;Optionally, the task information of the target task includes task type and label type;
对应地,第一生成模块706被进一步配置为:Correspondingly, the first generation module 706 is further configured as:
将指令文本输入任务处理模型,基于标签类型,对目标文本执行任务类型对应的目标任务,生成标签类型对应的预测文本,并基于标签类型和预测文本确定符合第二格式的任务执行结果。Input the instruction text into the task processing model, perform the target task corresponding to the task type on the target text based on the label type, generate the predicted text corresponding to the label type, and determine the task execution result that conforms to the second format based on the label type and the predicted text.
可选地,该装置还包括:Optionally, the device also includes:
第一训练模块,被配置为获取多种样本任务的样本任务文本和样本任务信息;基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本;基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本;基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本;基于预测结果文本和标签结果文本,对任务处理模型进行训练,在达到预设训练结束条件的情况下,获得训练完成的任务处理模型。The first training module is configured to obtain sample task text and sample task information of multiple sample tasks; based on the sample task text and sample task information, construct a sample instruction text that conforms to the first format; based on the sample task information and sample task information correspondence The sample label text determines the second format and the label result text that conforms to the second format; based on the sample instruction text, uses the task processing model to perform the corresponding sample task on the sample task text to generate a prediction result text that conforms to the second format; based on the prediction The result text and label result text are used to train the task processing model, and when the preset training end conditions are met, the trained task processing model is obtained.
可选地,第一训练模块被进一步配置为:Optionally, the first training module is further configured as:
将样本指令文本输入任务处理模型,基于样本指令文本的上下文,生成样本任务信息对应的预测文本,并基于样本任务信息和预测文本,确定符合第二格式的预测结果文本。The sample instruction text is input into the task processing model, based on the context of the sample instruction text, a prediction text corresponding to the sample task information is generated, and based on the sample task information and the prediction text, a prediction result text that conforms to the second format is determined.
可选地,该装置还包括:Optionally, the device also includes:
第一筛选模块,被配置为根据样本任务文本的数量分布,按照预设的数量平衡策略,对样本任务文本进行筛选。The first screening module is configured to filter the sample task text according to the quantity distribution of the sample task text and according to the preset quantity balance strategy.
可选地,样本任务信息包括样本任务类型;Optionally, the sample task information includes a sample task type;
对应地,第一筛选模块被进一步配置为:Correspondingly, the first filtering module is further configured as:
根据样本任务类型,确定各样本任务类型的样本任务文本的数量分布;根据各样本任务类型的样本任务文本的数量分布,按照预设的第一数量平衡策略,对样本任务文本进行筛选,其中,第一数量平衡策略为针对样本任务类型的数量平衡策略。According to the sample task type, determine the quantity distribution of sample task texts of each sample task type; according to the quantity distribution of sample task texts of each sample task type, filter the sample task texts according to the preset first quantity balance strategy, where, The first quantity balancing strategy is a quantity balancing strategy for the sample task type.
可选地,样本任务信息包括样本标签类型;Optionally, the sample task information includes sample label type;
对应地,第一筛选模块被进一步配置为:Correspondingly, the first filtering module is further configured as:
根据样本标签类型,确定各样本标签类型对应的样本任务文本的数量分布;根据确定各样本标签类型对应的样本任务文本的数量分布,按照预设的第二数量平衡策略,对样本任务文本进行筛选,其中,第二数量平衡策略为针对样本标签类型的数量平衡策略。According to the sample label type, determine the quantity distribution of sample task texts corresponding to each sample label type; based on determining the quantity distribution of sample task texts corresponding to each sample label type, filter the sample task texts according to the preset second quantity balance strategy , where the second quantity balancing strategy is a quantity balancing strategy for sample label types.
可选地,样本任务信息包括目标样本任务信息和参考样本任务信息,目标样本任务信息和参考样本任务信息之间存在语义关联关系,样本任务文本包括目标样本任务信息对应的样本标签文本;Optionally, the sample task information includes target sample task information and reference sample task information, there is a semantic association between the target sample task information and the reference sample task information, and the sample task text includes sample label text corresponding to the target sample task information;
对应地,第一训练模块被进一步配置为:基于样本任务文本、目标样本任务信息和参考样本任务信息,构建符合第一格式的样本指令文本;基于目标样本任务信息和目标样本任务信息对应的样本标签文本,确定第二格式并构建符合第二格式的正标签结果文本;基于参考样本任务信息和参考样本任务信息对应的干扰标签文本,构建符合第二格式的负标签结果文本;基于正标签结果文本和负标签结果文本,确定标签结果文本。Correspondingly, the first training module is further configured to: based on the sample task text, the target sample task information and the reference sample task information, construct a sample instruction text that conforms to the first format; based on the target sample task information and the sample corresponding to the target sample task information Label text, determine the second format and construct a positive label result text that conforms to the second format; based on the reference sample task information and the interference label text corresponding to the reference sample task information, construct a negative label result text that conforms to the second format; based on the positive label result Text and negative label result text, determine label result text.
可选地,该装置还包括:Optionally, the device also includes:
第一微调模块,被配置为获取微调任务的微调任务文本和微调任务信息;基于微调任务文本和微调任务信息,构建符合第一格式的微调指令文本;基于微调任务信息和微调任务文本中微调任务信息对应的对象文本,确定第二格式并构建符合第二格式的标签结果文本;基于微调指令文本,利用训练完成的任务处理模型对微调任务文本执行对应的微调任务,生成符合第二格式的预测结果文本;基于预测结果文本和标签结果文本,调整任务处理模型的模型参数,在达到预设微调结束条件的情况下,获得微调完成的任务处理模型。The first fine-tuning module is configured to obtain the fine-tuning task text and fine-tuning task information of the fine-tuning task; based on the fine-tuning task text and the fine-tuning task information, construct a fine-tuning instruction text that conforms to the first format; based on the fine-tuning task information and the fine-tuning task text, the fine-tuning task The object text corresponding to the information determines the second format and constructs a label result text that conforms to the second format; based on the fine-tuning instruction text, uses the trained task processing model to perform the corresponding fine-tuning task on the fine-tuning task text to generate predictions that conform to the second format. Result text; based on the prediction result text and label result text, adjust the model parameters of the task processing model, and when the preset fine-tuning end conditions are reached, the fine-tuned task processing model is obtained.
本说明书实施例中,任务处理模型是基于第一格式的样本指令文本和第二格式的标签结果文本预先经过监督训练得到,学习到了第一格式的输入指令文本和第二格式的输出结果,在第二格式为基于样本任务信息和样本任务信息对应的标签文本确定的情况下,任务处理模型可以根据指令文本的任务信息,生成与该任务信息和对应的标签文本相对应的符合第二格式的任务执行结果,在对不同任务信息下对目标文本执行目标任务的同时,具有对特定任务信息的细化处理能力,即任务处理具有高通用性和高任务处理精度。In the embodiment of this specification, the task processing model is obtained through supervised training in advance based on the sample instruction text in the first format and the label result text in the second format. After learning the input instruction text in the first format and the output result in the second format, When the second format is determined based on the sample task information and the label text corresponding to the sample task information, the task processing model can generate the task information and the corresponding label text corresponding to the second format according to the task information of the instruction text. The task execution result, while performing the target task on the target text under different task information, has the ability to refine the specific task information, that is, the task processing has high versatility and high task processing accuracy.
上述为本实施例的一种任务处理装置的示意性方案。需要说明的是,该任务处理装置的技术方案与上述的任务处理方法的技术方案属于同一构思,任务处理装置的技术方案未详细描述的细节内容,均可以参见上述任务处理方法的技术方案的描述。The above is a schematic solution of a task processing device in this embodiment. It should be noted that the technical solution of the task processing device and the technical solution of the above-mentioned task processing method belong to the same concept. For details that are not described in detail in the technical solution of the task processing device, please refer to the description of the technical solution of the above task processing method. .
与上述方法实施例相对应,本说明书还提供了任务处理装置实施例,图8示出了本说明书一个实施例提供的另一种任务处理装置的结构示意图。如图8所示,该装置应用于云侧设备,包括:Corresponding to the above method embodiments, this specification also provides an embodiment of a task processing device. Figure 8 shows a schematic structural diagram of another task processing device provided by an embodiment of this specification. As shown in Figure 8, this device is applied to cloud-side equipment, including:
第二接收模块802,被配置为接收前端输入的目标文本以及针对目标文本所选择目标任务的任务信息;The second receiving module 802 is configured to receive the target text input by the front end and the task information of the target task selected for the target text;
第二构建模块804,被配置为基于目标文本和任务信息,构建符合第一格式的指令文本;The second building module 804 is configured to build an instruction text that conforms to the first format based on the target text and task information;
第二生成模块806,被配置为基于指令文本,利用任务处理模型对目标文本执行目标任务,生成符合第二格式的任务执行结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务信息对应的标签文本确定;The second generation module 806 is configured to use a task processing model to perform the target task on the target text based on the instruction text, and generate a task execution result that conforms to the second format, wherein the task processing model is based on the sample instruction text in the first format and the second format. The label result text of the format is obtained by training. The sample instruction text includes sample task text and sample task information. The second format is determined based on the sample task information and the label text corresponding to the sample task information;
反馈模块808,被配置为反馈任务执行结果至前端。The feedback module 808 is configured to feed back task execution results to the front end.
可选地,该装置还包括:Optionally, the device also includes:
交互模块,被配置为反馈任务执行结果至前端;接收前端发送的执行结果反馈,其中,执行结果反馈为基于任务执行结果生成的;基于执行结果反馈,调整任务处理模型的模型参数。The interactive module is configured to feed back task execution results to the front end; receive execution result feedback sent by the front end, where the execution result feedback is generated based on the task execution result; and adjust model parameters of the task processing model based on the execution result feedback.
本说明书实施例中,任务处理模型是基于第一格式的样本指令文本和第二格式的标签结果文本预先经过监督训练得到,学习到了第一格式的输入指令文本和第二格式的输出结果,在第二格式为基于样本任务信息和样本任务信息对应的标签文本确定的情况下,任务处理模型可以根据指令文本的任务信息,生成与该任务信息和对应的标签文本相对应的符合第二格式的任务执行结果,在对不同任务信息下对目标文本执行目标任务的同时,任务处理模型具有对特定任务信息的细化处理能力,即任务处理具有高通用性和高任务处理精度,并且,利用了云侧设备的高算力的优点,降低了任务处理的成本,提升了任务处理的效率。In the embodiment of this specification, the task processing model is obtained through supervised training in advance based on the sample instruction text in the first format and the label result text in the second format. After learning the input instruction text in the first format and the output result in the second format, When the second format is determined based on the sample task information and the label text corresponding to the sample task information, the task processing model can generate the task information and the corresponding label text corresponding to the second format according to the task information of the instruction text. The task execution results, while performing the target task on the target text under different task information, the task processing model has the ability to refine the specific task information, that is, the task processing has high versatility and high task processing accuracy, and utilizes The advantages of high computing power of cloud-side devices reduce the cost of task processing and improve the efficiency of task processing.
上述为本实施例的一种任务处理装置的示意性方案。需要说明的是,该任务处理装置的技术方案与上述的任务处理方法的技术方案属于同一构思,任务处理装置的技术方案未详细描述的细节内容,均可以参见上述任务处理方法的技术方案的描述。The above is a schematic solution of a task processing device in this embodiment. It should be noted that the technical solution of the task processing device and the technical solution of the above-mentioned task processing method belong to the same concept. For details that are not described in detail in the technical solution of the task processing device, please refer to the description of the technical solution of the above task processing method. .
上述方法实施例相对应,本说明书还提供了实体识别装置实施例,图9示出了本说明书一个实施例提供的一种实体识别装置的结构示意图。如图9所示,该装置包括:Corresponding to the above method embodiments, this specification also provides an entity recognition device embodiment. Figure 9 shows a schematic structural diagram of an entity recognition device provided by an embodiment of this specification. As shown in Figure 9, the device includes:
第三接收模块902,被配置为接收前端输入的目标文本以及针对目标文本所选择识别任务的识别任务信息;The third receiving module 902 is configured to receive the target text input by the front end and the recognition task information of the recognition task selected for the target text;
第三构建模块904,被配置为基于目标文本和识别任务信息,构建符合第一格式的指令文本;The third building module 904 is configured to construct an instruction text that conforms to the first format based on the target text and recognition task information;
第三生成模块906,被配置为基于指令文本,利用任务处理模型对目标文本执行识别任务,生成符合第二格式的实体识别结果,其中,任务处理模型基于第一格式的样本指令文本和第二格式的标签结果文本训练得到,样本指令文本包括样本任务文本和样本任务信息,第二格式基于样本任务信息和样本任务文本中样本任务信息对应的对象文本确定。The third generation module 906 is configured to use a task processing model to perform a recognition task on the target text based on the instruction text, and generate an entity recognition result that conforms to the second format, wherein the task processing model is based on the sample instruction text in the first format and the second format. The label result text of the format is obtained through training. The sample instruction text includes sample task text and sample task information. The second format is determined based on the sample task information and the object text corresponding to the sample task information in the sample task text.
本说明书实施例中,任务处理模型是基于第一格式的样本指令文本和第二格式的标签结果文本预先经过监督训练得到,学习到了第一格式的输入指令文本和第二格式的输出结果,在第二格式为基于样本任务信息和样本任务信息对应的标签文本确定的情况下,任务处理模型可以根据指令文本的识别任务信息,生成与该识别任务信息和对应的标签文本相对应的符合第二格式的实体识别结果,在对不同任务信息下对目标文本执行目标任务的同时,任务处理模型具有对特定识别任务信息的细化实体识别能力,具有高通用性和高实体识别精度。In the embodiment of this specification, the task processing model is obtained through supervised training in advance based on the sample instruction text in the first format and the label result text in the second format. After learning the input instruction text in the first format and the output result in the second format, When the second format is determined based on the sample task information and the label text corresponding to the sample task information, the task processing model can generate a second format corresponding to the recognition task information and the corresponding label text based on the recognition task information of the instruction text. Entity recognition results in a format, while performing target tasks on target text under different task information, the task processing model has the ability to refine entity recognition for specific recognition task information, with high versatility and high entity recognition accuracy.
上述为本实施例的一种实体识别装置的示意性方案。需要说明的是,该实体识别装置的技术方案与上述的实体识别方法的技术方案属于同一构思,实体识别装置的技术方案未详细描述的细节内容,均可以参见上述实体识别方法的技术方案的描述。The above is a schematic solution of an entity identification device in this embodiment. It should be noted that the technical solution of the entity recognition device and the technical solution of the above-mentioned entity recognition method belong to the same concept. For details that are not described in detail in the technical solution of the entity recognition device, please refer to the description of the technical solution of the above-mentioned entity recognition method. .
上述方法实施例相对应,本说明书还提供了任务处理的数据处理装置实施例,图10示出了本说明书一个实施例提供的一种任务处理的数据处理装置的结构示意图。如图10所示,该装置应用于云侧设备,包括:Corresponding to the above method embodiments, this specification also provides an embodiment of a data processing device for task processing. FIG. 10 shows a schematic structural diagram of a data processing device for task processing provided by an embodiment of this specification. As shown in Figure 10, this device is applied to cloud-side equipment, including:
获取模块1002,被配置为获取多种样本任务的样本任务文本和样本任务信息;The acquisition module 1002 is configured to obtain sample task texts and sample task information of multiple sample tasks;
构建模块1004,被配置为基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本;The construction module 1004 is configured to construct a sample instruction text that conforms to the first format based on the sample task text and the sample task information;
确定模块1006,被配置为基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本;The determination module 1006 is configured to determine the second format and the label result text that conforms to the second format based on the sample task information and the sample label text corresponding to the sample task information;
生成模块1008,被配置为基于样本指令文本,利用任务处理模型对样本任务文本执行对应的样本任务,生成符合第二格式的预测结果文本;The generation module 1008 is configured to use the task processing model to perform corresponding sample tasks on the sample task text based on the sample instruction text, and generate prediction result text that conforms to the second format;
训练模块1010,被配置为基于预测结果文本和标签结果文本,对任务处理模型进行训练,在达到预设训练结束条件的情况下,获得训练完成的任务处理模型;The training module 1010 is configured to train the task processing model based on the prediction result text and the label result text, and obtain the trained task processing model when the preset training end conditions are met;
发送模块1012,被配置为将任务处理模型发送至端侧设备。The sending module 1012 is configured to send the task processing model to the end-side device.
本说明书实施例中,基于样本任务文本和样本任务信息,构建符合第一格式的样本指令文本,基于样本任务信息和样本任务信息对应的样本标签文本,确定第二格式以及符合第二格式的标签结果文本,基于样本指令文本和标签结果文本,对任务处理模型进行了在多种样本任务的样本任务信息约束下的训练,使得任务处理模型具有对不同任务的任务处理能力,任务处理模型具有高通用性,同时,通过第一格式和第二格式的固定格式约束下的训练,使得任务处理模型具有对各样本任务的细化任务处理能力,任务处理模型具有高任务处理精度,将训练过程在云侧设备执行,利用了云侧设备的高算力、大存储的优点,降低了任务处理的成本,提升了任务处理模型的训练效率和训练效果。In the embodiment of this specification, based on the sample task text and the sample task information, a sample instruction text conforming to the first format is constructed, and based on the sample task information and the sample label text corresponding to the sample task information, the second format and the label conforming to the second format are determined. Result text, based on the sample instruction text and label result text, the task processing model is trained under the constraints of sample task information of multiple sample tasks, so that the task processing model has task processing capabilities for different tasks, and the task processing model has high Universality, at the same time, through training under the fixed format constraints of the first format and the second format, the task processing model has detailed task processing capabilities for each sample task. The task processing model has high task processing accuracy, and the training process is Cloud-side device execution takes advantage of the high computing power and large storage of cloud-side devices to reduce task processing costs and improve the training efficiency and training effect of task processing models.
上述为本实施例的一种任务处理的数据处理装置的示意性方案。需要说明的是,该任务处理的数据处理装置的技术方案与上述的任务处理的数据处理方法的技术方案属于同一构思,任务处理的数据处理装置的技术方案未详细描述的细节内容,均可以参见上述任务处理的数据处理方法的技术方案的描述。The above is a schematic solution of a data processing device for task processing in this embodiment. It should be noted that the technical solution of the data processing device for task processing belongs to the same concept as the technical solution of the data processing method for task processing mentioned above. For details that are not described in detail in the technical solution of the data processing device for task processing, please refer to Description of the technical solution of the data processing method for the above task processing.
图11示出了本说明书一个实施例提供的一种计算设备的结构框图。该计算设备1100的部件包括但不限于存储器1110和处理器1120。处理器1120与存储器1110通过总线1130相连接,数据库1150用于保存数据。Figure 11 shows a structural block diagram of a computing device provided by an embodiment of this specification. Components of the computing device 1100 include, but are not limited to, memory 1110 and processor 1120 . The processor 1120 and the memory 1110 are connected through a bus 1130, and the database 1150 is used to save data.
计算设备1100还包括接入设备1140,接入设备1140使得计算设备1100能够经由一个或多个网络1160通信。这些网络的示例包括公用交换电话网(PSTN,PublicSwitchedTelephone Network)、局域网(LAN,LocalAreaNetwork)、广域网(WAN,WideAreaNetwork)、个域网(PAN,Personal Area Network)或诸如因特网的通信网络的组合。接入设备1140可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC,network interface controller))中的一个或多个,诸如IEEE802.11无线局域网(WLAN,Wireless Local Area Network)无线接口、全球微波互联接入(Wi-MAX,WorldwideInteroperability for Microwave Access)接口、以太网接口、通用串行总线(USB,Universal Serial Bus)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC,Near FieldCommunication)。Computing device 1100 also includes an access device 1140 that enables computing device 1100 to communicate via one or more networks 1160 . Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. Access device 1140 may include one or more of any type of network interface (eg, network interface controller (NIC)), wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) Wireless interface, Worldwide Interoperability for Microwave Access (Wi-MAX, Worldwide Interoperability for Microwave Access) interface, Ethernet interface, Universal Serial Bus (USB, Universal Serial Bus) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC, Near Field Communication).
在本说明书的一个实施例中,计算设备1100的上述部件以及图11中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图11所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。In one embodiment of this specification, the above-mentioned components of the computing device 1100 and other components not shown in FIG. 11 may also be connected to each other, such as through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 11 is for illustrative purposes only and does not limit the scope of this description. Those skilled in the art can add or replace other components as needed.
计算设备1100可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或个人计算机(PC,Personal Computer)的静止计算设备。计算设备1100还可以是移动式或静止式的服务器。Computing device 1100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile telephone (e.g., smartphone ), wearable computing devices (eg, smart watches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). Computing device 1100 may also be a mobile or stationary server.
其中,处理器1120用于执行如下计算机可执行指令,该计算机可执行指令被处理器执行时实现上述任务处理方法、实体识别方法或者任务处理的数据处理方法的步骤。The processor 1120 is configured to execute the following computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned task processing method, entity identification method, or task processing data processing method are implemented.
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的任务处理方法、实体识别方法和任务处理的数据处理方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述任务处理方法、实体识别方法或者任务处理的数据处理方法的技术方案的描述。The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of the computing device belongs to the same concept as the technical solutions of the above-mentioned task processing method, entity identification method and task processing data processing method. Details that are not described in detail in the technical solution of the computing device can be found in Description of the technical solution of the above task processing method, entity recognition method or data processing method for task processing.
本说明书一实施例还提供一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述任务处理方法、实体识别方法或者任务处理的数据处理方法的步骤。An embodiment of the present specification also provides a computer-readable storage medium that stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the above-mentioned task processing method, entity identification method, or task processing data processing method is implemented. step.
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的任务处理方法、实体识别方法和任务处理的数据处理方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述任务处理方法、实体识别方法或者任务处理的数据处理方法的技术方案的描述。The above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solutions of the above-mentioned task processing method, entity identification method and task processing data processing method. For details that are not described in detail in the technical solution of the storage medium, please refer to Description of the technical solution of the above task processing method, entity recognition method or data processing method for task processing.
本说明书一实施例还提供一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述任务处理方法、实体识别方法或者任务处理的数据处理方法的步骤。An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above task processing method, entity recognition method or task processing data processing method.
上述为本实施例的一种计算机程序的示意性方案。需要说明的是,该计算机程序的技术方案与上述的任务处理方法、实体识别方法和任务处理的数据处理方法的技术方案属于同一构思,计算机程序的技术方案未详细描述的细节内容,均可以参见上述任务处理方法、实体识别方法或者任务处理的数据处理方法的技术方案的描述。The above is a schematic solution of a computer program in this embodiment. It should be noted that the technical solution of the computer program belongs to the same concept as the technical solutions of the above-mentioned task processing method, entity identification method and task processing data processing method. Details that are not described in detail in the technical solution of the computer program can be found in Description of the technical solution of the above task processing method, entity recognition method or data processing method for task processing.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desired results. Additionally, the processes depicted in the figures do not necessarily require the specific order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or may be advantageous in certain implementations.
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据专利实践的要求进行适当的增减,例如在某些地区,根据专利实践,计算机可读介质不包括电载波信号和电信信号。The computer instructions include computer program code, which may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , random access memory (RAM, RandomAccess Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunications signals.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本说明书实施例并不受所描述的动作顺序的限制,因为依据本说明书实施例,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本说明书实施例所必须的。It should be noted that for the convenience of description, each of the foregoing method embodiments is expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described action sequence. limitation, because according to the embodiments of this specification, certain steps may be performed in other orders or at the same time. Secondly, those skilled in the art should also know that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily necessary for the embodiments of this specification.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, each embodiment is described with its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
以上公开的本说明书优选实施例只是用于帮助阐述本说明书。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书实施例的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本说明书实施例的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本说明书。本说明书仅受权利要求书及其全部范围和等效物的限制。The preferred embodiments of this specification disclosed above are only used to help explain this specification. Alternative embodiments are not described in all details, nor are the inventions limited to the specific embodiments described. Obviously, many modifications and changes can be made based on the contents of the embodiments of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the embodiments in this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims (14)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311047348.1A CN117291185A (en) | 2023-08-17 | 2023-08-17 | Task processing method, entity identification method and task processing data processing method |
PCT/CN2024/106303 WO2025036077A1 (en) | 2023-08-17 | 2024-07-19 | Task processing method, entity recognition method, and data processing method for task processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311047348.1A CN117291185A (en) | 2023-08-17 | 2023-08-17 | Task processing method, entity identification method and task processing data processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117291185A true CN117291185A (en) | 2023-12-26 |
Family
ID=89256082
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311047348.1A Pending CN117291185A (en) | 2023-08-17 | 2023-08-17 | Task processing method, entity identification method and task processing data processing method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117291185A (en) |
WO (1) | WO2025036077A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117648986A (en) * | 2024-01-26 | 2024-03-05 | 浙江阿里巴巴机器人有限公司 | Task processing and code processing method, computing device, medium, and program product |
CN118095266A (en) * | 2024-03-15 | 2024-05-28 | 北京师范大学 | Language model-based ancient Chinese text processing method, device and storage medium |
WO2025036077A1 (en) * | 2023-08-17 | 2025-02-20 | 阿里巴巴(中国)有限公司 | Task processing method, entity recognition method, and data processing method for task processing |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113361285B (en) * | 2021-06-30 | 2022-07-12 | 北京百度网讯科技有限公司 | Training method of natural language processing model, natural language processing method and device |
CN113705187B (en) * | 2021-08-13 | 2023-08-01 | 北京百度网讯科技有限公司 | Method and device for generating pre-training language model, electronic equipment and storage medium |
CN114154482A (en) * | 2021-11-18 | 2022-03-08 | 郑州云海信息技术有限公司 | NLU task processing method and system, electronic device and storage medium |
CN116151236A (en) * | 2022-10-17 | 2023-05-23 | 马上消费金融股份有限公司 | Training method of text processing model, text processing method and related equipment |
CN117291185A (en) * | 2023-08-17 | 2023-12-26 | 杭州阿里云飞天信息技术有限公司 | Task processing method, entity identification method and task processing data processing method |
-
2023
- 2023-08-17 CN CN202311047348.1A patent/CN117291185A/en active Pending
-
2024
- 2024-07-19 WO PCT/CN2024/106303 patent/WO2025036077A1/en unknown
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025036077A1 (en) * | 2023-08-17 | 2025-02-20 | 阿里巴巴(中国)有限公司 | Task processing method, entity recognition method, and data processing method for task processing |
CN117648986A (en) * | 2024-01-26 | 2024-03-05 | 浙江阿里巴巴机器人有限公司 | Task processing and code processing method, computing device, medium, and program product |
CN117648986B (en) * | 2024-01-26 | 2024-05-14 | 浙江阿里巴巴机器人有限公司 | Task processing and code processing method, computing device, medium, and program product |
CN118095266A (en) * | 2024-03-15 | 2024-05-28 | 北京师范大学 | Language model-based ancient Chinese text processing method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2025036077A1 (en) | 2025-02-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116720004B (en) | Recommendation reason generation method, device, equipment and storage medium | |
CN117291185A (en) | Task processing method, entity identification method and task processing data processing method | |
US20170200066A1 (en) | Semantic Natural Language Vector Space | |
CN111831813B (en) | Dialog generation method, dialog generation device, electronic equipment and medium | |
CN114861889B (en) | Deep learning model training method, target object detection method and device | |
WO2023137911A1 (en) | Intention classification method and apparatus based on small-sample corpus, and computer device | |
KR102608867B1 (en) | Method for industry text increment, apparatus thereof, and computer program stored in medium | |
CN117573842B (en) | Document retrieval method and automatic question-answering method | |
CN113591490A (en) | Information processing method and device and electronic equipment | |
CN116341564A (en) | Problem reasoning method and device based on semantic understanding | |
WO2024041350A1 (en) | Intention recognition method and apparatus, electronic device, and storage medium | |
CN117633162A (en) | Machine learning task template generation method, training method, fine adjustment method and equipment | |
CN118363601A (en) | Task processing method, code complement method, code processing model training method, information processing method based on code processing model and model training platform | |
CN116778011A (en) | Image generating method | |
CN114328917A (en) | Method and apparatus for determining label of text data | |
CN118733748A (en) | A training method and device for a generative large language model and its application in value system recognition | |
CN116861913A (en) | Position detection method based on GPT large model and related equipment | |
CN114546326A (en) | A kind of virtual human sign language generation method and system | |
CN114358019A (en) | Intention prediction model training method and system | |
CN114692610A (en) | Keyword determination method and device | |
Xiaofei et al. | A Survey of Research Progress and Theory Foundation in Large Model | |
CN117808043B (en) | Information processing method, training method, device, equipment and medium for model | |
CN115269830B (en) | Abnormal text detection model training method, abnormal text detection method and device | |
CN117313670B (en) | Copywriting generation method, device, electronic device and storage medium | |
US20240211686A1 (en) | Context-based natural language processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |