A method and system for training a natural language model

By combining artificial neural networks and rule/semantic knowledge networks in a natural language processing system, the old and new models complement each other, improving the accuracy and applicability of semantic understanding while reducing training costs and computational requirements.

CN116029334BActive Publication Date: 2026-03-20SHENZHEN RENMA INTERACTIVE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310192088.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2026-03-20
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

In pursuing new technologies, existing natural language processing techniques struggle to effectively connect and complement old and new models, resulting in high training costs, large computational demands, and insufficient applicability in specific domains.

Method used

A natural language processing system is adopted, which combines models based on artificial neural networks and rule/semantic knowledge networks. The first model transforms the input text into intermediate text, and the second model extracts a set of triples to establish association relationships as training data for the third model, thereby improving semantic understanding capabilities.

Benefits of technology

It improves the model's applicability and recognition accuracy in specific fields, reduces training costs and computational requirements, and expands the model's recognition and understanding range.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The application discloses a training method of a natural language understanding model, and is based on a natural language processing system, wherein the natural language processing system comprises a first model, a second model and a third model; the first model is used for converting input text into intermediate text; the second model is used for converting the intermediate text into a semantic understanding result; a correlation between the input text, the intermediate text and the semantic understanding result corresponding to the intermediate text is established and is input into the third model as training data of the third model; and the third model is trained so as to obtain the semantic understanding result of the input text according to the input text. Through the above method, the first model can be used, and on the basis of the second model with high precision and relatively low recall rate, the third model with higher recall rate can be trained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a semantic knowledge network expansion method and system. BACKGROUND

[0002] Nowadays, in the field of natural language processing, various new technical paths and models emerge in an endless stream. In terms of technical path and model innovation and processing effect, there is a "latecomer advantage".

[0003] However, the most advanced natural language processing technology path and the latest model need huge training cost, the latest research results and the top researchers to support.

[0004] For companies already in the field of natural language processing, natural language processing technology is changing day by day. Instead of constantly chasing new technologies on the surface, it is better to determine a certain technical path and practice deeply to develop and improve the selected technology to a mature and stable state.

[0005] Therefore, in the face of an endless stream of new technologies, how to keep the core technology while realizing the connection and application of new and old models, how to improve the performance of the original model through the new model based on the new technology, and how to realize the complementarity of new and old models are technical problems to be solved. SUMMARY

[0006] To solve the above technical problems, the present application provides a natural language understanding model training method based on a natural language processing system, which includes a first model, a second model and a third model. The first model is used to convert the input text into intermediate text. The second model is used to convert the intermediate text into a semantic understanding result. The association relationship between the input text, the intermediate text and the semantic understanding result corresponding to the intermediate text is established and input into the third model as the training data of the third model. The third model is trained to make the third model obtain the semantic understanding result of the input text according to the input text.

[0007] A natural language understanding model training method further includes: when the third model is a model based on rules and / or semantic knowledge network; the second model is used to convert the intermediate text into a triple set; the association relationship between the input text, the intermediate text and the triple set corresponding to the intermediate text is established and input into the third model as the training data of the third model. The third model is trained to make the third model obtain the triple set according to the input text.

[0008] The training method of the natural language understanding model further comprises: inputting the input text into the second model to obtain a set of triples corresponding to the input text; establishing a correlation between the input text, the set of triples corresponding to the input text, the intermediate text and the set of triples corresponding to the intermediate text, and inputting the correlation as training data of the third model into the third model to train the third model.

[0009] The natural language understanding method is based on a natural language processing system, which comprises: obtaining input information; inputting the input information into the third model, and inputting the input information into the first model if the third model cannot understand the input information; converting the input information by the first model to obtain converted intermediate text; and inputting the intermediate text into the third model to make the third model obtain a semantic understanding result of the input information according to the intermediate text.

[0010] The natural language understanding method further comprises: establishing a correlation between the input text, the set of triples corresponding to the input text, the intermediate text and the set of triples corresponding to the intermediate text, and inputting the correlation as training data of the third model into the third model to train the third model if the third model obtains a set of triples according to the intermediate text.

