CN113806485A - Intention identification method and device based on small sample cold start and readable medium - Google Patents

Intention identification method and device based on small sample cold start and readable medium Download PDF

Info

Publication number
CN113806485A
CN113806485A CN202111113988.9A CN202111113988A CN113806485A CN 113806485 A CN113806485 A CN 113806485A CN 202111113988 A CN202111113988 A CN 202111113988A CN 113806485 A CN113806485 A CN 113806485A
Authority
CN
China
Prior art keywords
training data
num
intention
data
classification
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.)
Granted
Application number
CN202111113988.9A
Other languages
Chinese (zh)
Other versions
CN113806485B (en
Inventor
黄友福
肖龙源
李稀敏
邹辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Kuaishangtong Technology Co Ltd
Original Assignee
Xiamen Kuaishangtong Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Kuaishangtong Technology Co Ltd filed Critical Xiamen Kuaishangtong Technology Co Ltd
Priority to CN202111113988.9A priority Critical patent/CN113806485B/en
Publication of CN113806485A publication Critical patent/CN113806485A/en
Application granted granted Critical
Publication of CN113806485B publication Critical patent/CN113806485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an intention identification method, an intention identification device and a readable medium based on small sample cold start.A data volume of second training data is n by acquiring labeled at least one first training data corresponding to at least one newly added intention category and labeled second training data in an intention identification model; dividing the second training data into num third training data; splicing the first training data with each of the num third training data to obtain num classification data sets; respectively training a classification model for each classification data set in the num classification data sets to obtain num trained classification models; after receiving the text information to be recognized, predicting and voting according to num trained classification models, and determining the intention category of the text information according to the voting result. The invention avoids the enlargement of the scale of the original intention recognition model, reduces the labor cost of sample marking and provides the recognition speed and accuracy.

Description

Intention identification method and device based on small sample cold start and readable medium
Technical Field
The invention relates to the field of natural language processing, in particular to an intention identification method and device based on small sample cold start and a readable medium.
Background
With the development of deep learning and natural language processing technologies, many companies are working on developing human-machine interactive systems, and it is expected that human and machine can interact with each other through natural language. Intention recognition is an important research direction in the field of natural language processing, and is mainly used for recognizing the behavior intention of a user according to text information.
The existing intention recognition systems recognize on an intention recognition model trained in advance, that is, the recognition effect of the intention recognition system depends on the intention recognition model trained in advance, the generation of the intention recognition model depends on a corpus labeled in advance, and the recognition effect of the intention recognition system is better as the number of the corpus labeled in advance is larger and the number of the corpus labeled in advance is larger. When a large number of platform users create a new intention category, a large amount of labeled data can not be used for training, each intention category is only provided with a few or dozens of samples, on one hand, the intention recognition model is difficult to train through a small number of labeled samples to obtain the intention recognition model with an accurate recognition result, on the other hand, the intention recognition model needs to be retrained every time a new intention category is created, so that the intention recognition model is large and is difficult to deploy in an actual production environment.
Since the CNN/RNN model needs to be pre-trained with a large amount of sample corpora and corresponding intention labels before intention recognition is performed, when the sample corpora and corresponding intention labels are small in data amount, for example, at cold start, the accuracy of the intention recognition model is low, thereby causing the accuracy of the intention recognition system to be lowered. The existing problem is that how to perform intention identification in a small sample cold start scene is large, and methods adopted in the prior art are complex.
Disclosure of Invention
The technical problems mentioned in the background above are addressed. An object of the embodiments of the present application is to provide a method, an apparatus and a readable medium for identifying an intention based on a cold start of a small sample, so as to solve the technical problems mentioned in the above background.
In a first aspect, an embodiment of the present application provides an intention identification method based on a small sample cold start, including the following steps:
s1, acquiring at least one labeled first training data corresponding to at least one newly added intention type and labeled second training data in the intention recognition model, wherein the data volume of the second training data is n;
s2, dividing the second training data into num third training data, wherein the data volume of each third training data is m, and num is
Figure BDA0003274640320000021
[]The number of the training data is a rounded symbol, num is an odd number, and the intention class proportion in the third training data is the same as the intention class proportion in the second training data;
s3, splicing the first training data with each of num third training data to obtain num classification data sets;
s4, respectively training a classification model for each of the num classification data sets to obtain num trained classification models;
and S5, after receiving the text information to be recognized, predicting and voting according to num trained classification models to obtain a voting result, and determining the intention category of the text information according to the voting result.
In some embodiments, step S5 specifically includes:
s51, respectively inputting the text information into the trained num classification models for prediction to obtain num prediction results;
s52, voting according to num prediction results, and determining a voting result;
and S53, judging whether the text information belongs to the new intention category according to the voting result, if so, determining the intention category identified by the text information as the new intention category, otherwise, inputting the text information into an intention identification model for intention identification to obtain the intention category.
In some embodiments, step S2 specifically includes: extracting m data from the second training data without replacing the m data to obtain third training data; and repeating the operation for num times to obtain num third training data.
In some embodiments, when the number of the newly added intention categories is 1, the classification model adopts a binary classification model, and m is the data size of the first training data.
In some embodiments, when the newly added intention categories are 2 or more than 2, the classification model adopts a multi-classification model, and m is an average value of data amounts of the plurality of first training data.
In some embodiments, when the newly added intention categories are 2 or more than 2, the step S3 specifically includes: and splicing 2 or more than 2 first training data, and then respectively splicing with each of num third training data to obtain num classification data sets.
In some embodiments, the classification model comprises one of a logistic regression model, a support vector machine, a decision tree, a classification regression tree, and a random forest.
In a second aspect, an embodiment of the present application provides an intention recognition apparatus based on a small sample cold start, including:
the data acquisition module is configured to acquire at least one labeled first training data corresponding to at least one newly added intention type and labeled second training data in the intention recognition model, and the data volume of the second training data is n;
a data dividing module configured to divide the second training data into num third training data, wherein the data amount of each third training data is m, and num is
Figure BDA0003274640320000031
[]The number of the training data is a rounded symbol, num is an odd number, and the intention class proportion in the third training data is the same as the intention class proportion in the second training data;
the data splicing module is configured to splice the first training data with each of the num third training data to obtain num classified data sets;
the training module is configured to train a classification model for each of the num classification data sets to obtain num trained classification models;
and the recognition module is configured to predict and vote according to num trained classification models after receiving the text information to be recognized, so as to obtain a voting result, and determine the intention category of the text information according to the voting result.
In a third aspect, embodiments of the present application provide an electronic device comprising one or more processors; storage means for storing one or more programs which, when executed by one or more processors, cause the one or more processors to carry out a method as described in any one of the implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the method as described in any of the implementations of the first aspect.
The invention discloses an intention identification method, an intention identification device and a readable medium based on small sample cold start.A data volume of second training data is n by acquiring labeled at least one first training data corresponding to at least one newly added intention category and labeled second training data in an intention identification model; dividing the second training data into num third training data, wherein the data volume of each third training data is m, and num is
Figure BDA0003274640320000032
[]The number of the training data is a rounded symbol, num is an odd number, and the intention class proportion in the third training data is the same as the intention class proportion in the second training data; splicing the first training data with each of the num third training data to obtain num classification data sets; respectively training a classification model for each classification data set in the num classification data sets to obtain num trained classification models(ii) a After receiving the text information to be identified, predicting and voting according to num trained classification models to obtain a voting result, and determining the intention category of the text information according to the voting result. The method can predict and vote by adopting a plurality of classification models without repeatedly training the original intention recognition model on the basis of the small sample newly added intention category, judge whether the newly added intention category is the new intention category or input the original intention recognition model for recognition according to the voting result, avoid the expansion of the scale of the original intention recognition model, reduce the labor cost of sample labeling and provide the recognition speed and accuracy.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is an exemplary device architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flowchart illustrating an intent recognition method based on a small sample cold start according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating step S5 of the method for identifying an intention based on a cold start of a small sample according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an intent recognition device based on small sample cold start according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device suitable for implementing an electronic apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 illustrates an exemplary device architecture 100 to which the method for identifying an intention based on a small sample cold start or an intention identifying device based on a small sample cold start according to an embodiment of the present application may be applied.
As shown in fig. 1, the apparatus architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various applications, such as data processing type applications, file processing type applications, etc., may be installed on the terminal apparatuses 101, 102, 103.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a background data processing server that processes files or data uploaded by the terminal devices 101, 102, 103. The background data processing server can process the acquired file or data to generate a processing result.
The intention identification method based on the cold start of the small sample provided in the embodiment of the present application may be executed by the server 105, or may be executed by the terminal devices 101, 102, and 103, and accordingly, the intention identification device based on the cold start of the small sample may be provided in the server 105, or may be provided in the terminal devices 101, 102, and 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. In the case where the processed data does not need to be acquired from a remote location, the above device architecture may not include a network, but only a server or a terminal device.
Fig. 2 illustrates an intention identification method based on a small sample cold start provided by an embodiment of the present application, including the following steps:
and S1, acquiring at least one labeled first training data corresponding to at least one newly added intention type and labeled second training data in the intention recognition model, wherein the data volume of the second training data is n.
In a specific embodiment, for the new intention category CE, a small amount of label data is first prepared as first training data, the first training data is named data _ CE, and the data volume of the first training data _ CE is m. In the embodiment of the application, the intention recognition model has completed labeling, training and other tasks, the training data corresponding to the intention recognition model is second training data named data _ origin, the data quantity of the second training data _ origin is N, and the intention category corresponding to the intention recognition model is A, B, c. Since the first training data is small sample data, so n ≧ m, in a specific embodiment, the intention recognition model includes an intention recognition model based on rule matching or a document classification model based on a probabilistic statistical model, and the selection of the intention recognition model is not limited. The new intention type CE does not need to be added into the intention recognition model for retraining, and the intention type corresponding to the intention recognition model does not need to be added with the new intention type CE but keeps the original state. The intention recognition model cannot be retrained and adjusted along with the increase of the number of the newly added intention categories, and the scale of the intention recognition model cannot be enlarged. When there are more than one newly added intention categories, there are more than one first training data
S2, dividing the second training data into num third training data, wherein the data volume of each third training data is m, and num is
Figure BDA0003274640320000051
[]To round the symbol and num is an odd number, the proportion of the intention class in the third training data is the same as the proportion of the intention class in the second training data.
In a specific embodiment, step S2 specifically includes: extracting m data from the second training data without replacing the m data to obtain third training data; and repeating the operation for num times to obtain num third training data. And extracting m data from the second training data _ origin without being put back for num times to obtain third training data which are respectively data _ v1 and data _ v2.. Wherein i ∈ [1, 2.. num ]]Num is odd number, and the value range of num is
Figure BDA0003274640320000061
Figure BDA0003274640320000062
If m is 2 and n is 11, num is 5. When the number of the newly added intention types is 1, m is the data volume of the first training data; when the newly added intention types are 2 and more than 2, m is an average value of data amounts of the plurality of first training data.
In a specific embodiment, the third training data _ vi comprises an intention class ratio that is consistent with the intention class ratio in the second training data _ origin. That is, the proportion of the concept class A, B, c.. N in the third training data _ vi to the data amount (m) of the third training data is the same as the proportion of the concept class A, B, c.. N in the second training data _ origin to the data amount (N) of the second training data. Therefore, the influence of the data distribution on the training and prediction accuracy of the subsequent classification model can be reduced.
And S3, splicing the first training data with each of num third training data to obtain num classification data sets.
In a specific embodiment, num classification data sets are constructed, each of which is composed of the first training data _ ce and the third training data _ vi. Taking m data in the first training data _ ce as a first array and m data in the third training data _ vi as a second array, and splicing the first array and the second array into a classification data set; or, directly mixing the m data in the first training data _ ce and the m data in the third training data _ vi into a classification data set. Since the number of the third training data _ vi is num, the first training data _ ce is spliced with the num third training data _ vi, so that num classification data sets can be obtained. In each classification dataset, the first training data portion is labeled as a first class, e.g., the first class may be "0", and the third training data portion is labeled as a second class, e.g., the second class may be "1". If a plurality of first training data exist, for example, data _ ce1 and data _ ce2, the plurality of first training data are spliced first and then are spliced with each third training data, each classification data set is data _ vi and data _ ce1, and a plurality of first classes also exist as a result of the splicing.
And S4, respectively training a classification model for each of the num classification data sets to obtain num trained classification models.
In a particular embodiment, the classification model includes one of a logistic regression model, a support vector machine, a decision tree, a classification regression tree, and a random forest. In order to ensure the consistency of the prediction results of the classification models, the same classification model is selected. And respectively training a classification model aiming at each of the num classification data sets, so that num classification models are obtained through training. Assuming num is 5, there are 5 classification models. The possible prediction result of each classification model is "0" or "1", where "0" indicates that the classification model belongs to the new category CE, and "1" indicates that the classification model does not belong to the new category CE. There are 5 kinds of prediction results for 5 classification models, and each prediction result may be "0" or "1". When the number of the newly added intention types is 1, adopting a two-classification model as a classification model; when the newly added intention types are 2 or more than 2, the classification model adopts a multi-classification model. Of course, more than one binary model may be used. And aiming at a plurality of newly added intention categories, the performance of the multi-classification model is better.
And S5, after receiving the text information to be recognized, predicting and voting according to num trained classification models to obtain a voting result, and determining the intention category of the text information according to the voting result.
In a specific embodiment, as shown in fig. 3, step S5 specifically includes:
s51, respectively inputting the text information into the trained num classification models for prediction to obtain num prediction results;
s52, voting according to num prediction results, and determining a voting result;
and S53, judging whether the text information belongs to the new intention category according to the voting result, if so, determining the intention category of the text information as the new intention category, otherwise, inputting the text information into an intention identification model for intention identification to obtain the intention category.
In a particular embodiment, voting based on the prediction results of num classification models may also be understood as voting between models with minority-compliant majority. And when the text information is considered to belong to the new intention category CE by the prediction results of the majority of classification model models, the final intention identification result is the new intention category CE, otherwise, the text information is input into the intention identification model for identification, and the intention category A, B or C. Since num is an odd number, flat votes cannot exist, so that a unique voting result can be guaranteed. And judging whether the text information belongs to a new intention type CE or not according to a voting result, if so, directly determining the intention type of the text information as the new intention type CE, otherwise, inputting the text information into an original intention identification model for identification, and finally determining the intention type. When a plurality of new intention categories exist, whether the text information corresponds to the new intention category with the highest vote number in the new intention categories or belongs to the intention category existing in the intention identification model can be determined according to the voting result.
Specifically, for example, the customer service system receives a piece of text information, inputs the text information into 5 trained classification models respectively for prediction, obtains 5 prediction results, and determines that the category of the text information is the new intention category CE according to the fact that the number of "0" is 3 and the number of "1" is 2 in the voting results.
With further reference to fig. 4, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an intention identification apparatus based on a small sample cold start, which corresponds to the method embodiment shown in fig. 2, and which can be applied to various electronic devices in particular.
The embodiment of the application provides an intention recognition device based on little sample cold start, includes:
the data acquisition module 1 is configured to acquire at least one labeled first training data corresponding to at least one newly added intention category and labeled second training data in the intention recognition model, wherein the data volume of the second training data is n;
a data dividing module 2 configured to divide the second training data into num third training data, where a data amount of each third training data is m, and num is
Figure BDA0003274640320000081
[]The number of the training data is a rounded symbol, num is an odd number, and the intention class proportion in the third training data is the same as the intention class proportion in the second training data;
the data splicing module 3 is configured to splice the first training data with each of the num third training data to obtain num classification data sets;
the training module 4 is configured to train a classification model for each of the num classification data sets to obtain num trained classification models;
and the identification module 5 is configured to predict and vote according to num trained classification models after receiving the text information to be identified, so as to obtain a voting result, and determine an intention category of the text information according to the voting result.
Referring now to fig. 5, a schematic diagram of a computer apparatus 500 suitable for implementing an electronic device (e.g., the server or the terminal device shown in fig. 1) according to an embodiment of the present application is shown. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer apparatus 500 includes a Central Processing Unit (CPU)501 and a Graphics Processing Unit (GPU)502, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)503 or a program loaded from a storage section 509 into a Random Access Memory (RAM) 504. In the RAM 504, various programs and data necessary for the operation of the apparatus 500 are also stored. The CPU 501, GPU502, ROM 503, and RAM 504 are connected to each other via a bus 505. An input/output (I/O) interface 506 is also connected to bus 505.
The following components are connected to the I/O interface 506: an input portion 507 including a keyboard, a mouse, and the like; an output section 508 including a display such as a Liquid Crystal Display (LCD) and a speaker; a storage section 509 including a hard disk and the like; and a communication section 510 including a network interface card such as a LAN card, a modem, or the like. The communication section 510 performs communication processing via a network such as the internet. The driver 511 may also be connected to the I/O interface 506 as necessary. A removable medium 512 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 511 as necessary, so that a computer program read out therefrom is mounted into the storage section 509 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications section 510, and/or installed from removable media 512. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU)501 and a Graphics Processing Unit (GPU) 502.
It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable medium or any combination of the two. The computer readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or any combination of the foregoing. More specific examples of the computer readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or apparatus. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based devices that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present application may be implemented by software or hardware. The modules described may also be provided in a processor.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, when the one or more programs are executedThe plurality of programs, when executed by the electronic device, cause the electronic device to: acquiring labeled at least one first training data corresponding to at least one newly added intention type and labeled second training data in an intention recognition model, wherein the data volume of the second training data is n; dividing the second training data into num third training data, wherein the data volume of each third training data is m, and num is
Figure BDA0003274640320000101
[]The number of the training data is a rounded symbol, num is an odd number, and the intention class proportion in the third training data is the same as the intention class proportion in the second training data; splicing the first training data with each of the num third training data to obtain num classification data sets; respectively training a classification model for each classification data set in the num classification data sets to obtain num trained classification models; after receiving the text information to be identified, predicting and voting according to num trained classification models to obtain a voting result, and determining the intention category of the text information according to the voting result.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. An intention identification method based on small sample cold start is characterized by comprising the following steps:
s1, acquiring at least one labeled first training data corresponding to at least one newly added intention type and labeled second training data in the intention recognition model, wherein the data volume of the second training data is n;
s2, dividing the second training data into num third training data, wherein the data volume of each third training data is m, and num is
Figure FDA0003274640310000011
[]The number of the training data is a rounded symbol, num is an odd number, and the intention class proportion in the third training data is the same as the intention class proportion in the second training data;
s3, splicing the first training data with each of the num third training data to obtain num classification data sets;
s4, respectively training a classification model for each of the num classification data sets to obtain num trained classification models;
and S5, after receiving the text information to be recognized, predicting and voting according to the num trained classification models to obtain a voting result, and determining the intention category of the text information according to the voting result.
2. The method for identifying an intention based on a cold start of a small sample according to claim 1, wherein the step S5 specifically comprises:
s51, inputting the text information into the trained num classification models respectively for prediction to obtain num prediction results;
s52, voting according to the num prediction results, and determining a voting result;
and S53, judging whether the text information belongs to the added intention category according to the voting result, if so, determining the intention category of the text information as the added intention category, otherwise, inputting the text information into the intention identification model for intention identification to obtain the intention category.
3. The method for identifying an intention based on a cold start of a small sample according to claim 1, wherein the step S2 specifically comprises: extracting m data from the second training data without replacing the m data to obtain a third training data; repeating the operation for num times to obtain num third training data.
4. The method for identifying an intention based on small sample cold start according to claim 1, wherein when the number of the newly added intention categories is 1, the classification model adopts a binary classification model, and m is the data size of the first training data.
5. The method for identifying an intention based on a cold start of a small sample according to claim 1, wherein when the newly added intention categories are 2 or more, the classification model adopts a multi-classification model, and m is an average value of data amounts of the first training data.
6. The method for identifying intentions based on small sample cold start according to claim 1, wherein when the newly added intentions are 2 or more than 2, the step S3 specifically includes: and splicing 2 or more than 2 first training data, and then respectively splicing with each of the num third training data to obtain num classification data sets.
7. The small-sample cold start-based intention recognition method of claim 1, wherein the classification model comprises one of a logistic regression model, a support vector machine, a decision tree, a classification regression tree, and a random forest.
8. An intent recognition device based on small sample cold start, comprising:
the data acquisition module is configured to acquire at least one labeled first training data corresponding to at least one newly added intention type and labeled second training data in the intention recognition model, and the data volume of the second training data is n;
a data partitioning module configured to partition the second training data into num third training data, wherein each third training dataThe data size of the training data is m, num is
Figure FDA0003274640310000021
[]Is a rounding symbol, and num is an odd number;
a data splicing module configured to splice the first training data with each of the num third training data to obtain num classification data sets;
a training module configured to train a classification model for each of the num classification data sets to obtain num trained classification models;
and the recognition module is configured to predict and vote according to the num trained classification models after receiving the text information to be recognized, so as to obtain a voting result, and determine the intention category of the text information according to the voting result.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202111113988.9A 2021-09-23 2021-09-23 Intention recognition method and device based on small sample cold start and readable medium Active CN113806485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111113988.9A CN113806485B (en) 2021-09-23 2021-09-23 Intention recognition method and device based on small sample cold start and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111113988.9A CN113806485B (en) 2021-09-23 2021-09-23 Intention recognition method and device based on small sample cold start and readable medium

