Information processing method and device and electronic equipment

文档序号:1087408 发布日期:2020-10-20 浏览:8次 中文

阅读说明:本技术 信息处理方法、装置及电子设备 (Information processing method and device and electronic equipment ) 是由 韩伟 于 2019-04-04 设计创作,主要内容包括:本发明实施例提供一种信息处理方法、装置及电子设备,该方法包括:获取待识别的文本信息,依次将所述文本信息的设定数量的词汇确定为语言单元,对所述语言单元进行语义识别处理,并根据所述语言单元的语义识别结果,确定所述文本信息的有效语义信息;由此可见,本实施例中在进行语义识别之前,无需对语音信息或者文本信息进行任何预切分,避免了切分错误导致的语义识别错误,提高了语义识别的准确率;另外,由于是对各语言单元实时进行语义识别处理,提高了语义识别的实时性。(The embodiment of the invention provides an information processing method, an information processing device and electronic equipment, wherein the method comprises the following steps: acquiring text information to be recognized, sequentially determining a set number of vocabularies of the text information as language units, performing semantic recognition processing on the language units, and determining effective semantic information of the text information according to a semantic recognition result of the language units; therefore, in the embodiment, before semantic recognition, no pre-segmentation is needed to be performed on the voice information or the text information, so that semantic recognition errors caused by segmentation errors are avoided, and the accuracy of semantic recognition is improved; in addition, because the semantic recognition processing is carried out on each language unit in real time, the real-time performance of the semantic recognition is improved.)

1. An information processing method characterized by comprising:

acquiring text information to be identified;

and sequentially determining the set number of vocabularies of the text information as language units, performing semantic recognition processing on the language units, and determining effective semantic information of the text information according to a semantic recognition result of the language units.

2. The method of claim 1, wherein the semantic recognition result comprises: the semantic integrity probability score and the semantic information, wherein the effective semantic information of the text information is determined according to the semantic recognition result of the language unit, and the effective semantic information comprises the following steps:

and if the semantic integrity probability scores corresponding to the N continuous language units meet a preset condition, taking the semantic information of the N language units as effective semantic information of the text information, wherein N is greater than or equal to 1.

3. The method according to claim 2, wherein if the semantic integrity probability scores corresponding to the N consecutive language units satisfy a preset condition, taking the semantic information of the N language units as effective semantic information of the text information includes:

aiming at any first language unit in the language units, obtaining a cached historical language unit, wherein the historical language unit comprises at least one language unit before the first language unit, and the semantic integrity probability score corresponding to the historical language unit does not meet a set condition;

performing semantic recognition processing on a second language unit obtained by splicing the historical language unit and the first language unit to obtain a semantic recognition result of the second language unit;

and if the semantic integrity probability score of the second language unit meets a set condition, taking the semantic information of the second language unit as effective semantic information of the text information.

4. The method of claim 3, wherein the semantic completeness probability score of the second language unit is determined to satisfy a set condition according to the following steps:

and if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, determining that the semantic integrity probability score of the second language unit meets a set condition.

5. The method of claim 3, wherein the semantic completeness probability score of the second language unit is determined to satisfy a set condition according to the following steps:

if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, and the semantic integrity probability score of the second language unit is greater than or equal to the semantic integrity probability score of the language unit obtained by splicing the second language unit and a third language unit, determining that the semantic integrity probability score of the second language unit meets a set condition;

wherein the third language unit is a language unit subsequent to and adjacent to the first language unit.

6. The method of claim 3, wherein the semantic completeness probability score of the second language unit is determined to satisfy a set condition according to the following steps:

if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, and the semantic integrity probability scores of the language units obtained by splicing the second language unit and the language units before the fourth language unit are all less than or equal to the integrity probability score of the second language unit, determining that the semantic integrity probability score of the second language unit meets a set condition;

the fourth language unit is located behind the first language unit, and a preset number of language units are arranged between the fourth language unit and the first language unit.

7. The method of claim 3, further comprising:

and if the semantic integrity probability score of the second language unit meets the set condition, deleting the historical language unit from the cache.

8. An information processing apparatus characterized by comprising:

the acquisition module is used for acquiring text information to be identified;

the first recognition module is used for sequentially determining the set number of vocabularies of the text information as language units, performing semantic recognition processing on the language units, and determining effective semantic information of the text information according to a semantic recognition result of the language units.

9. An electronic device, comprising: at least one processor and memory;

the memory stores computer-executable instructions;