[0011] The natural language understanding method further comprises: the third model reporting an error to an administrator, the administrator adding a new semantic understanding result and a set of triples corresponding to the new semantic understanding result based on a rule, so that the set of triples corresponding to the input text and / or the intermediate text matches the set of triples corresponding to the newly established semantic understanding result; establishing a correlation between the input text, the set of triples corresponding to the input text, the intermediate text, the set of triples corresponding to the intermediate text and the newly established semantic understanding result, and inputting the correlation as training data of the third model into the third model to train the third model if the third model cannot obtain a set of triples according to the intermediate text.

[0012] The natural language understanding method further comprises: inputting the input text and / or the intermediate text into the second model, the second model extracting a set of triples of the input text and / or the intermediate text, and obtaining a semantic understanding result of the input text and / or the intermediate text according to the set of triples of the input text and / or the intermediate text if the third model cannot obtain a semantic understanding result of the input information according to the intermediate text when the third model is a natural language understanding model based on an artificial neural network.

[0013] The natural language understanding method further comprises: after the second model obtains the semantic understanding result of the input text and / or the intermediate text according to the triple set of the input text and / or the intermediate text; establishing a correlation between the input text, the intermediate text and the semantic understanding result of the input text and / or the intermediate text, and inputting the correlation as training data of the third model to train the third model.

[0014] The natural language understanding method further comprises: after the second model obtains the semantic understanding result of the input text and / or the intermediate text according to the triple set of the input text and / or the intermediate text; establishing a correlation between the input text, the intermediate text and the semantic understanding result of the input text and / or the intermediate text, and inputting the correlation as training data of the third model to train the third model.

[0015] An electronic device comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the program comprising instructions for performing the steps in the method. DETAILED DESCRIPTION

[0016] The term "comprising" and any variation thereof as used in the description of the present application shall be interpreted not to exclude the presence of other steps, elements, units, features, components, materials or parts not expressly stated in the process, method, system, product or device. For example, a process, method, system, product or device that comprises a list of steps or units does not exclude the presence of other steps or units not expressly stated in the list, or the presence of other steps or units inherent to such process, method, product or device.

[0017] It should be noted that the terms "exemplary" or "for example" in the embodiments of the present application are used to represent an example, illustration or description. Any embodiment or design method described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more advantageous or more advantageous than other embodiments or design methods. On the contrary, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner. In the embodiments of the present application, "A and / or B" means A and B, A or B, two meanings. "A, and / or B, and / or C" means any one of A, B, C, or means any two of A, B, C, or means A and B and C.

[0018] A natural language processing system comprises a first model, a second model and a third model.

[0019] The first model is used to convert the input text into the intermediate text;

[0020] The second model is used to convert the intermediate text into a set of triples;

[0021] The third model obtains a semantic understanding result of the input text according to the input text or the intermediate text.

[0022] The first model is a natural language processing model based on artificial neural network. The natural language processing model based on artificial neural network can be a generative pre-training natural language processing model based on artificial neural network, such as a GPT model (Generative Pre-Training), a BERT model (Bidirectional Encoder Representations from Transformers), etc.

[0023] The second model is a natural language processing model based on rules and / or semantic knowledge network. The natural language processing model based on rules and / or semantic knowledge network can include a natural language processing model based on symbolic rules, a natural language processing model based on graph matching rules, a natural language processing model based on semantic knowledge network, and a natural language processing model based on joint use of probability or other additional evaluation algorithms (such as fuzzy matching or similarity algorithms based on deep learning).

[0024] The third model can be a natural language processing model based on rules and / or semantic knowledge network, or an end-to-end natural language processing model based on artificial neural network.

[0025] Specifically, the first model is used to convert the first input text input into the first model into an intermediate text.

[0026] The conversion of the first input text by the first model includes simplifying the first input text, interpreting the first input text, and equivalently expressing the first input text, etc. Through the conversion of the first model, a plurality of first output texts which are equal, equivalent or similar to the first input text in the actual meaning of the content and different from the first input text in the expression form of the content can be obtained. For example, the first input text can be an article, and the first output text can be an article abstract; the first input text can be a general text for ordinary objects, and the first output text can be a special text for children; the first input text can be a long and difficult sentence, and the first output text can be a simple sentence.

