CN117892735B - Deep learning-based natural language processing method and system - Google Patents
Deep learning-based natural language processing method and system Download PDFInfo
- Publication number
- CN117892735B CN117892735B CN202410288968.2A CN202410288968A CN117892735B CN 117892735 B CN117892735 B CN 117892735B CN 202410288968 A CN202410288968 A CN 202410288968A CN 117892735 B CN117892735 B CN 117892735B
- Authority
- CN
- China
- Prior art keywords
- semantic
- semantic analysis
- natural language
- text
- text information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Medical Informatics (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Machine Translation (AREA)
Abstract
The application discloses a natural language processing method and a natural language processing system based on deep learning, which are used for improving the accuracy of text data analysis of a natural language analysis model. The method comprises the following steps: acquiring natural language audio information, natural language text information, a semantic association table, a text semantic analysis model and a voice semantic analysis model; carrying out semantic analysis on the natural language text information to generate a semantic analysis probability set; carrying out semantic analysis on the natural language audio information to generate a semantic analysis probability set; determining ambiguous text information; generating at least two semantic enhancement tags for the ambiguous text information; combining the semantic enhancement tag with the ambiguous text information to generate an enhanced text sample; re-carrying out semantic analysis on the enhanced text sample to generate semantic analysis distribution probability; and determining semantic analysis results of the ambiguous text information according to the semantic analysis distribution probability, and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set.
Description
Technical Field
The embodiment of the application relates to the field of natural language processing, in particular to a natural language processing method and system based on deep learning.
Background
Natural language generally refers to a language that naturally evolves with culture, and is a language that has been created for some specific purpose. Has certain cognition and uncertainty.
With the continuous development of computer technology, it is a long-sought goal to make computers able to recognize the meaning (meaning) of natural language, so as to realize communication between natural language and computer without spending a lot of time and effort to learn various computer languages.
In the prior art, with the continuous development of deep learning, the network model for deep learning can analyze text information, namely a natural language analysis model, besides realizing the recognition analysis of images. However, for natural language, especially chinese, natural language problems are often flexible and variable, and the organization of information in a resource database is also complex, so that it is a challenging task to effectively extract features to calculate the semantic relatedness between candidate information and natural language problems. Especially, the natural language has the problems of dissimilarity of the same text, and the like, and when the natural language analysis model faces text data with ambiguity, the real meaning of the text cannot be accurately identified. So that the analysis accuracy of the natural language analysis model for the text data is lowered.
Disclosure of Invention
The application discloses a natural language processing method and a natural language processing system based on deep learning, which are used for improving the accuracy of text data analysis of a natural language analysis model.
The first aspect of the application discloses a natural language processing method based on deep learning, which comprises the following steps:
Acquiring natural language audio information, N sections of natural language text information, a semantic meaning association table, a text semantic analysis model and a voice semantic analysis model, wherein the N sections of natural language text information have corresponding audio paragraphs in the natural language audio information, and the semantic meaning association table comprises association degrees among different semanteme and semantic meaning;
Inputting the natural language text information into a text semantic analysis model for semantic analysis to generate a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of natural language text information;
inputting natural language audio information into a voice semantic analysis model to carry out semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of audio paragraph;
determining ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set;
Generating at least two semantic enhancement tags for the ambiguous text information using the semantic association table, the semantic analysis probability set and the semantic analysis probability set;
Combining at least two semantic enhancement tags with the ambiguous text information to generate at least two enhanced text samples;
Re-inputting at least two enhanced text samples into a text semantic analysis model for semantic analysis, and generating semantic analysis distribution probabilities of the at least two enhanced text samples;
Determining semantic analysis results of the ambiguous text information according to the semantic analysis distribution probabilities of at least two enhanced text samples, and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set.
Optionally, determining the ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set includes:
Determining the maximum semantic value of the target natural language text information and the maximum semantic value of the target audio paragraph, wherein the audio paragraph corresponding to the target natural language text information in the natural language audio information is the target audio paragraph;
When the maximum semantic value is smaller than a first preset probability value, determining that the target natural language text information is ambiguous text information;
When the maximum semantic value is smaller than a second preset probability value and larger than the first preset probability value, determining the degree of association between the semantic corresponding to the maximum semantic value and the semantic corresponding to the maximum semantic value according to the semantic association table, wherein the second preset probability value is larger than the first preset probability value;
And when the association degree is not greater than a first preset association value, determining the target natural language text information as the ambiguous text information.
Optionally, generating at least two semantic enhancement tags for the ambiguous text information using the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set includes:
determining M ambiguous semantics with the largest semantic probability in the ambiguous text information and M ambiguous probabilities corresponding to the M ambiguous semantics according to the semantic distribution probability, wherein M is greater than or equal to 2;
determining natural language text information adjacent to the ambiguous text information;
Determining the maximum reference semantic meaning of adjacent natural language text information in semantic meaning distribution probability according to the semantic meaning analysis probability set;
the relevancy coefficient is determined according to the semantic association table, the reference semantic meaning and the ambiguity semantic meaning;
Generating an attention coefficient set according to the adjacent natural language text information, wherein the attention coefficient set comprises attention coefficients of the adjacent natural language text information and attention coefficients of ambiguous text information;
generating at least two semantic enhancement tags according to the M ambiguity probabilities, the semantic analysis probability set, the relevance coefficient and the attention coefficient set.
Optionally, generating the attention coefficient set according to the adjacent natural language text information includes:
determining context location information of adjacent natural language text information relative to ambiguous text information;
determining text length information of adjacent natural language text information;
Determining attribution information of adjacent natural language text information and ambiguous text information;
a set of attention coefficients is generated from the contextual location information, the text length information, and the attribution information.
Optionally, after determining the ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set, before generating at least two semantic enhancement tags for the ambiguous text information using the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set, the natural language processing method further includes:
performing initial sequencing on all ambiguous text information;
acquiring context information of the first ambiguous text information, wherein the context information is natural language text information closest to the first ambiguous text information;
when the ambiguous text in the context information reaches the preset quantity, the ambiguous analysis of the first ambiguous text information is delayed, and the analysis of the context information is sequentially carried out on each ambiguous text information until the reordering is completed.
Optionally, the method for processing natural language further includes, after inputting the at least two enhanced text samples into the text semantic analysis model again to perform semantic analysis and generating semantic analysis distribution probabilities of the at least two enhanced text samples:
determining the maximum target semantic analysis probability of the semantic analysis distribution probabilities of at least two enhanced text samples as the target distribution of the ambiguous text information;
calculating a loss value between the target semantic analysis probability and the semantic distribution probability of the ambiguous text information;
The text semantic analysis model is optimized in a back-propagation iterative manner by means of the penalty values.
Optionally, after optimizing the text semantic analysis model in a back propagation iterative manner by the penalty values, the natural language processing method further comprises:
Acquiring a section of natural language data of a user through a sound collector, and performing voice-to-text processing on the natural language information to generate a section of text to be analyzed;
inputting the text to be analyzed into a text semantic analysis model for semantic analysis, and generating real-time semantic distribution probability;
When the real-time semantic distribution probability cannot determine the semantic analysis result, inputting natural language data into a voice semantic analysis model for semantic analysis, and generating a real-time semantic analysis probability;
Generating at least two real-time semantic enhancement tags for the text to be analyzed according to the real-time semantic distribution probability, the real-time semantic analysis probability and the semantic association table;
combining at least two real-time semantic enhancement tags with the text to be analyzed to generate at least two real-time enhancement text samples;
Re-inputting at least two real-time enhanced text samples into a text semantic analysis model for semantic analysis, and generating real-time semantic analysis distribution probabilities of the at least two real-time enhanced text samples;
And determining the semantic analysis result of the text to be analyzed according to the real-time semantic analysis distribution probability of at least two real-time enhanced text samples.
The second aspect of the present application discloses a deep learning-based natural language processing system, comprising:
The first acquisition unit is used for acquiring natural language audio information, N sections of natural language text information, a semantic meaning association table, a text semantic analysis model and a voice semantic analysis model, wherein the N sections of natural language text information have corresponding audio paragraphs in the natural language audio information, and the semantic meaning association table comprises different semanteme and semantic relativity;
The first generation unit is used for inputting the natural language text information into the text semantic analysis model for semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of natural language text information;
The second generation unit is used for inputting the natural language audio information into the voice semantic analysis model to carry out semantic analysis and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each audio paragraph;
the first determining unit is used for determining ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set;
the third generation unit is used for generating at least two semantic enhancement tags for the ambiguous text information by using the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set;
a fourth generating unit, configured to combine at least two semantic enhancement tags and ambiguous text information to generate at least two enhanced text samples;
a fifth generating unit, configured to re-input at least two enhanced text samples into the text semantic analysis model for semantic analysis, and generate semantic analysis distribution probabilities of the at least two enhanced text samples;
The second determining unit is used for determining semantic analysis results of the ambiguous text information according to the semantic analysis distribution probabilities of at least two enhanced text samples and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set.
Optionally, the first determining unit includes:
Determining the maximum semantic value of the target natural language text information and the maximum semantic value of the target audio paragraph, wherein the audio paragraph corresponding to the target natural language text information in the natural language audio information is the target audio paragraph;
When the maximum semantic value is smaller than a first preset probability value, determining that the target natural language text information is ambiguous text information;
When the maximum semantic value is smaller than a second preset probability value and larger than the first preset probability value, determining the degree of association between the semantic corresponding to the maximum semantic value and the semantic corresponding to the maximum semantic value according to the semantic association table, wherein the second preset probability value is larger than the first preset probability value;
And when the association degree is not greater than a first preset association value, determining the target natural language text information as the ambiguous text information.
Optionally, the third generating unit includes:
The first determining module is used for determining M ambiguous semantics with the largest semantic probability in the ambiguous text information according to the semantic distribution probability, and M ambiguous probabilities corresponding to the M ambiguous semantics, wherein M is greater than or equal to 2;
The second determining module is used for determining natural language text information adjacent to the ambiguous text information;
The third determining module is used for determining the maximum reference semantic meaning of the adjacent natural language text information in the semantic meaning distribution probability according to the semantic meaning analysis probability set;
The fourth determining module is used for determining a relevance coefficient according to the semantic meaning association table, the reference semantic meaning and the ambiguity semantic meaning;
The first generation module is used for generating an attention coefficient set according to the adjacent natural language text information, wherein the attention coefficient set comprises attention coefficients of the adjacent natural language text information and attention coefficients of ambiguous text information;
The second generation module is used for generating at least two semantic enhancement tags according to M ambiguity probabilities, semantic analysis probability sets, relevance coefficients and attention coefficient sets.
Optionally, the first generating module includes:
determining context location information of adjacent natural language text information relative to ambiguous text information;
determining text length information of adjacent natural language text information;
Determining attribution information of adjacent natural language text information and ambiguous text information;
a set of attention coefficients is generated from the contextual location information, the text length information, and the attribution information.
Optionally, after the first determining unit and before the third generating unit, the natural language processing system further includes:
The first ordering unit is used for initially ordering all the ambiguous text information;
the second acquisition unit is used for acquiring the context information of the first ambiguous text information, wherein the context information is the natural language text information closest to the first ambiguous text information;
And the second sequencing unit is used for delaying the ambiguity analysis of the first ambiguous text information when the ambiguous text in the context information reaches the preset quantity, and sequentially analyzing the context information for each ambiguous text information until the re-sequencing is completed.
Optionally, after the fifth generating unit, the natural language processing system further includes:
the third determining unit is used for determining the largest target semantic analysis probability among the semantic analysis distribution probabilities of at least two enhanced text samples as the target distribution of the ambiguous text information;
the calculating unit is used for calculating a loss value between the target semantic analysis probability and the semantic distribution probability of the ambiguous text information;
and the updating unit is used for optimizing the text semantic analysis model in a back propagation iteration mode through the loss value.
Optionally, after updating the unit, the natural language processing system further comprises:
the third acquisition unit is used for acquiring a section of natural language data of a user through the sound collector, performing voice-to-text processing on the natural language information, and generating a section of text to be analyzed;
The sixth generation unit is used for inputting the text to be analyzed into the text semantic analysis model for semantic analysis and generating real-time semantic distribution probability;
The seventh generation unit is used for inputting the natural language data into the voice semantic analysis model for semantic analysis when the real-time semantic distribution probability cannot determine the semantic analysis result, and generating the real-time semantic analysis probability;
the eighth generation unit is used for generating at least two real-time semantic enhancement tags for the text to be analyzed according to the real-time semantic distribution probability, the real-time semantic analysis probability and the semantic relation table;
a ninth generating unit, configured to combine at least two real-time semantic enhancement tags and the text to be analyzed to generate at least two real-time enhanced text samples;
a tenth generation unit, configured to re-input at least two real-time enhanced text samples into the text semantic analysis model for semantic analysis, and generate real-time semantic analysis distribution probabilities of the at least two real-time enhanced text samples;
And the fourth determining unit is used for determining the semantic analysis result of the text to be analyzed according to the real-time semantic analysis distribution probability of at least two real-time enhanced text samples.
A third aspect of the present application provides a deep learning-based natural language processing system, including:
A processor, a memory, an input-output unit, and a bus;
the processor is connected with the memory, the input/output unit and the bus;
The memory holds a program that the processor invokes to perform any of the alternative natural language processing methods as in the first aspect as well as the first aspect.
A fourth aspect of the present application provides a computer readable storage medium having a program stored thereon, which when executed on a computer performs any of the alternative natural language processing methods as in the first aspect and the first aspect.
From the above technical solutions, the embodiment of the present application has the following advantages:
In the application, natural language audio information, N segments of natural language text information, a semantic meaning association table, a text semantic analysis model and a voice semantic analysis model are firstly acquired. The natural language audio information is N segments of natural language dialogue data, and the N segments of natural language text information is text data corresponding to the N segments of natural language dialogue data. In this step, the N-segment natural language dialogue data may also be converted into N-segment natural language text information by a speech recognition algorithm. Natural language audio information and N pieces of natural language text information are artificially designed, such as chinese hearing, including audio as well as text. The semantic meaning association table includes the degree of association between different semantics, i.e., the information expressed by the text segment, and the semantic meaning, i.e., the context (emotion) of the audio text segment, for example: qi, peace, and principal etc., the meaning of the words is mainly determined by the audio tone etc. parameters of the audio, and in the prior art, the meaning is similar to the meaning of the text corresponding to the audio determined by the audio tone etc. parameters. While there is typically a correlation between semantic and semantic, natural language processing models can iteratively adjust the direction of the semantic based on the semantic of a segment of speech.
Inputting the natural language text information into a text semantic analysis model for semantic analysis to generate a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each piece of natural language text information. Inputting natural language audio information into a voice semantic analysis model to carry out semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of audio paragraph;
And determining the ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set. And judging which sentence of text has the semantic analysis probability which does not reach the preset height through the semantic analysis probability set, and judging the text as an ambiguous sentence.
Next, at least two semantic enhanced labels are generated for the ambiguous text information using the semantic association table, the semantic analysis probability set, and the semantic analysis probability set. Namely, judging which semantic meaning of the segment words is more matched, and generating the semantic enhancement tag. And combining the at least two semantically enhanced labels with the ambiguous text information to generate at least two enhanced text samples. And then re-inputting the at least two enhanced text samples into a text semantic analysis model for semantic analysis, and generating semantic analysis distribution probabilities of the at least two enhanced text samples. The current semantic analysis distribution probability is enhanced for each semantic, and the probability of the enhanced semantic correspondence is greatly increased. And finally, determining semantic analysis results of the ambiguous text information according to semantic analysis distribution probabilities of at least two enhanced text samples, and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set.
By combining the traditional text semantic analysis model and the voice semantic analysis model, semantic meaning is enhanced, and the accuracy of analyzing text data by the natural language analysis model is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a deep learning-based natural language processing method according to the present application;
FIG. 2 is a schematic diagram of a first stage of a deep learning-based natural language processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a second stage of the deep learning-based natural language processing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a third stage of the deep learning-based natural language processing method of the present application;
FIG. 5 is a schematic diagram of a fourth stage of the deep learning-based natural language processing method of the present application;
FIG. 6 is a schematic diagram of one embodiment of a deep learning based natural language processing system of the present application;
FIG. 7 is a schematic diagram of another embodiment of a deep learning based natural language processing system of the present application;
FIG. 8 is a schematic diagram of another embodiment of a deep learning based natural language processing system of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In the prior art, natural language generally refers to a language that naturally evolves with culture, and is a language that has been created for some specific purpose. Has certain cognition and uncertainty.
With the continuous development of computer technology, it is a long-sought goal to make computers able to recognize the meaning (meaning) of natural language, so as to realize communication between natural language and computer without spending a lot of time and effort to learn various computer languages.
In the prior art, with the continuous development of deep learning, the network model for deep learning can analyze text information, namely a natural language analysis model, besides realizing the recognition analysis of images. However, for natural language, especially chinese, natural language problems are often flexible and variable, and the organization of information in a resource database is also complex, so that it is a challenging task to effectively extract features to calculate the semantic relatedness between candidate information and natural language problems. Especially, the natural language has the problems of dissimilarity of the same text, and the like, and when the natural language analysis model faces text data with ambiguity, the real meaning of the text cannot be accurately identified. So that the analysis accuracy of the natural language analysis model for the text data is lowered.
Based on the method and the system, the application discloses a natural language processing method and a system based on deep learning, which are used for improving the accuracy of a natural language analysis model in analyzing text data.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The method of the present application may be applied to a server, a device, a terminal, or other devices having logic processing capabilities, and the present application is not limited thereto. For convenience of description, the following description will take an execution body as an example of a terminal.
Referring to fig. 1, the present application provides an embodiment of a deep learning-based natural language processing method, which includes:
101. Acquiring natural language audio information, N sections of natural language text information, a semantic meaning association table, a text semantic analysis model and a voice semantic analysis model, wherein the N sections of natural language text information have corresponding audio paragraphs in the natural language audio information, and the semantic meaning association table comprises association degrees among different semanteme and semantic meaning;
In this embodiment, first, natural language audio information, N-segment natural language text information, a semantic meaning association table, a text semantic analysis model, and a speech semantic analysis model are acquired.
The natural language audio information is N segments of natural language dialogue data, and the N segments of natural language text information is text data corresponding to the N segments of natural language dialogue data. In this step, the N-segment natural language dialogue data may also be converted into N-segment natural language text information by a speech recognition algorithm. Natural language audio information and N pieces of natural language text information are artificially designed, such as chinese hearing, including audio as well as text.
In this embodiment, the semantic meaning association table includes different semantics and degrees of association between the semantics, where the semantics are information expressed by the text segment, and the semantics are context (emotion) of the audio text segment, for example: qi, peace, and principal etc., the meaning of the words is mainly determined by the audio tone etc. parameters of the audio, and in the prior art, the meaning is similar to the meaning of the text corresponding to the audio determined by the audio tone etc. parameters. While there is typically a correlation between semantic and semantic, natural language processing models can iteratively adjust the direction of the semantic based on the semantic of a segment of speech.
The text semantic analysis model is mainly used for sentence semantic analysis of text data, and the voice semantic analysis model is used for judging the semantic meaning in the dialogue of the voice semantic analysis model due to the analysis of the audio data.
102. Inputting the natural language text information into a text semantic analysis model for semantic analysis to generate a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of natural language text information;
The terminal inputs the natural language text information into a text semantic analysis model for semantic analysis to generate a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each piece of natural language text information, namely, semantic analysis exists in each piece of text, for example, the probability of the first sentence of meaning A is 70 percent, the probability of the first sentence of meaning B is 20 percent, and the whole of other meanings is 10 percent.
103. Inputting natural language audio information into a voice semantic analysis model to carry out semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of audio paragraph;
the terminal inputs the natural language audio information into a voice semantic analysis model to carry out semantic analysis, a semantic analysis probability set is generated, the semantic analysis probability set comprises semantic distribution probability of each section of audio paragraph, the semantic distribution probability comprises context analysis of each section of audio, for example, the probability that the context of the first sentence is mild is step 80, and the whole of other contexts is 20 percent.
104. Determining ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set;
the terminal determines ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set, and specifically needs to judge according to the semantic distribution probability of each sentence and the semantic distribution probability corresponding to each sentence.
105. Generating at least two semantic enhancement tags for the ambiguous text information using the semantic association table, the semantic analysis probability set and the semantic analysis probability set;
The terminal generates at least two semantic enhancement tags for the ambiguous text information by using the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set, namely, determining only a plurality of semantics which can most probably correspond to the text information according to the semantics.
106. Combining at least two semantic enhancement tags with the ambiguous text information to generate at least two enhanced text samples;
and the terminal combines the at least two semantic enhancement tags and the ambiguous text information to generate at least two enhancement text samples.
Specifically, each enhanced text sample contains an ambiguous text message and a semantic enhanced label, and the combination mode is as follows:
let the ambiguous text information be DIFFERENT MEANINGS-texts, with one semantic enhanced tag sum being strengthen _labes.
dataset=[(different meanings-texts,strengthen_labels) for different meanings-texts,strengthen_labels in zip(different meanings-texts,strengthen_labels)].
107. Re-inputting at least two enhanced text samples into a text semantic analysis model for semantic analysis, and generating semantic analysis distribution probabilities of the at least two enhanced text samples;
108. determining semantic analysis results of the ambiguous text information according to the semantic analysis distribution probabilities of at least two enhanced text samples, and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set.
And finally, re-inputting the at least two enhanced text samples into a text semantic analysis model for semantic analysis, and generating semantic analysis distribution probabilities of the at least two enhanced text samples. The terminal determines semantic analysis results of ambiguous text information according to semantic analysis distribution probabilities of at least two enhanced text samples, analyzes semantic analysis results of other natural language text information according to semantic analysis probability sets, namely, at least two enhanced text input text semantic analysis models are subjected to semantic analysis to obtain semantic analysis distribution probabilities of at least two enhanced text samples, and then the maximum semantic probability value of which of the at least two semantic analysis distribution probabilities is larger than a preset threshold value is compared, and if the maximum semantic probability value is larger than the preset threshold value, the semantic is determined to be the semantic of the ambiguous text information. If both meet the preset threshold, the maximum is selected.
In this embodiment, first, natural language audio information, N-segment natural language text information, a semantic meaning association table, a text semantic analysis model, and a speech semantic analysis model are acquired. The natural language audio information is N segments of natural language dialogue data, and the N segments of natural language text information is text data corresponding to the N segments of natural language dialogue data. In this step, the N-segment natural language dialogue data may also be converted into N-segment natural language text information by a speech recognition algorithm. Natural language audio information and N pieces of natural language text information are artificially designed, such as chinese hearing, including audio as well as text. The semantic meaning association table includes the degree of association between different semantics, i.e., the information expressed by the text segment, and the semantic meaning, i.e., the context (emotion) of the audio text segment, for example: qi, peace, and principal etc., the meaning of the words is mainly determined by the audio tone etc. parameters of the audio, and in the prior art, the meaning is similar to the meaning of the text corresponding to the audio determined by the audio tone etc. parameters. While there is typically a correlation between semantic and semantic, natural language processing models can iteratively adjust the direction of the semantic based on the semantic of a segment of speech.
Inputting the natural language text information into a text semantic analysis model for semantic analysis to generate a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each piece of natural language text information. Inputting natural language audio information into a voice semantic analysis model to carry out semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of audio paragraph;
And determining the ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set. And judging which sentence of text has the semantic analysis probability which does not reach the preset height through the semantic analysis probability set, and judging the text as an ambiguous sentence.
Next, at least two semantic enhanced labels are generated for the ambiguous text information using the semantic association table, the semantic analysis probability set, and the semantic analysis probability set. Namely, judging which semantic meaning of the segment words is more matched, and generating the semantic enhancement tag. And combining the at least two semantically enhanced labels with the ambiguous text information to generate at least two enhanced text samples. And then re-inputting the at least two enhanced text samples into a text semantic analysis model for semantic analysis, and generating semantic analysis distribution probabilities of the at least two enhanced text samples. The current semantic analysis distribution probability is enhanced for each semantic, and the probability of the enhanced semantic correspondence is greatly increased. And finally, determining semantic analysis results of the ambiguous text information according to semantic analysis distribution probabilities of at least two enhanced text samples, and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set.
By combining the traditional text semantic analysis model and the voice semantic analysis model, semantic meaning is enhanced, and the accuracy of analyzing text data by the natural language analysis model is improved.
Referring to fig. 2, 3, 4 and 5, the present application provides an embodiment of a deep learning-based natural language processing method, which includes:
201. Acquiring natural language audio information, N sections of natural language text information, a semantic meaning association table, a text semantic analysis model and a voice semantic analysis model, wherein the N sections of natural language text information have corresponding audio paragraphs in the natural language audio information, and the semantic meaning association table comprises association degrees among different semanteme and semantic meaning;
202. Inputting the natural language text information into a text semantic analysis model for semantic analysis to generate a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of natural language text information;
203. Inputting natural language audio information into a voice semantic analysis model to carry out semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of audio paragraph;
steps 201 to 203 in this embodiment are similar to steps 101 to 103 in the previous embodiment, and will not be repeated here.
204. Determining the maximum semantic value of the target natural language text information and the maximum semantic value of the target audio paragraph, wherein the audio paragraph corresponding to the target natural language text information in the natural language audio information is the target audio paragraph;
205. when the maximum semantic value is smaller than a first preset probability value, determining that the target natural language text information is ambiguous text information;
206. When the maximum semantic value is smaller than a second preset probability value and larger than the first preset probability value, determining the degree of association between the semantic corresponding to the maximum semantic value and the semantic corresponding to the maximum semantic value according to the semantic association table, wherein the second preset probability value is larger than the first preset probability value;
207. When the association degree is not greater than a first preset association value, determining that the target natural language text information is ambiguous text information;
In this embodiment, the terminal first determines the maximum semantic value of the target natural language text information and the maximum semantic value of the target audio paragraph, and determines that the target natural language text information is ambiguous text information when the maximum semantic value is smaller than a first preset probability value (assuming 50 percent), because the semantic cannot be analyzed at all at this time, and the sentence is ambiguous text information.
When the maximum semantic value is smaller than the second preset probability value (assuming 80 percent) and larger than the first preset probability value (assuming 50 percent), the maximum semantic value is indicated to have certain credibility, and a basis needs to be added from a point according to the semantic. At this time, the degree of association between the semantic meaning corresponding to the maximum semantic value and the semantic meaning corresponding to the maximum semantic value is determined according to the semantic meaning association table, namely, whether the semantic meaning can be matched with the semantic meaning is determined, if so, the semantic meaning is normal, and if not, the semantic meaning is ambiguous text information.
Note that, when the maximum semantic value is greater than 80 percent, it may be determined that the semantics match directly without reference to the semantics.
208. Performing initial sequencing on all ambiguous text information;
209. acquiring context information of the first ambiguous text information, wherein the context information is natural language text information closest to the first ambiguous text information;
210. When the ambiguous texts in the context information reach the preset quantity, delaying the ambiguous analysis of the first ambiguous text information, and sequentially analyzing the context information for each ambiguous text information until the reordering is completed;
in this embodiment, the terminal performs sorting according to the sequence, and because the ambiguous text information needs to use semantic information of adjacent sentences in the analysis room, if the upper sentence and the lower sentence of the ambiguous text information are also ambiguous text information, priority judgment cannot be performed, and the ambiguous text information with good judgment needs to be analyzed.
When the ambiguous text in the context information reaches the preset quantity, the terminal delays the ambiguous analysis of the first ambiguous text information, and sequentially analyzes the context information for each ambiguous text information until the reordering is completed.
211. Determining M ambiguous semantics with the largest semantic probability in the ambiguous text information and M ambiguous probabilities corresponding to the M ambiguous semantics according to the semantic distribution probability, wherein M is greater than or equal to 2;
212. determining natural language text information adjacent to the ambiguous text information;
213. Determining the maximum reference semantic meaning of adjacent natural language text information in semantic meaning distribution probability according to the semantic meaning analysis probability set;
214. The relevancy coefficient is determined according to the semantic association table, the reference semantic meaning and the ambiguity semantic meaning;
215. determining context location information of adjacent natural language text information relative to ambiguous text information;
216. Determining text length information of adjacent natural language text information;
217. determining attribution information of adjacent natural language text information and ambiguous text information;
218. generating a attention coefficient set according to the context position information, the text length information and the attribution information, wherein the attention coefficient set comprises attention coefficients of adjacent natural language text information and attention coefficients of ambiguous text information;
219. generating at least two semantic enhancement tags according to the M ambiguity probabilities, the semantic analysis probability set, the relevance coefficient and the attention coefficient set;
And the terminal determines M ambiguous semantics with the largest semantic probability in the ambiguous text information according to the semantic distribution probability, and M ambiguous probabilities corresponding to the M ambiguous semantics, wherein M is greater than or equal to 2. I.e. selecting the largest possible few semantics and determining their probability, e.g.: the semantic distribution probability is (pa=0.5, pb=0.4, p0=0.1), where PA is the probability value of semantic a, PB is the probability value of semantic B, and P0 is the probability value of other semantics.
Next, the terminal determines the natural language text information adjacent to the ambiguous text information, i.e. selects the first few sentences, the last few sentences or the first few sentences and the last few sentences of the text information, and in this embodiment, includes the ambiguous text information C, the first two sentences DE and the last two sentences FG.
And then, the terminal determines the maximum reference semantic meaning of the adjacent natural language text information in the semantic meaning distribution probability according to the semantic meaning analysis probability set. Specific ambiguous text information C has probability p3=0.7 of maximum reference semantic H, probability p1=0.6 of maximum reference semantic I of d sentence, probability p2=0.6 of maximum reference semantic J of e sentence, probability p4=0.7 of maximum reference semantic K of f sentence, and probability p5=0.7 of maximum reference semantic L of g sentence.
And the terminal determines the relevance coefficient according to the semantic meaning relevance table, the reference semantic meaning and the ambiguity semantic meaning A and B. Traversing the semantic meaning association table to determine the association of the ambiguous semantics A and B with the maximum semantic HIJKL in five sentences, for example: the association coefficient of the ambiguous semantic A and the maximum semantic HIJKL in five sentences is obtained by looking up a table、、、、The association coefficient of the ambiguous semantic A and the maximum semantic HIJKL in the five sentences CDEFG is obtained by looking up a table、、、、. Wherein the correlation coefficient is positive and negative.
Then, the terminal determines the context position information of the adjacent natural language text information relative to the ambiguous text information, and then determines the text length information of the adjacent natural language text information. And determining the attribution information of the adjacent natural language text information and the ambiguous text information.
The terminal generates a attention coefficient set according to the context position information, the text length information and the attribution information, wherein the attention coefficient set comprises attention coefficients of adjacent natural language text information and attention coefficients of ambiguous text information. The method aims at setting the attention coefficient larger as the attention coefficient of the ambiguous text information is closer to the context position information, setting the attention coefficient larger as the text length is longer, wherein the attribution information indicates that the ambiguous text information is output by a first utterance, the first two sentences DE are output by a second utterance, the second two sentences FG are output by the first utterance, and the attribution of the second two sentences FG to one text information is strong. The stronger the attribution, the greater the attention coefficient. The attention coefficient is set by artificial experience.
Finally generating attention coefficients of the ambiguous text information C, the first two sentences DE and the second two sentences FG、、、、。
Finally, the terminal generates at least two semantic enhancement tags according to M ambiguity probabilities, a semantic analysis probability set, a relevance coefficient and a attention coefficient set, and the specific generation mode is described below to correct the semantic PA of the semantic A:
it should be noted that, the occurrence probability of each new ambiguity semantic may be directly used as a probability distribution soft tag, or a parameter obtained by performing association processing on the occurrence probability of each classification may be used as a probability distribution soft tag.
220. Combining at least two semantic enhancement tags with the ambiguous text information to generate at least two enhanced text samples;
221. Re-inputting at least two enhanced text samples into a text semantic analysis model for semantic analysis, and generating semantic analysis distribution probabilities of the at least two enhanced text samples;
222. Determining semantic analysis results of the ambiguous text information according to semantic analysis distribution probabilities of at least two enhanced text samples, and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set;
steps 220 to 222 in this embodiment are similar to steps 106 to 106 in the previous embodiment, and are not repeated here.
223. Determining the maximum target semantic analysis probability of the semantic analysis distribution probabilities of at least two enhanced text samples as the target distribution of the ambiguous text information;
224. Calculating a loss value between the target semantic analysis probability and the semantic distribution probability of the ambiguous text information;
225. Optimizing a text semantic analysis model in a back propagation iteration mode through the loss value;
In this embodiment, the terminal may perform model training by using natural language audio information and N-segment natural language text information, determine a maximum target semantic analysis probability of semantic analysis distribution probabilities of at least two enhanced text samples as a target distribution of ambiguous text information, then calculate a loss value between the target semantic analysis probability and the semantic distribution probability of the ambiguous text information, update parameters of the text semantic analysis model by the loss value, and optimize the text semantic analysis model by the terminal in a back propagation iteration manner, so as to complete training.
It should be noted that, the natural language audio information and the N-segment natural language text information are designed artificially, for example, chinese hearing, and include audio and text. Such samples can be used not only to detect the functionality of the model, but also to train with it to achieve more excellent levels of analysis.
226. Acquiring a section of natural language data of a user through a sound collector, and performing voice-to-text processing on the natural language information to generate a section of text to be analyzed;
227. inputting the text to be analyzed into a text semantic analysis model for semantic analysis, and generating real-time semantic distribution probability;
228. when the real-time semantic distribution probability cannot determine the semantic analysis result, inputting natural language data into a voice semantic analysis model for semantic analysis, and generating a real-time semantic analysis probability;
229. Generating at least two real-time semantic enhancement tags for the text to be analyzed according to the real-time semantic distribution probability, the real-time semantic analysis probability and the semantic association table;
230. Combining at least two real-time semantic enhancement tags with the text to be analyzed to generate at least two real-time enhancement text samples;
231. Re-inputting at least two real-time enhanced text samples into a text semantic analysis model for semantic analysis, and generating real-time semantic analysis distribution probabilities of the at least two real-time enhanced text samples;
232. And determining the semantic analysis result of the text to be analyzed according to the real-time semantic analysis distribution probability of at least two real-time enhanced text samples.
In this embodiment, besides analyzing samples of an artificial design, real-time dialogue can be analyzed, specifically, a section of natural language data of a user needs to be acquired by using a sound collector, voice-to-text processing is performed on the natural language information, a section of text to be analyzed is generated, the text to be analyzed can be input into a text semantic analysis model for semantic analysis, and real-time semantic distribution probability is generated. If the real-time semantic distribution probability cannot determine the semantic analysis result, inputting the natural language data into the voice semantic analysis model for semantic analysis to generate the real-time semantic analysis probability, and specifically inputting the natural language data into the voice semantic analysis model for semantic analysis to generate the real-time semantic analysis probability by matching with the voice semantic analysis model. And then the terminal generates at least two real-time semantic enhancement tags for the text to be analyzed according to the real-time semantic distribution probability, the real-time semantic analysis probability and the semantic relation table, and combines the at least two real-time semantic enhancement tags with the text to be analyzed to generate at least two real-time enhancement text samples. And re-inputting the at least two real-time enhanced text samples into a text semantic analysis model for semantic analysis, and generating real-time semantic analysis distribution probabilities of the at least two real-time enhanced text samples. And determining the semantic analysis result of the text to be analyzed according to the real-time semantic analysis distribution probability of at least two real-time enhanced text samples. This step is similar to the steps 103 to 108 described above, and will not be described here.
Referring to FIG. 6, the present application provides one embodiment of a deep learning based natural language processing system, comprising:
A first obtaining unit 601, configured to obtain natural language audio information, N-segment natural language text information, a semantic meaning association table, a text semantic analysis model, and a speech semantic analysis model, where the N-segment natural language text information has a corresponding audio paragraph in the natural language audio information, and the semantic meaning association table includes associations between different semantics and semantic meanings;
A first generation unit 602, configured to input natural language text information into a text semantic analysis model for semantic analysis, and generate a semantic analysis probability set, where the semantic analysis probability set includes semantic distribution probabilities of each piece of natural language text information;
A second generating unit 603, configured to input natural language audio information into a speech semantic analysis model for semantic analysis, and generate a semantic analysis probability set, where the semantic analysis probability set includes a semantic distribution probability of each audio paragraph;
A first determining unit 604, configured to determine ambiguous text information according to the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set;
A third generating unit 605 for generating at least two semantic enhancement tags for the ambiguous text information using the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set;
a fourth generating unit 606, configured to combine at least two semantic enhancement tags and ambiguous text information to generate at least two enhanced text samples;
A fifth generating unit 607, configured to re-input at least two enhanced text samples into the text semantic analysis model for semantic analysis, and generate semantic analysis distribution probabilities of the at least two enhanced text samples;
A second determining unit 608, configured to determine a semantic analysis result of the ambiguous text information according to the semantic analysis distribution probabilities of the at least two enhanced text samples, and analyze the semantic analysis results of the other natural language text information according to the semantic analysis probability set.
Referring to fig. 7, the present application provides an embodiment of a deep learning-based natural language processing system, comprising:
A first obtaining unit 701, configured to obtain natural language audio information, N-segment natural language text information, a semantic meaning association table, a text semantic analysis model, and a speech semantic analysis model, where the N-segment natural language text information has a corresponding audio paragraph in the natural language audio information, and the semantic meaning association table includes associations between different semantics and semantic meanings;
A first generating unit 702, configured to input the natural language text information into a text semantic analysis model for semantic analysis, and generate a semantic analysis probability set, where the semantic analysis probability set includes a semantic distribution probability of each piece of natural language text information;
A second generating unit 703, configured to input natural language audio information into a speech semantic analysis model for semantic analysis, and generate a semantic analysis probability set, where the semantic analysis probability set includes a semantic distribution probability of each audio paragraph;
A first determining unit 704, configured to determine ambiguous text information according to the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set;
optionally, the first determining unit 704 includes:
Determining the maximum semantic value of the target natural language text information and the maximum semantic value of the target audio paragraph, wherein the audio paragraph corresponding to the target natural language text information in the natural language audio information is the target audio paragraph;
When the maximum semantic value is smaller than a first preset probability value, determining that the target natural language text information is ambiguous text information;
When the maximum semantic value is smaller than a second preset probability value and larger than the first preset probability value, determining the degree of association between the semantic corresponding to the maximum semantic value and the semantic corresponding to the maximum semantic value according to the semantic association table, wherein the second preset probability value is larger than the first preset probability value;
And when the association degree is not greater than a first preset association value, determining the target natural language text information as the ambiguous text information.
A first sorting unit 705, configured to perform initial sorting on all ambiguous text information;
a second obtaining unit 706, configured to obtain context information of the first ambiguous text information, where the context information is natural language text information closest to the first ambiguous text information;
a second sorting unit 707, configured to delay the ambiguity analysis of the first ambiguous text information when the ambiguous text in the context information reaches a preset number, and sequentially perform the analysis of the context information on each ambiguous text information until the reordering is completed;
A third generating unit 708, configured to generate at least two semantic enhancement tags for the ambiguous text information using the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set;
optionally, the third generating unit 708 includes:
a first determining module 7081, configured to determine, according to the semantic distribution probability, M ambiguous semantics having the largest semantic probability in the ambiguous text information, and M ambiguous probabilities corresponding to the M ambiguous semantics, where M is greater than or equal to 2;
A second determining module 7082 for determining natural language text information adjacent to the ambiguous text information;
A third determining module 7083, configured to determine, according to the semantic analysis probability set, a reference semantic meaning of the adjacent natural language text information that is the largest in the semantic distribution probability;
A fourth determining module 7084, configured to determine a relevance coefficient according to the semantic meaning association table, the reference semantic meaning, and the ambiguous semantic meaning;
a first generating module 7085, configured to generate, according to adjacent natural language text information, a attention coefficient set, where the attention coefficient set includes an attention coefficient of the adjacent natural language text information and an attention coefficient of ambiguous text information;
optionally, the first generating module 7085 includes:
determining context location information of adjacent natural language text information relative to ambiguous text information;
determining text length information of adjacent natural language text information;
Determining attribution information of adjacent natural language text information and ambiguous text information;
a set of attention coefficients is generated from the contextual location information, the text length information, and the attribution information.
A second generating module 7086, configured to generate at least two semantic enhancement tags according to the M ambiguity probabilities, the semantic analysis probability set, the association coefficient, and the attention coefficient set.
A fourth generating unit 709 for combining at least two semantic enhanced labels and ambiguous text information to generate at least two enhanced text samples;
a fifth generating unit 710, configured to re-input at least two enhanced text samples into the text semantic analysis model for semantic analysis, and generate semantic analysis distribution probabilities of the at least two enhanced text samples;
a second determining unit 711, configured to determine a semantic analysis result of the ambiguous text information according to semantic analysis distribution probabilities of at least two enhanced text samples, and analyze semantic analysis results of other natural language text information according to a semantic analysis probability set;
A third determining unit 712, configured to determine a maximum target semantic analysis probability among semantic analysis distribution probabilities of at least two enhanced text samples as a target distribution of ambiguous text information;
A calculation unit 713 for calculating a loss value between the target semantic analysis probability and the semantic distribution probability of the ambiguous text information;
an updating unit 714 for optimizing the text semantic analysis model in a back propagation iterative manner by means of the penalty values;
A third obtaining unit 715, configured to obtain a section of natural language data of the user through the sound collector, perform a voice-to-text processing on the natural language information, and generate a section of text to be analyzed;
A sixth generating unit 716, configured to input the text to be analyzed into a text semantic analysis model for semantic analysis, and generate a real-time semantic distribution probability;
a seventh generating unit 717 for inputting the natural language data into the voice semantic analysis model for semantic analysis when the real-time semantic distribution probability cannot determine the semantic analysis result, and generating a real-time semantic analysis probability;
an eighth generating unit 718, configured to generate at least two real-time semantic enhancement tags for the text to be analyzed according to the real-time semantic distribution probability, the real-time semantic analysis probability, and the semantic association table;
a ninth generating unit 719, configured to combine the at least two real-time semantic enhancement tags and the text to be analyzed to generate at least two real-time enhanced text samples;
a tenth generating unit 720, configured to re-input at least two real-time enhanced text samples into the text semantic analysis model for semantic analysis, and generate real-time semantic analysis distribution probabilities of the at least two real-time enhanced text samples;
A fourth determining unit 721, configured to determine a semantic analysis result of the text to be analyzed according to the real-time semantic analysis distribution probabilities of at least two real-time enhanced text samples.
Referring to fig. 8, the present application provides a natural language processing system based on deep learning, comprising:
A processor 801, a memory 803, an input output unit 802, and a bus 804.
The processor 801 is connected to a memory 803, an input/output unit 802, and a bus 804.
The memory 803 holds a program, and the processor 801 calls the program to execute the natural language processing method as in fig. 1,2, 3,4, and 5.
The present application provides a computer-readable storage medium having a program stored thereon, which when executed on a computer performs a natural language processing method as in fig. 1,2,3, 4, and 5.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM, random access memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Claims (4)
1. A natural language processing method based on deep learning, comprising:
acquiring natural language audio information, N sections of natural language text information, a semantic meaning association table, a text semantic analysis model and a voice semantic analysis model, wherein the N sections of natural language text information have corresponding audio paragraphs in the natural language audio information, and the semantic meaning association table comprises association degrees among different semantics and semantic meanings;
Inputting the natural language text information into the text semantic analysis model for semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of natural language text information;
Inputting the natural language audio information into the voice semantic analysis model for semantic analysis, and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each audio paragraph;
Determining a maximum semantic value of target natural language text information and a maximum semantic value of a target audio paragraph, wherein the audio paragraph corresponding to the target natural language text information in the natural language audio information is the target audio paragraph;
When the maximum semantic value is smaller than a first preset probability value, determining that the target natural language text information is ambiguous text information;
When the maximum semantic value is smaller than a second preset probability value and larger than a first preset probability value, determining the degree of association between the semantic corresponding to the maximum semantic value and the semantic corresponding to the maximum semantic value according to the semantic association table, wherein the second preset probability value is larger than the first preset probability value;
When the association degree is not greater than a first preset association value, determining that the target natural language text information is ambiguous text information;
Determining M ambiguous semantics with the largest semantic probability in the ambiguous text information and M ambiguous probabilities corresponding to the M ambiguous semantics according to the semantic distribution probability, wherein M is greater than or equal to 2;
determining natural language text information adjacent to the ambiguous text information;
determining the maximum reference semantic meaning of the adjacent natural language text information in semantic meaning distribution probability according to the semantic meaning analysis probability set;
The relevance coefficient is determined according to the semantic meaning association table, the reference semantic meaning and the ambiguity semantic meaning;
Generating a attention coefficient set according to the adjacent natural language text information, wherein the attention coefficient set comprises attention coefficients of the adjacent natural language text information and attention coefficients of ambiguous text information;
generating at least two semantic enhancement tags according to the M ambiguity probabilities, the semantic analysis probability set, the relevance coefficient and the attention coefficient set;
Combining the at least two semantic enhancement tags with the ambiguous text information to generate at least two enhanced text samples;
Re-inputting the at least two enhanced text samples into the text semantic analysis model for semantic analysis, and generating semantic analysis distribution probabilities of the at least two enhanced text samples;
Determining semantic analysis results of the ambiguous text information according to the semantic analysis distribution probabilities of the at least two enhanced text samples, and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set;
determining the maximum target semantic analysis probability of the semantic analysis distribution probabilities of the at least two enhanced text samples as the target distribution of the ambiguous text information;
calculating a loss value between the target semantic analysis probability and the semantic distribution probability of the ambiguous text information;
Optimizing the text semantic analysis model in a back propagation iterative manner by the loss value;
acquiring a section of natural language data of a user through a sound collector, and performing voice-to-word processing on the natural language information to generate a section of text to be analyzed;
Inputting the text to be analyzed into the text semantic analysis model for semantic analysis, and generating real-time semantic distribution probability;
When the real-time semantic distribution probability cannot determine a semantic analysis result, inputting the natural language data into the voice semantic analysis model for semantic analysis, and generating a real-time semantic analysis probability;
generating at least two real-time semantic enhancement tags for the text to be analyzed according to the real-time semantic distribution probability, the real-time semantic analysis probability and the semantic correlation table;
Combining the at least two real-time semantic enhancement tags with the text to be analyzed to generate at least two real-time enhanced text samples;
Re-inputting the at least two real-time enhanced text samples into the text semantic analysis model for semantic analysis, and generating real-time semantic analysis distribution probabilities of the at least two real-time enhanced text samples;
And determining the semantic analysis result of the text to be analyzed according to the real-time semantic analysis distribution probability of the at least two real-time enhanced text samples.
2. The method of claim 1, wherein generating a set of attention coefficients from the adjacent natural language text information comprises:
Determining contextual location information of the adjacent natural language text information relative to the ambiguous text information;
determining text length information of the adjacent natural language text information;
Determining attribution information of the adjacent natural language text information and the ambiguous text information;
and generating an attention coefficient set according to the context position information, the text length information and the attribution information.
3. The natural language processing method of claim 1, wherein after determining ambiguous text information from the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set, before generating at least two semantic enhancement tags for the ambiguous text information using the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set, the natural language processing method further comprises:
performing initial sequencing on all ambiguous text information;
Acquiring context information of first ambiguous text information, wherein the context information is natural language text information closest to the first ambiguous text information;
And when the ambiguous texts in the context information reach the preset quantity, delaying the ambiguous analysis of the first ambiguous text information, and sequentially analyzing the context information for each ambiguous text information until the reordering is completed.
4. A deep learning-based natural language processing system, comprising:
The first acquisition unit is used for acquiring natural language audio information, N sections of natural language text information, a semantic meaning association table, a text semantic analysis model and a voice semantic analysis model, wherein the N sections of natural language text information have corresponding audio paragraphs in the natural language audio information, and the semantic meaning association table comprises association degrees among different semanteme and semantic meaning;
The first generation unit is used for inputting the natural language text information into the text semantic analysis model for semantic analysis and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each section of natural language text information;
the second generation unit is used for inputting the natural language audio information into the voice semantic analysis model to carry out semantic analysis and generating a semantic analysis probability set, wherein the semantic analysis probability set comprises semantic distribution probability of each audio paragraph;
the first determining unit is used for determining ambiguous text information according to the semantic meaning association table, the semantic analysis probability set and the semantic analysis probability set;
A first determination unit including:
Determining a maximum semantic value of target natural language text information and a maximum semantic value of a target audio paragraph, wherein the audio paragraph corresponding to the target natural language text information in the natural language audio information is the target audio paragraph;
When the maximum semantic value is smaller than a first preset probability value, determining that the target natural language text information is ambiguous text information;
When the maximum semantic value is smaller than a second preset probability value and larger than a first preset probability value, determining the degree of association between the semantic corresponding to the maximum semantic value and the semantic corresponding to the maximum semantic value according to the semantic association table, wherein the second preset probability value is larger than the first preset probability value;
When the association degree is not greater than a first preset association value, determining that the target natural language text information is ambiguous text information;
a third generating unit, configured to generate at least two semantic enhancement tags for the ambiguous text information using the semantic meaning association table, the semantic analysis probability set, and the semantic analysis probability set;
A third generation unit including:
The first determining module is used for determining M ambiguous semantics with the largest semantic probability in the ambiguous text information according to the semantic distribution probability, and M ambiguous probabilities corresponding to the M ambiguous semantics, wherein M is greater than or equal to 2;
The second determining module is used for determining natural language text information adjacent to the ambiguous text information;
The third determining module is used for determining the reference semantic meaning of the adjacent natural language text information with the largest semantic meaning distribution probability according to the semantic meaning analysis probability set;
The fourth determining module is used for determining a relevance coefficient according to the semantic meaning relevance table, the reference semantic meaning and the ambiguity semantic meaning;
The first generation module is used for generating a attention coefficient set according to the adjacent natural language text information, wherein the attention coefficient set comprises attention coefficients of the adjacent natural language text information and attention coefficients of ambiguous text information;
the second generation module is used for generating at least two semantic enhancement tags according to the M ambiguity probabilities, the semantic analysis probability set, the relevance coefficient and the attention coefficient set;
a fourth generating unit, configured to combine the at least two semantic enhancement tags and the ambiguous text information to generate at least two enhanced text samples;
a fifth generating unit, configured to re-input the at least two enhanced text samples into the text semantic analysis model for semantic analysis, and generate semantic analysis distribution probabilities of the at least two enhanced text samples;
The second determining unit is used for determining semantic analysis results of the ambiguous text information according to the semantic analysis distribution probabilities of the at least two enhanced text samples and analyzing the semantic analysis results of other natural language text information according to the semantic analysis probability set;
the third determining unit is used for determining the largest target semantic analysis probability among the semantic analysis distribution probabilities of at least two enhanced text samples as the target distribution of the ambiguous text information;
the calculating unit is used for calculating a loss value between the target semantic analysis probability and the semantic distribution probability of the ambiguous text information;
the updating unit is used for optimizing the text semantic analysis model in a back propagation iteration mode through the loss value;
the third acquisition unit is used for acquiring a section of natural language data of a user through the sound collector, performing voice-to-text processing on the natural language information, and generating a section of text to be analyzed;
The sixth generation unit is used for inputting the text to be analyzed into the text semantic analysis model for semantic analysis and generating real-time semantic distribution probability;
The seventh generation unit is used for inputting the natural language data into the voice semantic analysis model for semantic analysis when the real-time semantic distribution probability cannot determine the semantic analysis result, and generating the real-time semantic analysis probability;
the eighth generation unit is used for generating at least two real-time semantic enhancement tags for the text to be analyzed according to the real-time semantic distribution probability, the real-time semantic analysis probability and the semantic relation table;
a ninth generating unit, configured to combine at least two real-time semantic enhancement tags and the text to be analyzed to generate at least two real-time enhanced text samples;
a tenth generation unit, configured to re-input at least two real-time enhanced text samples into the text semantic analysis model for semantic analysis, and generate real-time semantic analysis distribution probabilities of the at least two real-time enhanced text samples;
And the fourth determining unit is used for determining the semantic analysis result of the text to be analyzed according to the real-time semantic analysis distribution probability of at least two real-time enhanced text samples.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410288968.2A CN117892735B (en) | 2024-03-14 | 2024-03-14 | Deep learning-based natural language processing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410288968.2A CN117892735B (en) | 2024-03-14 | 2024-03-14 | Deep learning-based natural language processing method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117892735A CN117892735A (en) | 2024-04-16 |
CN117892735B true CN117892735B (en) | 2024-07-02 |
Family
ID=90644425
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410288968.2A Active CN117892735B (en) | 2024-03-14 | 2024-03-14 | Deep learning-based natural language processing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117892735B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115495552A (en) * | 2022-09-16 | 2022-12-20 | 中国人民解放军国防科技大学 | Multi-round dialogue reply generation method and terminal equipment based on dual-channel semantic enhancement |
CN117350298A (en) * | 2023-09-26 | 2024-01-05 | 中国联合网络通信集团有限公司 | Method, device and storage medium for determining target semantic information |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7734623B2 (en) * | 2006-11-07 | 2010-06-08 | Cycorp, Inc. | Semantics-based method and apparatus for document analysis |
CN101178705A (en) * | 2007-12-13 | 2008-05-14 | 中国电信股份有限公司 | Free-running speech comprehend method and man-machine interactive intelligent system |
US10726831B2 (en) * | 2014-05-20 | 2020-07-28 | Amazon Technologies, Inc. | Context interpretation in natural language processing using previous dialog acts |
US9734455B2 (en) * | 2015-11-04 | 2017-08-15 | Zoox, Inc. | Automated extraction of semantic information to enhance incremental mapping modifications for robotic vehicles |
CN108052506B (en) * | 2017-12-28 | 2021-06-29 | Oppo广东移动通信有限公司 | Natural language processing method, device, storage medium and electronic device |
CN108417227B (en) * | 2018-02-12 | 2019-10-25 | 口碑(上海)信息技术有限公司 | Voice-based resource allocation method and system |
EP3828731A1 (en) * | 2019-11-26 | 2021-06-02 | Siemens Aktiengesellschaft | A method and analytical engine for a semantic analysis of textual data |
CN111611452B (en) * | 2020-05-22 | 2023-05-02 | 上海携程商务有限公司 | Method, system, equipment and storage medium for identifying ambiguity of search text |
CN112071304B (en) * | 2020-09-08 | 2024-03-15 | 深圳市天维大数据技术有限公司 | Semantic analysis method and device |
CN113779987A (en) * | 2021-08-23 | 2021-12-10 | 科大国创云网科技有限公司 | Event co-reference disambiguation method and system based on self-attention enhanced semantics |
CN113704416B (en) * | 2021-10-26 | 2022-03-04 | 深圳市北科瑞声科技股份有限公司 | Word sense disambiguation method and device, electronic equipment and computer-readable storage medium |
CN113901836B (en) * | 2021-11-16 | 2024-09-17 | 东莞理工学院 | Word sense disambiguation method and device based on context semantics and related equipment |
CN114662500A (en) * | 2022-03-18 | 2022-06-24 | 支付宝(杭州)信息技术有限公司 | Man-machine interaction method and device and electronic equipment |
CN117496960A (en) * | 2023-07-27 | 2024-02-02 | 马上消费金融股份有限公司 | Training method and device of voice recognition model, electronic equipment and storage medium |
-
2024
- 2024-03-14 CN CN202410288968.2A patent/CN117892735B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115495552A (en) * | 2022-09-16 | 2022-12-20 | 中国人民解放军国防科技大学 | Multi-round dialogue reply generation method and terminal equipment based on dual-channel semantic enhancement |
CN117350298A (en) * | 2023-09-26 | 2024-01-05 | 中国联合网络通信集团有限公司 | Method, device and storage medium for determining target semantic information |
Also Published As
Publication number | Publication date |
---|---|
CN117892735A (en) | 2024-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108829757B (en) | Intelligent service method, server and storage medium for chat robot | |
CN109241255B (en) | An Intent Recognition Method Based on Deep Learning | |
CN110472043B (en) | Clustering method and device for comment text | |
WO2021047180A1 (en) | Emotion recognition-based smart chat method, device, and computer apparatus | |
CN113254643B (en) | Text classification method and device, electronic equipment and text classification program | |
CN110362819A (en) | Text emotion analysis method based on convolutional neural networks | |
CN113505200A (en) | Sentence-level Chinese event detection method combining document key information | |
CN111161726B (en) | Intelligent voice interaction method, device, medium and system | |
CN115312033A (en) | Speech emotion recognition method, device, equipment and medium based on artificial intelligence | |
CN116483979A (en) | Dialog model training method, device, equipment and medium based on artificial intelligence | |
CN111522953B (en) | Marginal attack method and device for naive Bayes classifier and storage medium | |
CN112528653A (en) | Short text entity identification method and system | |
CN111401069A (en) | Intention recognition method and intention recognition device for conversation text and terminal | |
CN118133829B (en) | Small sample named entity recognition method | |
CN112597299A (en) | Text entity classification method and device, terminal equipment and storage medium | |
CN113065350A (en) | Biomedical text word sense disambiguation method based on attention neural network | |
CN117892735B (en) | Deep learning-based natural language processing method and system | |
CN110347807B (en) | Problem information processing method and device | |
CN112632956A (en) | Text matching method, device, terminal and storage medium | |
CN115859999B (en) | Intention recognition method, device, electronic equipment and storage medium | |
CN116978367A (en) | Speech recognition method, device, electronic equipment and storage medium | |
CN114974310A (en) | Emotion recognition method and device based on artificial intelligence, computer equipment and medium | |
CN113571041A (en) | Method and device for processing voice recognition text and electronic equipment | |
CN113096649B (en) | Voice prediction method, device, electronic equipment and storage medium | |
CN113254658B (en) | Text information processing method, system, medium, and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |