Electronic equipment, text recognition method and device, storage medium and program product
By integrating scanning and processing devices into mobile phones or tablets, text recognition and translation functions are achieved, solving the problem of inconvenient use of translation devices and improving the convenience of translation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HEYTAP TECHNOLOGY CO LTD
- Filing Date
- 2024-11-19
- Publication Date
- 2026-05-19
AI Technical Summary
Current translation equipment is inconvenient to use, affecting the flexibility of daily translation.
The functions of a dedicated translation electronic device are integrated into a mobile phone or tablet device, enabling text recognition and translation through the cooperation of scanning and processing devices.
It improves the convenience of translation, allowing users to meet their translation needs without having to purchase additional dedicated translation equipment.
Smart Images

Figure CN122067253A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an electronic device, a text recognition method, an apparatus, a storage medium, and a program product. Background Technology
[0002] With the increasing depth of international exchanges, the demand for translation in daily life is gradually increasing. Among them, translation using specialized electronic devices such as translation pens is currently the mainstream translation method.
[0003] However, current translation methods suffer from inconvenience in use. Summary of the Invention
[0004] Therefore, it is necessary to provide an electronic device, text recognition method, apparatus, storage medium, and program product that can improve the convenience of translation in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides an electronic device, comprising:
[0006] The device body; a scanning device disposed within the device body, the scanning device being used to scan text to obtain scanned data; a processing device disposed within the device body, the processing device being connected to the scanning device, the processing device being used to perform text recognition processing on the scanned data obtained by the scanning device, and to respond according to the recognition result, wherein the electronic device is a mobile phone device or a tablet computer device.
[0007] Secondly, this application provides a text recognition method for use in the electronic device provided in the first aspect, wherein the electronic device is a mobile phone or a tablet computer, and the method includes:
[0008] The text is scanned by a scanning device installed in the electronic device to obtain scanned data;
[0009] The scanning data obtained by the scanning device is processed for text recognition, and a response is given based on the recognition result.
[0010] Thirdly, this application also provides a text recognition device for use in the electronic device provided in the first aspect, wherein the electronic device is a mobile phone device or a tablet computer device, comprising:
[0011] A scanning module is used to scan text using a scanning device installed in the electronic device to obtain scanned data;
[0012] The response module is used to perform text recognition processing on the scanned data obtained by the scanning device and to respond based on the recognition results.
[0013] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the second aspect above.
[0014] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the second aspect above.
[0015] The aforementioned electronic device, text recognition method, apparatus, storage medium, and program product provide an electronic device including a device body, a scanning device, and a processing device. This electronic device is a mobile phone or tablet computer. Both the scanning device and the processing device are located within the device body. The scanning device scans text to obtain scanned data. The processing device, connected to the scanning device, performs text recognition processing on the scanned data and responds based on the recognition results. The mobile phone or tablet computer provided in this application integrates the scanning device from a dedicated translation electronic device. Through the cooperation of the scanning device and the processing device, text recognition and corresponding responses using the recognized text can be achieved. This allows the mobile phone or tablet computer to also possess the functions of a dedicated translation electronic device. Since mobile phones and tablet computers are devices that users frequently carry, integrating the functions of a dedicated translation electronic device into a mobile phone or tablet computer allows users to meet their translation needs with a single device without needing to purchase and carry a separate dedicated translation electronic device, thus improving the convenience of translation. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of an electronic device in one embodiment;
[0018] Figure 2 This is a schematic diagram illustrating the input / output method of an electronic device in one embodiment;
[0019] Figure 3 This is a flowchart illustrating a text recognition method in one embodiment;
[0020] Figure 4 This is a structural block diagram of a text recognition device in one embodiment. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0022] With increasing international exchange, the demand for translation in daily life is gradually growing. To meet users' translation needs, the market has introduced specialized electronic devices such as translation machines and pens. However, the use of these specialized electronic devices is inconvenient, thus affecting the flexibility of daily translation.
[0023] In view of this, embodiments of this application provide an electronic device, a text recognition method, an apparatus, a storage medium, and a program product. The electronic device includes a device body, a scanning device, and a processing device. The electronic device is a mobile phone or tablet computer. Both the scanning device and the processing device are located within the device body. The scanning device scans text to obtain scanned data. The processing device is connected to the scanning device and performs text recognition processing on the scanned data obtained by the scanning device, and responds based on the recognition results. The mobile phone or tablet computer provided in this application integrates the scanning device from a dedicated translation electronic device. Through the cooperation of the scanning device and the processing device, text recognition and corresponding responses using the recognized text can be achieved. This allows the mobile phone or tablet computer to also possess the functions of a dedicated translation electronic device. Since mobile phones or tablet computers are devices that users typically carry when traveling, integrating the functions of a dedicated translation electronic device into a mobile phone or tablet computer allows users to meet their translation needs with a single device without needing to purchase and carry a separate dedicated translation electronic device, thus improving the convenience of translation.
[0024] It should be noted that, in addition to using a scanning device to achieve translation, the electronic device provided in this application embodiment can also achieve other functions, such as text reading and text input. This application embodiment does not specifically limit these functions.
[0025] The electronic device provided in the embodiments of this application will be briefly described below. The electronic device is a mobile phone device or a tablet computer device. The electronic device may include a device body, a scanning device, and a processing device.
[0026] In an optional embodiment of this application, the device body may include a mid-frame and a rear shell.
[0027] The middle frame has a rear shell on its first side, which forms a cavity with the middle frame to accommodate components such as the motherboard and battery of an electronic device. A display screen is located on the second side of the middle frame, and this display screen can have touch and display functions. The middle frame may include surrounding side frames, which can be rectangular in shape.
[0028] In optional embodiments of this application, the scanning device may be disposed within the device body. For example, the scanning device may be disposed within a receiving cavity formed by the rear shell and the middle frame. Optionally, the scanning device may be disposed on the motherboard of the electronic device. In optional embodiments of this application, the scanning device may be an optical scanning device. For example, the scanning device may include a camera, a laser scanner, or an infrared scanner, etc. This application does not specifically limit the specific implementation of these embodiments.
[0029] This scanning device is used to scan text to obtain scanned data, which may be, for example, scanned images.
[0030] Please refer to Figure 1 In an optional embodiment of this application, a scanning port 101 may be provided on the side frame of the middle frame of the device body of the electronic device, and the scanning direction of the scanning device is towards the scanning port so as to scan the text through the scanning port.
[0031] In optional embodiments of this application, the processing device may be disposed within the device body. For example, the processing device may be disposed within the receiving cavity formed by the rear shell and the middle frame. Optionally, the processing device may be disposed on the motherboard of the electronic device. The processing device may be, for example, the processor of the electronic device. This application embodiment does not specifically limit this. The processing device is connected to the scanning device and is used to perform text recognition processing on the scanned data obtained by the scanning device and respond according to the recognition result.
[0032] In an optional embodiment of this application, the processing device may have a built-in text recognition program to perform text recognition processing on the scanned data. The text recognition program may be, for example, an OCR (Optical Character Recognition) program.
[0033] In an optional embodiment of this application, the processing device can also be used to perform text recognition processing on the content items collected by the text acquisition device of the electronic device, and respond according to the recognition result.
[0034] Optionally, the text acquisition device may include at least one of the following: a first audio input device built into an electronic device, such as a microphone in the electronic device; a second audio input device that is communicatively connected to the electronic device, such as headphones with sound pickup function that are connected to the electronic device via Bluetooth; and a shooting device built into the electronic device, such as a camera in the electronic device.
[0035] Different types of text acquisition devices can acquire different types of content items. In optional embodiments of this application, the type of content item may include audio, image, etc., and this application does not specifically limit this. Similarly, as described above, the processing device can use a built-in text recognition program to perform text recognition processing on the content item. In order to recognize various types of content items, in addition to the built-in text recognition program, the processing device may also include an image processing program, an audio processing program, an audio-to-text program, etc., and this application does not specifically limit this.
[0036] As mentioned above, the processing device can respond accordingly based on the text recognition results. Specifically:
[0037] In an optional embodiment of this application, the processing apparatus is specifically configured to perform at least one of the following responses:
[0038] 1. Output the recognized text through the output device of the electronic device.
[0039] In an optional embodiment of this application, the output device includes at least one of the following: a display screen disposed on the second side of the mid-frame; a first audio output device built into an electronic device, such as a speaker in the electronic device; and a second audio output device communicatively connected to the electronic device, such as headphones connected to the electronic device via Bluetooth.
[0040] In other words, in an optional embodiment of this application, the processing device can display the recognized text on a screen, convert the recognized text into audio and play it through a speaker, or play it through headphones connected to an electronic device.
[0041] 2. Fill the input box with the recognized text.
[0042] In an optional embodiment of this application, the display screen of the electronic device may show an input box, which may be various types of input boxes, such as an address input box, a mobile phone number input box, a name input box, etc. The processing device may fill the input box with the recognized text.
[0043] 3. Save the recognized text.
[0044] In an optional embodiment of this application, the processing device may also save the recognized text.
[0045] In an optional embodiment of this application, the processing device may further convert the identified text from a first language to a second language before responding based on the identified text; that is, it may perform translation processing on the identified text. Optionally, the processing device may have a built-in translation program that can be used to translate the identified text. After converting the identified text from the first language to the second language, the processing device may respond accordingly based on the converted second language text. In an optional embodiment of this application, the processing device is specifically used to perform at least one of the following responses:
[0046] 1. Output text in a second language through the output device of an electronic device.
[0047] 2. Fill the input box with text in the second language.
[0048] 3. Save the text in the second language.
[0049] The above three response methods are similar to those described above, and will not be elaborated further in this application embodiment.
[0050] In optional embodiments of this application, in addition to the electronic device comprising a device body, a scanning device, and a processing device as described above, the electronic device may optionally include a memory, an input / output interface, and a communication interface input device. The processing device, memory, and input / output interface are connected via a system bus, and the communication interface, display screen, and input device are connected to the system bus via the input / output interface. The memory of the electronic device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the electronic device is used for exchanging information between the processor and external devices. The communication interface of the electronic device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. The display screen of the electronic device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the electronic device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the electronic device, or external keyboards, touchpads, or mice, etc.
[0051] Please refer to Figure 2This illustrates various text input and output methods of the electronic device provided in the embodiments of this application. The embodiments of this application will combine... Figure 2 The various possible use cases of this electronic device are briefly illustrated with examples.
[0052] 1. Translation scenario:
[0053] Electronic devices can provide translation applications that offer multiple input options and multiple output options. The multiple input options correspond to scan input, photo input, and audio input, respectively, while the multiple output options correspond to display output and audio output, respectively.
[0054] If the user selects the scan input option, the electronic device can scan the text using a scanning device to obtain scanned data; if the user selects the photo input option, the electronic device can take a picture of the text using a shooting device to obtain a text image (image-type content item); if the user selects the audio input option, the electronic device can capture audio containing the text using an audio input device (microphone or headphones with pickup function) (audio-type content item).
[0055] Then, the processing unit of the electronic device can perform text recognition processing on the scanned data or content items, and then the processing unit of the electronic device can convert the recognized text from the first language to the second language (translation).
[0056] If the user selects the display output option, the electronic device can display text in the second language on the screen; if the user selects the audio output option, the electronic device can convert the text in the second language into audio and output the audio through an audio output device (speaker or headphones).
[0057] 2. Text reading scenario.
[0058] Electronic devices can provide a text-to-speech application that offers multiple input options, corresponding to scanning input, photo input, and audio input.
[0059] If the user selects the scan input option, the electronic device can scan the text using a scanning device to obtain scanned data; if the user selects the photo input option, the electronic device can take a picture of the text using a shooting device to obtain a text image (image-type content item); if the user selects the audio input option, the electronic device can capture audio containing the text using an audio input device (microphone or headphones with pickup function) (audio-type content item).
[0060] Then, the processing unit of the electronic device can perform text recognition processing on the scanned data or content items, convert the recognized text into audio, and output the audio through an audio output device (speaker or headphones).
[0061] 3. Text filling scenario.
[0062] Electronic devices can display a text input interface, which may include an input box and provide multiple input options, corresponding to scan input, photo input, and audio input, respectively.
[0063] If the user selects the scan input option, the electronic device can scan the text using a scanning device to obtain scanned data; if the user selects the photo input option, the electronic device can take a picture of the text using a shooting device to obtain a text image (image-type content item); if the user selects the audio input option, the electronic device can capture audio containing the text using an audio input device (microphone or headphones with pickup function) (audio-type content item).
[0064] Then, the electronic device's processing unit can perform text recognition processing on the scanned data or content items, and then the electronic device can use the recognized text to fill the input box in the text input interface.
[0065] 4. Text saving scenario.
[0066] Electronic devices can provide a text saving application that offers multiple input options, corresponding to scan input, photo input, and audio input.
[0067] If the user selects the scan input option, the electronic device can scan the text using a scanning device to obtain scanned data; if the user selects the photo input option, the electronic device can take a picture of the text using a shooting device to obtain a text image (image-type content item); if the user selects the audio input option, the electronic device can capture audio containing the text using an audio input device (microphone or headphones with pickup function) (audio-type content item).
[0068] Then, the electronic device's processing unit can perform text recognition processing on the scanned data or content items, and then the electronic device can save the recognized text.
[0069] In one exemplary embodiment, such as Figure 3 As shown, a text recognition method is provided. Taking the application of this method to the electronic device mentioned above as an example, the electronic device is a mobile phone or a tablet computer. The method includes the following steps:
[0070] Step 301: Scan the text using a scanning device installed in the electronic device to obtain scanned data.
[0071] Step 302: Perform text recognition processing on the scanned data obtained by the scanning device, and respond according to the recognition results.
[0072] Optionally, the recognized text can be output through the output device of an electronic device, the recognized text can be used to fill the input box, and / or the recognized text can be saved.
[0073] Optionally, the recognized text can be converted from the first language to the second language, and the second language text can be output through the output device of the electronic device, the input box can be filled with the second language text, and / or the second language text can be saved.
[0074] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0075] Based on the same inventive concept, this application also provides a text recognition device for implementing the text recognition method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more text recognition device embodiments provided below can be found in the limitations of the text recognition method described above, and will not be repeated here.
[0076] In one exemplary embodiment, such as Figure 4 As shown, a text recognition device 400 is provided for use in an electronic device, such as a mobile phone or a tablet computer, and includes a scanning module 401 and a response module 402.
[0077] The scanning module 401 is used to scan text using a scanning device installed in an electronic device to obtain scanned data.
[0078] The response module 402 is used to perform text recognition processing on the scanned data obtained by the scanning device and to respond based on the recognition results.
[0079] In an optional embodiment of this application, the response module 402 is specifically used to: output the recognized text through the output device of the electronic device, fill the input box with the recognized text, and / or save the recognized text.
[0080] In an optional embodiment of this application, the response module 402 is specifically used to: convert the recognized text from a first language to a second language, and output the text in the second language through the output device of the electronic device, fill the input box with the text in the second language, and / or save the text in the second language.
[0081] Each module in the aforementioned text recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.
[0082] In one exemplary embodiment, an electronic device, which is a mobile phone or a tablet computer, is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0083] Text is scanned by a scanning device installed in an electronic device to obtain scanned data; the scanned data obtained by the scanning device is processed for text recognition, and a response is given based on the recognition result.
[0084] In one embodiment, when the processor executes the computer program, it also performs the following steps: outputting the recognized text through the output device of the electronic device, filling the input box with the recognized text, and / or saving the recognized text.
[0085] In one embodiment, when the processor executes the computer program, it further performs the following steps: converting the recognized text from a first language to a second language, outputting the second language text through the output device of the electronic device, filling the input box with the second language text, and / or saving the second language text.
[0086] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0087] Text is scanned by a scanning device installed in an electronic device to obtain scanned data; the scanned data obtained by the scanning device is processed for text recognition, and a response is given based on the recognition result.
[0088] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: outputting the recognized text through the output device of the electronic device, filling the input box with the recognized text, and / or saving the recognized text.
[0089] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: converting the recognized text from a first language to a second language, outputting the second language text through the output device of an electronic device, filling an input box with the second language text, and / or saving the second language text.
[0090] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0091] Text is scanned by a scanning device installed in an electronic device to obtain scanned data; the scanned data obtained by the scanning device is processed for text recognition, and a response is given based on the recognition result.
[0092] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: outputting the recognized text through the output device of the electronic device, filling the input box with the recognized text, and / or saving the recognized text.
[0093] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: converting the recognized text from a first language to a second language, outputting the second language text through the output device of an electronic device, filling an input box with the second language text, and / or saving the second language text.
[0094] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0095] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0096] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An electronic device, characterized in that, The electronic device includes: Equipment body; A scanning device is disposed within the device body and is used to scan text to obtain scanned data; A processing device is disposed within the device body and connected to the scanning device. The processing device is used to perform text recognition processing on the scanned data obtained by the scanning device and to respond according to the recognition result. The electronic device is a mobile phone or a tablet computer.
2. The electronic device according to claim 1, characterized in that, The device body includes a middle frame and a rear shell; wherein, the rear shell is disposed on the first side of the middle frame and forms a receiving cavity with the middle frame, the middle frame includes an enclosing side frame, and the side frame has a scanning port; The scanning device is disposed within the receiving cavity, and the scanning direction of the scanning device is towards the scanning port, so as to scan the text through the scanning port.
3. The electronic device according to claim 2, characterized in that, The processing device is also used to perform text recognition processing on the content items collected by the text acquisition device of the electronic device, and to respond according to the recognition result.
4. The electronic device according to claim 3, characterized in that, The text acquisition device includes at least one of the following: A first audio input device built into the electronic device; A second audio input device that is communicatively connected to the electronic device; A camera device built into the electronic device.
5. The electronic device according to claim 3, characterized in that, The processing device is specifically used to output the recognized text through the output device of the electronic device, fill the input box with the recognized text, and / or save the recognized text.
6. The electronic device according to claim 5, characterized in that, The processing device is specifically used to convert the recognized text from a first language to a second language, and output the text in the second language through the output device of the electronic device, fill the input box with the text in the second language, and / or save the text in the second language.
7. The electronic device according to claim 5 or 6, characterized in that, The output device includes at least one of the following: A display screen is disposed on the second side of the middle frame; A first audio output device built into the electronic device; A second audio output device that is communicatively connected to the electronic device.
8. A text recognition method, characterized in that, In any of the electronic devices according to claims 1 to 7, wherein the electronic device is a mobile phone device or a tablet computer device, the method includes: The text is scanned by a scanning device installed in the electronic device to obtain scanned data; The scanning data obtained by the scanning device is processed for text recognition, and a response is given based on the recognition result.
9. The method according to claim 8, characterized in that, The response based on the identification result includes: The recognized text is output through the output device of the electronic device, the recognized text is used to fill the input box, and / or the recognized text is saved.
10. The method according to claim 9, characterized in that, The steps of outputting the recognized text through the output device of the electronic device, filling the input box with the recognized text, and / or saving the recognized text include: The recognized text is converted from the first language to the second language, and the text in the second language is output through the output device of the electronic device, the input box is filled with the text in the second language, and / or the text in the second language is saved.
11. A text recognition device, characterized in that, Used in any one of the electronic devices according to claims 1 to 7, wherein the electronic device is a mobile phone device or a tablet computer device, the device comprises: A scanning module is used to scan text using a scanning device installed in the electronic device to obtain scanned data; The response module is used to perform text recognition processing on the scanned data obtained by the scanning device and to respond based on the recognition results.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 8 to 10.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 8 to 10.