[0027] For example, the first input text is a long and difficult sentence, and the first output text is a simple sentence.

[0028] Example 1

[0029] The input text is: "After not sleeping all night, she was exhausted and stared blankly as she flipped through a yellowed paperback book called 'The Self-Cultivation of a Maid'";

[0030] The output text is "She is reading a book".

[0031] Example 2

[0032] The input text is "A roc rises with the wind in a single day, soaring straight up ninety thousand miles."

[0033] The output text is "The Great Roc Can Fly".

[0034] Example 3

[0035] The input text includes phrases such as "As soon as the sun rose, the ground looked like it was on fire" and "Early in the morning, the cicadas chirped loudly, telling people that another hot day had begun."

[0036] The output text includes phrases such as "It's so hot today," "The sun is so dazzling today," "The weather is so sunny today," "The sun is so hot today," "The sun is so strong today," and "The sun is so spicy today."

[0037] It can be understood that the process of the first model converting the first input text into the first output text can also be considered a data annotation process, establishing a relationship between the first input text and the first output text. Typically, the first input text is text that the second model cannot process or finds difficult to process for various reasons. The reasons why the second model cannot process or finds it difficult to process may be that the first input text exceeds the processing range of the second model in terms of text length, text features, text format, etc., or that the second model, when processing the first input text, fails to reach the preset qualified thresholds in terms of recognition accuracy, recall, and precision.

[0038] Optionally, the first model is the GPT model, and the training process of the first model includes:

[0039] First, the first model is pre-trained using a large set of unlabeled samples through unsupervised learning. This pre-training enables the first model to acquire general word and text representation capabilities. Word representation refers to the machine's representation of words, including semantic representation and relational representation. In one embodiment, word representation takes the form of word vectors, where the region pointed to by the word vector represents the word's semantics, and the distance between word vectors represents the word's relation. In other words, unsupervised pre-training enables the first model to acquire representational capabilities using word vectors as the representation form.

[0040] Secondly, according to the use requirement of the first model, the first model is fine-tuned by supervised learning using the sample set with labels, that is, the learning result of unsupervised learning is fine-tuned by supervised learning, and the fine-tuning result based on supervised learning is migrated to the specific use scene requiring supervised learning for application. In the embodiment, the use requirement of the first model is to realize the conversion of the first input text input into the first model.

[0041] The generative pre-training model based on artificial neural network has the advantages of strong comprehensiveness, good universality, common sense, and adaptability to various conventional life scenes. The disadvantages are large model, many parameters, long training time, high training cost, high demand for computing power, and low computing efficiency.

[0042] In an embodiment, the generative pre-training natural language processing model based on artificial neural network becomes a general and comprehensive natural language processing model after training, and has the ability of sentence conversion and common sense judgment. However, the model with universality and common sense judgment may not be applicable in some specific fields. For example, in the field of interactive novels. Different interactive novels record different worlds, and the content settings in different interactive novels are different. There is a content setting of "cats can fly, and user characters sit on cat heads to fly" in interactive novel A, and there is a content setting of "cats have nine tails and can swim, and user characters surf with cat tails" in interactive novel B. Since the content settings of interactive novels only exist in the world recorded by interactive novels, the application scenarios are limited, and the universality is not strong. In this case, if the first model is trained to make the first model learn the content settings that violate common sense in interactive novels, and the first model is applied to the field of interactive novels and specific interactive novels, the learning and application cost will not be proportional to the gain, and it will be a waste of resources.

[0043] The second model is a natural language processing model based on rules and / or semantic knowledge network. In the embodiment, the second model is a semantic relationship extraction model based on rules and / or semantic knowledge network, which is used to extract semantics of the second input text input into the second model, extract the semantic relationship in the second input text, and obtain a triple set corresponding to the second input text.

[0044] The second model inputs the second input text and outputs a triple set. For example:

[0045] Example 1:

[0046] The second input text: "She is reading a book";

[0047] The output triple set: There is something (she, book) in the statement; there is a verb-object relationship (read, book).

[0048] Example 2:

[0049] The second input text: "A big bird can fly";

[0050] The output triple set: can (big bird, fly).

[0051] Example three:

[0052] The second input text: "Today the sun is big";

[0053] The output triple set: state the degree (big, good); state the subject-predicate relationship (sun, big); state the strengthening modification (good, big); state the action modification (good, big); state the modifier of people or things (sun, big).

[0054] The triple set is used to represent the intention expressed by the second input text, and the natural language processing system can obtain the meaning of the second input text and understand the intention expressed by the second input text according to the triple set. The triple set includes a plurality of triples. Each triple includes two entities and an association relationship between the entities. Each entity includes at least one word, and the entity is a superordinate concept or summary concept of the word or word group. The association relationship is used to represent the semantic and / or grammatical relationship between the two entities. One structural representation form of the triple can be: semantic and / or grammatical relationship (first entity, second entity). It should be noted that the current representation form is only one example of the representation form of the triple structure, and other representation forms of the triple including two entities and the semantic and / or grammatical relationship between the two entities are not listed one by one. A plurality of triples in the triple set can be connected to form a tree or a graph based on the same entity, word or word group. That is, the triple set includes a tree or a graph formed by mutual connection, and the triple set as a whole can be represented by the tree or the graph formed by mutual connection.

[0055] The second model obtains the triple set corresponding to the second input text by performing tasks such as word segmentation, part-of-speech analysis, and triple extraction on the second input text. Specifically, after the second input text is subjected to word segmentation and part-of-speech analysis, a processing result is obtained, and the processing result is matched in a pre-trained semantic knowledge network (knowledge graph) based on rules. If the matching is successful, the triple set corresponding to the second input text is obtained. The semantic knowledge network includes a plurality of triples, and the connection architecture of the semantic knowledge network is composed of triples.

[0056] An association and correspondence relationship is established between the preset text intention and the triple set based on rules in advance. If the triple set extracted from the second input text can be successfully matched with the triple set corresponding to the preset text intention, the text intention of the second input text can be obtained according to the triple set extracted from the second input text.

[0057] The semantic extraction model based on rules and / or semantic knowledge network has the advantages of small model, few parameters, short training time, low training cost, small demand for operation capacity, high operation efficiency, high precision and high accuracy of recognition. The disadvantage is that the recall rate is low.

[0058] It can be understood that the natural language processing model based on rules and / or semantic knowledge network needs to establish the corresponding relationship between the triple set and the semantic understanding result through rule-based data labeling, which may have problems such as sparse labeled data and huge cost of conventional labeling. For example, if only the input information "I want to sit on the cat's head and fly" is labeled, only the corresponding relationship between the triple set corresponding to "I want to sit on the cat's head and fly" and the semantic understanding result corresponding to "I want to sit on the cat's head and fly" is established. The triple set corresponding to the sentences "I want to sit on the cat's head and swim in the starry sky", "I want to sit on the cat's head and shoulder with the sun", and "I want to sit on the cat's head and go to heaven" has not established the corresponding semantic understanding result. When the user inputs the information "I want to sit on the cat's head and swim in the starry sky", "I want to sit on the cat's head and shoulder with the sun", and "I want to sit on the cat's head and go to heaven", the triple set of the input information does not have a corresponding semantic understanding result, and the triple set of the input information is not associated with the semantic understanding result corresponding to "I want to sit on the cat's head and fly". At this time, the input information "I want to sit on the cat's head and swim in the starry sky", "I want to sit on the cat's head and shoulder with the sun", and "I want to sit on the cat's head and go to heaven" cannot be recognized and understood by the second model. But the semantic extraction model based on rules and / or semantic knowledge network can be quickly, simply and efficiently trained to adapt to a certain interactive novel.

[0059] The third model obtains the semantic understanding result of the third input text according to the third input text.

[0060] The third model can be a model based on rules and / or semantic knowledge network, or an end-to-end deep learning model based on artificial neural network.

[0061] When the third model is a model based on rules and / or semantic knowledge network, the third model obtains the triple set corresponding to the third input information according to the third input information input into the third model. It can be understood that the range of text features that the second model and the third model can process is not the same, and the range of text features that the third model can process includes and is larger than the range of text features that the second model can process. For example, the second model can only process article abstracts, and the third model can process entire articles; the second model can only process simple sentences, and the third model can process long and difficult sentences.