the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any of claims 1-7.

10. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1 to 7.

Technical Field

The embodiment of the invention relates to the technical field of artificial intelligence, in particular to an information processing method and device and electronic equipment.

Background

With the development of human-computer interaction technology, the semantic recognition technology shows its importance. Semantic recognition is a process of extracting feature information from a voice signal emitted by a human and determining the language meaning thereof, and mainly includes a voice recognition process and a semantic understanding process. The speech recognition process is a process of converting a human speech signal into text using an acoustic model, and the semantic understanding process is a process of recognizing the meaning of text using a natural language model.

Disclosure of Invention

The embodiment of the invention provides an information processing method, an information processing device and electronic equipment, which are used for improving the accuracy of semantic recognition.

In a first aspect, an embodiment of the present invention provides an information processing method, including:

acquiring text information to be identified;

and sequentially determining the set number of vocabularies of the text information as language units, performing semantic recognition processing on the language units, and determining effective semantic information of the text information according to a semantic recognition result of the language units.

Optionally, the semantic recognition result includes: the semantic integrity probability score and the semantic information, wherein the effective semantic information of the text information is determined according to the semantic recognition result of the language unit, and the effective semantic information comprises the following steps:

and if the semantic integrity probability scores corresponding to the N continuous language units meet a preset condition, taking the semantic information of the N language units as effective semantic information of the text information, wherein N is greater than or equal to 1.

Optionally, if the semantic integrity probability scores corresponding to the N consecutive language units satisfy a preset condition, taking the semantic information of the N language units as effective semantic information of the text information, including:

aiming at any first language unit in the language units, obtaining a cached historical language unit, wherein the historical language unit comprises at least one language unit before the first language unit, and the semantic integrity probability score corresponding to the historical language unit does not meet a set condition;

performing semantic recognition processing on a second language unit obtained by splicing the historical language unit and the first language unit to obtain a semantic recognition result of the second language unit;

and if the semantic integrity probability score of the second language unit meets a set condition, taking the semantic information of the second language unit as effective semantic information of the text information.

Optionally, determining that the semantic integrity probability score of the second language unit meets a set condition according to the following steps:

and if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, determining that the semantic integrity probability score of the second language unit meets a set condition.

Optionally, determining that the semantic integrity probability score of the second language unit meets a set condition according to the following steps:

if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, and the semantic integrity probability score of the second language unit is greater than or equal to the semantic integrity probability score of the language unit obtained by splicing the second language unit and a third language unit, determining that the semantic integrity probability score of the second language unit meets a set condition;

wherein the third language unit is a language unit subsequent to and adjacent to the first language unit.

Optionally, determining that the semantic integrity probability score of the second language unit meets a set condition according to the following steps:

if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, and the semantic integrity probability scores of the language units obtained by splicing the second language unit and the language units before the fourth language unit are all less than or equal to the integrity probability score of the second language unit, determining that the semantic integrity probability score of the second language unit meets a set condition;

the fourth language unit is located behind the first language unit, and a preset number of language units are arranged between the fourth language unit and the first language unit.

Optionally, the method further includes: and if the semantic integrity probability score of the second language unit meets the set condition, deleting the historical language unit from the cache.

Optionally, the method further includes:

and if the semantic integrity probability score of the second language unit does not meet the set condition, determining the second language unit as the historical language unit and caching the historical language unit into a cache.

Optionally, after the semantic information of the second language unit is used as the valid semantic information of the text information, the method further includes:

acquiring cached prediction semantic information and prediction reply information corresponding to the prediction semantic information, wherein the prediction semantic information is obtained by predicting according to the semantic information of the historical language unit;

and if the effective semantic information is consistent with the predicted semantic information, using the predicted reply information as reply information corresponding to the text information.

Optionally, before the obtaining the text information to be recognized, the method further includes:

acquiring voice information input into the intelligent equipment, and performing voice recognition processing on the voice information to obtain text information to be recognized.

Optionally, after determining the valid semantic information of the text information, the method further includes:

acquiring reply information corresponding to the text information according to the effective semantic information;

and controlling the intelligent equipment to output the reply information.

In a second aspect, an embodiment of the present invention provides an information processing apparatus, including:

the acquisition module is used for acquiring text information to be identified;

the first recognition module is used for sequentially determining the set number of vocabularies of the text information as language units, performing semantic recognition processing on the language units, and determining effective semantic information of the text information according to a semantic recognition result of the language units.