Publications (2)

Publication Number Publication Date
CN113806485A true CN113806485A (en) 2021-12-17
CN113806485B CN113806485B (en) 2023-06-23

Family

ID=78940145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111113988.9A Active CN113806485B (en) 2021-09-23 2021-09-23 Intention recognition method and device based on small sample cold start and readable medium

Country Status (1)

Country Link
CN (1) CN113806485B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522556A (en) * 2018-11-16 2019-03-26 北京九狐时代智能科技有限公司 A kind of intension recognizing method and device
CN111914936A (en) * 2020-08-05 2020-11-10 平安科技(深圳)有限公司 Data feature enhancement method and device for corpus data and computer equipment
CN112036550A (en) * 2020-09-04 2020-12-04 平安科技(深圳)有限公司 Client intention identification method and device based on artificial intelligence and computer equipment
CN112149121A (en) * 2019-06-27 2020-12-29 深信服科技股份有限公司 Malicious file identification method, device, equipment and storage medium
CN112148874A (en) * 2020-07-07 2020-12-29 四川长虹电器股份有限公司 Intention identification method and system capable of automatically adding potential intention of user
US20210267474A1 (en) * 2020-03-02 2021-09-02 Wuyi University Training method, and classification method and system for eeg pattern classification model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522556A (en) * 2018-11-16 2019-03-26 北京九狐时代智能科技有限公司 A kind of intension recognizing method and device
CN112149121A (en) * 2019-06-27 2020-12-29 深信服科技股份有限公司 Malicious file identification method, device, equipment and storage medium
US20210267474A1 (en) * 2020-03-02 2021-09-02 Wuyi University Training method, and classification method and system for eeg pattern classification model
CN112148874A (en) * 2020-07-07 2020-12-29 四川长虹电器股份有限公司 Intention identification method and system capable of automatically adding potential intention of user
CN111914936A (en) * 2020-08-05 2020-11-10 平安科技(深圳)有限公司 Data feature enhancement method and device for corpus data and computer equipment
CN112036550A (en) * 2020-09-04 2020-12-04 平安科技(深圳)有限公司 Client intention identification method and device based on artificial intelligence and computer equipment