[0062] In a third model is an end-to-end deep learning model based on artificial neural network, the third model obtains a text intent corresponding to the third input information according to the third input information input into the third model.

[0063] It can be understood that the natural language processing model based on artificial neural network has large model, many parameters, long training time, high training cost, high demand for operation capacity and low operation efficiency. The natural language processing model based on rules and / or semantic knowledge network has small model, few parameters, low training cost, fast training speed, low demand for operation capacity and high operation efficiency. The two types of models have advantages and disadvantages and have application scenarios.

[0064] The semantic extraction natural language processing model based on rules and / or semantic knowledge network can also become a general and comprehensive natural language processing model after being trained by a large amount of data. However, as a general and comprehensive natural language processing model, the natural language processing model based on artificial neural network has better adaptability than the natural language processing model based on rules and / or semantic knowledge network.

[0065] A training method of a natural language understanding model based on a natural language processing system includes: a first model for converting input text into intermediate text; a second model for converting the intermediate text into a semantic understanding result; establishing a correlation relationship among the input text, the intermediate text and the semantic understanding result corresponding to the intermediate text, and inputting the correlation relationship into a third model as training data of the third model, and training the third model to make the third model output the semantic understanding result according to the input text or the intermediate text.

[0066] In an embodiment, when the third model is a model based on rules and / or semantic knowledge network, the second model is used to convert the intermediate text into a triple set; a correlation relationship among the input text, the intermediate text and the triple set corresponding to the intermediate text is established, and the correlation relationship is input into the third model as training data of the third model, and the third model is trained to make the third model output the triple set according to the input text or the intermediate text.

[0067] Through the above method, a third model with higher recall rate can be trained on the basis of the second model with high precision and relatively low recall rate.

[0068] Optionally, the input text is input into the second model to obtain a triple set corresponding to the input text; a correlation relationship among the input text, the triple set corresponding to the input text, the intermediate text and the triple set corresponding to the intermediate text is established, and the correlation relationship is input into the third model as training data of the third model, and the third model is trained.

[0069] A natural language understanding and natural language model training method based on a natural language processing system, comprising:

[0070] Obtaining input information, and inputting the input information into a third model;

[0071] If the third model cannot understand the input information, inputting the input information into a first model, and the first model converts the input information to obtain an intermediate text after conversion;

[0072] Inputting the intermediate text into the third model to make the third model obtain a semantic understanding result of the input information according to the intermediate text.

[0073] Through the above method, the sentence conversion capability of the first model can be used to interpret and analyze the input information that cannot be recognized by the third model, so as to convert the text that cannot be recognized by the third model into several sentences with the same meaning, equivalence or similarity, thereby increasing the possibility of the input information being recognized by the third model, expanding the recognition and understanding range of the machine, and making the machine more intelligent.

[0074] In an embodiment, the unrecognizable input information includes long and difficult sentences, sentences with complex grammar, sentences with colloquial words, and sentences mixed with new network words. The intermediate text can be a simple sentence with a preset format. The required sentence format of the intermediate text can be set. The third model only uses the first model for sentence conversion, such as converting the input information "I want to sit on the cat's head and swim in the starry sky", "I want to sit on the cat's head and shoulder with the sun", "I want to sit on the cat's head and go to heaven" into intermediate texts "I want to fly on the cat's head", "I want to fly on the cat's head", "I want to fly on the cat's head", "The cat can fly, the cat's head can sit", etc. Optionally, the first model outputs several intermediate texts, which will be sorted according to the similarity with the input information, and the intermediate text with high similarity will be used in the subsequent steps.

[0075] It can be understood that in the natural language understanding model based on artificial neural network, the understanding logic of the machine for natural language is invisible, unknowable and processable for human beings. In the natural language processing model based on rules and / or semantic knowledge network, the understanding logic of the machine for natural language is preset for human beings, and is known, visible and processable for human beings.

[0076] In an embodiment, the third model is a model based on rules and / or semantic knowledge network.

[0077] If the third model can obtain a triple set according to the intermediate text, the natural language understanding and natural language model training method further comprises:

[0078] The association relationship among the input text, the triple set corresponding to the input text, the intermediate text, the triple set corresponding to the intermediate text and the newly established semantic understanding result is established, and is input into the third model as training data of the third model, and the third model is trained.

[0079] When the third model is a model based on rules and / or a semantic knowledge network, if the third model cannot obtain the triple set according to the intermediate text, a natural language understanding and natural language model training method further includes:

[0080] The third model reports an error to an administrator, the administrator adds a new semantic understanding result and a triple set corresponding to the newly established semantic understanding result based on rules, so that the triple set corresponding to the input text and / or the intermediate text and the triple set corresponding to the newly established semantic understanding result are matched;

[0081] The association relationship among the input text, the triple set corresponding to the input text, the intermediate text, the triple set corresponding to the intermediate text and the newly established semantic understanding result is established, and is input into the third model as training data of the third model, and the third model is trained.

[0082] In another embodiment, the third model is a natural language understanding model based on an artificial neural network.

[0083] If the third model obtains the semantic understanding result according to the intermediate text, a natural language understanding and natural language model training method further includes:

[0084] The association relationship among the input text and the semantic understanding result of the intermediate text is established, and is input into the third model as training data of the third model, and the third model is trained.

[0085] If the third model cannot obtain the semantic understanding result of the input information according to the intermediate text, at this time, it is difficult to make the third model recognize and understand the input text and / or the intermediate text, at this time, a natural language understanding and natural language model training method further includes:

[0086] The input text and / or the intermediate text is input into the second model, the second model extracts the triple set of the input text and / or the intermediate text, and obtains the semantic understanding result of the input text and / or the intermediate text according to the triple set of the input text and / or the intermediate text.

[0087] It can be understood that the input text and / or intermediate text are input into the second model. If the second model cannot obtain the semantic understanding result of the input text and / or intermediate text according to the triple set of the input text and / or intermediate text, the second model reports an error to the administrator and requests the administrator to participate. The administrator can add a new semantic understanding result and its corresponding triple set based on rules to match the triple set corresponding to the input text and / or intermediate text, so as to obtain the semantic understanding result. In this way, the second model can identify and understand the input text and / or intermediate text. The method is simple, fast, and can be used for emergency handling in special situations. Moreover, the method is also convenient for debugging the semantic understanding result.

[0088] Optionally, the natural language understanding and natural language model training method further comprises:

[0089] After the second model obtains the semantic understanding result of the input text and / or intermediate text according to the triple set of the input text and / or intermediate text, the association relationship between the input text, the intermediate text and the semantic understanding result corresponding to the intermediate text is established, and is input into the third model as training data to train the third model.

[0090] Through the above method, the third model based on artificial neural network is trained. The training set of the third model is generated quickly and in large quantities by the cooperation of the first model based on artificial neural network and the second model based on rules and / or semantic knowledge network. The existing generative pre-training model capability (quick and efficient generation of a large amount of labeled data) is utilized, and the existing rule-based and / or semantic knowledge network model capability (high, controllable and machine logic controllable correct rate) is utilized. The third model based on artificial neural network borrows the capability of the first model, but is not limited to the first model, which can ensure the safety and reliability of the third model and improve the training speed of the third model.

[0091] Optionally, the natural language understanding and natural language model training method further comprises:

[0092] After the association relationship between the input text triple set and the plurality of intermediate text triple sets is constructed, and the association relationship between the plurality of intermediate text triple sets is constructed, the input text triple set, the plurality of intermediate text triple sets, the association relationship between the input text triple set and the plurality of intermediate text triple sets, and the association relationship between the plurality of intermediate text triple sets are input into the second model as training data to train the second model.

[0093] Through the above method, the second model can be trained in a machine learning manner to realize rapid expansion of the semantic knowledge network (knowledge graph) in the second model. In addition, the administrator can also add new semantic understanding results, input texts and / or intermediate texts, and the association relationship between the new semantic understanding results and the triple sets of the input texts and / or intermediate texts based on rules as training data to input the second model to train the second model.

[0094] The embodiments of the present application further provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute part or all of the steps of any method described in the above method embodiments, and the computer includes a server.

[0095] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0096] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0097] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the above units is only a logical function division. There can be another division manner for actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical or other forms.

