Speak-as-you-see function implementation method based on OCR

Through the OCR-based method, users can respond to click events by saying interface keywords through the voice system no matter which interface the device screen is on on the smart terminal. This solves the problems of untimely response and high device operation pressure in the existing technology, and realizes An efficient visible-to-say function.

WO2024187971A1PCT designated stage expired Publication Date: 2024-09-19RIVOTEK TECH (JIANGSU) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/074307
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-16
Filing Date
2024-01-26
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

The existing voice system cannot fully support the visible-to-speak function in third-party applications, resulting in problems such as untimely response, lags, and crashes, and requires the cooperation of third-party applications for development and cloud server processing.

Method used

Using an OCR-based method, there is no need for third-party applications to cooperate with voice system development. Through the CAE component, speech translation component, semantic translation component and OCR recognition component, after the user speaks the interface keywords, the coordinate parameters are obtained through the screen click component for contact interaction. , so that no matter which interface the device screen is on, it can respond to click events.

Benefits of technology

It realizes the visible and talkable function without cloud server processing and third-party application cooperation, improves user convenience, optimizes computing power and response speed, and solves the problem of high equipment operating pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024074307_19092024_PF_FP_ABST
    Figure CN2024074307_19092024_PF_FP_ABST
Patent Text Reader

Abstract

A speak-as-you-see function implementation method based on OCR. The method comprises: S1: a user speaking a wake-up word, a CAE component acquiring a wake-up word library and determining whether the wake-up word spoken by the user is in the wake-up word library, and if so, opening a voice assistant to enter a voice recognition state so as to execute S2, and if not, entering a standby state; S2: the user speaking an interface keyword, and a voice translation component translating into text information the interface keyword spoken by the user; S3: a semantic translation component performing semantic translation on the text information and translating the text information into standard character data; S4, processing screen text by means of an OCR component; and S5, a screen click-on component acquiring coordinate parameters of the processed screen text so as to perform contact interaction. On the basis of the method, intervention of a third-party application can be compatible, the convenience of user operations is improved, and the hit rate of related user entries is increased by means of components of a system.
Need to check novelty before this filing date? Find Prior Art

Description

A method for realizing the see-and-speak function based on OCR Technical Field

[0001] The present invention relates to the field of voice interaction technology, and in particular to a method for realizing a see-and-speak function based on OCR. Background Art

[0002] Currently, most smart terminals are equipped with a basic voice system, allowing users to use voice to operate some basic functions or make some settings. However, the skills of the voice systems currently available on the market do not cover all skills. For example, if you open a third-party video app and want to use the voice system to speak relevant keywords in response to clicking on the "hot" video category page, it is impossible to do so. Currently, third-party applications that want to combine the "see and speak" function generally provide relevant functional interfaces for the voice system to respond to relevant keywords, in order to achieve this scenario function, and the coverage of these scenarios is limited. In actual applications, many "see and speak" scenarios rely on the system's computing power, which may lead to problems such as delayed response, inability to hit the target, slow response, lag, freeze, and operating system abnormalities.

[0003] In order to solve this pain point, the present invention can achieve the above-mentioned scenarios without the need for third-party applications to cooperate with the voice system to develop related functions, nor does it require cloud servers to process related data. Other third-party applications can also be used. As long as you can see any entry on the interface, you can use the voice system to say the word to respond to the click event of the corresponding interface entry, achieving the effect of seeing and speaking.

[0004] Summary of the Invention

[0005] In view of the fact that the existing see-and-speak function cannot fully support third-party applications and may not respond in time, freeze, or freeze during operation, a method for implementing the see-and-speak function based on OCR is proposed. It does not require third-party applications to cooperate with the voice system to develop related functions, nor does it require cloud servers to process related data. No matter which interface the device screen is in, the voice system can be awakened to speak the keyword corresponding to the interface, and the coordinate position of the keyword can be clicked in response, achieving the see-and-speak effect.

[0006] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0007] A method for implementing a see-and-speak function based on OCR, the method comprising the following steps:

[0008] S1: The user speaks the wake-up word. The CAE component obtains the wake-up word library and determines whether the wake-up word spoken by the user exists in the wake-up word library. If so, the voice assistant is turned on, the voice recognition state is entered, and S2 is executed. If not, the system enters the standby state.

