CN112749565A - Semantic recognition method and device based on artificial intelligence and semantic recognition equipment - Google Patents

Semantic recognition method and device based on artificial intelligence and semantic recognition equipment Download PDF

Info

Publication number
CN112749565A
CN112749565A CN201911056617.4A CN201911056617A CN112749565A CN 112749565 A CN112749565 A CN 112749565A CN 201911056617 A CN201911056617 A CN 201911056617A CN 112749565 A CN112749565 A CN 112749565A
Authority
CN
China
Prior art keywords
corpus
negative
training
value
corpora
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911056617.4A
Other languages
Chinese (zh)
Inventor
张晴
刘畅
杨瑞东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Device Co Ltd
Original Assignee
Huawei Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN201911056617.4A priority Critical patent/CN112749565A/en
Priority to US17/771,577 priority patent/US20220414340A1/en
Priority to PCT/CN2020/105908 priority patent/WO2021082570A1/en
Priority to EP20881934.2A priority patent/EP4030335A4/en
Publication of CN112749565A publication Critical patent/CN112749565A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3343Query execution using phonetics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5846Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using extracted text

Abstract

The embodiment of the application provides a semantic recognition method, a semantic recognition device and a semantic recognition device based on artificial intelligence, wherein in the semantic recognition method based on artificial intelligence, a pre-trained semantic recognition model is obtained by utilizing developers on a model training platform, for example: training the training corpus configured by the Bot platform and the negative corpus provided by the model training platform, wherein the negative corpus is extracted by mapping to a negative corpus set according to the coding value of the training corpus; therefore, the negative corpora are extracted according to the coding values of the training corpora, the randomization method for generating the negative corpora is changed into a stable method, and under the condition that the training corpora are not added, deleted or modified, the models obtained by two times or more of training are kept to have no obvious difference, so that the test corpora of developers have almost the same confidence coefficient (the difference is less than 0.01) in the models obtained by the multiple times of training, the accuracy fluctuation is reduced, and the experience of the developers is improved.

Description

