Recognition model training method, device, information recognition method and device
By obtaining and fusing similar data samples in the intent identification task to generate target data samples and training the neural network model, the model skew problem caused by uneven sample size is solved, and better model balance and accuracy are achieved.
Patent Information
- Application Number
- CN202111614714.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-12-27
AI Technical Summary
In the intention recognition task, when the training data is small, the BERT model performs well, but because the sample size of a certain problem type is larger than the sum of the corresponding sample sizes of other problem types, the sample size is uneven, and the final identification model is tilted towards the problem type with a large sample size.
By obtaining the set of target samples to be processed, a similar data sample for the initial data sample is determined, and a target data sample is generated based on the initial data sample and a similar data sample is fused. The preset neural network model is trained using the target data sample and the initial data sample to obtain the recognition model.
The number of samples in the sample set is increased, which ensures the training balance during the model training process, and solves the problem of uneven sample size in the existing technology that the model is low after training.
Smart Images

Figure CN114461794B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a method and device for training a recognition model, and a method and device for information recognition. Background Art
[0002] Intent recognition is essentially a classification problem, which can be achieved using rule-based, traditional machine learning algorithms, and deep learning algorithms. For intent recognition tasks with a small amount of training data, the BERT model performs well. The BERT model refers to a transformer-based bidirectional encoder representation technology that can be trained on large-scale natural language data and fine-tune the model for specific training tasks on the basis of the training model to achieve intent recognition tasks. Therefore, the BERT model is relatively friendly to small data set model training. Since the sample size of a certain question type is greater than the sum of the corresponding sample sizes of the other question types during the training process, the serious imbalance in the sample size used for training will cause the final recognition model to tilt towards question types with a large sample size. Summary of the invention
[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a training method and device for a recognition model, and an information recognition method and device.
[0004] According to one aspect of an embodiment of the present application, a method for training a recognition model is provided, comprising:
[0005] Acquire a target sample set to be processed, wherein the target sample set includes a plurality of initial data samples corresponding to a target problem type;
[0006] Determine a similar data sample to the initial data sample from the target sample set;
[0007] Generate a target data sample based on the fusion of the initial data sample and the similar data sample;
[0008] The target data sample and the initial data sample are used to train a preset neural network model to obtain a recognition model.
[0009] Further, obtaining a target sample set to be processed includes:
[0010] Obtain sample sets corresponding to multiple question types;
[0011] Determine the number of samples corresponding to the data samples in the sample set;
[0012] The sample set whose sample quantity does not meet the preset quantity is determined as the target sample set.
[0013] Further, determining a similar data sample of the initial data sample from the target sample set includes:
[0014] Calculating the Euclidean distance between the initial data sample and other initial data samples in the target sample set;
[0015] Other initial data samples whose Euclidean distances fall within a preset range are determined as similar data samples corresponding to the initial data samples.
[0016] Furthermore, the generating a target data sample by fusing the initial data sample with the similar data sample includes:
[0017] Extracting first feature data from the initial data sample, and extracting second feature data from the similar data sample;
[0018] Obtaining a pre-generated random number, calculating the product of the random number and the difference between the first feature data and the second feature data, and determining the product as third feature data;
[0019] Calculating a sum of the first characteristic data and the third characteristic data, and determining the sum as fourth characteristic data;
[0020] The target data sample is generated based on the fourth feature data.
[0021] Furthermore, the use of the target data sample and the initial data sample to train a preset neural network model to obtain a recognition model includes:
[0022] Using the target data sample to update the target sample set, to obtain an updated target sample set, wherein the updated target sample set includes: the target data sample and the initial data sample;
[0023] The preset neural network model is trained using the updated target sample set to obtain a recognition model.
[0024] According to another aspect of the embodiment of the present application, there is also provided an information identification method, including:
[0025] receiving question information input by the requesting party;
[0026] Inputting the question information into a recognition model so that the recognition model recognizes the question information and obtains a target question type corresponding to the question information, wherein the recognition model is trained based on a target data sample, and the target data sample is generated by an initial data sample in a target sample set to be processed and a similar data sample associated with the initial data sample;
[0027] Execute the problem processing operation corresponding to the target problem type.
[0028] Further, the executing the problem processing operation corresponding to the target problem type includes:
[0029] In the case where it is determined that the target question type has a subtype, the question information is input into a classification model so that the classification model classifies the question information and determines the target subtype corresponding to the question information;
[0030] A processing terminal corresponding to the target subtype is determined, and the problem information is sent to the processing terminal.
[0031] Furthermore, before inputting the problem information into the recognition model, the method further includes:
[0032] Acquire a target sample set to be processed, wherein the target sample set includes a plurality of initial data samples corresponding to a target problem type;
[0033] Determine a similar data sample to the initial data sample from the target sample set;
[0034] Generate a target data sample based on the fusion of the initial data sample and the similar data sample;
[0035] The target data sample and the initial data sample are used to train a preset neural network model to obtain a recognition model.
[0036] According to another aspect of the embodiment of the present application, a training device for a recognition model is also provided, including:
[0037] An acquisition module, used to acquire a target sample set to be processed, wherein the target sample set includes a plurality of initial data samples corresponding to a target problem type;
[0038] A determination module, configured to determine a similar data sample to the initial data sample from the target sample set;
[0039] A generating module, configured to generate a target data sample by fusing the initial data sample with the similar data sample;
[0040] The training module is used to train a preset neural network model using the target data sample and the initial data sample to obtain a recognition model.
[0041] According to another aspect of the embodiment of the present application, there is also provided an information identification device, including:
[0042] A receiving module, used for receiving question information input by a requester;
[0043] An input module is used to input the question information into a recognition model so that the recognition model classifies the question information and obtains a target question type corresponding to the question information, wherein the recognition model is trained based on a target data sample, and the target data sample is generated by an initial data sample in a target sample set to be processed and a similar data sample associated with the initial data sample;
[0044] An execution module is used to execute the problem processing operation corresponding to the target problem type.
[0045] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0046] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0047] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
[0048] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the embodiment of the present application determines the similar data sample corresponding to each initial data sample in the sample set, and then fuses the initial data sample and the similar data sample to obtain a new target data sample. On the one hand, the target data sample can increase the number of samples in the sample set, and on the other hand, the training balance in the model training process is ensured, solving the problem of low accuracy after model training caused by the imbalance of the central sample size in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0051] Figure 1A flowchart of a method for training a recognition model provided in an embodiment of the present application;
[0052] Figure 2 A flowchart of an information identification method provided in an embodiment of the present application;
[0053] Figure 3 A block diagram of a training device for a recognition model provided in an embodiment of the present application;
[0054] Figure 4 A block diagram of an information identification method and device provided in an embodiment of the present application;
[0055] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0057] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another similar entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0058] The embodiments of the present application provide a method and device for training a recognition model, and an information recognition method and device. The method provided in the embodiments of the present invention can be applied to any required electronic device, for example, it can be an electronic device such as a server or a terminal, which is not specifically limited here. For the convenience of description, it is referred to as an electronic device in the following.
[0059] According to one aspect of the embodiments of the present application, a method embodiment of a method for training a recognition model is provided. Figure 1 A flowchart of a method for training a recognition model provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0060] Step S11, obtaining a target sample set to be processed, wherein the target sample set includes a plurality of initial data samples corresponding to a target problem type.
[0061] In the embodiment of the present application, step S11, obtaining a target sample set to be processed, includes the following steps A1-A3:
[0062] Step A1, obtaining sample sets corresponding to multiple question types.
[0063] In an embodiment of the present application, since the finally trained recognition model is deployed in an intelligent question-answering system, it is necessary to obtain sample sets corresponding to multiple question types during the model training process, wherein each question type corresponds to a sample set, and each sample set includes multiple groups of question and answer sentence samples and label information corresponding to each question and answer sentence sample, wherein the label information is used to identify the question type corresponding to the question and answer sentence sample.
[0064] As an example: the problem types can be: pre-sales consultation type, troubleshooting type, product ordering type, after-sales consultation type and chat type, etc. The sample set includes: pre-sales consultation sample set, troubleshooting sample set, product ordering sample set, after-sales consultation sample set and chat type sample set.
[0065] Step A2, determining the sample quantity corresponding to the data sample in the sample set.
[0066] In an embodiment of the present application, after determining multiple sample sets, the number of samples corresponding to each problem type (i.e., the number of samples in each sample set) will be counted. For example: the number of samples corresponding to the pre-sales consultation type is N1, the number of samples corresponding to the troubleshooting type is N2, the number of samples corresponding to the product ordering type is N3, the number of samples corresponding to the after-sales consultation type is N4, and the number of samples corresponding to the chat type is N5.
[0067] Step A3: determine the sample set whose sample quantity does not meet the preset quantity as the target sample set.
[0068] In the embodiment of the present application, by comparing the number of samples corresponding to each question type with a preset threshold, it is possible to determine a sample set whose sample number does not reach the expected target sample set. By determining that the sample number does not reach the expected target sample set, the data samples in the sample set are subsequently adjusted to ensure that the model will not be tilted towards the side with a larger number of samples during the subsequent model training process.
[0069] For example: During the model training process, if the number of samples of the chat type exceeds the preset number and is greater than the number of samples of other question types, the number of samples will be seriously uneven and the model will be biased towards the chat type after training. Therefore, it is necessary to determine the sample sets corresponding to question types other than the chat type as the target sample sets.
[0070] Step S12: determining similar data samples to the initial data sample from the target sample set.
[0071] In the embodiment of the present application, step S12, determining a similar data sample of the initial data sample from the target sample set, includes the following steps B1-B2:
[0072] Step B1, calculating the Euclidean distance between the initial data sample and other initial data samples in the target sample set.
[0073] In the embodiment of the present application, firstly, all data samples in the target sample set are determined as initial data samples, and then the Euclidean distance between each initial data sample and other data samples in the target sample set is calculated.
[0074] It should be noted that the process of calculating the Euclidean distance between data samples is as follows: first, extract the first eigenvector corresponding to the initial data sample, and extract the second eigenvector corresponding to other data samples in the target sample set, and then calculate the Euclidean distance between the initial data sample and other data samples in the target sample set based on the first eigenvector and the second eigenvector.
[0075] Step B2: Determine other initial data samples whose Euclidean distances fall within a preset range as similar data samples corresponding to the initial data samples.
[0076] In an embodiment of the present application, after obtaining the Euclidean distance between the initial data sample and other data samples in the target sample set, the Euclidean distance is compared with a preset range, and other initial data samples whose Euclidean distance falls within the preset range are determined as similar data samples to the initial data sample.
[0077] It should be noted that the embodiment of the present application can select data samples (i.e., similar data samples) with high similarity to each initial data sample in the sample set by calculating the Euclidean distance between data samples of the same problem type, and then fuse the initial data samples and similar data samples to obtain new data samples, and add the new data samples to the sample set. On the one hand, by selecting similar data samples for fusion, the accuracy of the fused data samples can be guaranteed. On the other hand, adding new data samples to the sample set can ensure that the number of samples in the sample set increases, thereby ensuring the training effect of the model.
[0078] Step S13, generating a target data sample based on the fusion of the initial data sample and the similar data sample.
[0079] In the embodiment of the present application, step S13, based on the fusion of the initial data sample and the similar data sample, generates a target data sample, including the following steps C1-C4:
[0080] Step C1, extracting first feature data from an initial data sample, and extracting second feature data from a similar data sample.
[0081] Step C2, obtaining a pre-generated random number, calculating the product of the random number and the difference between the first feature data and the second feature data, and determining the product as the third feature data.
[0082] Step C3, calculating the sum of the first characteristic data and the third characteristic data, and determining the sum as the fourth characteristic data.
[0083] Step C4, generating a target data sample based on the fourth characteristic data.
[0084] In the embodiment of the present application, a plurality of feature points in the initial data sample are first detected, and based on the plurality of feature points, the features in the initial data sample are normalized to obtain normalized features; the feature positions in the normalized features are located based on the normalized feature points on the normalized features; and the first data feature is extracted from the feature positions in the normalized features. The extraction process of the second data feature is the same as above.
[0085] In the embodiment of the present application, after extracting the data features, a pre-generated random number is obtained, the product of the random number and the difference between the first feature data and the second feature data is calculated, and the product is determined as the third feature data, and the sum of the first feature data and the third feature data is calculated, and the sum is determined as the fourth feature data. The calculation formula is as follows:
[0086] x new =x+rand(0,1)×|x-xn|In the above formula, x new is the fourth characteristic data, x is the first characteristic data, xn is the second characteristic data, and rand(0,1) is a random number.
[0087] In an embodiment of the present application, a target data sample is ultimately generated based on the fourth feature data, and the target data sample is added to a target sample set. Adding new data samples to the sample set can ensure that the number of samples in the sample set increases, thereby ensuring the training effect of the model.
[0088] Step S14, using the target data sample and the initial data sample to train the preset neural network model to obtain a recognition model.
[0089] In the embodiment of the present application, step S14, using the target data sample and the initial data sample to train the preset neural network model to obtain a recognition model, includes the following steps D1-D2:
[0090] Step D1, using the target data sample to update the target sample set to obtain an updated target sample set, wherein the updated target sample set includes: the target data sample and the initial data sample.
[0091] Step D2, using the updated target sample set to train the preset neural network model to obtain a recognition model.
[0092] In an embodiment of the present application, the preset neural network model is trained using the updated target sample set to obtain the recognition model in the following process: the target data sample, the initial training sample, and the corresponding question type are input into the preset neural network model, so that the preset neural network model extracts the feature information of the target data sample and the initial data sample, and learns the correspondence between the feature information and the question type to obtain the recognition model.
[0093] The embodiment of the present application determines the similar data samples corresponding to each initial data sample in the sample set, and then fuses the initial data sample and the similar data sample to obtain a new target data sample. On the one hand, the target data sample can increase the number of samples in the sample set, and on the other hand, it ensures the training balance during the model training process, solving the problem of low accuracy after model training caused by the imbalance of the central sample size in the prior art.
[0094] Figure 2 A flowchart of an information identification method provided in an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps:
[0095] Step S21, receiving question information input by the requesting party.
[0096] Step S22, input the question information into the recognition model so that the recognition model recognizes the question information and obtains the target question type corresponding to the question information, wherein the recognition model is trained based on the target data sample, and the target data sample is generated by the initial data sample in the target sample set to be processed, and the similar data sample associated with the initial data sample.
[0097] Step S23, executing the problem processing operation corresponding to the target problem type.
[0098] In the embodiment of the present application, step S23, executing the problem processing operation corresponding to the target problem type, includes the following steps E1-E2:
[0099] Step E1, when it is determined that the target question type has subtypes, the question information is input into the classification model so that the classification model classifies the question information and determines the target subtype corresponding to the question information.
[0100] Step E2, determining the processing terminal corresponding to the target subtype, and sending the problem information to the processing terminal.
[0101] In an embodiment of the present application, the question information is input into the recognition model, the recognition model recognizes the question information, determines the target question type corresponding to the question information, and when the target question type has subtypes, determines the processing terminal corresponding to the target subtype, and sends the question information to the processing terminal. For example: when the target question type is a consulting type, the consulting type includes subtypes: pre-sales consulting or after-sales consulting. Then, the question information is analyzed again to determine the corresponding target subtype, and then the question information is sent to the processing terminal corresponding to the target subtype.
[0102] In an embodiment of the present application, the question information is input into the recognition model, the recognition model recognizes the question information, determines the target question type corresponding to the question information, and when the target question type does not have a subtype, jumps to the page corresponding to the target question type. For example: when the target question type is troubleshooting, jump to the fault detection page. When the target question type is an ordering type, jump to the ordering page. When the target question type is a chat type, match the corresponding reply information from the preset knowledge base.
[0103] In the embodiment of the present application, before inputting the question information into the recognition model, the method further includes:
[0104] Step F1, obtaining a target sample set to be processed, wherein the target sample set includes a plurality of initial data samples corresponding to a target problem type.
[0105] Step F2: determining similar data samples of the initial data sample from the target sample set.
[0106] Step F3, generating a target data sample based on the fusion of the initial data sample and the similar data sample.
[0107] Step F4, using the target data sample and the initial data sample to train the preset neural network model to obtain a recognition model.
[0108] The embodiment of the present application calculates the Euclidean distance between data samples of the same problem type, and can select data samples (i.e., similar data samples) with high similarity to each initial data sample in the sample set, and then fuses the initial data sample and the similar data sample to obtain a new data sample, and adds the new data sample to the sample set. On the one hand, by selecting similar data samples for fusion, the accuracy of the fused data sample can be guaranteed. On the other hand, adding new data samples to the sample set can ensure that the number of samples in the sample set increases, thereby ensuring the training effect of the model.
[0109] Figure 3 The present invention provides a block diagram of a recognition model training device, which can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 3 As shown, the device comprises:
[0110] An acquisition module 31 is used to acquire a target sample set to be processed, wherein the target sample set includes a plurality of initial data samples corresponding to a target problem type;
[0111] A determination module 32, configured to determine similar data samples of the initial data sample from the target sample set;
[0112] A generating module 33, configured to generate a target data sample by fusing the initial data sample with the similar data sample;
[0113] The training module 34 is used to train the preset neural network model using the target data samples and the initial data samples to obtain a recognition model.
[0114] In the embodiment of the present application, the acquisition module 31 is used to obtain sample sets corresponding to multiple question types; determine the number of samples corresponding to the data samples in the sample set; and determine the sample set whose sample number does not meet the preset number as the target sample set.
[0115] In the embodiment of the present application, the determination module 32 is used to calculate the Euclidean distance between the initial data sample and other initial data samples in the target sample set; and determine other initial data samples whose Euclidean distance falls within a preset range as similar data samples corresponding to the initial data sample.
[0116] In an embodiment of the present application, a generation module 33 is used to extract the first feature data from an initial data sample and to extract the second feature data from a similar data sample; obtain a pre-generated random number, calculate the product of the random number and the difference between the first feature data and the second feature data, and determine the product as the third feature data; calculate the sum of the first feature data and the third feature data, and determine the sum as the fourth feature data; and generate a target data sample based on the fourth feature data.
[0117] In an embodiment of the present application, the training module 34 is used to update the target sample set using the target data sample to obtain an updated target sample set, wherein the updated target sample set includes: target data samples and initial data samples; and use the updated target sample set to train the preset neural network model to obtain a recognition model.
[0118] Figure 4 This is a block diagram of an information identification device provided in an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 4 As shown, the device comprises:
[0119] Receiving module 41, used for receiving question information input by the requesting party;
[0120] An input module 42 is used to input the question information into the recognition model so that the recognition model classifies the question information and obtains a target question type corresponding to the question information, wherein the recognition model is trained based on a target data sample, and the target data sample is generated by an initial data sample in a target sample set to be processed and a similar data sample associated with the initial data sample;
[0121] The execution module 43 is used to execute the problem processing operation corresponding to the target problem type.
[0122] In an embodiment of the present application, the execution module 43 is used to input the question information into the classification model when it is determined that the target question type has subtypes, so that the classification model classifies the question information and determines the target subtype corresponding to the question information; determines the processing terminal corresponding to the target subtype, and sends the question information to the processing terminal.
[0123] The information identification device of the embodiment of the present application includes: a training module, which is used to obtain a target sample set to be processed, wherein the target sample set includes multiple initial data samples corresponding to the target problem type; determine similar data samples of the initial data samples from the target sample set; generate target data samples based on the fusion of the initial data samples and the similar data samples; and use the target data samples and the initial data samples to train a preset neural network model to obtain a recognition model.
[0124] The embodiment of the present application determines the similar data samples corresponding to each initial data sample in the sample set, and then fuses the initial data sample and the similar data sample to obtain a new target data sample. On the one hand, the target data sample can increase the number of samples in the sample set, and on the other hand, it ensures the training balance during the model training process, solving the problem of low accuracy after model training caused by the imbalance of the central sample size in the prior art.
[0125] The present application also provides an electronic device, such as Figure 5 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0126] Memory 1503, used for storing computer programs;
[0127] The processor 1501 is used to implement the steps of the above embodiment when executing the computer program stored in the memory 1503.
[0128] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0129] The communication interface is used for communication between the above terminal and other devices.
[0130] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0131] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0132] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the training method of the recognition model described in any of the above embodiments.
[0133] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the training method of the recognition model described in any one of the above embodiments.
[0134] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk), etc.
[0135] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
[0136] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for training a recognition model, characterized in that: include: Obtaining a target sample set to be processed, wherein the target sample set includes a plurality of question-answer sentence samples corresponding to a target question type; Determine a similar data sample of the question-answer sentence sample from the target sample set; Generate a target data sample based on the fusion of the question and answer sentence sample and the similar data sample; Using the target data sample and the question-answer sentence sample to train a preset neural network model to obtain a recognition model; The method of generating a target data sample based on the fusion of the question and answer sentence sample and the similar data sample includes: extracting the first feature data from the question and answer sentence sample, and extracting the second feature data from the similar data sample; obtaining a pre-generated random number, calculating the product of the random number and the difference between the first feature data and the second feature data, and determining the product as the third feature data; calculating the sum of the first feature data and the third feature data, and determining the sum as the fourth feature data; generating the target data sample based on the fourth feature data, wherein extracting the first feature data from the question and answer sentence sample includes: detecting multiple feature points in the question and answer sentence sample, and normalizing the features in the question and answer sentence sample based on the multiple feature points to obtain a normalized feature; locating the feature position in the normalized feature based on the normalized feature points on the normalized feature; and extracting the first data feature from the feature position in the normalized feature.
2. The method according to claim 1, characterized in that The step of obtaining a target sample set to be processed includes: Obtain sample sets corresponding to multiple question types; Determine the number of samples corresponding to the data samples in the sample set; The sample set whose sample quantity does not meet the preset quantity is determined as the target sample set.
3. The method according to claim 1, characterized in that The determining a similar data sample of the question-answer sentence sample from the target sample set includes: Calculating the Euclidean distance between the question-answer sentence sample and other question-answer sentence samples in the target sample set; Other question and answer sentence samples whose Euclidean distance falls within a preset range are determined as similar data samples corresponding to the question and answer sentence samples.
4. The method according to claim 1, characterized in that The method of training a preset neural network model using the target data sample and the question-answer sentence sample to obtain a recognition model includes: Using the target data sample to update the target sample set, to obtain an updated target sample set, wherein the updated target sample set includes: the target data sample and the question and answer sentence sample; The preset neural network model is trained using the updated target sample set to obtain a recognition model.
5. An information identification method, characterized in that: include: receiving question information input by the requesting party; The question information is input into a recognition model so that the recognition model recognizes the question information and obtains a target question type corresponding to the question information, wherein the recognition model is obtained based on training of a target data sample, and the target data sample is obtained as follows: determining a similar data sample of a question-answering statement sample from a target sample set, extracting the first feature data in the question-answering statement sample, and extracting the second feature data in the similar data sample, obtaining a pre-generated random number, calculating the product of the random number and the difference between the first feature data and the second feature data, and determining the product as the third feature data; calculating the sum of the first feature data and the third feature data, and determining the sum as the fourth feature data; generating the target data sample based on the fourth feature data, and extracting the first feature data in the question-answering statement sample, including: detecting a plurality of feature points in the question-answering statement sample, and normalizing the features in the question-answering statement sample based on the plurality of feature points, thereby obtaining a normalized feature; locating the feature position in the normalized feature based on the normalized feature points on the normalized feature; extracting the first data feature from the feature position in the normalized feature; Execute the problem processing operation corresponding to the target problem type.
6. The method according to claim 5, characterized in that The executing the problem processing operation corresponding to the target problem type includes: In the case where it is determined that the target question type has a subtype, the question information is input into a classification model so that the classification model classifies the question information and determines the target subtype corresponding to the question information; A processing terminal corresponding to the target subtype is determined, and the problem information is sent to the processing terminal.
7. The method according to claim 5, characterized in that Before inputting the problem information into the recognition model, the method further includes: Obtaining a target sample set to be processed, wherein the target sample set includes a plurality of question-answer sentence samples corresponding to a target question type; Determine a similar data sample of the question-answer sentence sample from the target sample set; Generate a target data sample based on the fusion of the question and answer sentence sample and the similar data sample; The preset neural network model is trained using the target data samples and the question and answer sentence samples to obtain a recognition model.
8. A training device for a recognition model, characterized in that: include: An acquisition module, used to acquire a target sample set to be processed, wherein the target sample set includes a plurality of question-answer sentence samples corresponding to a target question type; A determination module, used to determine similar data samples of the question and answer sentence sample from the target sample set; A generation module, used to generate a target data sample based on the fusion of the question and answer sentence sample and the similar data sample; A training module, used to train a preset neural network model using the target data sample and the question-answer sentence sample to obtain a recognition model; The generation module is used to extract the first feature data from the question and answer sentence sample, and to extract the second feature data from the similar data sample, wherein the extraction of the first feature data from the question and answer sentence sample includes: detecting multiple feature points in the question and answer sentence sample, and normalizing the features in the question and answer sentence sample based on the multiple feature points to obtain a normalized feature; locating the feature position in the normalized feature based on the normalized feature points on the normalized feature; extracting the first data feature from the feature position in the normalized feature; obtaining a pre-generated random number, calculating the product of the random number and the difference between the first feature data and the second feature data, and determining the product as the third feature data; calculating the sum of the first feature data and the third feature data, and determining the sum as the fourth feature data; and generating the target data sample based on the fourth feature data.
9. An information recognition device, characterized in that: include: A receiving module, used for receiving question information input by a requester; An input module is used to input the question information into a recognition model so that the recognition model classifies the question information and obtains a target question type corresponding to the question information, wherein the recognition model is obtained based on training of a target data sample, and the target data sample is obtained as follows: determining a similar data sample of a question-answering statement sample from a target sample set, extracting the first feature data in the question-answering statement sample, and extracting the second feature data in the similar data sample, obtaining a pre-generated random number, calculating the product of the random number and the difference between the first feature data and the second feature data, and determining the product as the third feature data; calculating the sum of the first feature data and the third feature data, and determining the sum as the fourth feature data; generating the target data sample based on the fourth feature data, and extracting the first feature data in the question-answering statement sample, including: detecting multiple feature points in the question-answering statement sample, and normalizing the features in the question-answering statement sample based on the multiple feature points, thereby obtaining a normalized feature; locating the feature position in the normalized feature based on the normalized feature points on the normalized feature; extracting the first data feature from the feature position in the normalized feature; An execution module is used to execute the problem processing operation corresponding to the target problem type.
Citation Information
Patent Citations
Job problem processing method and device, computer equipment and storage medium
CN112257427A
Classification model training method and device, electronic equipment and storage medium
CN112560912A