[0009] S2: The user speaks the interface keywords, and the speech translation component translates the user's spoken interface keywords into text information;

[0010] S3: a semantic translation component performs semantic translation on the text information, translating the text information into standard character data;

[0011] S4: Process the screen text through the OCR recognition component;

[0012] S5: The screen click component obtains the coordinate parameters of the processed screen text and performs touch interaction.

[0013] As a preferred solution of the present invention, the CAE component further includes a noise reduction algorithm and a differential array algorithm for performing noise reduction processing on the sound source.

[0014] As a preferred solution of the present invention, in step S4, processing the screen text by the OCR recognition component specifically includes:

[0015] S41: taking a screenshot of the current screen content and preprocessing the text of the screenshot;

[0016] S42: performing character segmentation processing on the pre-processed text and marking the coordinate parameters of each character on the screen;

[0017] S43: The OCR component recognizes all the cut characters and extracts them into the system cache;

[0018] S44: Arrange the recognized characters in order and store them in a character data set;

[0019] S45: All character data are processed with special symbols to eliminate the recognition obstacles of special symbols so as to recognize the words spoken by the user.

[0020] As a preferred solution of the present invention, in step S41, pre-processing the text of the captured image specifically includes:

[0021] Grayscale, binarization and noise reduction are performed on the captured images;

[0022] Apply shadow and skew to text in an image.

[0023] As a preferred solution of the present invention, the shadow processing is specifically: removing the font shadow of the shadowed text, adjusting the overall background to white and the font to black; the tilt processing is specifically: identifying the minimum area rectangle of the text and rotating it to achieve angle correction.

[0024] As a preferred solution of the present invention, the tilt processing also includes: if after identifying the minimum area rectangle of the text and rotating it, the rectangle has been straightened but the text inside the rectangle is still in a tilted state, then using Hough line transform to connect each piece of text with a line, and then processing to put the line in a horizontal state, so that the tilted text can be corrected.

[0025] As a preferred solution of the present invention, in S42, the character cutting process includes row cutting process and column cutting process. The row cutting process is to compress all the black pixels of the characters into a line passing from left to right, so as to know the characters in each row; the column cutting process is to compress all the black pixels of the characters into a line passing from top to bottom, so as to know how many columns of text there are.

[0026] As a preferred solution of the present invention, in step S5, the screen click component obtains the coordinate parameters of the processed screen text and performs contact interaction, specifically including: the screen click component matches the character data set obtained by the OCR recognition component with the standard character data obtained by the semantic translation component. If the match is successful, the coordinate parameters corresponding to the standard character data are obtained, the screen coordinate matching click is performed according to the coordinate parameters, and the click effect is responded to at the coordinate position.

[0027] As a preferred embodiment of the present invention, step S5 further includes: when the user speaks the current interface keyword again, the first character data set is preferentially matched, and the system processes the current screen text through the OCR recognition component in an asynchronous thread manner for the system to perform a second matching. If the matching fails, step S4 is repeated to re-perform OCR recognition on the screen text.

[0028] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the program.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] For the voice system in the smart terminal, there is no need for third-party applications to cooperate with the development of related functions, nor is there a need for cloud servers to process related data. No matter which interface the device screen is in, as long as the voice system is awakened and the keyword corresponding to the interface is spoken, it can respond to the click event of the corresponding interface entry, achieving the effect of seeing and speaking, perfectly compatible with the intervention of third-party applications, and improving the convenience of user operation. Based on the method proposed by the present invention, the problem of high operating pressure of the device is solved, the hit rate of relevant user entries is improved through the various components of the system, and the computing power, recognition ability, and response speed are optimized. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be derived from these drawings without inventive effort. Among them:

[0032] FIG1 is a flow chart of a method according to an embodiment of the present invention;

[0033] FIG2 is an operation flow chart of step S4 in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0035] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0036] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.

[0037] Explanation of terms:

[0038] CAE: Computer Aided Engineering, which refers to computer-aided engineering in engineering design. It refers to the use of computers to solve and analyze the structural mechanical properties of complex projects and products, as well as optimize structural performance.