Semantic recognition method and device based on artificial intelligence and semantic recognition equipment
Technical Field
The present application relates to the technical field of semantic recognition in artificial intelligence, and in particular, to a semantic recognition method, an apparatus and a semantic recognition device based on artificial intelligence.
Background
The man-machine interactive system is a new generation man-machine interactive interface, the Bot platform is a model training platform, and the Bot platform provides a platform with rapid capability construction for developers, supports the skills of rapidly constructing conversations for three-party business parties, and is used for interactive triggering of business functions of the three-party business parties. The Bot platform provides a one-touch trigger button for the developer to automatically train the developer to configure the skill model. When a developer retrains a model, the model obtained by retraining may not be consistent with the model obtained by previous training, resulting in a large fluctuation of confidence, which may be specifically expressed that a corpus that can be recognized last time cannot be recognized under the model obtained by retraining, or a corpus that cannot be recognized by the model obtained by previous training may be recognized on the model obtained by retraining. Indexes such as well-adjusted corpora, accuracy and/or recall rate can fluctuate greatly and do not meet expectations, and instability caused by retraining the model finally affects experience of developers.
Disclosure of Invention
The application provides a semantic recognition method, a semantic recognition device and a semantic recognition device based on artificial intelligence, and also provides a computer-readable storage medium, so that under the condition that training corpora are not added, deleted or modified, models obtained through two times of training and multiple times of training are kept to have no obvious difference, test corpora of developers have almost the same confidence coefficient (the difference is less than 0.01) in the models obtained through multiple times of training, further, the accuracy fluctuation is reduced, and the experience of the developers is improved.
In a first aspect, the present application provides a semantic recognition method based on artificial intelligence, including:
acquiring a query statement input by a user;
recognizing the query statement through a pre-trained semantic recognition model to obtain the intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, wherein the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted; wherein, the corpus is a corpus generated by a developer on a model training platform, for example: the negative corpus set is configured on the Bot platform and is provided by the model training platform;
obtaining a response corresponding to the query statement according to the query statement and the intention of the query statement;
and displaying the response corresponding to the query statement.
In the semantic recognition method based on artificial intelligence, the negative corpus is extracted through the mapping relation according to the coding value of the training corpus, when the training corpus is not added, deleted or modified, the coding value of the training corpus is not changed, and the mapping relation will not change, so the negative corpus extracted by the mapping relation according to the coding value of the training corpus will not change, because the training corpus and the extracted negative corpus are unchanged, the model obtained by training the training corpus and the negative corpus has higher stability, can realize that the models obtained by two or more times of training have no obvious difference under the condition of no addition, deletion or modification of the training corpus, the test corpus of the developer has almost the same confidence coefficient (difference is less than 0.01) in the model obtained by multiple times of training, so that the accuracy fluctuation is reduced, and the experience of the developer is improved.
In one possible implementation manner, the obtaining a query statement input by a user includes: acquiring a query sentence input by a user through a text; alternatively, the first and second electrodes may be,
acquiring a query sentence input by a user through voice; alternatively, the first and second electrodes may be,
the method comprises the steps of obtaining a picture input by a user, identifying the picture, and obtaining a query statement included in the picture.
That is, the user may input the query sentence in a text, voice, or picture manner.
In one possible implementation manner, the training process of the semantic recognition model includes: grouping the training corpuses according to the quantity of the negative corpuses to be extracted; coding each group of training corpora to obtain a coding value of each group of training corpora; extracting a first type of negative-going corpus and a second type of negative-going corpus according to the coding value, wherein the first type of negative-going corpus can be chatting negative-going corpus, and the second type of negative-going corpus can be high-frequency positive-going vocabulary negative-going corpus; and training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
Specifically, after grouping each group of corpus, each group of corpus may be encoded, so that each group of corpus may have a unique encoding value, and the encoding method may include: a hash value or a simHash value, etc.;
further, before the training corpuses are grouped according to the quantity of the negative corpuses which are extracted as required, the training corpuses can be sequenced. Specifically, the corpus may be sorted in the following sorting manner: the training corpuses are sorted according to the character strings, Hash (Hash) values of the training corpuses, simHash values of the training corpuses, and the like, and certainly, other sorting modes can be adopted to sort the training corpuses, and the embodiment is not limited. In this embodiment, by sequencing the corpus, under the condition that the corpus is completely the same, the grouped coding values are not changed due to the change of the corpus sequence, so that the grouping of the corpus is not changed.
In the present application, after the training corpora are grouped, each group of training corpora is encoded, a first type of negative corpora and a second type of negative corpora are extracted according to the encoded values, then training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain a semantic recognition model, thereby realizing that the negative direction corpus is uniquely extracted according to the coding value of the training corpus, the randomization method of the negative direction corpus generation is changed into the stable generation method, under the condition that the training corpus is not added, deleted or modified, the model obtained by two or more times of training can be kept to have no obvious difference, the test corpus of the developer has almost the same confidence coefficient (difference is less than 0.01) in the model obtained by multiple times of training, so that the accuracy fluctuation is reduced, and the experience of the developer is improved.
In one possible implementation manner, the extracting the negative corpora of the first type according to the encoded value includes: acquiring a first quantity of negative-going corpora of a first type included in a first negative-going corpus set; the first negative corpus set may be a chat negative corpus set, and the first quantity is the total quantity of the negative corpuses of the first type included in the first negative corpus set;
obtaining a first sampling value of the negative direction corpus of the first type according to the coding value of each group of training corpuses and the first quantity; specifically, the obtaining of the first sampling value of the negative-going corpora of the first type according to the code value of each set of corpus and the first number may be: using the coded value of each training corpus to obtain a remainder for the first number, using the remainder as a mapping relation, and using the remainder as the first sampling value;
and extracting first negative direction linguistic data of a first type from the first negative direction linguistic data set according to the first sampling value. Specifically, the first negative-going corpora whose identifier (or index) matches the first sampling value may be extracted by searching in the first negative-going corpus according to the first sampling value.
In this embodiment, the first negative-direction corpus is extracted according to the coding value of the corpus through a mapping relationship, when the corpus is not added, deleted or modified, the coding value of the corpus is unchanged, and the mapping relationship is also unchanged, so that the first negative-direction corpus extracted according to the coding value of the corpus through the mapping relationship is also unchanged, and since the corpus and the extracted negative-direction corpus are unchanged, the stability of the model obtained by training the corpus and the negative-direction corpus is higher, it is possible to keep the model obtained by two or more times of training unchanged under the condition that the corpus is not added, deleted or modified, so that the test corpus of the developer has almost the same confidence (difference <0.01) in the model obtained by multiple times of training, and further reduce the accuracy fluctuation, thereby improving the experience of the developer.
In a possible implementation manner, after the extracting, according to the first sampling value, a first negative-direction corpus of a first type from the first negative-direction corpus set, the method further includes:
calculating a first similarity between the first negative-going corpus and the training corpus, wherein the training corpus comprises all positive-going corpora, namely all positive-going training corpora configured by the model training platform;
and if the first similarity is smaller than a first similarity threshold value, determining that the sampling of the first negative-going corpus is successful, and adding the first negative-going corpus into a sampling corpus set.
In a possible implementation manner, after the calculating the first similarity between the first negative-going corpus and the training corpus, the method further includes:
if the first similarity is larger than or equal to a first similarity threshold value, obtaining a second sampling value according to the first sampling value; in specific implementation, a preset value may be added to the first sampling value to obtain a second sampling value;
extracting a second negative-going corpus of the first type from the first negative-going corpus set according to the second sampling value;
calculating a second similarity between the second negative-going corpus and the training corpus;
and if the second similarity is smaller than a first similarity threshold, determining that the second negative-going corpus is successfully sampled, and adding the second negative-going corpus into the sampled corpus set.
In a possible implementation manner, after the calculating the second similarity between the second negative-going corpus and the training corpus, the method further includes:
if the second similarity is larger than or equal to a first similarity threshold value, the step of obtaining a second sampling value according to the first sampling value and subsequent steps are repeatedly executed;
when the repeated execution times are larger than a preset repeated time threshold value, if the similarity between the negative-direction corpus obtained by current sampling and the training corpus is smaller than a second similarity threshold value, determining that the negative-direction corpus obtained by current sampling is successfully sampled, and adding the negative-direction corpus obtained by current sampling into the sampling corpus set; and if the similarity between the negative-going corpora obtained by current sampling and the training corpora is larger than or equal to a second similarity threshold, adding the negative-going corpora successfully sampled last time into the sampling corpus set again.
If the corpus configured by the developer is similar to the corpus in the first negative corpus set, the corpus is taken as the negative corpus, which affects the recognition of the intention of the corpus, and the confidence coefficient of recognizing the corpus as the negative intention or the recognized positive intention is low, and the sampling corpus with high similarity to the corpus is removed, so that the influence on the positive intention is avoided. The embodiment may realize that the negative corpora with lower similarity to the corpus are added to the sampling corpus set, and the negative corpora with high similarity to the corpus are not added to the sampling corpus set.
In a possible implementation manner, the extracting the negative corpora of the second type according to the encoded value includes: sequentially acquiring every M coded values from the coded values;
selecting a second number of encoded values from each of the acquired M encoded values;
extracting the negative linguistic data of the second type from the second negative linguistic data set according to the second number of the coding values;
sorting the encoded values;
acquiring every N coded values in sequence from the sequenced coded values;
selecting a third number of encoded values from every N acquired encoded values;
extracting the negative linguistic data of the second type from the second negative linguistic data set according to the coding values of the third quantity; wherein, M and N are positive integers, and M is not equal to N.
In this embodiment, the second negative-direction corpus is extracted according to the coding value of the corpus through a mapping relationship, when the corpus is not added, deleted or modified, the coding value of the corpus is unchanged, and the mapping relationship is also unchanged, so the second negative-direction corpus extracted according to the coding value of the corpus through the mapping relationship is also unchanged, and since the corpus and the extracted negative-direction corpus are unchanged, the stability of the model obtained by training the corpus and the negative-direction corpus is higher, it is possible to keep the model obtained by two or more times of training to have no obvious difference under the condition that the corpus is not added, deleted or modified, so that the test corpus of the developer has almost the same confidence coefficient (difference <0.01) in the model obtained by multiple times of training, and further reduce the accuracy fluctuation, thereby improving the experience of the developer.
In a possible implementation manner, the extracting the negative corpora of the first type and the negative corpora of the second type according to the coding value includes: obtaining a third sampling value of the negative-going corpus of the first type and a fourth sampling value of the negative-going corpus of the second type according to the coding value of each group of training corpuses and a pre-learned mapping relation;
and extracting negative corpora of a first type from the first negative corpus set according to the third sampling value, and extracting negative corpora of a second type from the second negative corpus set according to the fourth sampling value.
In a possible implementation manner, before obtaining the third sample value of the negative-going corpus of the first type and the fourth sample value of the negative-going corpus of the second type according to the coding value of each set of training corpuses and a pre-learned mapping relationship, the method further includes:
acquiring a training sample pair, wherein the training sample pair comprises a code value of a training corpus and a sampling value of a corresponding negative corpus; the distance between the sampling values of the negative corpora corresponding to the training corpora meets a preset constraint distance;
and learning a mapping relation by using the training sample pair, wherein the mapping relation comprises a mapping relation between the coding value of the training corpus and the sampling value of the corresponding negative corpus.
In the implementation mode, the negative corpora are extracted through the mapping relation according to the coding values of the corpus, when the corpus is not added, deleted or modified, the coding values of the corpus are unchanged, and the mapping relation is also unchanged, so that the negative corpora extracted through the mapping relation according to the coding values of the corpus are also unchanged, and the corpus and the extracted negative corpora are unchanged, so that the stability of the model obtained by training the corpus and the negative corpora is higher, and the model obtained by two times or more of training can be kept to have no obvious difference under the condition that the corpus is not added, deleted or modified, so that the test corpus of developers has almost the same confidence coefficient (difference is less than 0.01) in the model obtained by multiple times of training, and further the accuracy fluctuation is reduced, thereby improving the experience of the developers.
In a second aspect, the present application provides an artificial intelligence based semantic recognition apparatus, including:
the acquisition module is used for acquiring the query statement input by the user;
the recognition module is used for recognizing the query statement through a pre-trained semantic recognition model to obtain the intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, wherein the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted;
the query module is used for acquiring a response corresponding to the query statement according to the query statement acquired by the acquisition module and the intention of the query statement identified by the identification module;
and the display module is used for displaying the response corresponding to the query statement.
In one possible implementation manner, the obtaining module is specifically configured to obtain a query statement input by a user through a text; or acquiring a query sentence input by a user through voice; or acquiring a picture input by a user, identifying the picture, and acquiring a query statement included in the picture.
In one possible implementation manner, the apparatus further includes:
the grouping module is used for grouping the training corpora according to the quantity of the negative corpora to be extracted;
the coding module is used for coding each group of training corpora to obtain a coding value of each group of training corpora;
the extraction module is used for extracting the negative linguistic data of the first type and the negative linguistic data of the second type according to the coding value obtained by the coding module;
and the training module is used for training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
In one possible implementation manner, the extraction module includes:
the quantity obtaining sub-module is used for obtaining a first quantity of the negative direction linguistic data of the first type included in the first negative direction linguistic data set;
the sampling value obtaining sub-module is used for obtaining a first sampling value of the negative direction corpus of the first type according to the coding value of each group of training corpuses and the first quantity;
and the corpus extraction submodule is used for extracting first negative direction corpuses of a first type from the first negative direction corpus set according to the first sampling value obtained by the sampling value obtaining submodule.
In one possible implementation manner, the extraction module further includes:
the similarity calculation operator module is used for calculating the first similarity between the first negative direction corpus and the training corpus after the corpus extraction sub-module extracts the first negative direction corpus of the first type;
the corpus extraction sub-module is further configured to determine that a first negative corpus is successfully sampled and add the first negative corpus to a sampled corpus set when the first similarity is smaller than a first similarity threshold.
In one possible implementation manner, the sampling value obtaining sub-module is further configured to, after the similarity calculation sub-module calculates the first similarity, obtain a second sampling value according to the first sampling value if the first similarity is greater than or equal to a first similarity threshold;
the corpus extraction submodule is further configured to extract a second negative-direction corpus of the first type from the first negative-direction corpus set according to a second sampling value obtained by the sampling value obtaining submodule;
the similarity operator module is further configured to calculate a second similarity between the second negative-going corpus and the training corpus;
and the corpus extraction sub-module is further configured to determine that the second negative-direction corpus is successfully sampled and add the second negative-direction corpus to the sampled corpus set when the second similarity is smaller than a first similarity threshold.
In one possible implementation manner, the sampling value obtaining sub-module is further configured to, after the similarity calculation sub-module calculates the second similarity, if the second similarity is greater than or equal to a first similarity threshold, repeatedly execute the step of obtaining the second sampling value according to the first sampling value and subsequent steps;
the corpus extraction sub-module is further configured to, when the number of repeated executions is greater than a preset number of repeated threshold, determine that the sampling of the currently sampled negative corpus is successful if the similarity between the currently sampled negative corpus and the training corpus is less than a second similarity threshold, and add the currently sampled negative corpus into the sampled corpus set; and if the similarity between the negative-going corpora obtained by current sampling and the training corpora is larger than or equal to a second similarity threshold, adding the negative-going corpora successfully sampled last time into the sampling corpus set again.
In one possible implementation manner, the extraction module includes:
the coding value acquisition submodule is used for acquiring every M coding values from the coding values in sequence; and selecting a second number of encoded values from each of the acquired M encoded values;
the corpus extraction submodule is used for extracting negative corpuses of a second type from a second negative corpus set according to a second number of coding values;
the coded value sorting submodule is used for sorting the coded values;
the coded value acquisition submodule is also used for acquiring every N coded values in sequence from the sequenced coded values; and selecting a third number of encoded values from every N acquired encoded values;
the corpus extraction submodule is further used for extracting negative corpuses of a second type from a second negative corpus set according to a third number of coding values; wherein, M and N are positive integers, and M is not equal to N.
In one possible implementation manner, the extraction module includes:
the sampling value obtaining sub-module is used for obtaining a third sampling value of the negative-going corpora of the first type and a fourth sampling value of the negative-going corpora of the second type according to the coding values of each group of training corpora and a pre-learned mapping relation;
and the corpus extraction sub-module is used for extracting the negative corpuses of the first type from the first negative corpus set according to a third sampling value obtained by the sampling value obtaining sub-module, and extracting the negative corpuses of the second type from the second negative corpus set according to a fourth sampling value.
In one possible implementation manner, the extraction module further includes:
the sample pair acquisition sub-module is used for acquiring a training sample pair before the sampling value acquisition sub-module acquires a third sampling value of the first type of negative-going corpora and a fourth sampling value of the second type of negative-going corpora, wherein the training sample pair comprises a coding value of the training corpora and a sampling value of the corresponding negative-going corpora; the distance between the sampling values of the negative corpora corresponding to the training corpora meets a preset constraint distance;
and the mapping relation learning submodule is used for learning a mapping relation by using the training sample pair, and the mapping relation comprises a mapping relation between the coding value of the training corpus and the sampling value of the corresponding negative corpus.
In a third aspect, the present application provides a semantic recognition device based on artificial intelligence, including: a display screen; one or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the steps of:
acquiring a query statement input by a user;
recognizing the query statement through a pre-trained semantic recognition model to obtain the intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, wherein the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted;
obtaining a response corresponding to the query statement according to the query statement and the intention of the query statement;
and displaying the response corresponding to the query statement.
In one possible implementation manner, when the instruction is executed by the apparatus, the apparatus is specifically caused to perform the following steps:
acquiring a query sentence input by a user through a text; alternatively, the first and second electrodes may be,
acquiring a query sentence input by a user through voice; alternatively, the first and second electrodes may be,
the method comprises the steps of obtaining a picture input by a user, identifying the picture, and obtaining a query statement included in the picture.
In one possible implementation manner, when the instruction is executed by the apparatus, the apparatus is specifically caused to perform the following steps:
grouping the training corpuses according to the quantity of the negative corpuses to be extracted;
coding each group of training corpora to obtain a coding value of each group of training corpora;
extracting the negative linguistic data of the first type and the negative linguistic data of the second type according to the coding value;
and training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
It should be understood that the second to third aspects of the present application are consistent with the technical solution of the first aspect of the present application, and the beneficial effects obtained by the aspects and the corresponding possible implementation are similar, and are not described again.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the method according to the first aspect.
In a fifth aspect, the present application provides a computer program for performing the method of the first aspect when the computer program is executed by a computer.
In a possible design, the program of the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.
Drawings
FIG. 1 is a diagram illustrating a problem with a model generated by a Bot platform in the prior art;
FIG. 2 is a schematic diagram of confidence levels of models obtained by training using the method provided by the present application;
FIG. 3 is a flowchart illustrating an embodiment of a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to the present application;
FIG. 4 is a flowchart illustrating another exemplary embodiment of a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to the present application;
FIG. 5 is a flowchart illustrating a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to yet another embodiment of the present invention;
FIG. 6 is a flowchart illustrating a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to yet another embodiment of the present invention;
FIG. 7 is a flowchart of an embodiment of a semantic recognition method based on artificial intelligence according to the present application;
FIG. 8 is a schematic structural diagram of an embodiment of an artificial intelligence based semantic recognition apparatus according to the present application;
FIG. 9 is a schematic structural diagram of another embodiment of the artificial intelligence based semantic recognition apparatus according to the present application;
FIG. 10 is a schematic structural diagram of an embodiment of the artificial intelligence based semantic recognition device according to the present application.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
In the prior art, as a model training platform, after a machine learning intention recognition algorithm used by a Bot platform retrains a model, two random factors exist as a main reason for model differentiation. One random factor is to randomly fight against the generation of negative corpora, which are generated in a random extraction manner, such as: randomly drawing a chatting language material such as ' o ' you ' and the like; another random factor is to automatically counteract the generation of negative corpora, which is generated in a generating manner, such as: and generating negative linguistic data such as a bank card or a mobile phone good card according to the card. The two ways of randomly generating negative corpora make the model unstable.
Therefore, the application provides a method for sampling stability without randomization, namely, the two above-mentioned ways of generating negative-going corpora are changed into stable, and the effect of randomizing and extracting the negative-going corpora is achieved, so that the training model is kept stable, and when the configuration of a developer is not modified, the models trained twice by using the Bot platform are kept consistent, so that the same corpora have the same prediction effect under the model obtained by multiple times of training.
It should be noted that, in the present application, the Bot platform is only an example of the model training platform, and the model training platform may be other platforms, which is not limited in the present application.
Fig. 1 is a schematic diagram illustrating a problem existing in a model generated by a Bot platform in the prior art, as shown in fig. 1, in the prior art, a negative-direction corpus random generation manner has instability, which causes a large difference between a model obtained by retraining the Bot platform and a model obtained by previous training, and is represented as:
(1) the accuracy fluctuates: after retraining, the confidence of the classification algorithm fluctuates, resulting in a decrease in prediction accuracy. The carefully adjusted language material does not meet the expectation and seriously influences the indexes such as accuracy and the like.
(2) Experience inconsistency: the model is retrained, the instability of the model causes the fluctuation of confidence, and the same linguistic data has different results on different models obtained by training, thereby influencing the experience.
Aiming at the problems of the Bot platform, the technical problem to be solved by the application is to change a negative corpus randomization generation method into a stable generation method, so that under the condition that training corpuses are not added, deleted or modified, models obtained by two or more times of training have no obvious difference, so that the test corpuses of developers have almost the same confidence coefficient (the difference is less than 0.01) in the models obtained by multiple times of training, as shown in fig. 2, and further the accuracy fluctuation is reduced, thereby improving the experience of the developers. FIG. 2 is a schematic diagram of confidence of a model obtained by training using the method provided by the present application.
As can be seen from fig. 2, in the related art, for the query statement "how the weather after sunrise is good", the model obtained by two times of training is used to identify the query statement, and the intention of the query statement is obtained as "weather query", but as can be seen from fig. 2, in the related art, the confidence of the intention identified by the model obtained by the previous training is 0.88, the confidence of the intention identified by the model obtained by retraining is 0.78, and the confidence of the intention identified by the model obtained by two times of training is large (0.1), so that the answers given by the models obtained by two times of training are different for the same query statement, thereby affecting the experience of developers.
After the negative-going corpora are generated by the method provided by the application, the confidence coefficient difference of the intentions recognized by the models obtained by the two times of training is very small (0.01), so that the answers given by the models obtained by the two times of training for the same query sentence are the same, and the experience of developers can be improved.
The following describes a training process of the semantic recognition model provided by the present application, the semantic recognition model in the present application may be obtained by training on a model training platform, such as a Bot platform, the model training platform may be deployed on a cloud server, of course, the semantic recognition model may also be obtained by training on other devices, and an execution subject for training the semantic recognition model is not limited in this embodiment.
Fig. 3 is a flowchart of an embodiment of a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to the present application, as shown in fig. 3, the training process may include:
and 301, grouping the training corpora according to the quantity of the negative corpora to be extracted.
The number of the negative-going corpuses to be extracted may be set by itself according to implementation requirements and/or system performance during specific implementation, which is not limited in this embodiment, and assuming that the number of the negative-going corpuses to be extracted is Num, the training corpuses need to be divided into Num groups, where Num is a positive integer.
Further, before the training corpuses are grouped according to the quantity of the negative corpuses which are extracted as required, the training corpuses can be sequenced. Specifically, the corpus may be sorted in the following sorting manner: the training corpuses are sorted according to the character strings, Hash (Hash) values of the training corpuses, simHash values of the training corpuses, and the like, and certainly, other sorting modes can be adopted to sort the training corpuses, and the embodiment is not limited. In this embodiment, by sequencing the corpus, under the condition that the corpus is completely the same, the grouped coding values are not changed due to the change of the corpus sequence, so that the grouping of the corpus is not changed.
Step 302, coding each group of training corpora to obtain the coding value of each group of training corpora.
Specifically, in this embodiment, after grouping each group of corpus, each group of corpus may be encoded, so that each group of corpus may have a unique encoding value, and the encoding manner may include: a hash value or a simHash value, etc., although other encoding methods may also be used, which is not limited in this embodiment. In a specific implementation, the embodiment may perform the following operations on the corpus of each group according to an N-gram (N-gram), for example: and in the unigram and bigranm modes, the calculated simHash value is used as the coding value of each group of training corpora.
Step 303, extracting the negative corpora of the first type and the negative corpora of the second type according to the coding values.
The negative corpora of the first type may be chat negative corpora, and the negative corpora of the second type may be high-frequency positive vocabulary negative corpora.
For example, the chatting negative corpus may include a chatting corpus such as "you so"; the high-frequency positive vocabulary negative corpora may include negative corpora such as "bank card" or "mobile phone good card" generated according to the high-frequency positive vocabulary "card", wherein the high-frequency positive vocabulary includes vocabularies that appear more frequently in the training corpora.
And 304, training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
In this embodiment, after the training corpora are grouped, each group of training corpora is encoded, a negative corpus of a first type and a negative corpus of a second type are extracted according to the encoding value, then training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain a semantic recognition model, thereby realizing that the negative direction corpus is uniquely extracted according to the coding value of the training corpus, the randomization method of the negative direction corpus generation is changed into the stable generation method, under the condition that the training corpus is not added, deleted or modified, the model obtained by two or more times of training can be kept to have no obvious difference, the test corpus of the developer has almost the same confidence coefficient (difference is less than 0.01) in the model obtained by multiple times of training, so that the accuracy fluctuation is reduced, and the experience of the developer is improved.
Fig. 4 is a flowchart of another embodiment of a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to the present application, as shown in fig. 4, in the embodiment shown in fig. 3 of the present application, the extracting negative corpora of the first type according to the coding value in step 303 may include:
step 401, obtain a first number of negative-going corpuses of a first type included in a first negative-going corpus set.
The first negative corpus set may be a chat negative corpus set, and the first quantity is a total quantity of the negative corpuses of the first type included in the first negative corpus set.
Step 402, obtaining a first sampling value of the negative corpus of the first type according to the code value of each set of corpus and the first quantity.
Specifically, the obtaining of the first sampling value of the negative-going corpora of the first type according to the code value of each set of corpus and the first number may be: and using the coded value of each group of training corpuses to obtain a remainder for the first number, using the remainder as a mapping relation, and using the remainder as the first sampling value. The above is only one implementation manner for obtaining the first sampling value of the negative-going corpora of the first type according to the coding value and the first number of each set of corpus, and may also adopt other implementation manners to obtain the first sampling value of the negative-going corpora of the first type according to the coding value and the first number of each set of corpus, which is not limited in this embodiment.
Step 403, extracting a first negative-going corpus of a first type from the first negative-going corpus set according to the first sampling value.
Specifically, the first negative-going corpora whose identifier (or index) matches the first sampling value may be extracted by searching in the first negative-going corpus according to the first sampling value.
Further, after step 403, the method may further include:
step 404, calculating a first similarity between the first negative-going corpus and the training corpus. Then step 405 or step 406 is performed.
Specifically, after the first negative-going corpora are extracted according to the first sampling value, the first similarity between the first negative-going corpora and the corpus needs to be calculated, where the corpus includes all positive-going corpora, that is, all positive-going corpora configured by the model training platform.
In a specific implementation, a lucene algorithm may be used to calculate a first similarity between the first negative-going corpus and the training corpus.
Step 405, if the first similarity is smaller than the first similarity threshold, it is determined that the first negative-going corpus is successfully sampled, and the first negative-going corpus is added to the sampled corpus set. The process is finished.
The first similarity threshold may be set according to system performance and/or implementation requirements, and the size of the first similarity threshold is not limited in this embodiment.
Step 406, if the first similarity is greater than or equal to a first similarity threshold, a second sample value is obtained according to the first sample value.
In a specific implementation, the second sampling value may be obtained by adding a preset value to the first sampling value.
The preset value may be set according to system performance and/or implementation requirements, and the preset value is not limited in this embodiment.
Step 407, according to the second sampling value, extracting a second negative-going corpus of the first type from the first negative-going corpus set.
Similarly, the second sampling value may be searched in the first negative-going corpus set, and the second negative-going corpus whose identifier (or index) matches the second sampling value may be extracted.
Step 408, calculating a second similarity between the second negative-going corpus and the training corpus. Then step 409 or step 410 is performed.
Specifically, after the second negative-going corpora are extracted according to the second sampling value, the first similarity between the second negative-going corpora and the corpus needs to be calculated, where the corpus includes all the positive-going corpora, that is, all the positive-going corpora configured by the model training platform.
Step 409, if the second similarity is smaller than the first similarity threshold, determining that the second negative-going corpus is successfully sampled, and adding the second negative-going corpus into the sampled corpus set. The process is finished.
Step 410, if the second similarity is greater than or equal to the first similarity threshold, repeating the step 406 to the step 409; when the repeated execution times are larger than a preset repeated time threshold value, if the similarity between the negative-direction corpus obtained by current sampling and the training corpus is smaller than a second similarity threshold value, determining that the negative-direction corpus obtained by current sampling is successfully sampled, and adding the negative-direction corpus obtained by current sampling into the sampling corpus set; and if the similarity between the negative-going corpora obtained by current sampling and the training corpora is larger than or equal to a second similarity threshold, adding the negative-going corpora successfully sampled last time into the sampling corpus set again.
The preset threshold of the number of repetitions may be set according to system performance and/or implementation requirements during specific implementation, and the preset number of repetitions is not limited in this embodiment, for example, the preset number of repetitions may be 5.
The size of the second similarity threshold may be set according to system performance and/or implementation requirements during specific implementation, and the second similarity threshold is not limited in this embodiment as long as the second similarity threshold is greater than the first similarity threshold.
If the corpus configured by the developer is similar to the corpus in the first negative corpus set, the corpus is taken as the negative corpus, which affects the recognition of the intention of the corpus, and the confidence coefficient of recognizing the corpus as the negative intention or the recognized positive intention is low, and the sampling corpus with high similarity to the corpus is removed, so that the influence on the positive intention is avoided. The embodiment may realize that the negative corpora with lower similarity to the corpus are added to the sampling corpus set, and the negative corpora with high similarity to the corpus are not added to the sampling corpus set.
Fig. 5 is a flowchart of a further embodiment of a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to the present application, as shown in fig. 5, in the embodiment shown in fig. 3 of the present application, the extracting negative corpora of the second type according to the above-mentioned coded value in step 303 may include:
step 501, obtaining every M encoded values in sequence from the encoded values.
Step 502 selects a second number of encoded values from each of the acquired M encoded values.
The second number may be set by itself in specific implementation, and the size of the second number is not limited in this embodiment.
Step 503, extracting the negative corpora of the second type from the second negative corpus set according to the second number of encoded values.
The second negative corpus set may be a high-frequency positive vocabulary negative corpus set, and the negative corpus of the second type included in the second negative corpus set may be a high-frequency word.
Step 504, sorting the encoded values.
And 505, acquiring every N coded values in sequence from the sorted coded values.
Step 506, a third number of encoded values is selected from every N acquired encoded values.
The third number may be set by itself in specific implementation, and the size of the third number is not limited in this embodiment.
Step 507, extracting the negative corpora of the second type from the second negative corpora set according to the third number of encoded values.
Wherein, M and N are positive integers, and M is not equal to N. Specifically, the size of M and N may be set according to system performance and/or implementation requirements during specific implementation, and the size of M and N is not limited in this embodiment, for example, M may be 2, and N may be 3.
Assuming that the corpora are divided into 4 groups, and the encoding values of the 4 groups of corpora are a1, a2, a3 and a4, respectively, each 2 encoding values, namely a1a2, a2a3 and a3a4, may be obtained from the above encoding values in sequence, and then, a second number of encoding values may be selected from each 2 encoding values (a1a2, a2a3 and a3a4), where the second number is 2, two groups of encoding values, namely a1a2 and a2a3, and certainly two groups of encoding values, namely a1a2 and a3a4, may also be selected, and this embodiment is not limited thereto, and the two groups of encoding values, namely a1a2 and a2a3, are taken as an example for illustration. It should be noted that if the second number is 2, two sets of code values, a1a2 and a2a3, are selected during the first selection, and then two sets of code values, a1a2 and a2a3, still need to be selected each time the model training is performed.
Next, taking the group of coding values a1a2 as an example, first mapping the coding values a1 and a2 to a second negative-direction corpus set, where the simplest mapping method is to take the remainder of the coding values to the total number of negative-direction corpuses included in the second negative-direction corpus set, then concatenating the second negative-direction corpuses extracted according to the coding values a1 and a2, respectively, to generate a Bigram negative-direction corpus, using the generated Bigram negative-direction corpus as a negative-direction corpus of a second type, then adding the generated Bigram negative-direction corpus to the negative-direction corpus set required by the corpus, and similarly, according to the same method, generating the second type negative-direction corpus corresponding to a2a 3.
Then, a1, a2, a3 and a4 are reordered, assuming that the reordered code values are a2, a1, a3 and a4, and every 3 code values, namely a2a1a3 and a1a3a4, are sequentially obtained from the ordered code values, and then, a third number of code values can be obtained from every 3 obtained code values (namely a2a1a3 and a1a3a4), wherein the third number is assumed to be 1, then the group of code values a2a1a3 can be selected, and the group of code values a1a3a4 can also be selected, which is not limited in this embodiment, and the group of code values a2a1a3 is taken as an example for explanation here. It should be noted that if the third number is 1, the set of a2a1a3 code values is selected during the first selection, and then the set of a2a1a3 code values still needs to be selected each time the model training is performed.
Next, the encoding values of a2, a1, and a3 may be mapped to the second negative-going corpus set, where the simplest mapping method is to take the remainder of the total number of the negative-going corpuses included in the second negative-going corpus set for the encoding values, then splice the second negative-going corpuses extracted according to the encoding values of a2, a1, and a3, respectively, to generate a Trigram negative-going corpus, use the generated Trigram negative-going corpus as the second type of corpus, then add the generated Trigram negative-going corpus to the negative-going corpus set required by the corpus, where the purpose of reordering the a1, a2, a3, and a4 is to make the generated Trigram negative-going corpus not include the generated Bigram negative-going corpus.
In this embodiment, the second negative-direction corpus is extracted according to the coding value of the corpus through a mapping relationship, when the corpus is not added, deleted or modified, the coding value of the corpus is unchanged, and the mapping relationship is also unchanged, so the second negative-direction corpus extracted according to the coding value of the corpus through the mapping relationship is also unchanged, and since the corpus and the extracted negative-direction corpus are unchanged, the stability of the model obtained by training the corpus and the negative-direction corpus is higher, it is possible to keep the model obtained by two or more times of training to have no obvious difference under the condition that the corpus is not added, deleted or modified, so that the test corpus of the developer has almost the same confidence coefficient (difference <0.01) in the model obtained by multiple times of training, and further reduce the accuracy fluctuation, thereby improving the experience of the developer.
In this embodiment, the total number of negative corpora included in the first negative corpus set and the second negative corpus set is not limited, and only a mapping method is proposed here to map to the first negative corpus set and the second negative corpus set according to the coding value to ensure consistency of each sampling.
Fig. 6 is a flowchart of another embodiment of a training process of a semantic recognition model in the artificial intelligence based semantic recognition method according to the present application, as shown in fig. 6, in the embodiment shown in fig. 3 of the present application, the extracting negative corpuses of the first type and the negative corpuses of the second type according to the coding value in step 303 may include:
step 601, obtaining a third sampling value of the negative-going corpus of the first type and a fourth sampling value of the negative-going corpus of the second type according to the coding value of each group of training corpuses and a pre-learned mapping relation.
The mapping relationship learned in advance may include a remainder, which is not limited in this embodiment.
Step 602, extracting a first type of negative-going corpus from the first negative-going corpus according to the third sampling value, and extracting a second type of negative-going corpus from the second negative-going corpus according to the fourth sampling value.
Further, before step 601, the method may further include:
step 603, acquiring a training sample pair, wherein the training sample pair comprises a code value of a training corpus and a sampling value of a corresponding negative corpus; and the distance between the sampling values of the negative direction corpora corresponding to the training corpora meets the preset constraint distance.
Specifically, the above training sample pair may be obtained by:
based on equidistant mapping constraint, such as multidimensional Scaling (MDS) and other methods, the problem of measuring probability distribution of different spaces is converted into the problem of equidistant constraint of relative positions of training samples in different spaces, and the probability distribution of the two spaces is ensured to be consistent in the distance meaning. Specifically, the paired training samples can be solved based on equidistant constraint modeling; the specific method can adopt a kernel-based learning method, and a training sample pair is constructed by directly defining a relative mapping relation for a nearest neighbor sample under the condition of not requiring mapping defined explicitly.
Step 604, learning a mapping relationship by using the training sample pair, where the mapping relationship includes a mapping relationship between the code value of the training corpus and the sampling value of the corresponding negative corpus.
In this embodiment, the present embodimentThe provided sampling method based on the coding value extracts the first type of negative direction linguistic data from the first negative direction linguistic data set, and can obtain a sampling linguistic data set. To make k sample corpuses { k'iThe distribution of the data is compared with k sampling corpora { k } randomly extracted from the first negative corpus setiThe distribution is the same, and can be equivalent to the solution of kiDistribution of { k'iThe KL divergence (Kullback-Leibler divergence) between the distributions is minimal. Specifically, the KL divergence can be calculated by the formula shown in formula (1).
Figure RE-GDA0002359245570000211
In the formula (1), P (i) is { k }iH, Q (i) is { k'iDistribution of }, DKL(P | | Q) is { k |)iDistribution of { k'iThe KL divergence between the distributions of.
Assuming the hash method has been chosen, the general formalization of the above problem can be approximated as: obtaining { k'i=hash(x’i) The distribution of { k } and { k }iX with the smallest KL divergence between distributions iThe method of (3).
The following is a solution analysis:
the hash method is selected as simhash, and the simplest method to embed into the first negative corpus is to take the remainder (as described in the embodiment of fig. 4). Firstly, the training corpora are grouped, then the simhash value of each group of training corpora is calculated as a coding value, and the hash (x) can be visually generated to the maximum extent i) The degree of overlap (overlapping) is minimal and the simhash guarantees a similarity constraint (based on hamming distance, generally 64-bit simhash, hamming distance less than 3 can be considered dissimilar).
Considering that the original corpus set is labeled (label) and the mapped negative corpus set is not labeled (label), the following two cases may occur: 1) the mapped set elements belong to different classes; 2) The mapped collection elements belong to the same class. The category here refers to the intrinsic structure category of the negative-going corpus, for example, the category label of the negative-going corpus itself, or the intrinsic structure category is determined by means of clustering or the like without the category label.
Both of the above cases can be reduced to the point that taking the remainder directly from the more general distribution holds is not necessarily the best mapping because the original distribution cannot be approximated directly, while also being insensitive to content.
Therefore, this embodiment proposes a constraint based on the distance projected into the first negative-going corpus set: and solving the coded value x of the training corpus before mapping in a reverse mode, wherein the x is a 'virtual sample' mapped by the hash function to be designed. Mapping (x) obtains the final sampling value of the negative-going corpus. The simplest Mapping (Mapping) is taking the remainder, and the simplest hash is the hash of JDK String. And (2) combining with a classical Cumulative Distribution Function (CDF) inversion sampling operation:
1) hash is constrained by distance: the simhash controls overlapping in advance, and the distance of the embedded original prior information keeps a mapping relation;
2) solving by an inverse problem: and embedding target property distance constraint and learning a mapping relation.
In this embodiment, the negative corpora are extracted according to the coding values of the corpus through a mapping relationship, and when the corpus is not added, deleted, or modified, the coding values of the corpus are unchanged, and the mapping relationship is also unchanged, so that the negative corpora extracted according to the coding values of the corpus through the mapping relationship is also unchanged, and since the corpus and the extracted negative corpora are unchanged, the stability of the model obtained by training using the corpus and the negative corpora is higher, and it is possible to keep the models obtained by two or more times of training unchanged under the condition that the corpus is not added, deleted, or modified, so that the test corpus of the developer has almost the same confidence (difference <0.01) in the models obtained by multiple times of training, thereby reducing the accuracy fluctuation, and improving the experience of the developer.
The embodiments shown in fig. 3 to 5 of the present application map the remainder of the coded value to the negative corpus set, and the embodiments shown in fig. 6 of the present application equate the random method of extracting the negative corpus to the extraction method of the stable method by learning the mapping relationship, which is not only suitable for extracting the negative corpus in the present application, but also suitable for the situation that other random factors have the requirement of keeping consistent every time.
By the method provided by the embodiments shown in fig. 3 to fig. 6 of the present application, a trained semantic recognition model can be obtained, and then the trained semantic recognition model can be used to perform semantic recognition on the input query sentence. In this application, the semantic recognition model may be carried on a model training platform, for example: after obtaining the trained semantic recognition model according to the method provided in the embodiments shown in fig. 3 to fig. 6 of the present application, after performing semantic recognition on the Bot platform, as shown in fig. 2, the right-side box of fig. 2 shows that the query sentence "how weather is after sunrise" input by the user is queried on the Bot platform by using the trained semantic recognition model, the intention of the query sentence is obtained as "weather query", and then the answer "weather is fine after sunrise, … …" of the query sentence is obtained, and an example of the answer is displayed.
The semantic recognition model may be mounted on other electronic devices, such as: and performing semantic recognition on the server or the terminal. The electronic device may include: the Intelligent Vehicle comprises a cloud server, a mobile terminal (mobile phone), an Intelligent screen, an unmanned aerial Vehicle, an Intelligent Connected Vehicle (ICV), an Intelligent Vehicle (smart/Intelligent car) or Vehicle-mounted equipment and the like.
Fig. 7 is a flowchart of an embodiment of the artificial intelligence based semantic recognition method according to the present application, and as shown in fig. 7, the artificial intelligence based semantic recognition method may include:
step 701, obtaining a query statement input by a user.
Specifically, acquiring the query statement input by the user may include:
acquiring a query sentence input by a user through a text; alternatively, the first and second electrodes may be,
acquiring a query sentence input by a user through voice; alternatively, the first and second electrodes may be,
the method comprises the steps of obtaining a picture input by a user, identifying the picture, and obtaining a query statement included in the picture.
That is, the user may input the query sentence in a text, voice, or picture manner.
Step 702, recognizing the query statement through a pre-trained semantic recognition model to obtain the intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, and the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted.
The pre-trained semantic recognition model is trained according to the method provided by the embodiments shown in fig. 3 to 6 of the present application, and is not described herein again.
Step 703, obtaining a response corresponding to the query statement according to the query statement and the intention of the query statement.
Step 704, displaying the response corresponding to the query statement.
In the semantic recognition method based on artificial intelligence, the negative corpus is extracted through the mapping relation according to the coding value of the training corpus, when the training corpus is not added, deleted or modified, the coding value of the training corpus is not changed, and the mapping relation will not change, so the negative corpus extracted by the mapping relation according to the coding value of the training corpus will not change, because the training corpus and the extracted negative corpus are unchanged, the model obtained by training the training corpus and the negative corpus has higher stability, can realize that the models obtained by two or more times of training have no obvious difference under the condition of no addition, deletion or modification of the training corpus, the test corpus of the developer has almost the same confidence coefficient (difference is less than 0.01) in the model obtained by multiple times of training, so that the accuracy fluctuation is reduced, and the experience of the developer is improved.
Fig. 8 is a schematic structural diagram of an embodiment of the artificial intelligence based semantic recognition apparatus according to the present application, and as shown in fig. 8, the artificial intelligence based semantic recognition apparatus 80 may include: an acquisition module 81, an identification module 82, a query module 83, and a display module 84. It should be understood that the artificial intelligence based semantic recognition device 80 may correspond to the apparatus 900 of fig. 10. Wherein, the functions of the obtaining module 81, the identifying module 82 and the querying module 83 can be implemented by the processor 910 in the device 900 of fig. 10; the display module 84 may specifically correspond to the display unit 970 in the device 900 of fig. 10.
The acquiring module 81 is configured to acquire a query statement input by a user; in this embodiment, the obtaining module 81 is specifically configured to obtain a query statement input by a user through a text; or acquiring a query sentence input by a user through voice; or acquiring a picture input by a user, identifying the picture, and acquiring a query statement included in the picture.
That is, the user may input the query sentence in a text, voice, or picture manner.
The recognition module 82 is configured to recognize the query statement through a pre-trained semantic recognition model to obtain an intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, and the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted;
a query module 83, configured to obtain a response corresponding to the query statement according to the query statement obtained by the obtaining module 81 and the intention of the query statement identified by the identifying module 82;
and a display module 84, configured to display a response corresponding to the query statement.
The artificial intelligence based semantic recognition apparatus provided by the embodiment shown in fig. 8 can be used to implement the technical solution of the method embodiment shown in fig. 7 of the present application, and the implementation principle and technical effects thereof can be further referred to the related description in the method embodiment.
Fig. 9 is a schematic structural diagram of another embodiment of the artificial intelligence based semantic recognition device according to the present application, which is different from the artificial intelligence based semantic recognition device shown in fig. 8 in that the artificial intelligence based semantic recognition device 90 shown in fig. 9 may further include: a grouping module 85, an encoding module 86, an extraction module 87, and a training module 88; it should be understood that the artificial intelligence based semantic recognition device 90 may correspond to the apparatus 900 of fig. 10. Wherein, the functions of the obtaining module 81, the identifying module 82 and the querying module 83 can be implemented by the processor 910 in the device 900 of fig. 10; the display module 84 may specifically correspond to the display unit 970 in the device 900 of fig. 10; the functions of the grouping module 85, the encoding module 86, the decimation module 87 and the training module 88 may be implemented by the processor 910 in the device 900 of fig. 10.
The grouping module 85 is configured to group the training corpora according to the number of the negative corpora to be extracted; the number of the negative-going corpuses to be extracted may be set by itself according to implementation requirements and/or system performance during specific implementation, which is not limited in this embodiment, and assuming that the number of the negative-going corpuses to be extracted is Num, the training corpuses need to be divided into Num groups, where Num is a positive integer.
Further, the artificial intelligence based semantic recognition device 80 may further include: a sorting module 89;
the sorting module 89 is configured to sort the corpus before the grouping module 85 groups the corpus according to the number of the negative corpora that need to be extracted. Specifically, the ranking module 89 may rank the corpus in the following ranking manners: the training corpuses are sorted according to the character strings, Hash (Hash) values of the training corpuses, simHash values of the training corpuses, and the like, and certainly, other sorting modes can be adopted to sort the training corpuses, and the embodiment is not limited. In this embodiment, the corpus is sorted by the sorting module 89, so that under the condition that the corpus is completely the same, the grouped coding values are not changed due to the change of the corpus sequence, thereby ensuring that the grouping of the corpus is not changed.
The encoding module 86 is configured to encode each group of corpus to obtain an encoded value of each group of corpus; specifically, in this embodiment, after the grouping module 85 groups each group of corpus, the encoding module 86 may encode each group of corpus respectively, so that each group of corpus has a unique encoding value, and the encoding manner may include: a hash value or a simHash value, etc., although other encoding methods may also be used, which is not limited in this embodiment. In particular implementations, the encoding module 86 may encode the corpus of each group according to an N-gram (N-gram), for example: and in the unigram and bigranm modes, the calculated simHash value is used as the coding value of each group of training corpora.
An extracting module 87, configured to extract the negative corpora of the first type and the negative corpora of the second type according to the coding value obtained by the coding module 86; the negative corpora of the first type may be chat negative corpora, and the negative corpora of the second type may be high-frequency positive vocabulary negative corpora.
A training module 88, configured to train using the training corpus, the negative corpus of the first type, and the negative corpus of the second type to obtain the semantic recognition model.
In this embodiment, after the grouping module 85 groups the corpus, the encoding module 86 encodes each group of corpus, the extracting module 87 extracts the negative corpus of the first type and the negative corpus of the second type according to the encoding value, and then the training module 88 trains by using the corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model, so as to realize that the negative corpus is uniquely extracted according to the encoding value of the corpus, change the randomization method for generating the negative corpus into a stable generation method, and under the condition that the corpus is not added, deleted or modified, the models obtained by two or more times of training can be kept without obvious difference, so that the test corpus of a developer has almost the same confidence coefficient (difference <0.01) in the models obtained by multiple times of training, and further the accuracy fluctuation is reduced, thereby improving the experience of developers.
In this embodiment, the extracting module 87 may include: the number obtaining sub-module 871, the sampling value obtaining sub-module 872 and the corpus extraction sub-module 873;
the quantity obtaining sub-module 871 is configured to obtain a first quantity of negative-going corpora of the first type included in the first negative-going corpus set; the first negative corpus set may be a chat negative corpus set, and the first quantity is a total quantity of the negative corpuses of the first type included in the first negative corpus set.
A sampling value obtaining sub-module 872, configured to obtain a first sampling value of a negative corpus of a first type according to the coding value of each set of training corpora and the first number; specifically, the obtaining of the first sampling value of the negative-going corpora of the first type according to the code value of each set of corpus and the first number may be: the sampling value obtaining sub-module 872 uses the encoded value of each training corpus to obtain a remainder for the first number, and uses the remainder as the mapping relation, where the remainder is used as the first sampling value. The above is only one implementation manner for obtaining the first sampling value of the negative-going corpora of the first type according to the encoded value and the first quantity of each set of corpus, and the sampling value obtaining sub-module 872 may further obtain the first sampling value of the negative-going corpora of the first type according to the encoded value and the first quantity of each set of corpus by adopting other implementation manners, which is not limited in this embodiment.
The corpus extraction sub-module 873 is configured to extract the first negative corpus of the first type from the first negative corpus set according to the first sampling value obtained by the sampling value obtaining sub-module 872.
Specifically, the corpus extraction sub-module 873 may perform a lookup in the first negative corpus set according to the first sampling value, and extract the first negative corpus whose identifier (or index) matches the first sampling value.
Further, the extracting module 87 may further include: a similarity operator module 874;
a similarity operator module 874, configured to calculate a first similarity between the first negative-direction corpus and the training corpus after the corpus extraction sub-module 873 extracts the first negative-direction corpus of the first type; specifically, after the corpus extraction sub-module 873 extracts the first negative corpus according to the first sampling value, the similarity operator module 874 needs to calculate the first similarity between the first negative corpus and the corpus, where the corpus includes all positive corpuses, that is, all positive corpuses configured by the model training platform.
The corpus extraction sub-module 873 is further configured to determine that the first negative corpus is successfully sampled when the first similarity is smaller than the first similarity threshold, and add the first negative corpus to the sampled corpus set. The first similarity threshold may be set according to system performance and/or implementation requirements, and the size of the first similarity threshold is not limited in this embodiment.
In this embodiment, the sampling value obtaining sub-module 872 is further configured to, after the similarity calculation sub-module 874 calculates the first similarity, if the first similarity is greater than or equal to a first similarity threshold, obtain a second sampling value according to the first sampling value; in a specific implementation, the sampling value obtaining sub-module 872 may add a predetermined value to the first sampling value to obtain a second sampling value.
The preset value may be set according to system performance and/or implementation requirements, and the preset value is not limited in this embodiment.
The corpus extraction sub-module 873, configured to extract a second negative-direction corpus of the first type from the first negative-direction corpus set according to the second sampling value obtained by the sampling value obtaining sub-module 872; similarly, the corpus extraction sub-module 873 may perform a lookup in the first negative corpus set according to the second sampling value, and extract the second negative corpus whose identifier (or index) matches the second sampling value.
The similarity operator module 874, further configured to calculate a second similarity between the second negative corpus and the training corpus; specifically, after the corpus extraction sub-module 873 extracts the second negative corpus according to the second sampling value, the similarity operator module 874 needs to calculate the first similarity between the second negative corpus and the corpus, where the corpus includes all positive corpuses, that is, all positive corpuses configured by the model training platform.
The corpus extraction sub-module 873 is further configured to determine that the second negative-going corpus is successfully sampled and add the second negative-going corpus to the sampled corpus set when the second similarity is smaller than the first similarity threshold.
The sampling value obtaining sub-module 872, further configured to, after the similarity degree calculation sub-module 874 calculates the second similarity degree, if the second similarity degree is greater than or equal to the first similarity degree threshold, repeatedly perform the step of obtaining the second sampling value according to the first sampling value and subsequent steps;
the corpus extraction sub-module 873, configured to, when the number of repeated executions is greater than a preset number of repeated times threshold, determine that the sampling of the currently sampled negative corpus is successful if the similarity between the currently sampled negative corpus and the corpus is smaller than a second similarity threshold, and add the currently sampled negative corpus to the sampled corpus set; and if the similarity between the negative-going corpus obtained by current sampling and the training corpus is greater than or equal to a second similarity threshold, adding the negative-going corpus successfully sampled last time into the sampling corpus set again.
The preset threshold of the number of repetitions may be set according to system performance and/or implementation requirements during specific implementation, and the preset number of repetitions is not limited in this embodiment, for example, the preset number of repetitions may be 5.
The size of the second similarity threshold may be set according to system performance and/or implementation requirements during specific implementation, and the second similarity threshold is not limited in this embodiment as long as the second similarity threshold is greater than the first similarity threshold.
If the corpus configured by the developer is similar to the corpus in the first negative corpus set, the corpus is taken as the negative corpus, which affects the recognition of the intention of the corpus, and the confidence coefficient of recognizing the corpus as the negative intention or the recognized positive intention is low, and the sampling corpus with high similarity to the corpus is removed, so that the influence on the positive intention is avoided. The embodiment may realize that the negative corpora with lower similarity to the corpus are added to the sampling corpus set, and the negative corpora with high similarity to the corpus are not added to the sampling corpus set.
In this embodiment, the extracting module 87 may include: an encoding value acquisition sub-module 875, a corpus extraction sub-module 873 and an encoding value sorting sub-module 876;
an encoded value obtaining sub-module 875 configured to sequentially obtain every M encoded values from the encoded values; and selecting a second number of encoded values from each of the acquired M encoded values;
a corpus extraction sub-module 873 configured to extract negative corpuses of the second type from the second negative corpus set according to the second number of coding values; the second negative corpus set may be a high-frequency positive vocabulary negative corpus set, and the negative corpus of the second type included in the second negative corpus set may be a high-frequency word.
A coded value sorting submodule 876 configured to sort the coded values;
the coded value acquisition sub-module 875 is further configured to sequentially acquire every N coded values from the sorted coded values; and selecting a third number of encoded values from every N acquired encoded values;
the corpus extraction sub-module 873, further configured to extract negative corpuses of the second type from the second negative corpus set according to the third number of coding values; wherein, M and N are positive integers, and M is not equal to N.
Specifically, the size of M and N may be set according to system performance and/or implementation requirements during specific implementation, and the size of M and N is not limited in this embodiment, for example, M may be 2, and N may be 3.
Assuming that the corpora are divided into 4 groups, and the encoding values of the 4 groups of corpora are a1, a2, a3 and a4, respectively, each 2 encoding values, namely a1a2, a2a3 and a3a4, may be obtained from the above encoding values in sequence, and then, a second number of encoding values may be selected from each 2 encoding values (a1a2, a2a3 and a3a4), where the second number is 2, two groups of encoding values, namely a1a2 and a2a3, and certainly two groups of encoding values, namely a1a2 and a3a4, may also be selected, and this embodiment is not limited thereto, and the two groups of encoding values, namely a1a2 and a2a3, are taken as an example for illustration. It should be noted that if the second number is 2, two sets of code values, a1a2 and a2a3, are selected during the first selection, and then two sets of code values, a1a2 and a2a3, still need to be selected each time the model training is performed.
Next, taking the group of coding values a1a2 as an example, first mapping the coding values a1 and a2 to a second negative-direction corpus set, where the simplest mapping method is to take the remainder of the coding values to the total number of negative-direction corpuses included in the second negative-direction corpus set, then concatenating the second negative-direction corpuses extracted according to the coding values a1 and a2, respectively, to generate a Bigram negative-direction corpus, using the generated Bigram negative-direction corpus as a negative-direction corpus of a second type, then adding the generated Bigram negative-direction corpus to the negative-direction corpus set required by the corpus, and similarly, according to the same method, generating the second type negative-direction corpus corresponding to a2a 3.
Then, a1, a2, a3 and a4 are reordered, assuming that the reordered code values are a2, a1, a3 and a4, and every 3 code values, namely a2a1a3 and a1a3a4, are sequentially obtained from the ordered code values, and then, a third number of code values can be obtained from every 3 obtained code values (namely a2a1a3 and a1a3a4), wherein the third number is assumed to be 1, then the group of code values a2a1a3 can be selected, and the group of code values a1a3a4 can also be selected, which is not limited in this embodiment, and the group of code values a2a1a3 is taken as an example for explanation here. It should be noted that if the third number is 1, the set of a2a1a3 code values is selected during the first selection, and then the set of a2a1a3 code values still needs to be selected each time the model training is performed.
Next, the encoding values of a2, a1, and a3 may be mapped to the second negative-going corpus set, where the simplest mapping method is to take the remainder of the total number of the negative-going corpuses included in the second negative-going corpus set for the encoding values, then splice the second negative-going corpuses extracted according to the encoding values of a2, a1, and a3, respectively, to generate a Trigram negative-going corpus, use the generated Trigram negative-going corpus as the second type of corpus, then add the generated Trigram negative-going corpus to the negative-going corpus set required by the corpus, where the purpose of reordering the a1, a2, a3, and a4 is to make the generated Trigram negative-going corpus not include the generated Bigram negative-going corpus.
In this embodiment, the extracting module 87 may include: a sampling value obtaining submodule 872 and a corpus extraction submodule 873;
the sampling value obtaining sub-module 872, configured to obtain a third sampling value of the negative-going corpus of the first type and a fourth sampling value of the negative-going corpus of the second type according to the coding value of each set of training corpora and a pre-learned mapping relationship; the mapping relationship learned in advance may include a remainder, which is not limited in this embodiment.
The corpus extraction sub-module 873 is configured to extract the negative corpuses of the first type from the first negative corpus set according to the third sampling value obtained by the sampling value obtaining sub-module 872, and extract the negative corpuses of the second type from the second negative corpus set according to the fourth sampling value.
Further, the extraction module 87 may further include: a sample pair obtaining submodule 877 and a mapping relation learning submodule 878;
the sample pair obtaining sub-module 877 is configured to obtain a training sample pair before the sampling value obtaining sub-module 872 obtains a third sampling value of the negative-going corpus of the first type, where the training sample pair includes a code value of the training corpus and a sampling value of the corresponding negative-going corpus; the distance between the sampling values of the negative corpora corresponding to the training corpora meets a preset constraint distance;
and a mapping relation learning submodule 878, configured to learn a mapping relation by using the training sample pair, where the mapping relation includes a mapping relation between a code value of the training corpus and a sampling value of a corresponding negative corpus.
The semantic recognition device based on artificial intelligence provided by the embodiment shown in fig. 9 can be used for executing the technical solutions of the method embodiments shown in fig. 3 to fig. 6 of the present application, and the implementation principles and technical effects thereof can be further described with reference to the related descriptions in the method embodiments.
It should be understood that the division of the modules of the artificial intelligence based semantic recognition apparatus shown in fig. 8 to 9 is only a logical division, and the actual implementation may be wholly or partially integrated into a physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the module may be a separate processing element, or may be integrated into a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
Fig. 10 is a schematic structural diagram of an embodiment of the artificial intelligence based semantic recognition device according to the present application, where the artificial intelligence based semantic recognition device may include: a display screen; one or more processors; a memory; a plurality of application programs; and one or more computer programs.
Wherein, the display screen may include a display screen of a vehicle-mounted computer (Mobile Data Center); the semantic recognition equipment based on artificial intelligence can be equipment such as a cloud server, a mobile terminal (mobile phone), a smart screen, an unmanned aerial Vehicle, an Intelligent Connected Vehicle (ICV), an Intelligent Vehicle (smart/Intelligent car) or Vehicle-mounted equipment.
Wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the steps of: acquiring a query statement input by a user;
recognizing the query sentence through a pre-trained semantic recognition model to obtain the intention of the query sentence; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, and the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted;
obtaining a response corresponding to the query statement according to the query statement and the intention of the query statement;
and displaying the response corresponding to the query statement.
In a possible implementation manner, when the instruction is executed by the apparatus, the apparatus is specifically caused to perform the following steps:
acquiring a query sentence input by a user through a text; alternatively, the first and second electrodes may be,
acquiring a query sentence input by a user through voice; alternatively, the first and second electrodes may be,
the method comprises the steps of obtaining a picture input by a user, identifying the picture, and obtaining a query statement included in the picture.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps:
grouping the training corpuses according to the quantity of the negative corpuses to be extracted;
coding each group of training corpora to obtain a coding value of each group of training corpora;
extracting the negative linguistic data of the first type and the negative linguistic data of the second type according to the coding value;
and training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps:
acquiring a first quantity of negative-going corpora of a first type included in a first negative-going corpus set;
obtaining a first sampling value of the negative direction corpus of the first type according to the coding value of each group of training corpuses and the first quantity;
and extracting first negative direction linguistic data of a first type from the first negative direction linguistic data set according to the first sampling value.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps: after a first negative-direction corpus of a first type is extracted from the first negative-direction corpus set according to the first sampling value, calculating a first similarity between the first negative-direction corpus and the training corpus;
and if the first similarity is smaller than a first similarity threshold value, determining that the sampling of the first negative-going corpus is successful, and adding the first negative-going corpus into a sampling corpus set.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps: after calculating a first similarity between the first negative-going corpus and the training corpus, if the first similarity is greater than or equal to a first similarity threshold, obtaining a second sampling value according to the first sampling value;
extracting a second negative-going corpus of the first type from the first negative-going corpus set according to the second sampling value;
calculating a second similarity between the second negative-going corpus and the training corpus;
and if the second similarity is smaller than a first similarity threshold, determining that the second negative-going corpus is successfully sampled, and adding the second negative-going corpus into the sampled corpus set.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps: after calculating a second similarity between the second negative-going corpus and the training corpus, if the second similarity is greater than or equal to a first similarity threshold, repeating the step of obtaining a second sampling value according to the first sampling value and subsequent steps;
when the repeated execution times are larger than a preset repeated time threshold value, if the similarity between the negative-direction corpus obtained by current sampling and the training corpus is smaller than a second similarity threshold value, determining that the negative-direction corpus obtained by current sampling is successfully sampled, and adding the negative-direction corpus obtained by current sampling into the sampling corpus set; and if the similarity between the negative-going corpora obtained by current sampling and the training corpora is larger than or equal to a second similarity threshold, adding the negative-going corpora successfully sampled last time into the sampling corpus set again.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps: sequentially acquiring every M coded values from the coded values;
selecting a second number of encoded values from each of the acquired M encoded values;
extracting a second type of negative direction linguistic data from a second negative direction linguistic data set according to the second number of coding values;
sorting the encoded values;
acquiring every N coded values in sequence from the sequenced coded values;
selecting a third number of encoded values from every N acquired encoded values;
extracting a second type of negative direction linguistic data from a second negative direction linguistic data set according to the third number of coding values; wherein, M and N are positive integers, and M is not equal to N.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps: obtaining a third sampling value of the negative-going corpus of the first type and a fourth sampling value of the negative-going corpus of the second type according to the coding value of each group of training corpuses and a pre-learned mapping relation;
and extracting negative corpora of a first type from the first negative corpus set according to the third sampling value, and extracting negative corpora of a second type from the second negative corpus set according to the fourth sampling value.
In one possible implementation, the instructions, when executed by the device, cause the device to perform the following steps: acquiring a training sample pair before acquiring a third sampling value of the negative-going corpus of the first type and a fourth sampling value of the negative-going corpus of the second type according to the coding value of each group of training corpuses and a pre-learned mapping relation, wherein the training sample pair comprises the coding value of the training corpuses and the sampling value of the corresponding negative-going corpus; the distance between the sampling values of the negative corpora corresponding to the training corpora meets a preset constraint distance;
and learning a mapping relation by using the training sample pair, wherein the mapping relation comprises a mapping relation between the coding value of the training corpus and the sampling value of the corresponding negative corpus.
The artificial intelligence based semantic recognition device shown in fig. 10 may be an electronic device or a circuit device built in the electronic device. The electronic equipment can be cloud server, mobile terminal (mobile phone), smart screen, unmanned aerial vehicle, ICV, intelligent (automobile) or vehicle-mounted equipment and the like.
The artificial intelligence based semantic recognition device described above may be used to perform the functions/steps of the methods provided by the embodiments of fig. 3-7 of the present application.
As shown in FIG. 10, the artificial intelligence based semantic recognition device 900 includes a processor 910 and a transceiver 920. Optionally, the artificial intelligence based semantic recognition device 900 may also include a memory 930. The processor 910, the transceiver 920 and the memory 930 may communicate with each other via internal connection paths to transmit control and/or data signals, the memory 930 may be used for storing a computer program, and the processor 910 may be used for calling and running the computer program from the memory 930.
Optionally, the artificial intelligence based semantic recognition device 900 may further include an antenna 940 for transmitting the wireless signal output by the transceiver 920.
The processor 910 and the memory 930 may be combined into a single processing device, or more generally, separate components, and the processor 910 is configured to execute the program code stored in the memory 930 to implement the functions described above. In particular implementations, the memory 930 may be integrated with the processor 910 or may be separate from the processor 910.
In addition to this, in order to make the function of the artificial intelligence based semantic recognition apparatus 900 more complete, the artificial intelligence based semantic recognition apparatus 900 may further include one or more of an input unit 960, a display unit 970, an audio circuit 980 which may further include a speaker 982, a microphone 984, and the like, a camera 990, a sensor 901, and the like. The display unit 970 may include a display screen, among others.
Optionally, the artificial intelligence based semantic recognition device 900 described above may also include a power supply 950 for providing power to various devices or circuits in the artificial intelligence based semantic recognition device 900.
It should be understood that the artificial intelligence based semantic recognition apparatus 900 shown in fig. 10 can implement the processes of the methods provided by the embodiments shown in fig. 3-7. The operation and/or function of each module in the artificial intelligence based semantic recognition device 900 are respectively for implementing the corresponding flow in the above method embodiment. Reference may be made specifically to the description of the method embodiments shown in fig. 3 to 7, and a detailed description is appropriately omitted herein to avoid redundancy.
It should be understood that the processor 910 in the artificial intelligence based semantic recognition apparatus 900 shown in fig. 10 may be a system on a chip SOC, and the processor 910 may include a Central Processing Unit (CPU), and may further include other types of processors, such as: an image Processing Unit (hereinafter, referred to as GPU), and the like.
In summary, various portions of the processors or processing units within the processor 910 may cooperate to implement the foregoing method flows, and corresponding software programs for the various portions of the processors or processing units may be stored in the memory 930.
In the above embodiments, the processors may include, for example, a CPU, a DSP, a microcontroller, or a digital Signal processor, and may further include a GPU, an embedded Neural Network Processor (NPU), and an Image Signal Processing (ISP), and the processors may further include necessary hardware accelerators or logic Processing hardware circuits, such as an ASIC, or one or more integrated circuits for controlling the execution of the program according to the technical solution of the present application. Further, the processor may have the functionality to operate one or more software programs, which may be stored in the storage medium.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the method provided by the embodiments shown in fig. 3, fig. 4, fig. 5, fig. 6 or fig. 7 of the present application.
Embodiments of the present application also provide a computer program product, which includes a computer program, when the computer program runs on a computer, causes the computer to execute the method provided by the embodiments shown in fig. 3, fig. 4, fig. 5, fig. 6 or fig. 7 of the present application.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (24)

