Information identification method and device, electronic equipment and vehicle
In the natural language understanding task, combining sample statements and knowledge graphs marked with entity information, identifying and analyzing entity information and its context in text, the problem of inaccurate identification results in the prior art is solved, and more accurate information recognition and user intention recognition are achieved.
Patent Information
- Application Number
- CN202311312353.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, in the natural language understanding task, the inaccurate recognition results lead to a low accuracy of information recognition and the inaccurate recognition of the user's true intention content cannot be accurately identified.
By obtaining the text information to be identified, matching with different sample statement information marked with entity information, the first entity information is identified, and the word segmentation in the text information is matched with the entity information in the knowledge graph, and the second entity information is identified. The two are union operations, the target entity information and its context information are determined, based on this, and a combination sequence of conjunction and entity words is selected as the recognition result.
It enhances the entity representation and distinction ability in natural language understanding tasks, and combines context information analysis, effectively improves the context understanding ability and accuracy of natural language understanding, and can accurately identify the user's true intentions, even if there are interfering words.
Smart Images

Figure CN119849483A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to an information identification method, device, electronic equipment and vehicle. Background Art
[0002] Natural Language Understanding (NLU) refers to the process of computers analyzing human natural language texts to extract information such as grammar, semantics, and logic from them so that they can be automatically understood and used by computers. Natural language understanding is an important branch of the field of artificial intelligence.
[0003] In the natural language understanding task of the in-vehicle system, the text information obtained by speech recognition (Automatic Speech Recognition, ASR) is further recognized by natural language understanding and converted into structured language that can be understood by machines.
[0004] However, there may be many interference words in the text information to be recognized, which will lead to inaccurate recognition results of natural language understanding, and then lead to low accuracy of information recognition results, and fail to accurately recognize the user's true intention content. Summary of the invention
[0005] In view of this, the present application provides an information recognition method, device, electronic device and vehicle, the main purpose of which is to improve the technical problem that the current existing technology will lead to inaccurate recognition results of natural language understanding, which in turn leads to low accuracy of information recognition results and inability to accurately identify the user's true intention content.
[0006] In a first aspect, the present application provides an information identification method, comprising:
[0007] Obtain text information to be recognized;
[0008] identifying first entity information in the text information by matching the text information with different sample sentence information annotated with entity information; and,
[0009] By matching the word segments in the text information with the entity information in the knowledge graph, second entity information in the text information is identified, wherein the first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries;
[0010] Performing a union operation on the first entity information and the second entity information to obtain target entity information in the text information;
[0011] Determine context information of the target entity information in the text information;
[0012] Based on the target entity information and the context information, an analysis is performed, an associated word of the target entity information is selected from the context information, and a combination sequence of the associated word and the entity word corresponding to the target entity information is used as a recognition result of natural language understanding.
[0013] In a second aspect, the present application provides an information identification device, comprising:
[0014] An acquisition module, configured to acquire text information to be recognized;
[0015] A matching module is configured to identify first entity information in the text information by matching the text information with different sample sentence information annotated with entity information; and identify second entity information in the text information by matching word segments in the text information with entity information in the knowledge graph, wherein the first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries;
[0016] A calculation module, configured to perform a union operation on the first entity information and the second entity information to obtain target entity information in the text information;
[0017] A determination module, configured to determine context information of the target entity information in the text information;
[0018] The analysis module is configured to perform analysis based on the target entity information and the context information, select associated words of the target entity information from the context information, and use a combination sequence of the associated words and the entity words corresponding to the target entity information as a recognition result of natural language understanding.
[0019] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0020] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0021] In a fifth aspect, the present application provides a vehicle, comprising: the device as described in the second aspect, or the electronic device as described in the fourth aspect.
[0022] By means of the above technical scheme, the present application provides an information identification method, device, system and electronic device, which specifically first obtains text information to be identified; then identifies the first entity information in the text information by matching the text information with different sample sentence information marked with entity information; and identifies the second entity information in the text information by matching the word segments in the text information with the entity information in the knowledge graph, wherein the first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries; performs a union operation on the first entity information and the second entity information to obtain target entity information in the text information; determines the context information of the target entity information in the text information; and then analyzes the target entity information and the context information, selects the associated words of the target entity information from the context information, and uses the combination sequence of the associated words and the entity words corresponding to the target entity information as the recognition result of natural language understanding. Compared with the current existing technology, the present application can enhance the entity representation ability and entity distinction ability in natural language understanding tasks. Combined with the analysis of context information, it can effectively enhance the context understanding ability and context representation ability of natural language understanding. When the speech recognition results are further subjected to natural language understanding and recognition, the recognition results of natural language understanding can be accurately obtained. Even if there are interference words in the text information to be recognized, the accuracy of the information recognition results can be improved as much as possible, and the user's true intention can be accurately recognized.
[0023] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 A schematic diagram of a flow chart of an information identification method provided in an embodiment of the present application is shown;
[0027] Figure 2A schematic diagram showing a flow chart of another information identification method provided in an embodiment of the present application is shown;
[0028] Figure 3 A structural block diagram of an application example provided by an embodiment of the present application is shown;
[0029] Figure 4 A schematic diagram of the structure of an information identification device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0031] This embodiment provides an information identification method, such as Figure 1 As shown, the method includes:
[0032] Step 101: Obtain text information to be recognized.
[0033] The execution subject of this embodiment may be an information recognition device or equipment, which may be configured on the client side or the server side, etc. The method of this embodiment may be applied to various fields, such as the field of speech recognition, etc. This embodiment does not specifically limit this, but only illustrates it by way of example.
[0034] The text information to be recognized may refer to the text information to be recognized by natural language understanding. The text information can be obtained through automatic speech recognition. It is further necessary to perform natural language understanding and recognition on the text information to obtain the user's true intention content, such as the user needs to open the car window, listen to music, watch videos, etc.
[0035] Step 102: Identify the first entity information in the text information by matching the text information with different sample sentence information marked with entity information, and identify the second entity information in the text information by matching the word segments in the text information with the entity information in the knowledge graph.
[0036] The first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries.
[0037] In the embodiment of the present application, entity words may specifically include: nouns or pronouns in text information, etc. Entity boundaries may be boundary position information of entity words in text information. For example, [2, 3] represents that the entity boundary of an entity word is the range from the second word to the third word in the text information, that is, the entity word is composed of the second word and the third word in the text information.
[0038] This embodiment can identify entity information in text information in two aspects. On the one hand, the text information is matched with different sample sentence information, and the sample sentence information has corresponding entity information. In this way, the entity information in the text information is found according to the matching results. On the other hand, the text information is segmented, and then the obtained segmented words are matched with each entity information in the knowledge graph to find the entity information in the text information. However, combining the recognition results of these two aspects, the entity information in the text information can be more accurately identified.
[0039] Step 103: Perform a union operation on the first entity information and the second entity information to obtain target entity information in the text information.
[0040] Exemplarily, if the first entity information includes entity information a, entity information b, and entity information c, and the second entity information includes entity information b, entity information c, and entity information d, they are unioned to obtain target entity information including entity information a, entity information b, entity information c, and entity information d.
[0041] Step 104: Determine context information of the target entity information in the text information.
[0042] In an embodiment of the present application, context information refers to the context information of each target entity word in the text information determined based on the target entity words and target entity boundaries corresponding to each target entity information. The context information can specifically be the information of the previous words corresponding to each target entity word, and / or the information of the following words corresponding to each target entity word.
[0043] Step 105: Analyze the target entity information and the context information, select the associated words of the target entity information from the context information, and use the combined sequence of the associated words and the entity words corresponding to the target entity information as the recognition result of natural language understanding.
[0044] Natural language understanding refers to the process by which computers analyze human natural language texts and extract information such as grammar, semantics, and logic from them so that they can be automatically understood and used by computers. Natural language understanding is an important branch of artificial intelligence.
[0045] For example, in the natural language understanding task of the in-vehicle system, after the speech recognition passes through ASR, there may be many interference words in the obtained text information. In order to improve the recognition accuracy of natural language understanding, this embodiment proposes an information recognition method. By designing two different methods to accurately recognize the entity information in the text information, the entity representation ability and entity distinction ability in the natural language understanding task can be enhanced, and then the context information in the text information is combined for analysis, and the associated words of the target entity information are selected from the context information, and the combination sequence of the associated words and the entity words corresponding to the target entity information is used as the recognition result of natural language understanding.
[0046] Compared with the current existing technology, this embodiment can enhance the entity representation ability and entity distinction ability in natural language understanding tasks. Combined with the analysis of context information, it can effectively enhance the context understanding ability and context representation ability of natural language understanding. When the speech recognition results are further subjected to natural language understanding and recognition, the natural language understanding recognition results can be accurately obtained. Even if the ASR recognition is wrong, the accuracy of the information recognition results can be improved as much as possible, and the user's true intention can be accurately identified.
[0047] Further, as a refinement and extension of the above embodiment, in order to fully illustrate the specific implementation process of the method of the embodiment of the present disclosure, the embodiment of the present application provides the following Figure 2 The specific method shown includes:
[0048] Step 201: Obtain text information to be recognized.
[0049] Optionally, take the example that a user can input “…I want to go to…New World…to buy fruit…” through voice, and based on the ASR technology to recognize the voice data, the text information to be recognized “…I want to go to…New World…to buy fruit…” can be obtained.
[0050] Exemplarily, the text information obtained through voice recognition is "I want to go to a new world".
[0051] Step 202: Identify the first entity information in the text information by matching the text information with different sample sentence information marked with entity information; and identify the second entity information in the text information by matching the word segments in the text information with the entity information in the knowledge graph.
[0052] The first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries.
[0053] Optionally, step 202 may specifically include: inputting text information into a first model to perform calculations for entity information recognition to obtain first entity information.
[0054] Among them, the first model is pre-trained based on different sample sentence information and entity information corresponding to different sample sentence information as a training set. The sample sentence information is various sentence information of the same entity in different scenarios, and the same entity contains a preset proportion of noise data.
[0055] Optionally, step 202 specifically further includes: inputting the text information into the second model to perform calculations for entity information recognition to obtain second entity information.
[0056] Among them, the second model is obtained by pre-training based on different entity words in the knowledge graph of the knowledge field to which the text information belongs, and the attribute information corresponding to the entity words as a training set.
[0057] In an embodiment of the present application, the first model may be an entity representation learning model, an entity learning model, etc., and the name of the first model is not specifically limited herein. Correspondingly, the second model may be a domain knowledge enhancement model, a domain knowledge fusion model, a domain knowledge enhancement fusion model, etc., and the name of the second model is not specifically limited herein.
[0058] In the embodiment of the present application, the sample sentence information also includes noise data of a preset proportion that is the same as the entity in the sample sentence information.
[0059] In the embodiment of the present application, the first model can better learn entity information and enhance the ability to learn entity information in different sentence structures and noises.
[0060] Optionally, the text information to be identified "... I want to go to... New World... to buy fruit..." is input into the first model and matched with different sample sentence information. For example, a matching degree can be set. If the matching degree of a certain sample sentence information is greater than or equal to a certain threshold, it can be considered to match the text information. If the matching degrees of multiple sample sentence information are greater than or equal to a certain threshold, the sample sentence information with the largest matching degree is selected as the target sample sentence information that matches the text information.
[0061] Exemplarily, in the first model, different sample sentence information may include a large number of sample sentences such as “search for a new world”, “I want to go to a new world”, “I want to see a new world”, “I want to go to a new world”, “I want to see the newly released new world”, etc.
[0062] Exemplarily, based on step 201, the text information to be identified "... I want to go to... New World... to buy fruit..." is input into the first model and matched with the sample sentence in the above example. For example, the matching degree can be set. If the matching degree of a certain sample sentence information is greater than or equal to a certain threshold, it can be considered to match the text information. If the matching degrees of multiple sample sentence information are greater than or equal to a certain threshold, the sample sentence information with the largest matching degree is selected as the target sample sentence information that matches the text information.
[0063] In an embodiment of the present application, the knowledge graph contains attribute information of different entities. The attribute information of the entity may include the position vector information of the entity, the action vector information of the entity, etc., which is not specifically limited here.
[0064] In an embodiment of the present application, the knowledge graph contains attribute information of different entities. The attribute information of the entity may include the position vector information of the entity, the action vector information of the entity, etc., which is not specifically limited here.
[0065] For example, for the text information “…I want to go to…New World…to buy fruit…”, the text information “…I want to go to…New World…to buy fruit…” obtained in the knowledge graph contains the position vector information corresponding to the entity and the action vector information corresponding to the entity, etc. The specific entity information may include “New World”, “New World”, “World”, “Go to New World”, “Go to New World”, etc.
[0066] In an embodiment of the present application, the knowledge graph includes different entities and attribute information corresponding to the entities. For example, if the entity is New World, New World is the name of a movie, and the attribute information corresponding to New World can be the director, actors, release information, etc. corresponding to the New World movie.
[0067] For example, if New World is the name of a fruit supermarket, the attribute information corresponding to New World may be the business hours, product categories, supermarket address, etc. of the New World supermarket; if New World is the name of a song, the attribute information corresponding to New World may be the singer, release time, album information, etc. of the New World song. Examples of entities and their corresponding attribute information will not be given one by one here.
[0068] In some examples, the text information is input into a second model for calculation. The second model may be a domain knowledge model. The domain knowledge model may be pre-trained based on the domain in which the entities in the text information are located, and may include attribute information corresponding to the entities in the text information as a training set. The domain knowledge graph may include attribute features of the entities in the text information.
[0069] Based on the existing research status of the representation of entity features by pre-trained language models, this embodiment focuses on the following from the perspective of natural language understanding: for downstream general domain tasks, the learning and representation of entity features mainly focuses on strengthening the ability to identify entity boundaries and discover new words; for downstream specific domain tasks, some graphs with strong domain relevance can extract some general patterns for strengthening in pre-training. Finally, a pre-training scheme is proposed to enhance the entity representation and entity distinction capabilities of the pre-training model by designing two different pre-training tasks, so as to promote the accuracy of downstream tasks.
[0070] Step 203: Perform a union operation on the first entity information and the second entity information to obtain target entity information in the text information.
[0071] Exemplarily, based on step 202, the text information to be identified "... I want to go to... New World... to buy fruit..." is input into the second model, and the text information is identified based on the knowledge graph, and a union calculation is performed with the entity information calculated in the example of step 202 to obtain the target entity information.
[0072] For example, the entity information corresponding to the matching sample sentence information and the entity information matching the attribute information are combined to obtain the candidate entity information. The entities such as "new world", "new world", "world", "go to new world" corresponding to the matching sample sentence information and the entities such as "new world", "new world", "world", "go to new world", "go to new world" and so on that match the attribute information can be combined to determine the candidate entity information, which can be "new world", "new world", "world", "go to new world", "go to new world" and so on.
[0073] In an embodiment of the present application, inputting text information into the second model for calculation can specifically be performing vector calculation. For example, for the text information "... I want to go to... New World... to buy fruit...", vector information of entities such as "New World" and their corresponding attributes can be obtained in the knowledge graph, and vector product calculation can be performed to obtain entities whose vector product calculation results are greater than a preset vector threshold. These entities are pre-trained entities. Two types of pre-training tasks are added during the pre-training process to enhance the model's entity representation capabilities and specific domain knowledge learning capabilities.
[0074] Step 204: Determine context information of the target entity information in the text information.
[0075] Exemplarily, based on step 203, for the text information "...I want to go to...New World...to buy fruit...", if the determined target entity information is "New World", the corresponding preceding information may be "...I want to go to...", and correspondingly, the corresponding following information may be "...to buy fruit...".
[0076] For example, the context information of the entity information "new world" is the vector information of "I want to go", and the context information of the entity information "new world" is the vector information of "I want to go" and "world" respectively. Other situations can be deduced by analogy and will not be listed one by one here.
[0077] Step 205: obtain multiple candidate words from the context information, and combine one or more of the multiple candidate words with the entity words corresponding to the target entity information to obtain multiple combination sequences.
[0078] Optionally, step 205 may specifically include: obtaining the position of the entity word in the text information based on the entity boundary of the entity word; determining the word order of the candidate word and the entity word in the text information based on the position of the entity word in the text information and the context position of the candidate word in the entity word; combining the candidate word and the entity word according to the word order of the candidate word and the entity word in the text information to obtain a combined sequence.
[0079] Exemplarily, based on step 204, if the determined target entity information is "New World", then in the corresponding context information "... I want to go ..." and "... buy fruit ...", the candidate words that can be obtained may be "I", "want to go", "I want to go", "buy", "fruit", "buy fruit", etc., and examples are not given one by one here.
[0080] Step 206: Calculate the confidence score of each combined sequence as a recognition result of natural language understanding.
[0081] Optionally, step 206 may specifically include: obtaining the part of speech corresponding to each word in the combined sequence; calculating the occurrence probability of each word based on the part of speech corresponding to each word and combining the order of words of different parts of speech in the grammatical rules; multiplying the occurrence probabilities corresponding to each word to obtain the confidence score corresponding to the combined sequence.
[0082] Optionally, the part of speech may be a secondary corresponding attribute. For example, when the word is "New World", the part of speech may be that New World is a movie name, a music name, a place name, etc.
[0083] In an embodiment of the present application, the order of words of different parts of speech in the grammatical rules can be, for example, if New World is the name of a movie, the words that appear in the context of New World should be "see", "go to see", etc., and "listen", "go to listen", etc. should not appear.
[0084] Exemplarily, based on step 205, the candidate words may be combined with "new world" one by one, and probability calculation may be performed, as shown in the following formula 1:
[0085] P(a1, a2, a3..., aN)=P(a1)*P(a2|a1)*P(a3|a1, a2)*...*P(aN|a1, a2,..., aN-1)
[0086] (Formula 1)
[0087] In formula 1, P(a1) represents the probability of the first word, P(a2|a1) represents the probability of a2 given a1, and so on.
[0088] Exemplarily, based on step 205, for the text information "...I want to go to...New World...buy fruit...", the entity is "New World", and the corresponding probability calculation of an associated word can be P(I want to go)*P(New World|I want to go)*P(buy fruit|I want to go to New World).
[0089] Step 207: Select a target combination sequence whose confidence score is greater than or equal to a preset threshold.
[0090] Among them, the candidate words in the target combination sequence are used as associated words of the target entity information, and the target combination sequence is used as the recognition result of natural language understanding.
[0091] Optionally, step 207 may specifically include: if there are multiple combination sequences with confidence scores greater than or equal to a preset threshold, selecting a combination sequence with the largest confidence score as the target combination sequence.
[0092] In an embodiment of the present application, if there are at least two target combinations greater than or equal to a preset threshold, the combination sequence with the largest confidence score is selected as the recognition result of natural language understanding. In addition, if there is no target combination sequence greater than the preset threshold, it can be considered that there is no natural language recognition result.
[0093] Exemplarily, based on step 206, the context information of the entity information "New World" is the vector information of "I want to go", and the confidence scores of "New World" and "I want to go" are calculated. Specifically, the vectors corresponding to "New World" and "I want to go" are multiplied to obtain the confidence score corresponding to "New World". Accordingly, the confidence is calculated for each target entity and the corresponding context information, and the confidence score corresponding to each target entity is obtained respectively. The confidence score of each target entity is compared with the preset threshold, and at least one target entity with the preset threshold is obtained. Then, the confidence scores of the target entities are compared, and the target entity with the largest confidence score is selected as the target entity. Introducing confidence in the pre-training stage and considering the confidence information between entities in the process of contextual reasoning can effectively enhance the contextual understanding ability of the pre-training model.
[0094] Compared with the current existing technology, this embodiment adds two types of pre-training tasks in the pre-training process. The first model, namely the entity representation learning model, and the second model, namely the domain knowledge enhancement fusion model, can enhance the entity representation ability and entity distinction ability in the natural language understanding task. The combined analysis of context information can effectively enhance the context understanding ability and context representation ability of natural language understanding. When further performing natural language understanding and recognition on the speech recognition results, the confidence score calculation is introduced to accurately obtain the recognition results of natural language understanding, thereby ensuring the accuracy of the natural language recognition results. Even if there are interference words in the text information to be recognized, the accuracy of the information recognition results can be improved as much as possible, and the user's true intention can be accurately recognized.
[0095] Further, in order to fully illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following examples, but is not limited thereto: Figure 3 The following is a structural block diagram of an example.
[0096] Based on the deficiencies of the existing research status and the ideas to be improved in this embodiment, this embodiment is mainly divided into three modules: S1 entity representation learning task module; S2 domain knowledge enhancement fusion module; S3 entity context learning module. In S1, entity boundary learning and entity new word discovery learning are strengthened, in S2, graph information of specific fields is introduced for domain knowledge learning, and confidence information is introduced in S3 to enhance the contextual representation ability of the language model. After these two stages of learning, on the one hand, the model's entity representation ability and specific domain knowledge learning ability are enhanced, and on the other hand, confidence is introduced. Considering the confidence information between entities in the process of contextual reasoning can effectively enhance the contextual understanding ability of the language model, which will have a certain promoting effect on downstream tasks such as named entity recognition and intent recognition.
[0097] The two pre-training tasks of this scheme are: entity representation learning S1 + entity context learning module S3, domain knowledge enhancement fusion module S2 + entity context learning module. In task one, the input is various sentence patterns of the same entity in different scenarios, including 20% entities with noise data. The pre-training task is to predict the entities and entity boundaries contained in the sentence. In order to better learn the entity information, the location of the entity is recorded after the entity is predicted, and its confidence score is calculated. The predicted entity and the whole sentence are interactively calculated to better learn the contextual features of the entity word, and the prediction sequence with the highest confidence is selected as the prediction result of this task.
[0098] The input for Task 2 is a sentence and a knowledge base related to a specific domain. The pre-training task is also to predict the entities and entity boundaries contained in the sentence. The difference is that each time an entity is predicted, the vector features of the entity will be obtained from the knowledge base, and the feature vectors directly connected to the entity will be used as one of the reference vectors for prediction and calculated with the sentence vector. Finally, the confidence will also be calculated through the entity context learning module, and the result sequence with the largest confidence value will be taken as the prediction result of the task. Two types of pre-training tasks are added during the pre-training process to enhance the model's entity representation ability and specific domain knowledge learning ability; confidence is introduced in the pre-training stage, and the confidence information between entities is considered in the process of contextual reasoning, which can effectively enhance the contextual understanding ability of the pre-trained model.
[0099] Compared with the current existing technology, this embodiment adds two types of pre-training tasks in the pre-training process. The first model, namely the entity representation learning model, and the second model, namely the domain knowledge enhancement fusion model, can enhance the entity representation ability and entity distinction ability in the natural language understanding task. The combined analysis of context information can effectively enhance the context understanding ability and context representation ability of natural language understanding. When further performing natural language understanding and recognition on the speech recognition results, the confidence score calculation is introduced to accurately obtain the recognition results of natural language understanding, thereby ensuring the accuracy of the natural language recognition results. Even if there are interference words in the text information to be recognized, the accuracy of the information recognition results can be improved as much as possible, and the user's true intention can be accurately recognized.
[0100] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in this embodiment provides an information identification device, such as Figure 4 As shown, the device includes: an acquisition module 31, a matching module 32, a calculation module 33, a determination module 34, and an analysis module 35.
[0101] An acquisition module 31 is configured to acquire text information to be recognized;
[0102] The matching module 32 is configured to identify first entity information in the text information by matching the text information with different sample sentence information annotated with entity information; and identify second entity information in the text information by matching the segmented words in the text information with the entity information in the knowledge graph, wherein the first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries;
[0103] An operation module 33 is configured to perform a union operation on the first entity information and the second entity information to obtain target entity information in the text information;
[0104] A determination module 34, configured to determine context information of the target entity information in the text information;
[0105] The analysis module 35 is configured to perform analysis based on the target entity information and the context information, select associated words of the target entity information from the context information, and use a combination sequence of the associated words and the entity words corresponding to the target entity information as a recognition result of natural language understanding.
[0106] In a specific application scenario, the analysis module 35 is specifically configured to obtain multiple candidate words from the context information; combine one or more of the multiple candidate words with the entity words corresponding to the target entity information to obtain multiple combination sequences; calculate the confidence score of each combination sequence as the recognition result of the natural language understanding; select the target combination sequence with a confidence score greater than or equal to a preset threshold, wherein the candidate words in the target combination sequence are used as associated words of the target entity information, and the target combination sequence is used as the recognition result of the natural language understanding.
[0107] In a specific application scenario, the analysis module 35 is further configured to obtain the position of the entity word in the text information based on the entity boundary of the entity word; determine the word order of the candidate word and the entity word in the text information based on the position of the entity word in the text information and the context position of the candidate word in the entity word; and combine the candidate word with the entity word according to the word order of the candidate word and the entity word in the text information to obtain a combined sequence.
[0108] In a specific application scenario, the analysis module 35 is further configured to obtain the part of speech corresponding to each word in the combination sequence; calculate the occurrence probability of each word based on the part of speech corresponding to each word and in combination with the order of words of different parts of speech in the grammatical rules; multiply the occurrence probabilities corresponding to each word to obtain the confidence score corresponding to the combination sequence.
[0109] In a specific application scenario, the analysis module 35 is further configured to select a combination sequence with the largest confidence score as the target combination sequence if there are multiple combination sequences with confidence scores greater than or equal to a preset threshold.
[0110] In a specific application scenario, the matching module 32 is specifically configured to input the text information into a first model to perform entity information recognition calculations to obtain the first entity information, wherein the first model is pre-trained based on the different sample sentence information and the entity information corresponding to the different sample sentence information as a training set, and the sample sentence information is various types of sentence information of the same entity in different scenarios, and the same entity contains a preset proportion of noise data.
[0111] In a specific application scenario, the matching module 32 is further configured to input the text information into a second model to perform entity information recognition calculations to obtain the second entity information. The second model is pre-trained based on different entity words in the knowledge graph of the knowledge field to which the text information belongs, and attribute information corresponding to the entity words as a training set.
[0112] It should be noted that for other corresponding descriptions of the functional units involved in the information identification device provided in this embodiment, please refer to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0113] Based on the above Figure 1 and Figure 2 The method shown in the figure, accordingly, the embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The method shown.
[0114] Based on this understanding, the technical solution of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various implementation scenarios of the present disclosure.
[0115] Based on the above Figure 1 and Figure 2 The method shown, and Figure 4In order to achieve the above-mentioned purpose, the embodiment of the present disclosure also provides an electronic device, which can be configured on a computer terminal, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The method shown.
[0116] In some embodiments, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may include a standard wired interface, a wireless interface (such as a WI-FI interface), etc. in some embodiments.
[0117] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in the embodiments of the present disclosure does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0118] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0119] Based on the above electronic device, the embodiment of the present disclosure further provides a vehicle, which may specifically include: Figure 4 The device shown in the figure or the electronic device as described above. The vehicle can be a new energy vehicle or a traditional vehicle.
[0120] Through the description of the above disclosed implementation methods, compared with the current existing technology, this embodiment adds two types of pre-training tasks in the pre-training process. The first model, namely the entity representation learning model, and the second model, namely the domain knowledge enhancement fusion model, can enhance the entity representation ability and entity distinction ability in the natural language understanding task. The combined analysis of context information can effectively enhance the context understanding ability and context representation ability of natural language understanding. When further performing natural language understanding and recognition on the speech recognition results, the confidence score calculation is introduced to accurately obtain the recognition results of natural language understanding, and the accuracy of the natural language recognition results is guaranteed. Even if there are interference words in the text information to be recognized, the accuracy of the information recognition results is improved as much as possible, and the user's true intention can be accurately recognized.
[0121] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0122] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. An information identification method, characterized in that: The method comprises: Obtain text information to be recognized; identifying first entity information in the text information by matching the text information with different sample sentence information annotated with entity information; and, By matching the word segments in the text information with the entity information in the knowledge graph, second entity information in the text information is identified, wherein the first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries; Performing a union operation on the first entity information and the second entity information to obtain target entity information in the text information; Determine context information of the target entity information in the text information; Based on the target entity information and the context information, an analysis is performed, an associated word of the target entity information is selected from the context information, and a combination sequence of the associated word and the entity word corresponding to the target entity information is used as a recognition result of natural language understanding.
2. The method according to claim 1, characterized in that The step of analyzing the target entity information and the context information, selecting associated words of the target entity information from the context information, and using a combination sequence of the associated words and the target entity information as a recognition result of natural language understanding includes: Acquire multiple candidate words from the context information; Combining one or more of the multiple candidate words with the entity words corresponding to the target entity information to obtain multiple combination sequences; Calculating a confidence score for each combined sequence as a recognition result of the natural language understanding; A target combination sequence whose confidence score is greater than or equal to a preset threshold is selected, wherein the candidate words in the target combination sequence are used as associated words of the target entity information, and the target combination sequence is used as a recognition result of the natural language understanding.
3. The method according to claim 2, characterized in that The step of combining one or more of the plurality of candidate words with the entity words corresponding to the target entity information to obtain a plurality of combination sequences includes: According to the entity boundary of the entity word, obtaining the position of the entity word in the text information; Determining the word order of the candidate word and the entity word in the text information according to the position of the entity word in the text information and the context position of the candidate word in the entity word; According to the word order of the candidate words and the entity words in the text information, the candidate words are combined with the entity words to obtain a combined sequence.
4. The method according to claim 2, characterized in that: The calculating of the confidence score of each combined sequence as the recognition result of the natural language understanding comprises: Get the part of speech corresponding to each word in the combined sequence; According to the parts of speech corresponding to the respective words and in combination with the order of words of different parts of speech in the grammatical rules, the occurrence probabilities corresponding to the respective words are calculated; The occurrence probabilities corresponding to the respective words are multiplied to obtain the confidence score corresponding to the combined sequence.
5. The method according to claim 2, characterized in that: The step of selecting a target combination sequence whose confidence score is greater than or equal to a preset threshold comprises: If there are multiple combination sequences whose confidence scores are greater than or equal to the preset threshold, the combination sequence with the largest confidence score is selected as the target combination sequence.
6. The method according to claim 1, characterized in that The identifying the first entity information in the text information by matching the text information with different sample sentence information marked with entity information respectively includes: The text information is input into a first model to perform calculations for entity information recognition to obtain the first entity information, wherein the first model is pre-trained based on the different sample sentence information and the entity information corresponding to the different sample sentence information as a training set, the sample sentence information is various types of sentence information of the same entity in different scenarios, and the same entity contains a preset proportion of noise data.
7. The method according to claim 1, characterized in that The identifying the second entity information in the text information by matching the segmented words in the text information with the entity information in the knowledge graph respectively includes: The text information is input into a second model to perform entity information recognition calculations to obtain the second entity information. The second model is pre-trained based on different entity words in the knowledge graph of the knowledge field to which the text information belongs, and attribute information corresponding to the entity words as a training set.
8. An information recognition device, characterized in that: The device comprises: An acquisition module, configured to acquire text information to be recognized; A matching module is configured to identify first entity information in the text information by matching the text information with different sample sentence information annotated with entity information; and identify second entity information in the text information by matching word segments in the text information with entity information in the knowledge graph, wherein the first entity information and the second entity information include: entity words in the text information and corresponding entity boundaries; an operation module, configured to perform a union operation on the first entity information and the second entity information to obtain target entity information in the text information; A determination module, configured to determine context information of the target entity information in the text information; The analysis module is configured to perform analysis based on the target entity information and the context information, select associated words of the target entity information from the context information, and use a combination sequence of the associated words and the entity words corresponding to the target entity information as a recognition result of natural language understanding.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
11. A vehicle, characterized in that: include: The device as claimed in claim 8 or the electronic device as claimed in claim 10.