[0039] OCR: Optical Character Recognition, refers to the process by which an electronic device (such as a scanner or digital camera) examines characters printed on paper, determines their shape by detecting dark and light patterns, and then uses character recognition methods to translate the shape into computer text.

[0040] Example 1: As shown in Figures 1 and 2, this is an embodiment of the present invention, which provides a method for realizing the "see and speak" function based on OCR. "See and speak" is a voice interaction method, which means that no manual touch is required. As long as the function options can be displayed on the smart terminal, they can be controlled through voice interaction, realizing "only speaking, no hands". For example, a multimedia application has a play button on the interface, and the operation intention is to play music. You only need to say "play music" to complete the automatic playback of the music, realizing the "see and speak" function. Compared with the "see and speak" in the prior art, this application introduces the capability of OCR, which can be applied to all devices developed based on the Android system on the market, and is compatible with all scenarios of third-party applications.

[0041] The method comprises the following steps:

[0042] S1: The user speaks the wake-up word. The CAE component obtains the wake-up word library and determines whether the wake-up word spoken by the user exists in the wake-up word library. If so, the voice assistant is turned on, the voice recognition state is entered, and S2 is executed. If not, the system enters the standby state.

[0043] The CAE component is an auxiliary component that assists the voice system in monitoring related wake-up voice assistants, including voice wake-up, noise reduction algorithm, differential array algorithm, etc.

[0044] Preferably, the noise reduction algorithm can use the general subtraction method or LMS adaptive filter, notch filter noise reduction, for example, the digital signal processor (DSP) hard noise reduction method, Baidu soft noise reduction or third-party hard noise reduction method can be used to perform noise reduction processing, thereby eliminating the noise in the voice signal and improving the accuracy of voice recognition.

[0045] S2: The user speaks interface keywords, and the speech translation component translates the user's spoken interface keywords into text information for subsequent matching of related behavioral operations;

[0046] S3: The semantic translation component translates text information into standard character data. Text alone cannot effectively match the actionable locations on the screen seen by the user. Further semantic translation is required to match Chinese, numbers, and English characters with standard character data.

[0047] S4: Process the screen text through the OCR recognition component, specifically including:

[0048] S41: Take a screenshot of the current screen content and preprocess the text in the captured image; the preprocessing includes grayscale conversion, binarization, and noise reduction of the captured image; perform shadow processing and skew processing on the text in the image.

[0049] The binarization process can select methods including global threshold method, local threshold method, deep learning-based method, or other methods; the methods for noise reduction of the image include spatial filtering, wavelet threshold filtering, non-local method, or neural network-based method; the shadow processing is specifically: remove the font shadow of the text with shadow, adjust the overall background to white, and the font to black; the skew processing is specifically: identify the minimum area rectangle of the text and rotate it to achieve angle correction. If after identifying the minimum area rectangle of the text and rotating it, the rectangle is already straightened but the text inside the rectangle is still skewed, then use the Hough line transform to connect each segment of the text with a line, and then place the line in a horizontal state through processing to correct the skewed text.

[0050] S42: Perform character segmentation processing on the preprocessed text and mark the coordinate parameters of each character on the screen; the character segmentation processing includes line segmentation processing and column segmentation processing. The line segmentation processing is to compress all the black pixels of the characters onto a line passing from left to right, so as to know the characters in each line; the column segmentation processing is to compress the black pixels of the characters onto a line passing from top to bottom, so as to know how many columns of text there are. In order to enable OCR to efficiently recognize individual characters, we also need to mark the coordinate parameters of each character on the screen for later semantic restoration.

[0051] S43: The OCR component recognizes all the segmented characters and extracts them into the system cache;

[0052] S44: Arrange the recognized characters in order and store them in the character data set; the characters have been recognized and disassembled, and the corresponding coordinate parameters have been marked before disassembly. Arrange the character data in order according to the marks and store it in the character data set.

[0053] Currently, after the above processing of all text layouts, the whole is already horizontally straightened, and the background is white and the font is black. For example, if the OCR component recognizes a bunch of characters: "good", "you", "ah", "what", "right?", restore the semantics "How are you?".