1. A semantic recognition method based on artificial intelligence is characterized by comprising the following steps:
acquiring a query statement input by a user;
recognizing the query statement through a pre-trained semantic recognition model to obtain the intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, wherein the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted;
obtaining a response corresponding to the query statement according to the query statement and the intention of the query statement;
and displaying the response corresponding to the query statement.
2. The method of claim 1, wherein the obtaining the query statement input by the user comprises:
acquiring a query sentence input by a user through a text; alternatively, the first and second electrodes may be,
acquiring a query sentence input by a user through voice; alternatively, the first and second electrodes may be,
the method comprises the steps of obtaining a picture input by a user, identifying the picture, and obtaining a query statement included in the picture.
3. The method according to claim 1 or 2, wherein the training process of the semantic recognition model comprises:
grouping the training corpuses according to the quantity of the negative corpuses to be extracted;
coding each group of training corpora to obtain a coding value of each group of training corpora;
extracting the negative linguistic data of the first type and the negative linguistic data of the second type according to the coding value;
and training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
4. The method according to claim 3, wherein said extracting the first type of negative-going corpora according to the coded value comprises:
acquiring a first quantity of negative-going corpora of a first type included in a first negative-going corpus set;
obtaining a first sampling value of the negative direction corpus of the first type according to the coding value of each group of training corpuses and the first quantity;
and extracting first negative direction linguistic data of a first type from the first negative direction linguistic data set according to the first sampling value.
5. The method of claim 4, wherein after extracting first negative-going corpora of a first type from the first negative-going corpus according to the first sampling value, further comprising:
calculating a first similarity between the first negative-going corpus and the training corpus;
and if the first similarity is smaller than a first similarity threshold value, determining that the sampling of the first negative-going corpus is successful, and adding the first negative-going corpus into a sampling corpus set.
6. The method of claim 5, wherein after calculating the first degree of similarity between the first negative-going corpus and the corpus, further comprising:
if the first similarity is larger than or equal to a first similarity threshold value, obtaining a second sampling value according to the first sampling value;
extracting a second negative-going corpus of the first type from the first negative-going corpus set according to the second sampling value;
calculating a second similarity between the second negative-going corpus and the training corpus;
and if the second similarity is smaller than a first similarity threshold, determining that the second negative-going corpus is successfully sampled, and adding the second negative-going corpus into the sampled corpus set.
7. The method according to claim 6, wherein after calculating the second similarity between the second negative-going corpus and the corpus, further comprising:
if the second similarity is larger than or equal to a first similarity threshold value, the step of obtaining a second sampling value according to the first sampling value and subsequent steps are repeatedly executed;
when the repeated execution times are larger than a preset repeated time threshold value, if the similarity between the negative-direction corpus obtained by current sampling and the training corpus is smaller than a second similarity threshold value, determining that the negative-direction corpus obtained by current sampling is successfully sampled, and adding the negative-direction corpus obtained by current sampling into the sampling corpus set; and if the similarity between the negative-going corpora obtained by current sampling and the training corpora is larger than or equal to a second similarity threshold, adding the negative-going corpora successfully sampled last time into the sampling corpus set again.
8. The method according to claim 3, wherein said extracting the second type of negative-going corpora according to the encoded values comprises:
sequentially acquiring every M coded values from the coded values;
selecting a second number of encoded values from each of the acquired M encoded values;
extracting a second type of negative direction linguistic data from a second negative direction linguistic data set according to the second number of coding values;
sorting the encoded values;
acquiring every N coded values in sequence from the sequenced coded values;
selecting a third number of encoded values from every N acquired encoded values;
extracting a second type of negative direction linguistic data from a second negative direction linguistic data set according to the third number of coding values; wherein, M and N are positive integers, and M is not equal to N.
9. The method of claim 3, wherein extracting the first type of negative-going corpus and the second type of negative-going corpus according to the coding value comprises:
obtaining a third sampling value of the negative-going corpus of the first type and a fourth sampling value of the negative-going corpus of the second type according to the coding value of each group of training corpuses and a pre-learned mapping relation;
and extracting negative corpora of a first type from the first negative corpus set according to the third sampling value, and extracting negative corpora of a second type from the second negative corpus set according to the fourth sampling value.
10. The method according to claim 9, wherein before obtaining the third sample value of the first type of negative-going corpus and the fourth sample value of the second type of negative-going corpus according to the coding value of each set of corpus and the pre-learned mapping relationship, further comprising:
acquiring a training sample pair, wherein the training sample pair comprises a code value of a training corpus and a sampling value of a corresponding negative corpus; the distance between the sampling values of the negative corpora corresponding to the training corpora meets a preset constraint distance;
and learning a mapping relation by using the training sample pair, wherein the mapping relation comprises a mapping relation between the coding value of the training corpus and the sampling value of the corresponding negative corpus.
11. A semantic recognition device based on artificial intelligence is characterized by comprising:
the acquisition module is used for acquiring the query statement input by the user;
the recognition module is used for recognizing the query statement through a pre-trained semantic recognition model to obtain the intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, wherein the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted;
the query module is used for acquiring a response corresponding to the query statement according to the query statement acquired by the acquisition module and the intention of the query statement identified by the identification module;
and the display module is used for displaying the response corresponding to the query statement.
12. The apparatus of claim 11,
the acquisition module is specifically used for acquiring query sentences input by a user through texts; or acquiring a query sentence input by a user through voice; or acquiring a picture input by a user, identifying the picture, and acquiring a query statement included in the picture.
13. The apparatus of claim 11 or 12, further comprising:
the grouping module is used for grouping the training corpora according to the quantity of the negative corpora to be extracted;
the coding module is used for coding each group of training corpora to obtain a coding value of each group of training corpora;
the extraction module is used for extracting the negative linguistic data of the first type and the negative linguistic data of the second type according to the coding value obtained by the coding module;
and the training module is used for training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
14. The apparatus of claim 13, wherein the extraction module comprises:
the quantity obtaining sub-module is used for obtaining a first quantity of the negative direction linguistic data of the first type included in the first negative direction linguistic data set;
the sampling value obtaining sub-module is used for obtaining a first sampling value of the negative direction corpus of the first type according to the coding value of each group of training corpuses and the first quantity;
and the corpus extraction submodule is used for extracting first negative direction corpuses of a first type from the first negative direction corpus set according to the first sampling value obtained by the sampling value obtaining submodule.
15. The apparatus of claim 14, wherein the extraction module further comprises:
the similarity calculation operator module is used for calculating the first similarity between the first negative direction corpus and the training corpus after the corpus extraction sub-module extracts the first negative direction corpus of the first type;
the corpus extraction sub-module is further configured to determine that a first negative corpus is successfully sampled and add the first negative corpus to a sampled corpus set when the first similarity is smaller than a first similarity threshold.
16. The apparatus of claim 15,
the sampling value obtaining submodule is further used for obtaining a second sampling value according to the first sampling value if the first similarity is larger than or equal to a first similarity threshold value after the similarity calculation submodule calculates the first similarity;
the corpus extraction submodule is further configured to extract a second negative-direction corpus of the first type from the first negative-direction corpus set according to a second sampling value obtained by the sampling value obtaining submodule;
the similarity operator module is further configured to calculate a second similarity between the second negative-going corpus and the training corpus;
and the corpus extraction sub-module is further configured to determine that the second negative-direction corpus is successfully sampled and add the second negative-direction corpus to the sampled corpus set when the second similarity is smaller than a first similarity threshold.
17. The apparatus of claim 16,
the sampling value obtaining submodule is further configured to, after the similarity degree calculation submodule calculates the second similarity degree, if the second similarity degree is greater than or equal to a first similarity degree threshold, repeatedly execute the step of obtaining the second sampling value according to the first sampling value and subsequent steps;
the corpus extraction sub-module is further configured to, when the number of repeated executions is greater than a preset number of repeated threshold, determine that the sampling of the currently sampled negative corpus is successful if the similarity between the currently sampled negative corpus and the training corpus is less than a second similarity threshold, and add the currently sampled negative corpus into the sampled corpus set; and if the similarity between the negative-going corpora obtained by current sampling and the training corpora is larger than or equal to a second similarity threshold, adding the negative-going corpora successfully sampled last time into the sampling corpus set again.
18. The apparatus of claim 13, wherein the extraction module comprises:
the coding value acquisition submodule is used for acquiring every M coding values from the coding values in sequence; and selecting a second number of encoded values from each of the acquired M encoded values;
the corpus extraction submodule is used for extracting negative corpuses of a second type from a second negative corpus set according to the second number of coding values;
the coded value sorting submodule is used for sorting the coded values;
the coded value acquisition submodule is also used for acquiring every N coded values in sequence from the sequenced coded values; and selecting a third number of encoded values from every N acquired encoded values;
the corpus extraction submodule is further configured to extract negative corpuses of a second type from a second negative corpus set according to the third number of coding values; wherein, M and N are positive integers, and M is not equal to N.
19. The apparatus of claim 13, wherein the extraction module comprises:
the sampling value obtaining sub-module is used for obtaining a third sampling value of the negative-going corpora of the first type and a fourth sampling value of the negative-going corpora of the second type according to the coding values of each group of training corpora and a pre-learned mapping relation;
and the corpus extraction sub-module is used for extracting the negative corpuses of the first type from the first negative corpus set according to a third sampling value obtained by the sampling value obtaining sub-module, and extracting the negative corpuses of the second type from the second negative corpus set according to a fourth sampling value.
20. The apparatus of claim 19, wherein the extraction module further comprises:
the sample pair acquisition sub-module is used for acquiring a training sample pair before the sampling value acquisition sub-module acquires a third sampling value of the first type of negative-going corpora and a fourth sampling value of the second type of negative-going corpora, wherein the training sample pair comprises a coding value of the training corpora and a sampling value of the corresponding negative-going corpora; the distance between the sampling values of the negative corpora corresponding to the training corpora meets a preset constraint distance;
and the mapping relation learning submodule is used for learning a mapping relation by using the training sample pair, and the mapping relation comprises a mapping relation between the coding value of the training corpus and the sampling value of the corresponding negative corpus.
21. An artificial intelligence based semantic recognition device, comprising:
a display screen; one or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the steps of:
acquiring a query statement input by a user;
recognizing the query statement through a pre-trained semantic recognition model to obtain the intention of the query statement; the pre-trained semantic recognition model is trained by utilizing a training corpus and a negative corpus, wherein the negative corpus is mapped to a negative corpus set according to the coding value of the training corpus and extracted;
obtaining a response corresponding to the query statement according to the query statement and the intention of the query statement;
and displaying the response corresponding to the query statement.
22. The device of claim 21, wherein the instructions, when executed by the device, cause the device to perform the steps of:
acquiring a query sentence input by a user through a text; alternatively, the first and second electrodes may be,
acquiring a query sentence input by a user through voice; alternatively, the first and second electrodes may be,
the method comprises the steps of obtaining a picture input by a user, identifying the picture, and obtaining a query statement included in the picture.
23. The apparatus according to claim 21 or 22, wherein the instructions, when executed by the apparatus, cause the apparatus to perform in particular the steps of:
grouping the training corpuses according to the quantity of the negative corpuses to be extracted;
coding each group of training corpora to obtain a coding value of each group of training corpora;
extracting the negative linguistic data of the first type and the negative linguistic data of the second type according to the coding value;
and training by using the training corpus, the negative corpus of the first type and the negative corpus of the second type to obtain the semantic recognition model.
24. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1-10.
CN201911056617.4A 2019-10-31 2019-10-31 Semantic recognition method and device based on artificial intelligence and semantic recognition equipment Pending CN112749565A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201911056617.4A CN112749565A (en) 2019-10-31 2019-10-31 Semantic recognition method and device based on artificial intelligence and semantic recognition equipment
US17/771,577 US20220414340A1 (en) 2019-10-31 2020-07-30 Artificial intelligence-based semantic recognition method, apparatus, and device
PCT/CN2020/105908 WO2021082570A1 (en) 2019-10-31 2020-07-30 Artificial intelligence-based semantic identification method, device, and semantic identification apparatus
EP20881934.2A EP4030335A4 (en) 2019-10-31 2020-07-30 Artificial intelligence-based semantic identification method, device, and semantic identification apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911056617.4A CN112749565A (en) 2019-10-31 2019-10-31 Semantic recognition method and device based on artificial intelligence and semantic recognition equipment