Also Published As

Publication number Publication date
CN113806485B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN111104482A (en) Data processing method and device
CN108121699B (en) Method and apparatus for outputting information
CN108280200B (en) Method and device for pushing information
CN111897934B (en) Question-answer pair generation method and device
CN108121814B (en) Search result ranking model generation method and device
CN107948437B (en) Screen-off display method and device
CN112860919A (en) Data labeling method, device and equipment based on generative model and storage medium
CN114385780A (en) Program interface information recommendation method and device, electronic equipment and readable medium
CN113268560A (en) Method and device for text matching
CN115757731A (en) Dialogue question rewriting method, device, computer equipment and storage medium
CN110059172B (en) Method and device for recommending answers based on natural language understanding
CN115062617A (en) Task processing method, device, equipment and medium based on prompt learning
CN117195886A (en) Text data processing method, device, equipment and medium based on artificial intelligence
CN114548192A (en) Sample data processing method and device, electronic equipment and medium
CN113806485B (en) Intention recognition method and device based on small sample cold start and readable medium
CN113268575B (en) Entity relationship identification method and device and readable medium
CN115730603A (en) Information extraction method, device, equipment and storage medium based on artificial intelligence
CN115238676A (en) Method and device for identifying hot spots of bidding demands, storage medium and electronic equipment
CN109857838B (en) Method and apparatus for generating information
CN114020896A (en) Intelligent question and answer method, system, electronic equipment and storage medium
CN113688232A (en) Method and device for classifying bidding texts, storage medium and terminal
CN113450764A (en) Text voice recognition method, device, equipment and storage medium
CN112446738A (en) Advertisement data processing method, device, medium and electronic equipment
CN111723188A (en) Sentence display method and electronic equipment based on artificial intelligence for question-answering system
CN113111897A (en) Alarm receiving and warning condition type determining method and device based on support vector machine

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
GR01 Patent grant
GR01 Patent grant