Text acquisition method, device and equipment based on scanning equipment and storage medium

文档序号:1832033 发布日期:2021-11-12 浏览:4次 中文

阅读说明:本技术 基于扫描设备的文本获取方法、装置、设备以及存储介质 (Text acquisition method, device and equipment based on scanning equipment and storage medium ) 是由 张铭阳 蒋峰 张志达 张国鹏 徐梓翔 刘继强 于 2021-08-18 设计创作,主要内容包括:本公开提供了一种基于扫描设备的文本获取方法、装置、设备以及存储介质,本公开涉及人工智能技术领域,具体涉及自然语言处理和计算机视觉技术领域,可应用于文本的收录和翻译等场景。具体实现方案为:响应于扫描操作以获取扫描文本;确定扫描操作的操作类型,其中,操作类型包括扫描范围小于预设范围的第一类型扫描操作、以及扫描范围不小于预设范围的第二类型扫描操作;当扫描操作为第一类型扫描操作时,对扫描文本进行补全以得到目标文本。用户可以利用扫描设备以第一类型扫描操作来获取到目标文本,使得扫描操作更加简单,能够显著地缩短用户的操作时间,提高获取文本的效率。(The disclosure relates to the technical field of artificial intelligence, in particular to the technical field of natural language processing and computer vision, and can be applied to scenes such as receiving, recording and translating texts. The specific implementation scheme is as follows: responding to a scanning operation to acquire scanned text; determining operation types of scanning operation, wherein the operation types comprise a first type of scanning operation with a scanning range smaller than a preset range and a second type of scanning operation with a scanning range not smaller than the preset range; and when the scanning operation is the first type scanning operation, completing the scanned text to obtain a target text. The user can acquire the target text by the first type of scanning operation by using the scanning equipment, so that the scanning operation is simpler, the operation time of the user can be obviously shortened, and the text acquisition efficiency is improved.)

1. A text acquisition method based on a scanning device comprises the following steps:

responding to the scanning operation to acquire a scanned text;

determining an operation type of the scanning operation, wherein the operation type comprises a first type of scanning operation with a scanning range smaller than a preset range and a second type of scanning operation with a scanning range not smaller than the preset range;

and when the scanning operation is the first type scanning operation, completing the scanned text to obtain a target text.

2. The method of claim 1, wherein said responding to a scan operation to obtain scanned text comprises:

the method includes acquiring scanned text from a scanning medium in response to a user based on a scanning operation of a scanning device on the scanning medium.

3. The method of claim 2, wherein the determining the operation type of the scan operation comprises:

determining a moving operation distance corresponding to the scanning operation;

and judging whether the moving operation distance is smaller than a preset distance, and if the moving operation distance is smaller than the preset distance, determining that the scanning operation is a first type scanning operation.

4. The method of claim 3, wherein the determining a movement operation distance corresponding to the scanning operation comprises:

detecting a moving distance corresponding to the scanning device during the continuous contact with the scanning medium;

and determining the moving distance as a moving operation distance corresponding to the scanning operation.

5. The method of claim 2, wherein the determining the operation type of the scan operation comprises:

determining operation time corresponding to the scanning operation;

and judging whether the operation time is less than a preset time, and if the operation time is less than the preset time, determining that the scanning operation is a first type scanning operation.

6. The method of claim 5, wherein the determining an operation time corresponding to the scanning operation comprises:

detecting a duration corresponding to the scanning device continuously contacting the scanning medium;

and determining the duration as the operation time corresponding to the scanning operation.

7. The method of any of claims 1-6, wherein the completing the scanned text to obtain target text comprises:

retrieving a text which is uniquely matched with the scanned text from a preset word bank;

and determining the uniquely matched text as a target text corresponding to the scanned text.

8. The method of any of claims 1-6, wherein the completing the scanned text to obtain target text comprises:

searching a plurality of candidate texts matched with the scanned texts from a preset word bank;

determining a weight value of each candidate text, wherein the weight value is related to the number of times the candidate text is queried;

sequencing and displaying a plurality of candidate texts based on the weight value of each candidate text;

and determining a target text corresponding to the scanned text from the candidate texts in response to the selection operation of the user on the candidate texts.