Publications (1)

Publication Number Publication Date
CN112749565A true CN112749565A (en) 2021-05-04

Family

ID=75645490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911056617.4A Pending CN112749565A (en) 2019-10-31 2019-10-31 Semantic recognition method and device based on artificial intelligence and semantic recognition equipment

Country Status (4)

Country Link
US (1) US20220414340A1 (en)
EP (1) EP4030335A4 (en)
CN (1) CN112749565A (en)
WO (1) WO2021082570A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230008868A1 (en) * 2021-07-08 2023-01-12 Nippon Telegraph And Telephone Corporation User authentication device, user authentication method, and user authentication computer program

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138523A (en) * 2014-05-30 2015-12-09 富士通株式会社 Method and device for determining semantic keywords in text
CN106777257A (en) * 2016-12-28 2017-05-31 厦门快商通科技股份有限公司 The constructing system and method for the Intelligent dialogue model based on words art
US20170351971A1 (en) * 2016-06-07 2017-12-07 International Business Machines Corporation Method and apparatus for informative training repository building in sentiment analysis model learning and customaization
CN108108754A (en) * 2017-12-15 2018-06-01 北京迈格威科技有限公司 The training of identification network, again recognition methods, device and system again
CN108460396A (en) * 2017-09-20 2018-08-28 腾讯科技(深圳)有限公司 The negative method of sampling and device
WO2018196684A1 (en) * 2017-04-24 2018-11-01 北京京东尚科信息技术有限公司 Method and device for generating conversational robot
CN108920622A (en) * 2018-06-29 2018-11-30 北京奇艺世纪科技有限公司 A kind of training method of intention assessment, training device and identification device
CN109344395A (en) * 2018-08-30 2019-02-15 腾讯科技(深圳)有限公司 A kind of data processing method, device, server and storage medium
CN110110860A (en) * 2019-05-06 2019-08-09 南京大学 A kind of self-adapting data method of sampling for accelerating machine learning to train
CN110276075A (en) * 2019-06-21 2019-09-24 腾讯科技(深圳)有限公司 Model training method, name entity recognition method, device, equipment and medium
WO2019184118A1 (en) * 2018-03-26 2019-10-03 平安科技(深圳)有限公司 Risk model training method and apparatus, a risk identification method and apparatus, and device and medium
US20190325864A1 (en) * 2018-04-16 2019-10-24 Google Llc Automated assistants that accommodate multiple age groups and/or vocabulary levels

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567304B (en) * 2010-12-24 2014-02-26 北大方正集团有限公司 Filtering method and device for network malicious information
US10152534B2 (en) * 2015-07-02 2018-12-11 International Business Machines Corporation Monitoring a corpus for changes to previously provided answers to questions
US10733982B2 (en) * 2018-01-08 2020-08-04 Apple Inc. Multi-directional dialog
CN109783820B (en) * 2019-01-18 2022-11-25 广东小天才科技有限公司 Semantic parsing method and system
CN110162611B (en) * 2019-04-23 2021-03-26 苏宁金融科技(南京)有限公司 Intelligent customer service response method and system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138523A (en) * 2014-05-30 2015-12-09 富士通株式会社 Method and device for determining semantic keywords in text
US20170351971A1 (en) * 2016-06-07 2017-12-07 International Business Machines Corporation Method and apparatus for informative training repository building in sentiment analysis model learning and customaization
CN106777257A (en) * 2016-12-28 2017-05-31 厦门快商通科技股份有限公司 The constructing system and method for the Intelligent dialogue model based on words art
WO2018196684A1 (en) * 2017-04-24 2018-11-01 北京京东尚科信息技术有限公司 Method and device for generating conversational robot
CN108460396A (en) * 2017-09-20 2018-08-28 腾讯科技(深圳)有限公司 The negative method of sampling and device
CN108108754A (en) * 2017-12-15 2018-06-01 北京迈格威科技有限公司 The training of identification network, again recognition methods, device and system again
WO2019184118A1 (en) * 2018-03-26 2019-10-03 平安科技(深圳)有限公司 Risk model training method and apparatus, a risk identification method and apparatus, and device and medium
US20190325864A1 (en) * 2018-04-16 2019-10-24 Google Llc Automated assistants that accommodate multiple age groups and/or vocabulary levels
CN108920622A (en) * 2018-06-29 2018-11-30 北京奇艺世纪科技有限公司 A kind of training method of intention assessment, training device and identification device
CN109344395A (en) * 2018-08-30 2019-02-15 腾讯科技(深圳)有限公司 A kind of data processing method, device, server and storage medium
CN110110860A (en) * 2019-05-06 2019-08-09 南京大学 A kind of self-adapting data method of sampling for accelerating machine learning to train
CN110276075A (en) * 2019-06-21 2019-09-24 腾讯科技(深圳)有限公司 Model training method, name entity recognition method, device, equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DEEN MD. ABDULLAH ET AL: "An automated advisor system to suggest response after analyzing user writings in social network", 2017 INTERNATIONAL CONFERENCE ON RESEARCH AND INNOVATION IN INFORMATION SYSTEMS (ICRIIS), pages 1 - 6 *
刘荣;郝晓燕;李颖;: "基于语义模式的半监督中文观点句识别研究", 南京大学学报(自然科学), no. 05, pages 111 - 117 *
沈思等: "基于多标签分类的学术文献潜在时间意图识别研究", 湖南大学学报(自然科学版), vol. 44, no. 10, pages 158 - 164 *