[0054] S45: Perform special symbol processing on all character data; for example, process "The&Moon_Light" into "THEMOONLIGHT" to exclude the recognition obstacles of relevant special symbols for recognizing the terms spoken by the user.

[0055] S5: The screen click component obtains the coordinate parameters of the processed screen text and performs touch interaction. The screen click component matches the character data set obtained by the OCR recognition component with the standard character data obtained by the semantic translation component. If the match is successful, the screen click component obtains the coordinate parameters corresponding to the standard character data, performs screen coordinate matching and click based on the coordinate parameters, and responds to the click effect at the coordinate location. If the match fails, step S4 is repeated to re-perform OCR recognition on the screen text.

[0056] When the user speaks the current interface keyword again, the first character data set can be matched first. At the same time, the system processes the current screen text through the OCR recognition component in an asynchronous thread for the system to match again.

[0057] Because the previously processed character data set is already cached in the system, when the user speaks the interface keyword again, the user's intention will quickly skip related voice and OCR processing, and first perform a match on the cached character data, achieving a quick hit. If a hit is not found, the current interface's OCR recognition is also processed simultaneously, allowing the system to perform a second match. This achieves an efficient and high-hit "see it, say it" approach, and can effectively reduce computer load and power consumption.

[0058] Example 2: This example provides an application scenario of a method for implementing the see-and-speak function based on OCR, such as when a user opens a video software and uses the initial page of the video software as the current interface.

[0059] S1: The user speaks the correct wake-up word. The CAE component obtains the wake-up word library and determines that the wake-up word spoken by the user exists in the wake-up word library. Then, the voice assistant is turned on and enters the voice recognition state.

[0060] S2: The user says the interface keyword "Dynamics" and wants to click "Dynamics" in the bottom navigation bar through the voice assistant intent; the speech translation component translates the user's spoken interface keyword "Dynamics" into text information;

[0061] S3: The semantic translation component translates the text information into standard character data;

[0062] S4: OCR component recognition process: Take a screenshot of the current screen and perform grayscale, binarization, and noise reduction on the captured image. Remove the shadows of any text in the image, adjust the overall background to white, and the text to black. Identify the minimum area rectangle for the text and rotate it to achieve angle correction. If the rectangle is straightened after identification and rotation, but the text within it is still tilted, use the Hough line transform to connect each piece of text with a line. This line is then horizontalized to correct the tilt.

[0063] Perform character segmentation on the text, compress all the black pixels of the characters into a line running from left to right, so as to know the characters in each row; compress all the black pixels of the characters into a line running from top to bottom, so as to know how many columns of text there are; and mark the coordinate parameters of each character on the screen so as to restore the semantics later.

[0064] The OCR component recognizes all the characters after cutting and extracts them into the system cache; arranges the recognized characters in order and stores them in a character data set; processes all character data with special symbols to eliminate the recognition obstacles of related special symbols in order to recognize the words spoken by the user.

[0065] S5: Match the character data set obtained by the OCR recognition component with the standard character data obtained by the semantic translation component. After a successful match, obtain the coordinate parameters corresponding to the standard character data, pass the coordinate parameters to the Android system's input system through the screen click component, respond to clicks at the coordinate position, enter the page corresponding to the "Dynamics" in the bottom navigation bar, and respond to related click effects at that position, giving users a clear interactive experience.

[0066] After this operation, the user again expresses the intention to return to the "Home" page. When the user again speaks the interface keyword "Home", the first character data set is matched first. Since the last processed character data set has been cached in the system, when the user speaks the interface keyword again, the user's intention will quickly skip the relevant voice and OCR processing and execute the cached character data match first, achieving a quick hit intention.

[0067] At the same time, the system processes the screen text of the "dynamic" page through the OCR recognition component in an asynchronous thread. If it fails to hit the target, the OCR recognition of the current interface is also processed at the same time for the system to match it again, achieving efficient and high-hit "seeing is speaking" and effectively reducing the computer load and the power consumption of computer processing.

[0068] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method described above is implemented when the processor executes the program.