9. A text acquisition device based on a scanning device comprises:

a scanned text acquisition module for responding to the scanning operation to acquire a scanned text;

an operation type determining module, configured to determine an operation type of the scanning operation, where the operation type includes a first type of scanning operation whose scanning range is smaller than a preset range, and a second type of scanning operation whose scanning range is not smaller than the preset range;

and the target text acquisition module is used for completing the scanned text to obtain a target text when the scanning operation is a first type of scanning operation.

10. The apparatus of claim 9, wherein the scanned text acquisition module, when configured to acquire the scanned text in response to a scanning operation, is specifically configured to:

the method includes acquiring scanned text from a scanning medium in response to a user based on a scanning operation of a scanning device on the scanning medium.

11. The apparatus according to claim 10, wherein the operation type determining module, when configured to determine the operation type of the scanning operation, is specifically configured to:

determining a moving operation distance corresponding to the scanning operation;

and judging whether the moving operation distance is smaller than a preset distance, and if the moving operation distance is smaller than the preset distance, determining that the scanning operation is a first type scanning operation.

12. The apparatus according to claim 11, wherein the operation type determining module, when configured to determine the moving operation distance corresponding to the scanning operation, is specifically configured to:

detecting a moving distance corresponding to the scanning device during the continuous contact with the scanning medium;

and determining the moving distance as a moving operation distance corresponding to the scanning operation.

13. The apparatus according to claim 10, wherein the operation type determining module, when configured to determine the operation type of the scanning operation, is specifically configured to:

determining operation time corresponding to the scanning operation;

and judging whether the operation time is less than a preset time, and if the operation time is less than the preset time, determining that the scanning operation is a first type scanning operation.

14. The apparatus according to claim 13, wherein the operation type determining module, when configured to determine the operation time corresponding to the scanning operation, is specifically configured to:

detecting a duration corresponding to the scanning device continuously contacting the scanning medium;

and determining the duration as the operation time corresponding to the scanning operation.

15. The apparatus according to any one of claims 9 to 14, wherein the target text acquisition module, when configured to complement the scanned text to obtain the target text, is specifically configured to:

retrieving a text which is uniquely matched with the scanned text from a preset word bank;

and determining the uniquely matched text as a target text corresponding to the scanned text.

16. The apparatus according to any one of claims 9 to 14, wherein the target text acquisition module, when configured to complement the scanned text to obtain the target text, is specifically configured to:

searching a plurality of candidate texts matched with the scanned texts from a preset word bank;

determining a weight value of each candidate text, wherein the weight value is related to the number of times the candidate text is queried;

sequencing and displaying a plurality of candidate texts based on the weight value of each candidate text;

and determining a target text corresponding to the scanned text from the candidate texts in response to the selection operation of the user on the candidate texts.

17. A scanning device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.

18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.

19. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.

Technical Field

The present disclosure relates to the field of artificial intelligence technology, and more particularly to the field of natural language processing and computer vision technology, and can be applied to scenes such as recording and translation of texts.

Background

One type of scanning device (e.g., a dictionary pen) is capable of acquiring text on a scanning medium in a scanning manner and storing the acquired text in the scanning device. However, the existing scanning operation mode for acquiring the scanned text by using the scanning device usually requires that the user can acquire the complete target text after scanning the whole range of the target text by using the scanning device, and this operation mode is complex and time-consuming to operate, and affects the efficiency of acquiring the text by the user.

Disclosure of Invention

The disclosure provides a text acquisition method, a text acquisition device, a text acquisition equipment and a storage medium based on a scanning device.

According to a first aspect of the present disclosure, there is provided a text acquisition method based on a scanning device, including:

responding to the scanning operation to acquire a scanned text;

determining operation types of scanning operation, wherein the operation types comprise a first type of scanning operation with a scanning range smaller than a preset range and a second type of scanning operation with a scanning range not smaller than the preset range;

and when the scanning operation is the first type scanning operation, completing the scanned text to obtain a target text.

According to a second aspect of the present disclosure, there is provided a text acquisition apparatus based on a scanning device, including:

a scanned text acquisition module for responding to the scanning operation to acquire a scanned text;