Optionally, the semantic recognition result includes: the first recognition module is specifically configured to:

and if the semantic integrity probability scores corresponding to the N continuous language units meet a preset condition, taking the semantic information of the N language units as effective semantic information of the text information, wherein N is greater than or equal to 1.

Optionally, the first identification module is specifically configured to:

aiming at any first language unit in the language units, obtaining a cached historical language unit, wherein the historical language unit comprises at least one language unit before the first language unit, and the semantic integrity probability score corresponding to the historical language unit does not meet a set condition;

performing semantic recognition processing on a second language unit obtained by splicing the historical language unit and the first language unit to obtain a semantic recognition result of the second language unit;

and if the semantic integrity probability score of the second language unit meets a set condition, taking the semantic information of the second language unit as effective semantic information of the text information.

Optionally, the first identification module is specifically configured to:

and if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, determining that the semantic integrity probability score of the second language unit meets a set condition.

Optionally, the first identification module is specifically configured to:

if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, and the semantic integrity probability score of the second language unit is greater than or equal to the semantic integrity probability score of the language unit obtained by splicing the second language unit and a third language unit, determining that the semantic integrity probability score of the second language unit meets a set condition;

wherein the third language unit is a language unit subsequent to and adjacent to the first language unit.

Optionally, the first identification module is specifically configured to:

if the semantic integrity probability score of the second language unit is greater than or equal to a preset threshold value, and the semantic integrity probability scores of the language units obtained by splicing the second language unit and the language units before the fourth language unit are all less than or equal to the integrity probability score of the second language unit, determining that the semantic integrity probability score of the second language unit meets a set condition;

the fourth language unit is located behind the first language unit, and a preset number of language units are arranged between the fourth language unit and the first language unit.

Optionally, the first identification module is further configured to:

and if the semantic integrity probability score of the second language unit meets the set condition, deleting the historical language unit from the cache.

Optionally, the first identification module is further configured to:

and if the semantic integrity probability score of the second language unit does not meet the set condition, determining the second language unit as the historical language unit and caching the historical language unit into a cache.

Optionally, the first identification module is further configured to:

acquiring cached prediction semantic information and prediction reply information corresponding to the prediction semantic information, wherein the prediction semantic information is obtained by predicting according to the semantic information of the historical language unit;

and if the effective semantic information is consistent with the predicted semantic information, using the predicted reply information as reply information corresponding to the text information.

Optionally, the apparatus further comprises: a second identification module;

the acquisition module is also used for acquiring voice information input into the intelligent equipment;

and the second recognition module is used for carrying out voice recognition processing on the voice information to obtain text information to be recognized.

Optionally, the first identification module is further configured to:

acquiring reply information corresponding to the text information according to the effective semantic information;

and controlling the intelligent equipment to output the reply information.

In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor and memory;

the memory stores computer-executable instructions;

the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of the first aspects.

In a fourth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method according to any one of the first aspect is implemented.

In a fifth aspect, embodiments of the present invention provide a computer program product comprising computer program code which, when run on a computer, causes the computer to perform the method of any of the first aspects above.

In a sixth aspect, an embodiment of the present invention provides a chip, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that an electronic device in which the chip is installed performs the method according to any one of the above first aspects.

The technical scheme provided by the embodiment of the invention comprises the steps of acquiring text information to be recognized, sequentially determining a set number of vocabularies of the text information as language units, performing semantic recognition processing on the language units, and determining effective semantic information of the text information according to a semantic recognition result of the language units; therefore, in the embodiment, before semantic recognition, no pre-segmentation is needed to be performed on the voice information or the text information, so that semantic recognition errors caused by segmentation errors are avoided, and the accuracy of semantic recognition is improved; in addition, because the semantic recognition processing is carried out on each language unit in real time, the real-time performance of the semantic recognition is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

FIG. 1 is a schematic diagram of a semantic recognition process in the prior art;

fig. 2 is a first schematic flow chart of an information processing method according to an embodiment of the present invention;

fig. 3 is a second schematic flowchart of an information processing method according to an embodiment of the present invention;

FIG. 4 is a first diagram illustrating a semantic recognition process according to an embodiment of the present invention;

FIG. 5 is a second diagram illustrating a semantic recognition process according to an embodiment of the present invention;

fig. 6 is a third schematic flowchart of an information processing method according to an embodiment of the present invention;

FIG. 7 is a first schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;

FIG. 8 is a second schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;

fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:信息处理方法、装置及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!