Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
Fig. 1 is a schematic diagram of an intelligent translator according to an embodiment of the present invention, including: anidentification unit 101, atranslation unit 102, and anoutput unit 103, wherein:
the identifyingunit 101 is configured to collect first audio information of a child, where the first audio information is audio information sent when the child reads a book, convert the first audio information into first text information, and search the database for a target book that includes the first text information;
the identifyingunit 101 is further configured to collect second audio information of the child, and identify whether the second audio information includes preset audio features, where the preset audio features represent characters that the child encounters without knowledge;
thetranslation unit 102 is configured to determine, based on third audio information, second text information that the child reads before the second audio information, predict, based on the second text information, third text information that the child does not recognize currently in the target book, and translate the third text information into fourth audio information, where the third audio information is audio information that is collected by the identification unit before the second audio information and is continuous with the second audio information, and the second text information is text information corresponding to the third audio information;
theoutput unit 103 is configured to output the fourth audio information.
In the embodiment of the invention, the audio information of the child refers to the audio information sent by the child when reading the extracurricular book without pinyin.
The predetermined audio feature may be audio information generated based on the child's historic reading audio, which represents words that the child encounters. And the preset audio characteristics set by different children may be different, for example: some children will send out the audio feature of "one's own …" when encountering unrecognized text, while some children will send out "this …" when encountering unrecognized text, etc., and the embodiments of the invention are not limited thereto.
The target book may be a book stored in advance in a database.
The third text information may be a word, a phrase, a idiom, or the like.
And the outputting of the fourth audio information is playing the fourth audio information.
According to the embodiment of the invention, the intelligent translator can accurately recognize the unknown characters encountered by the child at present and translate the unknown characters under the condition that the child encounters the unknown characters, and output corresponding audio information to the child, so that the child is assisted in reading the books, and the reading experience of the child is further improved.
In the embodiment of the invention, the translator can be a handheld translator or a wearable translator.
In one embodiment, the identifyingunit 101 is further configured to transmit, to the translating unit, the collected audio information of the child that meets a first preset condition, where the first preset condition includes that the child pronounces without stopping;
thetranslation unit 102 is further configured to establish an audio information queue, store, in the audio information queue, audio information that satisfies the first preset condition and is sent by the identification unit, where the audio information queue length is 1 audio information, delete, after receiving a new audio information sent by the identification unit, the audio information stored in the audio information queue, and store the new audio information;
the third audio information is the audio information stored in the audio information queue.
In the embodiment, only one audio information needs to be stored at a time, so that characters which are not recognized by children can be translationally identified, and the storage space for storing the translator can be saved.
In one embodiment, the translation unit is further configured to count a proportion of characters that the child does not recognize for the target book based on a frequency of occurrence of the audio information including the preset audio feature, and update a predicted character length in real time based on the proportion;
the predicting third text information that the child does not know in the target book currently based on the second text information includes:
based on the second text information prediction, text information which is continuous with the second text information and is positioned behind the second text information in the target book and has the text length matched with the predicted text length is third text information which is not recognized by the child in the target book.
One implementation way of counting the proportion of unknown words of the child to the target book based on the frequency of occurrence of the audio information including the preset audio features is to determine the proportion according to a preset relationship between the frequency of occurrence of the audio information including the preset audio features and the proportion of unknown words, for example: the higher the frequency of occurrence of the audio information including the preset audio features, the higher the proportion of unrecognized characters, the preset relation, and the proportion of unrecognized characters of the child for the target book is determined.
Therefore, the prediction of the text length can be realized, the text information which is continuous with the second text information and is positioned behind the second text information in the target book, and the text information with the text length matched with the prediction text length is the third text information which is not recognized by the child in the target book at present, so that the prediction accuracy of the text which is not recognized by the child is improved.
In one embodiment, the translation unit is further configured to establish a reading paragraph queue, store, in the reading paragraph queue, paragraph marks of audio information currently stored in the audio information queue and currently read in the target book, where the length of the reading paragraph queue is 1 paragraph mark, delete a paragraph mark already stored in the reading paragraph queue after identifying that the reading paragraph queue stores the audio information change paragraph, and store a new paragraph mark;
the predicting based on the second text information, the text information which is continuous with the second text information and is located behind the second text information, and the text information with the text length matched with the predicted text length is the third text information which is not recognized by the child in the target book, and the method comprises the following steps:
based on the second text information prediction, the text information which is continuous with the second text information in the paragraphs corresponding to the paragraph marks stored in the reading paragraph queue and is positioned behind the second text information and has the text length matched with the predicted text length is third text information which is not recognized by the child in the target book.
Through the reading paragraph queue, the paragraphs which are read currently by the child can be tracked in time, so that the condition that some paragraphs comprise the same text information and the text connected with the same text information is different can be realized, and the unknown text which the child encounters currently can be accurately predicted. And because the length of the reading paragraph queue is 1 paragraph mark, only one paragraph mark needs to be stored at a time, thereby saving the storage space of the translator.
In one embodiment, the predicting, based on the second text information, the text information in the target book that is continuous with the second text information and is located after the second text information, where the text information with the text length matching the predicted text length is a third text information that the child does not recognize currently in the target book, includes:
when the predicted word length is N and the N is an integer greater than 1, identifying fourth word information, which is located after the second word information and has a word length matched with the predicted word length, in the target book based on the second word information, and judging whether a phrase or idiom is formed by the last word or words in the second word information and the first word of the fourth word information;
if the last word or words in the second text information and the first word of the fourth text information form a phrase or idiom, the first word in the fourth text information is used as third text information which is not recognized by the child in the target book at present;
and if the last word or words in the second text information and the first word of the fourth text information do not form a phrase or idiom, the fourth text information is used as third text information which is not recognized by the child in the target book.
The determining whether the last word or words in the second text information and the first word of the fourth text information form a phrase or idiom may be determining whether the last word or words in the second text information and the first word of the fourth text information form a phrase or idiom according to a preset phrase library or idiom library.
Because the last word or words in the second text information and the first word of the fourth text information form a phrase or idiom, only the first word in the fourth text information is needed to be used as the third text information which is not recognized by the child in the target book, the prediction accuracy can be improved, and because the Chinese in some books often appear in a phrase or idiom unit, when the phrase or idiom is finished, the following text can be the text recognized by the child.
If the last word or words in the second text information and the first word of the fourth text information do not form a phrase or idiom, the fourth text information with the length being matched with the predicted text length may be displayed as text which is not recognized by the child.
In one embodiment, the translation unit stores in advance a person name related to the target book; the predicting based on the second text information, the text information which is continuous with the second text information and is located behind the second text information, and the text information with the text length matched with the predicted text length is the third text information which is not recognized by the child in the target book, and the method comprises the following steps:
identifying character information which is continuous with the second character information and is positioned behind the second character information in the target book, and judging whether the character information positioned behind the second character information comprises a character name related to the target book;
when the character information positioned behind the second character information does not comprise the character name related to the target book, the character information positioned behind the second character information, the character length of which is matched with the predicted character length, is used as third character information which is not recognized by the child in the target book at present;
and when the character information positioned behind the second character information comprises the character name related to the target book and the character length of the character name exceeds the predicted character length, taking the character of the character name as third character information which is not recognized by the child in the target book.
Many books read by children are books translated from foreign language, character names in the books translated from foreign language are complex, characters of the character names are characters which are not commonly found in some Chinese articles, so that the character names are characters which are not recognized by the children, such as 'Desaimei XXS', the character names are directly translated, the reading experience of the children can be greatly improved, and the meaning of the characters to the current stage of the children is not great, so that the reading time of the children is saved.
In one embodiment, as shown in fig. 2, the intelligent translator further includes:
afirst recording unit 104, configured to record the audio information of the person name related to the target book output by the output unit, and record the output times of the audio information of each person name;
the translation unit is also used for predicting whether the text information of the current audio information is the name of the target person with the output frequency reaching a preset frequency threshold after the target book according to the audio information transmitted by the identification unit in real time; if the text information of the current audio information is the name of the target person with the output times reaching the preset times threshold value in the target book, outputting the audio information of the name of the target person to the output unit under the condition that the audio information comprising the preset audio features is not received;
the output unit is further configured to output audio information of the name of the target person.
In some books, some character names often appear repeatedly, particularly in some dialogue scenes, the frequency of the occurrence of the character names is particularly high, when the child reads the corresponding position, the audio information of the character names is directly translated, so that the reading speed of the child is improved, the reading pleasure of the child is improved, and the child prefers to read.
In one embodiment, as shown in fig. 3, the intelligent translator further includes:
asecond recording unit 105, configured to record text information corresponding to the audio information output by the output unit;
and when the second audio information includes the preset audio, determining second text information read by the child before the second audio information based on third audio information, predicting third text information which is not currently recognized by the child in the target book based on the second text information, and translating the third text information into fourth audio information, wherein the method comprises the following steps:
if the second audio information comprises the preset audio, based on third audio information, determining second text information read by the child before the second audio information, predicting third text information which is not currently known by the child in the target book based on the second text information, and judging whether the third text information is the text information recorded by the second recording unit;
under the condition that the third text information is judged to be the text information recorded by the recording unit, starting a preset timer so that the child has enough time to recall the text which is not known at present;
if the preset timer is advanced, deleting the second audio information if the identification unit identifies that the child sends out the audio information aiming at the third text information;
and under the condition that the preset timer is overtime, if the recognition unit does not recognize that the child sends out the audio information aiming at the third text information, translating the third text information into fourth audio information.
Through the preset timer, the time for allowing the child to think about the characters which are not known by the child can be realized, so that the recognition quantity of the child can be improved through the method, and the second audio information is deleted when the recognition unit recognizes that the child sends the audio information aiming at the third character information, so that the related translation of the second audio information is not needed, and the calculation power consumption of the translator is saved.
In an embodiment of the present invention, an intelligent translator includes: the device comprises an identification unit, a translation unit and an output unit, wherein: the recognition unit is used for collecting first audio information of the child, wherein the first audio information is audio information sent by the child when the child reads the book, the first audio information is converted into first text information, and a target book containing the first text information is searched in the database; the recognition unit is also used for collecting second audio information of the child, and recognizing whether the second audio information comprises preset audio features or not, wherein the preset audio features represent characters which are not recognized by the child; the translation unit is configured to determine, based on third audio information, second text information that the child reads before the second audio information, predict, based on the second text information, third text information that the child does not recognize currently in the target book, and translate the third text information into fourth audio information, where the third audio information is audio information that is collected by the identification unit before the second audio information and is continuous with the second audio information, and the second text information is text information corresponding to the third audio information; the output unit is configured to output the fourth audio information. According to the embodiment of the invention, the intelligent translator can translate the characters which are not recognized by the child in reading the books, so that the reading experience of the child is improved.
Fig. 4 is a flowchart of a translation method according to an embodiment of the present invention, as shown in fig. 4, including:
601. collecting first audio information of a child, wherein the first audio information is audio information sent by the child when the child reads a book, converting the first audio information into first text information, and searching a target book containing the first text information in the database;
602. collecting second audio information of the child, and identifying whether the second audio information comprises preset audio features or not, wherein the preset audio features represent characters which are not recognized by the child;
603. determining second text information read by the child before the second audio information based on third audio information under the condition that the second audio information comprises the preset audio, predicting third text information which is not currently known by the child in the target book based on the second text information, and translating the third text information into fourth audio information, wherein the third audio information is the audio information which is acquired by the identification unit before the second audio information and is continuous with the second audio information, and the second text information is the text information corresponding to the third audio information;
604. and outputting the fourth audio information.
Optionally, the method further comprises:
transmitting the acquired audio information meeting the first preset condition of the child to the translation unit in real time, wherein the first preset condition comprises that the child pronounces without stopping;
an audio information queue is established, audio information meeting the first preset condition sent by the identification unit is stored in the audio information queue, wherein the length of the audio information queue is 1 audio information, and when new audio information sent by the identification unit is received, the stored audio information in the audio information queue is deleted, and the new audio information is stored;
the third audio information is the audio information stored in the audio information queue.
Optionally, the method further comprises:
based on the frequency of occurrence of the audio information comprising the preset audio characteristics, counting the proportion of the unknown characters of the child to the target book, and updating the predicted character length in real time based on the proportion;
the predicting third text information that the child does not know in the target book currently based on the second text information includes:
based on the second text information prediction, text information which is continuous with the second text information and is positioned behind the second text information in the target book and has the text length matched with the predicted text length is third text information which is not recognized by the child in the target book.
Optionally, the method further comprises:
establishing a reading paragraph queue, storing paragraph marks of the audio information currently stored in the audio information queue in the target book, wherein the length of the reading paragraph queue is 1 paragraph mark, deleting the stored paragraph marks in the reading paragraph queue after recognizing that the reading paragraph queue stores the audio information change paragraphs, and storing new paragraph marks;
the predicting based on the second text information, the text information which is continuous with the second text information and is located behind the second text information, and the text information with the text length matched with the predicted text length is the third text information which is not recognized by the child in the target book, and the method comprises the following steps:
based on the second text information prediction, the text information which is continuous with the second text information in the paragraphs corresponding to the paragraph marks stored in the reading paragraph queue and is positioned behind the second text information and has the text length matched with the predicted text length is third text information which is not recognized by the child in the target book.
Optionally, the predicting, based on the second text information, the text information in the target book that is continuous with the second text information and is located after the second text information, where the text information with the text length matching the predicted text length is a third text information that the child does not recognize currently in the target book, includes:
when the predicted word length is N and the N is an integer greater than 1, identifying fourth word information, which is located after the second word information and has a word length matched with the predicted word length, in the target book based on the second word information, and judging whether a phrase or idiom is formed by the last word or words in the second word information and the first word of the fourth word information;
if the last word or words in the second text information and the first word of the fourth text information form a phrase or idiom, the first word in the fourth text information is used as third text information which is not recognized by the child in the target book at present;
and if the last word or words in the second text information and the first word of the fourth text information do not form a phrase or idiom, the fourth text information is used as third text information which is not recognized by the child in the target book.
Optionally, the name of the person involved in the target book is prestored; the predicting based on the second text information, the text information which is continuous with the second text information and is located behind the second text information, and the text information with the text length matched with the predicted text length is the third text information which is not recognized by the child in the target book, and the method comprises the following steps:
identifying character information which is continuous with the second character information and is positioned behind the second character information in the target book, and judging whether the character information positioned behind the second character information comprises a character name related to the target book;
when the character information positioned behind the second character information does not comprise the character name related to the target book, the character information positioned behind the second character information, the character length of which is matched with the predicted character length, is used as third character information which is not recognized by the child in the target book at present;
and when the character information positioned behind the second character information comprises the character name related to the target book and the character length of the character name exceeds the predicted character length, taking the character of the character name as third character information which is not recognized by the child in the target book.
Optionally, the method further comprises:
recording the audio information of the person names related to the target books and output by the output unit, and recording the output times of the audio information of each person name;
predicting whether text information of the current audio information is a target person name with the output times reaching a preset times threshold after the target book according to the audio information transmitted by the identification unit in real time; if the text information of the current audio information is the name of the target person with the output times reaching the preset times threshold value in the target book, outputting the audio information of the name of the target person to the output unit under the condition that the audio information comprising the preset audio features is not received;
and outputting the audio information of the name of the target person.
Optionally, the method further comprises:
recording text information corresponding to the audio information output by the output unit;
and when the second audio information includes the preset audio, determining second text information read by the child before the second audio information based on third audio information, predicting third text information which is not currently recognized by the child in the target book based on the second text information, and translating the third text information into fourth audio information, wherein the method comprises the following steps:
if the second audio information comprises the preset audio, based on third audio information, determining second text information read by the child before the second audio information, predicting third text information which is not currently known by the child in the target book based on the second text information, and judging whether the third text information is the text information recorded by the second recording unit;
under the condition that the third text information is judged to be the text information recorded by the recording unit, starting a preset timer so that the child has enough time to recall the text which is not known at present;
if the preset timer is advanced, deleting the second audio information if the identification unit identifies that the child sends out the audio information aiming at the third text information;
and under the condition that the preset timer is overtime, if the recognition unit does not recognize that the child sends out the audio information aiming at the third text information, translating the third text information into fourth audio information.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the intelligent translation method provided by the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.