Method and apparatus for determining semantic results of speech
By evaluating the accuracy of semantic entity objects in NLU models from different vendors in a voice interaction system and selecting the semantic result with the highest accuracy, the problem of inaccurate arbitration under different standards is solved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-03-27
AI Technical Summary
In existing voice interaction systems, the varying NLU model resolution capabilities of different vendors lead to inconsistent arbitration under different standards, resulting in inaccurate semantic selection and impacting user experience.
By acquiring multiple initial semantic results, the semantic entity object corresponding to each initial semantic result is determined. Based on the service information field, slot value, and recognition result information field of the semantic entity object, the accuracy is evaluated using a unified standard, and the semantic result with the highest accuracy is selected as the final output.
It enables the selection of the most accurate speech semantic results from different semantic results under a unified standard, thereby improving the user experience.
Smart Images

Figure CN116386618B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of speech recognition, in particular to a method for determining semantic results of speech and a device for determining semantic results of speech. BACKGROUND
[0002] The existing speech interaction system needs to use NLU to generate the semantics of the recognized text. However, different manufacturers' NLU generates semantic results based on their respective models, and different semantic results are used to provide reference for users, so that the users can judge the accuracy of the recognition result.
[0003] However, due to different technical levels and focuses, the abilities of NLU of different manufacturers to analyze different domain corpora are uneven. In order to optimize user experience, it is necessary to integrate NLU of multiple manufacturers and select the final semantics from the semantic outputs of the NLU of multiple manufacturers, so as to select the result of the best manufacturer under different corpora. The current solution is to configure weights for different NLU in different service fields, and the NLU with high performance is configured with high weight, and the NLU with poor performance is configured with low weight. When generating the final semantic result, the output semantics is selected according to the weight. Another solution is to integrate a semantic content judgment module on the basis of the above solution. If the weight of the service field corresponding to an NLU is high, but its semantic result is empty, the result of the NLU is not used directly, and the result of a suboptimal NLU is used. However, the above two solutions cannot solve the problem of arbitrating the semantic results generated by the NLU with results under different standards in a unified standard, resulting in inaccurate final semantic selection. SUMMARY
[0004] One of the purposes of the present application is to provide a method for determining semantic results of speech to solve the problem of arbitrating the semantic results generated by the NLU with results under different standards in a unified standard, resulting in inaccurate final semantic selection in the prior art. The second purpose is to provide a device for determining semantic results of speech.
[0005] In order to achieve the above purpose, the technical solution adopted by the present application is as follows:
[0006] A method for determining semantic results of speech, the method comprising:
[0007] obtaining a plurality of initial semantic results, the plurality of initial semantic results being obtained from the same speech;
[0008] determining a semantic entity object corresponding to each initial semantic result based on the plurality of initial semantic results;
[0009] perform semantic analysis on each semantic entity object to determine the accuracy of each semantic entity object;
[0010] take the initial semantic result corresponding to the semantic entity object with the highest accuracy as the semantic result of the voice.
[0011] According to the above technical means, since the semantic analysis of different manufacturers NLU corresponds to different strongest fields, the semantic results analyzed by different manufacturers NLU from the same voice are different in accuracy. In order to meet the use requirements and use experience of users, the best semantic result is selected from different semantic results for output. The scheme proposes arbitration under a unified standard, so that the semantic result of the voice finally determined from different semantic results is more accurate, and the user use experience is improved.
[0012] Further, a plurality of initial semantic results are obtained, the plurality of initial semantic results being obtained from the same voice, comprising:
[0013] input the same voice into different NLU models to obtain different initial semantic results; the NLU model is obtained based on natural language understanding training.
[0014] According to the above technical means, since the semantic analysis of different manufacturers NLU corresponds to different strongest fields, different manufacturers NLU are integrated in use, and the best semantic result is selected therefrom. Different manufacturers' NLU all use a large amount of voice data, which is trained by natural language understanding. After training, different NLU models have different model parameters. Therefore, after inputting the same voice into different NLU models, different initial semantic results can be obtained.
[0015] Further, based on the plurality of initial semantic results, the semantic entity object corresponding to each initial semantic result is determined, comprising:
[0016] determine the semantic entity object of each initial semantic result based on the common field in each initial semantic result.
[0017] According to the above technical means, after inputting the same voice into different NLU models, a plurality of initial semantic results can be obtained. The common field in the initial semantic result can be the same word, or a word with similar meaning (synonyms, etc.). Therefore, according to the common field in each initial semantic result, the semantic entity object of each initial semantic result can be determined. The semantic entity object can be a combination of a person's name, a place name, an organization name, a date, a time, a numerical value, and a percentage.
[0018] Further, the semantic entity object includes a service information field, a slot value, an identification result information field, and an error code field.
[0019] performing semantic analysis on each semantic entity object, determining the accuracy of each semantic entity object, comprising:
[0020] For each semantic entity object:
[0021] If the number of error code fields in the semantic entity object is not zero, the accuracy of the semantic entity object is determined as a preset value;
[0022] If the number of error code fields in the semantic entity object is zero, the accuracy of the semantic entity object is determined based on the service information field, slot value and recognition result information field of the semantic entity object.
[0023] According to the above technical means, if there is an error code field in the semantic entity object, it means that there is a recognition error in the NLU model re-recognition process, so the final semantics cannot meet the accuracy requirement, and the accuracy of the semantic entity object in this case is directly determined as a preset value. The preset value can be determined according to actual conditions, and can be set to 0. For the semantic entity object without error code field, the service information field, slot value and recognition result information field of the semantic entity object are continuously used for semantic analysis, and the accuracy of each semantic entity object is finally determined under a unified standard.
[0024] Further, determining the accuracy of the semantic entity object based on the service information field, slot value and recognition result information field of the semantic entity object, comprising:
[0025] For each semantic entity object:
[0026] Based on the correlation between the service information field and the recognition result information field in the semantic entity object, a first matching coefficient of the semantic entity object is determined;
[0027] Based on the validity of the slot value of the semantic entity object, a second matching coefficient of the semantic entity object is determined;
[0028] Based on the recognition result information field, a third matching coefficient of the semantic entity object is determined by using a rule matching algorithm;
[0029] Based on the first matching coefficient, the second matching coefficient and the third matching coefficient, the accuracy of the initial semantic result is determined.
[0030] According to the above technical means, the unified standard given in the application is to uniformly determine the first matching coefficient, the second matching coefficient and the third matching coefficient of the semantic entity object by using the service information field, the slot value and the recognition result information field of the semantic entity object, so as to realize subsequent accurate judgment.
[0031] Further, based on the service information field, the slot value and the identification result information field of the semantic entity object, determining the accuracy of the semantic entity object further includes:
[0032] For each semantic entity object:
[0033] The sum of the first matching coefficient, the second matching coefficient and the third matching coefficient of the semantic entity object is determined as the accuracy of the semantic entity object.
[0034] According to the above technical means, the sum of the first matching coefficient, the second matching coefficient and the third matching coefficient of the semantic entity object is determined as the accuracy of the semantic entity object, which can accurately represent the accuracy of each semantic entity object relative to the voice itself for selection.
[0035] A semantic result determination device of a voice, the device comprising:
[0036] A data acquisition module acquires a plurality of initial semantic results, and the plurality of initial semantic results are obtained from the same voice;
[0037] An object conversion module is configured to determine a semantic entity object corresponding to each initial semantic result based on the plurality of initial semantic results;
[0038] An accuracy determination module performs semantic analysis on each semantic entity object to determine the accuracy of each semantic entity object;
[0039] A semantic result output module outputs an initial semantic result corresponding to a semantic entity object with the highest accuracy as the semantic result of the voice.
[0040] According to the above technical means, since the strongest fields of semantic analysis corresponding to different manufacturers NLU are different, the accuracy of the semantic results parsed from the same voice by different manufacturers NLU is different. In order to meet the use requirements and use experience of users, the best semantic result is selected from different semantic results for output. The present scheme proposes arbitration under a unified standard, so that the semantic result of the voice finally determined from different semantic results is more accurate, and the user use experience is improved.
[0041] An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned semantic result determination method of a voice.
[0042] A readable storage medium having instructions stored thereon for causing a machine to execute the above-mentioned semantic result determination method of a voice.
[0043] A car comprising a cabin, further comprising:
[0044] at least one voice collector arranged in the cockpit.
[0045] The semantic result determination device of the voice is electrically connected with the voice collector.
[0046] The present application has the following beneficial effects:
[0047] (1) The present application can realize arbitration under a unified standard for different semantic results analyzed from the same voice.
[0048] (2) The present application can finally determine the most accurate semantic result of the voice from different semantic results of the same voice to meet the user demand and improve the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 The present application is a semantic result determination method of voice.
[0050] Figure 2 The present application is a flow chart of determining the accuracy of semantic entity objects.
[0051] Figure 3 The present application is a structural schematic diagram of a semantic result determination device of voice.
[0052] Among them, 10-data acquisition module; 20-object conversion module; 30-accuracy determination module; 40-semantic result output module. DETAILED DESCRIPTION
[0053] The embodiments of the present application will be described below with reference to the drawings and preferred embodiments, and other advantages and effects of the present application can be easily understood by those skilled in the art from the disclosure in the specification. The present application can also be implemented or applied by different specific embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, but not for limiting the protection scope of the present application.
[0054] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present application in a schematic manner, and only the components related to the present application are shown in the diagrams, but not the number, shape and size of the components when actually implemented. The actual implementation of each component may be a random change in type, number and proportion, and the component layout pattern may also be more complex.
[0055] The present embodiment proposes a semantic result determination method of voice, as shown in Figures 1-2 The method comprises the following steps:
[0056] Step 101, obtaining a plurality of initial semantic results, the plurality of initial semantic results being obtained from the same voice;
[0057] In this embodiment, the plurality of initial semantic results are obtained from the same voice, and the plurality of initial semantic results are obtained by the following steps:
[0058] The same voice is input into different NLU models to obtain different initial semantic results, and the NLU model is obtained based on natural language understanding training.
[0059] Step 102, determining a semantic entity object corresponding to each initial semantic result based on the plurality of initial semantic results;
[0060] In this embodiment, the semantic entity object of each initial semantic result is determined based on a common field in each initial semantic result. Specifically, SVM can be used for training to obtain an extraction model, and the extraction model outputs the semantic entity object.
[0061] Step 103, performing semantic analysis on each semantic entity object to determine the accuracy of each semantic entity object;
[0062] In this embodiment, the semantic entity object defines the fields and data required for the object used for semantic analysis, and the semantic entity object includes a service information field, a slot value, an identification result information field, and an error code field. The error code field in the semantic entity object defines the number of error codes in the semantic entity, and the error codes are obtained from the judgment of the NLU model on the generated semantic result when the voice is parsed. The step of obtaining the NLU model output error code is well known to those skilled in the art, and will not be described here.
[0063] For each semantic entity object:
[0064] If the number of error code fields in the semantic entity object is not zero, it means that there is an error in the output of the semantic result by the NLU model, and the accuracy of the semantic entity object is directly determined as 0 at this time;
[0065] If the number of error code fields in the semantic entity object is zero, it means that there is no error in the output of the semantic result by the NLU model, and the accuracy of the semantic entity object needs to be determined based on the service information field, the slot value, and the identification result information field of the semantic entity object, including:
[0066] First, based on the association between the service information field and the identification result information field in the semantic entity object, a first matching coefficient of the semantic entity object is determined;
[0067] Specifically, if the association between the service information field in the semantic entity object and the identified result information field is greater than a preset association threshold, a first preset sub-score is determined as the first matching coefficient; if the association between the service information field in the semantic entity object and the identified result information field is less than or equal to the preset association threshold, a second preset sub-score is determined as the first matching coefficient, and the first preset sub-score is greater than the second preset sub-score. How to determine the association between the service information field and the identified result information field can be determined in a manual manner or in an automatic manner by a machine.
[0068] For example, taking "I want to go to Beijing" as an example, there are some NLU returns the service information field is navigation business, and some NLU returns the service information field is ticket booking business, at this time, it is necessary to judge according to the identified result information field, that is, the user's geographical location and the application currently being used, if the user is not in Beijing at this time, the returned service information field is ticket booking business, and the association is higher.
[0069] Secondly, based on the validity of the slot value of the semantic entity object, a second matching coefficient of the semantic entity object is determined;
[0070] Specifically, the validity of the slot value of the semantic entity object is determined by the coverage of the extracted slot value and the information in the input text, whether the content in the identified result information field is completely parsed in the slot is judged, if it is completely parsed, the validity is higher than that when it is partially parsed, and the specific judgment manner is still according to the business subscription. If the coverage of the extracted slot value and the information in the input text is greater than a preset coverage threshold, a third preset sub-score is determined as the second matching coefficient; if the coverage of the extracted slot value and the information in the input text is less than or equal to the preset coverage threshold, a fourth preset sub-score is determined as the second matching coefficient, and the third preset sub-score is greater than the fourth preset sub-score.
[0071] Then, based on the identified result information field, a third matching coefficient of the semantic entity object is determined by using a rule matching algorithm;
[0072] Specifically, in order to judge whether the NLU truly understands the user's demand according to the reply of the NLU, regular matching is performed according to whether the reply has been found or not. Based on the identified result information field, a common reply dictionary is compared, and a matching degree output by the rule matching algorithm is used, if the output result of the rule matching algorithm is matching success, a fifth preset sub-score is determined as the third matching coefficient; if the output result of the rule matching algorithm is matching failure, a sixth preset sub-score is determined as the third matching coefficient, and the fifth preset sub-score is greater than the sixth preset sub-score.
[0073] For example, the user says "I want to listen to Jay Chou's songs", the reply of NLU1 is: OK, I have found Jay Chou's song "Qili Xiang" for you, and the reply of NLU2 is: Sorry, I have not found Jay Chou's song for you, let's listen to "Forget Water" of Andy Lau. From the perspective of the reply, the semantic of NLU1 should be the most satisfying to the user's demand, and the matching degree is higher. If the reply is not judged, both NLU can give the result, and even in the case of no scoring, the priority of the result of NLU2 is higher than that of NLU1
[0074] Finally, the sum of the first matching coefficient, the second matching coefficient and the third matching coefficient is directly determined as the accuracy of the initial semantic result.
[0075] Step 104, taking the initial semantic result corresponding to the semantic entity object with the highest accuracy as the semantic result of the voice.
[0076] After determining the initial semantic result corresponding to the semantic entity object with the highest accuracy as the semantic result of the voice, the semantic result is outputted and subsequent operations are performed.
[0077] The embodiment of the application also provides a semantic result determination device for voice, as shown in the figure, the device comprises: Figure 3 The device comprises:
[0078] A data acquisition module 10 acquires a plurality of initial semantic results, and the plurality of initial semantic results are obtained from the same voice;
[0079] An object conversion module 20 is configured to determine a semantic entity object corresponding to each initial semantic result based on the plurality of initial semantic results;
[0080] An accuracy determination module 30 performs semantic analysis on each semantic entity object to determine the accuracy of each semantic entity object;
[0081] A semantic result output module 40 takes the initial semantic result corresponding to the semantic entity object with the highest accuracy as the semantic result of the voice.
[0082] In the embodiment, the semantic result output module 40 exposes a getResult interface to the outside, and the external calling interface needs to input a plurality of semantic results returned by NLU. The semantic result output module 40 calls the getWeight method, the protocolConversion method and the getScore method, and then sorts the accuracy results to obtain the only semantic result with the highest accuracy outputted to the terminal.
[0083] The embodiment of the present application further provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the semantic result determination method of the voice when executing the computer program.
[0084] The embodiment of the present application further provides a readable storage medium, which stores instructions for causing a machine to execute the semantic result determination method of the voice.
[0085] The embodiment of the present application further provides an automobile, comprising a cabin, and at least one voice collector arranged in the cabin.
[0086] The semantic result determination device of the voice is electrically connected with the voice collector.
[0087] Those skilled in the art can understand that all or part of the steps of the method for implementing the above-mentioned embodiments can be completed by programs instructing relevant hardware, the programs are stored in a storage medium, and the programs include a plurality of instructions for causing a single-chip microcomputer, a chip or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and various storage medium capable of storing program codes.
[0088] The optional embodiments of the present application are described in detail above in combination with the drawings, but the embodiments of the present application are not limited to the specific details in the above-mentioned embodiments, and various simple modifications can be made to the technical solutions of the embodiments of the present application within the technical concept of the embodiments of the present application, and the simple modifications all belong to the protection scope of the embodiments of the present application. In addition, it should be noted that each specific technical feature described in the above-mentioned specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present application will not further describe various possible combination manners.
[0089] In addition, various different embodiments of the present application can also be combined in any manner, as long as it does not deviate from the idea of the embodiments of the present application, and it should be considered as the disclosed content of the embodiments of the present application.
Claims
1. A method for determining the semantic result of speech, characterized in that, The method includes: Multiple initial semantic results are obtained from the same speech segment; Based on multiple initial semantic results, a semantic entity object corresponding to each initial semantic result is determined. The semantic entity object includes: a service information field, a slot value, a recognition result information field, and an error code field. Perform semantic analysis on each semantic entity object to determine the accuracy of each semantic entity object, including: For each semantic entity object: If the number of error code fields in the semantic entity object is not zero, then the accuracy of the semantic entity object is set to the preset value; If the number of error code fields in the semantic entity object is zero, the accuracy of the semantic entity object is determined based on the service information field, slot value, and recognition result information field of the semantic entity object. The initial semantic result corresponding to the semantic entity object with the highest accuracy is taken as the semantic result of the speech.
2. The method for determining the semantic result of speech according to claim 1, characterized in that, Multiple initial semantic results are obtained from the same speech segment, including: The same speech segment is input into different NLU models, resulting in different initial semantic results; the NLU models are trained based on natural language understanding.
3. The method for determining the semantic result of speech according to claim 1, characterized in that, Based on multiple initial semantic results, determine the semantic entity object corresponding to each initial semantic result, including: Based on the common fields in each initial semantic result, determine the semantic entity object of each initial semantic result.
4. The method for determining the semantic result of speech according to claim 1, characterized in that, Based on the service information field, slot value, and recognition result information field of the semantic entity object, the accuracy of the semantic entity object is determined, including: For each semantic entity object: Based on the correlation between the service information field and the recognition result information field in the semantic entity object, the first matching coefficient of the semantic entity object is determined; Based on the validity of the slot value of the semantic entity object, determine the second matching coefficient of the semantic entity object; Based on the recognition result information field, the third matching coefficient of the semantic entity object is determined using a rule matching algorithm; The accuracy of the initial semantic result is determined based on the first matching coefficient, the second matching coefficient, and the third matching coefficient.
5. The method for determining the semantic result of speech according to claim 4, characterized in that, Determining the accuracy of a semantic entity object based on its service information field, slot value, and recognition result information field also includes: For each semantic entity object: The sum of the first matching coefficient, the second matching coefficient, and the third matching coefficient of the semantic entity object is determined as the accuracy of the semantic entity object.
6. A device for determining the semantic result of speech, characterized in that, The device includes: The data acquisition module acquires multiple initial semantic results, which are obtained from the same speech segment. The object conversion module is used to determine the semantic entity object corresponding to each initial semantic result based on multiple initial semantic results. The semantic entity object includes: service information field, slot value, recognition result information field and error code field. The accuracy determination module performs semantic analysis on each semantic entity object to determine the accuracy of each semantic entity object, including: For each semantic entity object: If the number of error code fields in the semantic entity object is not zero, then the accuracy of the semantic entity object is set to the preset value; If the number of error code fields in the semantic entity object is zero, the accuracy of the semantic entity object is determined based on the service information field, slot value, and recognition result information field of the semantic entity object. The semantic result output module takes the initial semantic result corresponding to the semantic entity object with the highest accuracy as the semantic result of the speech.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for determining the semantic results of speech as described in any one of claims 1-5.
8. A readable storage medium storing instructions for causing a machine to perform the semantic result determination method for speech as described in any one of claims 1-5.
9. An automobile, comprising a cabin, characterized in that, Also includes: At least one voice acquisition device is installed inside the cockpit; The speech semantic result determination device according to claim 6 is electrically connected to the speech acquisition unit.
Citation Information
Patent Citations
Semantic decision method and system
CN109408799A