Also Published As

Publication number Publication date
US20220414340A1 (en) 2022-12-29
WO2021082570A1 (en) 2021-05-06
EP4030335A1 (en) 2022-07-20
EP4030335A4 (en) 2022-11-23

Similar Documents

Publication Publication Date Title
CN110795543B (en) Unstructured data extraction method, device and storage medium based on deep learning
CN108287858B (en) Semantic extraction method and device for natural language
CN111324743A (en) Text relation extraction method and device, computer equipment and storage medium
CN110516253B (en) Chinese spoken language semantic understanding method and system
CN108763510A (en) Intension recognizing method, device, equipment and storage medium
CN110083693B (en) Robot dialogue reply method and device
CN112100349A (en) Multi-turn dialogue method and device, electronic equipment and storage medium
CN112287670A (en) Text error correction method, system, computer device and readable storage medium
CN110163181B (en) Sign language identification method and device
CN108228576B (en) Text translation method and device
CN112307208A (en) Long text classification method, terminal and computer storage medium
JP6677419B2 (en) Voice interaction method and apparatus
CN112528637B (en) Text processing model training method, device, computer equipment and storage medium
CN110222328B (en) Method, device and equipment for labeling participles and parts of speech based on neural network and storage medium
CN111985228A (en) Text keyword extraction method and device, computer equipment and storage medium
CN113553848B (en) Long text classification method, system, electronic device, and computer-readable storage medium
CN115455171B (en) Text video mutual inspection rope and model training method, device, equipment and medium
CN111143507A (en) Reading understanding method based on composite problems
CN111506726A (en) Short text clustering method and device based on part-of-speech coding and computer equipment
CN113436614A (en) Speech recognition method, apparatus, device, system and storage medium
CN116522905B (en) Text error correction method, apparatus, device, readable storage medium, and program product
CN112749565A (en) Semantic recognition method and device based on artificial intelligence and semantic recognition equipment
CN110413737B (en) Synonym determination method, synonym determination device, server and readable storage medium
CN111581341A (en) Method for acquiring text abstract and language model generation method
CN112016281B (en) Method and device for generating wrong medical text and storage medium

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