the operation type determining module is used for determining the operation type of the scanning operation, wherein the operation type comprises a first type of scanning operation of which the scanning range is smaller than a preset range and a second type of scanning operation of which the scanning range is not smaller than the preset range;

and the target text acquisition module is used for completing the scanned text to obtain a target text when the scanning operation is the first type scanning operation.

According to a third aspect of the present disclosure, there is provided a scanning apparatus comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the scanning device based text acquisition method described above.

According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to execute the above-described scanning device-based text acquisition method.

According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the scanning device based text acquisition method described above.

It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.

The technical scheme provided by the disclosure has the following beneficial effects:

in the technical scheme of the disclosure, a user can utilize the scanning device to scan the target text by the scanning operation with a smaller scanning range, so that the scanning device only acquires part of the target text, the scanning operation with the smaller scanning range is simpler, and the operation time of the user can be obviously shortened; the scanning device can continue to complement part of the target text to obtain the finished target text, so that the user can efficiently and accurately obtain the target text by simple scanning operation, and the text obtaining efficiency of the user is improved.

Drawings

The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:

fig. 1 is a schematic flowchart illustrating a text acquisition method based on a scanning device according to an embodiment of the present disclosure;

FIG. 2 is a schematic diagram illustrating a first type of scanning operation of a user on a scanning medium based on a scanning device provided by an embodiment of the present disclosure;

FIG. 3 is a schematic diagram illustrating a second type of scanning operation of a user on a scanned medium based on a scanning device provided by an embodiment of the present disclosure;

FIG. 4 is a flow chart illustrating a sub-method for determining an operation type of a scan operation according to an embodiment of the present disclosure;

FIG. 5 is a flow chart illustrating another sub-method for determining an operation type of a scan operation provided by an embodiment of the present disclosure;

FIG. 6 is a flow chart illustrating a sub-method for completing scanned text according to an embodiment of the present disclosure;

fig. 7 illustrates an exemplary diagram of a plurality of candidate texts obtained by completing a scanned text according to an embodiment of the present disclosure;

fig. 8 is a schematic diagram illustrating a text acquisition apparatus based on a scanning device according to an embodiment of the present disclosure;

fig. 9 shows a schematic block diagram of an example scanning device that may be used to implement the scanning device-based text acquisition method provided by embodiments of the present disclosure.

Detailed Description

Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

One type of scanning device (e.g., a dictionary pen) is capable of acquiring text on a scanning medium in a scanning manner and storing the acquired text in the scanning device. However, the existing scanning operation mode for acquiring the scanned text by using the scanning device usually requires that the user can acquire the complete target text after scanning the whole range of the target text by using the scanning device, and this operation mode is complex and time-consuming to operate, and affects the efficiency of acquiring the text by the user.

The embodiment of the disclosure provides a text acquisition method, a text acquisition device, a text acquisition equipment and a storage medium based on a scanning device, and aims to solve at least one of the above technical problems in the prior art.

Fig. 1 shows a schematic flowchart of a text acquisition method based on a scanning device according to an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes the following steps:

s110: the scanned text is acquired in response to a scanning operation.

In embodiments of the present disclosure, textual content may be carried on a scan medium. In some usage scenarios, the scanning medium may be paper-based or ink-screen, etc.; in other application scenarios, the scanning medium may be an electronic screen or the like. The embodiment of the disclosure can utilize the scanning device to scan on the scanning medium, so as to obtain the scanning text.

Alternatively, the embodiment of the present disclosure may acquire the scanned text from the scanned medium in response to a user's scanning operation on the scanned medium by the scanning device. Specifically, when a user scans a scanning medium using a scanning device, the scanning device may acquire an image containing text, and recognize and acquire a corresponding text from the image. For example, the scanning device may recognize the captured image using techniques such as Optical Character Recognition (OCR) to acquire text contained in the image. For ease of understanding and presentation, embodiments of the present disclosure may refer to a scanning device acquiring text on a scanning medium as scanning text. Alternatively, the scanning device may be a dictionary pen or a scanning pen, or may be other devices having a function of acquiring text from a scanning medium, and the embodiment of the present disclosure does not limit the type of the scanning device.