[0098] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiments of the present application.

[0099] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0100] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory. Based on this understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned memory includes various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, etc.

[0101] Those of ordinary skill in the art can understand that all or part of the steps of the various methods in the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0102] The embodiments of the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present application, the specific implementation manner and application range will be changed, and the above description of the embodiments is not used to limit the present application.

Claims

1. A training method for a natural language understanding model, based on a natural language processing system, the natural language processing system comprising a first model, a second model, and a third model, characterized in that, The first model is used to convert the input text into intermediate text; The second model is used to convert the intermediate text into semantic understanding results; Establish the relationship between the input text, the intermediate text, and the semantic understanding result corresponding to the intermediate text, and use it as the training data for the third model to train the third model so that the third model can obtain the semantic understanding result of the input text based on the input text. The training method for the natural language understanding model also includes: When the third model is a rule-based and / or semantic knowledge network model; The second model is used to convert the intermediate text into a set of triples; Establish the association between the input text, the intermediate text, and the set of triples corresponding to the intermediate text, and use this association as the training data for the third model to train the third model so that the third model can obtain the set of triples based on the input text.

2. The training method for a natural language understanding model as described in claim 1, characterized in that, Also includes: Input the input text into the second model to obtain a set of triples corresponding to the input text; Establish the relationships between the input text, the set of triples corresponding to the input text, the intermediate text, and the set of triples corresponding to the intermediate text, and use these relationships as training data for the third model to train it.

3. A natural language understanding method, based on a natural language processing system, comprising: Obtain input information; Input the information into the third model. If the third model cannot understand the input information, input the information into the first model. The first model transforms the input information to obtain the transformed intermediate text; The intermediate text is input into the third model so that the third model can obtain the semantic understanding result of the input information based on the intermediate text. When the third model is a rule-based and / or semantic knowledge network model, if the third model obtains the set of triples based on the intermediate text, it also includes: Establish the relationships between the input text, the set of triples corresponding to the input text, the intermediate text, and the set of triples corresponding to the intermediate text, and use these relationships as training data for the third model to train it.

4. The natural language understanding method as described in claim 3, characterized in that, If the third model cannot obtain the set of triples based on the intermediate text, it also includes: The third model reports an error to the administrator, who then adds new semantic understanding results and the set of triples corresponding to the new semantic understanding results based on the rules, so that the set of triples corresponding to the input text and / or intermediate text matches the set of triples corresponding to the newly established semantic understanding results. Establish the relationships between the input text, the set of triples corresponding to the input text, the intermediate text, the set of triples corresponding to the intermediate text, and the newly established semantic understanding results, and input these relationships into the third model as training data to train the third model.

5. The natural language understanding method as described in claim 3, characterized in that, When the third model is a natural language understanding model based on an artificial neural network, if the third model cannot obtain the semantic understanding result of the input information based on the intermediate text, it also includes: The input text and / or intermediate text are input into the second model. The second model extracts a set of triples from the input text and / or intermediate text, and obtains the semantic understanding result of the input text and / or intermediate text based on the set of triples from the input text and / or intermediate text.

6. The natural language understanding method as described in claim 5, characterized in that, Also includes: After the second model obtains the semantic understanding results of the input text and / or intermediate text based on the set of triples of the input text and / or intermediate text; Establish the association between the input text, the intermediate text, and the semantic understanding results of the input text and / or the intermediate text, and use this association as training data for the third model to train the third model.

7. The natural language understanding method as described in claim 5, characterized in that, Also includes: After the second model obtains the semantic understanding results of the input text and / or intermediate text based on the set of triples of the input text and / or intermediate text; Construct the association relationship between the input text triple set and several intermediate text triple sets, and construct the association relationship between several intermediate text triple sets; The input text triple set, several intermediate text triple sets, the relationship between the input text triple set and several intermediate text triple sets, and the relationship between several intermediate text triple sets are used as training data to input into the second model, and the second model is trained.

8. An electronic device, characterized in that, It includes a processor, a memory, and one or more programs, said one or more programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Question answering method and device of intelligent customer service, electronic equipment and computer storage medium

    CN115114404A