[0069] In summary, for the voice system in the smart terminal, there is no need for third-party applications to cooperate in the development of related functions, nor is there a need for cloud servers to process related data. No matter which interface the device screen is in, as long as the voice system is awakened and the keyword corresponding to the interface is spoken, it can respond to the click event of the corresponding interface entry, achieving the effect of seeing and speaking, perfectly compatible with the intervention of third-party applications, and improving the convenience of user operation. Based on the method proposed in the present invention, the problem of high pressure on device operation is solved, the hit rate of relevant user entries is improved through the various components of the system, and the computing power, recognition ability, and response speed are optimized.

[0070] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0071] In addition, the functional units in the various embodiments of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into a module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the above-mentioned integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc.

[0072] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for realizing the see-and-speak function based on OCR, characterized in that: The method comprises the following steps: S1: The user speaks the wake-up word, the CAE component obtains the wake-up word library and determines whether the wake-up word spoken by the user exists in the wake-up word library. If so, the voice assistant is turned on, the voice recognition state is entered, and S2 is executed; if not, the standby state is entered; S2: The user speaks the interface keywords, and the speech translation component translates the interface keywords spoken by the user into text information; S3: a semantic translation component performs semantic translation on the text information, and translates the text information into standard character data; S4: Process the screen text through the OCR recognition component, including: S41: taking a screenshot of the current screen content and preprocessing the text of the screenshot; S42: performing character segmentation processing on the pre-processed text, and marking the coordinate parameters of each character on the screen; In step S42, the character cutting process includes row cutting process and column cutting process. The row cutting process is to compress all the black pixels of the characters into a line passing from left to right, so as to know the characters in each row; the column cutting process is to compress all the black pixels of the characters into a line passing from top to bottom, so as to know how many columns of characters there are; S43: The OCR component recognizes all the characters after segmentation and extracts them into the system cache; S44: Arrange the recognized characters in order and store them in a character data set; S45: processing all character data with special symbols to eliminate obstacles to recognition of special symbols, so as to recognize the words spoken by the user; S5: the screen click component obtains the coordinate parameters of the processed screen text and performs touch interaction, specifically including: the screen click component matches the character data set obtained by the OCR recognition component with the standard character data obtained by the semantic translation component, if the match is successful, obtains the coordinate parameters corresponding to the standard character data, performs screen coordinate matching and clicking according to the coordinate parameters, and responds to the click effect at the coordinate position; if the match fails, repeats step S4 and performs OCR recognition on the screen text again; The step S5 also includes: when the user speaks the current interface keyword again, the first character data set is matched first, and at the same time, the system processes the current screen text through the OCR recognition component in an asynchronous thread manner for the system to match again.

2. The method for realizing the see-is-speak function based on OCR according to claim 1, characterized in that: The CAE component also includes a noise reduction algorithm and a differential array algorithm for performing noise reduction processing on the sound source.

3. The method for realizing the see-is-speak function based on OCR according to claim 1, characterized in that: In step S41, preprocessing the text of the captured image specifically includes: Grayscale, binarize and reduce noise on the captured images; Apply shadow and skew to text in an image.

4. The method for realizing the see-is-speak function based on OCR according to claim 3, characterized in that: The shadow processing is specifically: removing the font shadow of the text with shadows, adjusting the overall background to white and the font to black; the tilt processing is specifically: identifying the minimum area rectangle of the text and rotating it to achieve angle correction.

5. The method for realizing the see-is-speak function based on OCR according to claim 4, characterized in that: The tilt processing also includes: if after identifying the minimum area rectangle of the text and rotating it, the rectangle has been straightened but the text inside the rectangle is still in a tilted state, then Hough line transform is used to connect each piece of text with a line, and then the line is placed in a horizontal state through processing, so that the tilted text can be corrected.

6. A computer 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 program, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method for realizing screen control by self-defined voice

    CN110428832A

  • Character recognition method, device and system applied to intelligent voice mouse and storage medium

    CN110674825A

  • Method and device for waking up electronic equipment

    CN112306560A

  • Instruction determination method, apparatus and device for vehicle-mounted voice assistant, and medium

    CN114373460A

  • Voice control method and device, equipment, storage medium and program product

    CN115101069A