S120: an operation type of the scanning operation is determined.

In the embodiment of the present disclosure, the operation types of the scanning operation may include a first type scanning operation and a second type scanning operation, where a scanning range of the first type scanning operation is smaller than a first type scanning operation of a preset range, a scanning range of the second type scanning operation is not smaller than the preset range, and a specific range value of the preset range may be determined according to an actual situation. It can be understood that, for a target text that a user desires to acquire on a scanning medium, the user may scan only a partial range of the target text based on a first type of scanning operation of the scanning device on the scanning medium, and the user may scan the entire range of the target text based on a second type of scanning operation of the scanning device on the scanning medium. Generally, since the scan range of the first type scan operation is smaller than that of the second type scan operation, the first type scan operation is simpler and less time-consuming than the second type scan operation.

Alternatively, the first type of scanning operation may be that the user lifts the scanning device without moving the scanning device after contacting the scanning end of the scanning device to a position in the scanning medium in front of the target text, so that the scanning end thereof is away from the scanning medium; alternatively, the first type of scanning operation may be a user moving the scanning device a short distance to lift the scanning device after touching the scanning end of the scanning device to a position in the scanning medium in front of the target text, so that the scanning end is away from the scanning medium. It will be appreciated that a user has scanned a portion of the range of target text based on a first type of scanning operation of the scanning device on the scanning medium.

Alternatively, the second type of scanning operation may be that after the user touches the scanning end of the scanning device to a position in the scanning medium in front of the target text, the scanning device is moved to a position in the scanning medium in back of the target text and then lifted so that the scanning end thereof is away from the scanning medium. It will be appreciated that the user has scanned the full extent of the target text based on the second type of scanning operation of the scanning device on the scanning medium.

Fig. 2 is a schematic diagram illustrating a first type of scanning operation performed by a user on a scanning medium based on a scanning device according to an embodiment of the present disclosure, where in fig. 2, a target text that the user desires to acquire on the scanning medium is "Stayhungry, stayfolish," and an arrow indicates a moving direction of the scanning device. Specifically, after the user touches the scanning end of the scanning device to a position in the scanning medium in front of the first "Stay", the scanning device is lifted without moving the scanning device so that the scanning end is away from the scanning medium, and the scanning device may only scan a range corresponding to "Stayhungry".

Fig. 3 is a schematic diagram illustrating a second type of scanning operation performed by a user on a scanning medium based on a scanning device according to an embodiment of the present disclosure, where in fig. 3, a target text that the user desires to acquire on the scanning medium is "Stayhungry, stayfolish," and an arrow indicates a moving direction of the scanning device. Specifically, after the user touches the scanning end of the scanning device to a position in the scanning medium located in front of the first "Stay", the scanning device is moved to a position in the scanning medium located in back of the "foolish", and then the scanning device is lifted up to leave the scanning end of the scanning device from the scanning medium, at this time, the scanning device can scan the full range corresponding to the "Stayhungry, stayfolish".

It is to be understood that the moving distance and/or the dwell time of the scanning device on the scanning medium are different for the first type of scanning operation and the second type of scanning operation, and therefore the operation type of the scanning operation may be determined based on the moving distance and/or the dwell time, where the specific content of determining the operation type of the scanning operation will be specifically described later.

S130: and when the scanning operation is the first type scanning operation, completing the scanned text to obtain a target text.

As described above, for a target text that a user desires to acquire on a scanning medium, the user scans only a partial range of the target text based on a first type of scanning operation of a scanning device on the scanning medium. Therefore, the scanned text acquired by the scanning device based on a part of the range of the target text may be only a part of the content of the target text, and therefore, the scanned text needs to be complemented to obtain the target text. In the embodiment of the present disclosure, the scanned text may be completed by using a Natural Language Processing (NLP) technology, so as to obtain a target text that a user desires to obtain on a scanned medium. Here, the details of completing the scanned text will be described in detail later.

As previously described, for a target text that a user desires to acquire on a scanning medium, the user may scan the full extent of the target text based on a second type of scanning operation of the scanning device on the scanning medium. Therefore, the scanning device scans the target text that the user desires to acquire on the medium based on the scanned text acquired by the full range of the target text.

According to the text acquisition method based on the scanning equipment provided by the embodiment of the disclosure, a user can scan a target text by using the scanning equipment with a smaller scanning range, so that the scanning equipment only acquires a part of the target text, the scanning operation with the smaller scanning range is simpler, and the operation time of the user can be remarkably shortened; the scanning device can continue to complement part of the target text to obtain the finished target text, so that the user can efficiently and accurately obtain the target text by simple scanning operation, and the text obtaining efficiency of the user is improved.

Fig. 4 is a schematic flowchart illustrating a sub-method for determining an operation type of a scanning operation according to an embodiment of the present disclosure, and as shown in fig. 4, the method may mainly include the following steps:

s410: and determining the moving operation distance corresponding to the scanning operation.

Optionally, the embodiment of the disclosure may detect a moving distance corresponding to the scanning device during the period of continuously contacting the scanning medium, and determine the moving distance as a moving operation distance corresponding to the scanning operation.

It can be understood that when the user uses the scanning device to obtain the scanned text, the scanning device needs to contact and leave the scanning medium in sequence, and this step S410 may detect a moving distance of the scanning device on the scanning medium during the contacting and leaving of the scanning medium, and for convenience of description, this moving distance is defined as a moving operation distance corresponding to the scanning operation in the embodiment of the present disclosure.

S420: and judging whether the moving operation distance is smaller than a preset distance.

As can be seen from the above description of the first type scanning operation and the second type scanning operation, in the case where the user performs the first type scanning operation on the scanning medium based on the scanning device, the moving distance of the scanning device on the scanning medium is zero or a very small value (usually much smaller than the length of the target text); in the case where the user performs the second type of scanning operation on the scanned medium based on the scanning device, the distance that the scanning device moves over the scanned medium is large (typically close to or greater than the length of the target text). Therefore, the embodiment of the present disclosure may set a preset distance, and determine the type of the scanning operation corresponding to the moving operation distance by comparing the moving operation distance with the preset distance, where a specific value of the preset distance may be determined according to an actual situation.

S430: and if the moving operation distance is smaller than the preset distance, determining that the scanning operation is the first type scanning operation. After step S430, the scanned text needs to be complemented to obtain the target text.

S440: and if the moving operation distance is not less than the preset distance, determining that the scanning operation is a second type of scanning operation, and determining that the scanned text is the target text.

For a target text that a user desires to acquire on a scanning medium, the user may scan the full range of the target text based on a second type of scanning operation of the scanning device on the scanning medium. Therefore, the scanning device scans the target text that the user desires to acquire on the medium based on the scanned text acquired by the full range of the target text.

Fig. 5 is a schematic flowchart illustrating another sub-method for determining an operation type of a scanning operation according to an embodiment of the present disclosure, and as shown in fig. 5, the method may mainly include the following steps:

s510: and determining the operation time corresponding to the scanning operation.

Optionally, the embodiment of the disclosure may detect a duration corresponding to the scanning device continuously contacting the scanning medium, and determine the duration as an operation time corresponding to the scanning operation.

It can be understood that, when the user uses the scanning device to obtain the scanned text, the scanning device needs to contact and leave the scanning medium in sequence, and this step S510 may detect an interval time of the scanning device contacting and leaving the scanning medium, where the interval time may be a duration time corresponding to the scanning device continuously contacting the scanning medium.

S520: and judging whether the operation time is less than the preset time.

As can be seen from the above description of the first and second types of scanning operations, in the case where the user performs the first type of scanning operation on the scanning medium based on the scanning device, the duration corresponding to the scanning device continuously contacting the scanning medium is short; in the case where the user performs the second type of scanning operation on the scanning medium based on the scanning device, the duration corresponding to the scanning device continuously contacting the scanning medium is longer. Therefore, the embodiment of the present disclosure may set a preset time, and determine the type of the scanning operation corresponding to the operation time by comparing the operation time with the preset time, where a specific value of the operation time may be determined according to an actual situation.

S530: and if the operation time is less than the preset time, determining that the scanning operation is the first type scanning operation. After step S530, the scanned text needs to be complemented to obtain the target text.

S540: and if the operation time is less than the preset time, determining that the scanning operation is a second type of scanning operation, and determining that the scanned text is the target text.

For a target text that a user desires to acquire on a scanning medium, the user may scan the full range of the target text based on a second type of scanning operation of the scanning device on the scanning medium. Therefore, the scanning device scans the target text that the user desires to acquire on the medium based on the scanned text acquired by the full range of the target text.

As described above, when the scanning operation is the first type scanning operation, the scanned text acquired by the scanning device based on a part of the range of the target text may be only a part of the content of the target text, and the scanned text needs to be completed. The embodiment of the disclosure can deploy a preset word bank in the scanning device, the word bank comprises a plurality of complete texts, and the texts can comprise words, sentences and the like. When the scanned text is completed, a text which is uniquely matched with the scanned text can be retrieved from a preset word stock, and the uniquely matched text is determined as a target text corresponding to the scanned text. In some cases, a plurality of texts matching the scanned text may be retrieved from a preset thesaurus, and at this time, further determination needs to be made on the plurality of texts, so as to determine the target text.

Fig. 6 is a schematic flowchart illustrating a sub-method for completing a scanned text according to an embodiment of the present disclosure, and as shown in fig. 6, the method mainly includes the following steps:

s610: and retrieving a plurality of candidate texts matched with the scanned texts from a preset word bank.

Fig. 7 illustrates an exemplary schematic diagram of obtaining a plurality of candidate texts after completing a scanned text, taking "accucur" as an example of the scanned text, as shown in fig. 7, the candidate texts that are retrieved from the preset lexicon and matched with "accucur" at least include "accurate", "accurately", and "accurated".

S620: and determining the weight value of each candidate text.

In embodiments of the present disclosure, the weight value of each candidate text is related to the number of times the candidate text is queried. Optionally, the number of times of querying each candidate text may be normalized to obtain a weight value of the candidate text. It is understood that the more times the candidate text is queried, the greater the weight value of the candidate text. The larger the weight value of the candidate text is, the higher the possibility that the candidate text is the target text is.

Alternatively, the number of times the text in the dictionary has been queried may be obtained from some specified application,

for example, the number of times each text is queried by the user may be counted from data of some translation applications and updated to the scanning device for storage.

S630: and sequencing and displaying the candidate texts based on the weight value of each candidate text.

In this step, the candidate texts may be sorted in order of decreasing weight values, the candidate text with a larger weight value is displayed at a front position, and the candidate text with a smaller weight value is displayed at a rear position. As shown in fig. 7, the weight values of the candidate texts "accurate", "accurately", and "accurated" are sequentially decreased, and thus "accurater", "accurately", and "accurated" can be presented in positions from front to back.

S640: and determining a target text corresponding to the scanned text from the candidate texts in response to the selection operation of the user on the candidate texts.

The user can determine which candidate text is the target text from the candidate texts displayed by the scanning device, and select the candidate text, and when the scanning device detects a selection operation of the user on one candidate text, the scanning device can determine the target text corresponding to the scanned text from the candidate texts. For example, when the user selects the candidate text "acurate", the scanning device may determine that "acurate" is the target text corresponding to "acurate".

In the embodiment of the present disclosure, after determining the target text, the scanning device may continue to acquire at least one item of relevant information of the target text, where the specific content of the relevant information may be determined based on the application scenario. For example, for a text translation scenario, after determining a target text, the scanning device may obtain and display translation content of the target text for a specified language.

Based on the same principle as the above-mentioned text acquisition method based on the scanning device, fig. 8 shows a schematic diagram of a text acquisition apparatus based on the scanning device according to an embodiment of the present disclosure. As shown in fig. 8, the scanning device-based text acquisition apparatus 800 includes a scanned text acquisition module 810, an operation type determination module 820, and a target text acquisition module 830.

The scanned text acquisition module 810 is configured to acquire scanned text in response to a scanning operation.

The operation type determining module 820 is configured to determine operation types of the scanning operation, where the operation types include a first type of scanning operation whose scanning range is smaller than a preset range, and a second type of scanning operation whose scanning range is not smaller than the preset range.

The target text obtaining module 830 is configured to complete the scanned text to obtain a target text when the scanning operation is the first type scanning operation.

According to the text acquisition device based on the scanning equipment provided by the embodiment of the disclosure, a user can scan a target text by using the scanning equipment with a smaller scanning range, so that the scanning equipment can only acquire part of the target text, the scanning operation with the smaller scanning range is simpler, and the operation time of the user can be remarkably shortened; the scanning device can continue to complement part of the target text to obtain the finished target text, so that the user can efficiently and accurately obtain the target text by simple scanning operation, and the text obtaining efficiency of the user is improved.

In the embodiment of the present disclosure, the scanned-text obtaining module 810, when configured to respond to a scanning operation to obtain a scanned text, is specifically configured to: the method includes acquiring scanned text from a scanning medium in response to a user based on a scanning operation of a scanning device on the scanning medium.

In this embodiment of the disclosure, when the operation type determining module 820 is used to determine the operation type of the scanning operation, it is specifically configured to:

determining a moving operation distance corresponding to the scanning operation;

and judging whether the moving operation distance is smaller than a preset distance, and if the moving operation distance is smaller than the preset distance, determining that the scanning operation is the first type scanning operation.

In this embodiment of the disclosure, when the operation type determining module 820 is configured to determine the moving operation distance corresponding to the scanning operation, it is specifically configured to:

detecting a moving distance corresponding to the scanning device during the continuous contact with the scanning medium;

and determining the moving distance as the moving operation distance corresponding to the scanning operation.

In this embodiment of the disclosure, when the operation type determining module 820 is used to determine the operation type of the scanning operation, it is specifically configured to:

determining operation time corresponding to the scanning operation;

and judging whether the operation time is less than the preset time, and if the operation time is less than the preset time, determining that the scanning operation is the first type scanning operation.

In this embodiment of the present disclosure, when the operation type determining module 820 is configured to determine the operation time corresponding to the scanning operation, it is specifically configured to:

detecting the duration corresponding to the continuous contact of the scanning device with the scanning medium;

and determining the duration as the operation time corresponding to the scanning operation.

In this embodiment of the present disclosure, when the target text obtaining module 830 is used to complement the scanned text to obtain the target text, it is specifically configured to:

retrieving a text which is uniquely matched with the scanned text from a preset word bank;

and determining the uniquely matched text as the target text corresponding to the scanned text.

In this embodiment of the present disclosure, when the target text obtaining module 830 is used to complement the scanned text to obtain the target text, it is specifically configured to:

searching a plurality of candidate texts matched with the scanned texts from a preset word bank;

determining a weight value of each candidate text, wherein the weight value is related to the number of times that the candidate text is inquired;

sequencing and displaying a plurality of candidate texts based on the weight value of each candidate text;

and determining a target text corresponding to the scanned text from the candidate texts in response to the selection operation of the user on the candidate texts.

It can be understood that the modules of the scanning device based text acquisition apparatus in the embodiment of the present disclosure have functions of implementing the corresponding steps of the scanning device based text acquisition method. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the text acquisition apparatus based on the scanning device, reference may be specifically made to the corresponding description of the text acquisition method based on the scanning device, which is not described herein again.

The present disclosure also provides a scanning device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.

Fig. 9 shows a schematic block diagram of an example scanning device that may be used to implement the scanning device-based text acquisition method provided by embodiments of the present disclosure. The scanning device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The scanning device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.

As shown in fig. 9, the scanning device 900 includes a computing unit 901, which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the scanning device 900 can also be stored. The calculation unit 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.

A number of components in the scanning device 900 are connected to the I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, and the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, optical disk, or the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the scanning device 900 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.

The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 901 performs the respective methods and processes described above, such as a scanning device-based text acquisition method. For example, in some embodiments, the scanning device based text acquisition method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the scanning device 900 via the ROM 902 and/or the communication unit 909. When loaded into RAM 903 and executed by computing unit 901, may perform one or more of the steps of the scanning device based text acquisition method described above. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the scanning device based text acquisition method by any other suitable means (e.g., by means of firmware).

Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.

Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.

It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.

The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种车牌字符定位方法及相关设备

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!