WO2020238556A1 - 基于配置平台的数据传输方法、装置和计算机设备 - Google Patents
基于配置平台的数据传输方法、装置和计算机设备 Download PDFInfo
- Publication number
- WO2020238556A1 WO2020238556A1 PCT/CN2020/088049 CN2020088049W WO2020238556A1 WO 2020238556 A1 WO2020238556 A1 WO 2020238556A1 CN 2020088049 W CN2020088049 W CN 2020088049W WO 2020238556 A1 WO2020238556 A1 WO 2020238556A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- text
- picture
- stored
- designated
- preset
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Definitions
- This application relates to the computer field, and in particular to a data transmission method, device, computer equipment and storage medium based on a configuration platform.
- Recognizing the text in the picture is a technology often used in current production and life.
- the traditional text recognition method is that the upload terminal directly uploads the picture including the text to the recognition terminal, then the recognition terminal recognizes the picture to obtain the recognized text, and the recognition terminal sends the recognized text to the upload terminal.
- the inventor realizes that this traditional method requires repeated recognition for repeated pictures, which wastes computing power; and cannot send recognized text to third-party terminals in real time. If the recognized text is to be sent to third-party terminals, further uploading is required.
- the terminal sends the recognized text to a third-party terminal, thereby adding another step to the information transmission process, wasting resources and being unable to display the recognized text in real time at the same time.
- the main purpose of this application is to provide a data transmission method, device, computer equipment, and storage medium based on a configuration platform to reduce additional network overhead caused by repeated sending of text information corresponding to repeated pictures.
- this application proposes a data transmission method based on a configuration platform, which includes the following steps: receiving a text recognition application sent by an upload terminal, where the text recognition application specifies a text display terminal, and the text recognition application carries There is a designated picture; the predetermined picture similarity judgment method is used to determine whether the designated picture is similar to the pre-stored picture; if the designated picture is not similar to the pre-stored picture, the designated picture is sent to the designated text recognition terminal, so The designated text recognition terminal is used to recognize the text content in the designated picture as picture text text; receive the picture text text sent by the designated text recognition terminal, and use a preset text similarity calculation method to calculate the The similarity value between the text of the picture and the prestored text, and determine whether the similarity value is greater than a preset similarity threshold, wherein the prestored text refers to the text obtained by performing text recognition on the prestored picture; If the similarity value is not greater than a preset similarity
- This application provides a data transmission device based on a configuration platform, including: a text recognition application receiving unit for receiving a text recognition application sent by an upload terminal, the text recognition application specifies a text display terminal, and the text recognition application carries There are designated pictures; the picture similarity judgment unit is used to use a preset picture similarity judgment method to judge whether the designated picture is similar to the pre-stored picture; the designated picture sending unit is used if the designated picture is not similar to the pre-stored picture , The designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture as picture text text; the picture text text receiving unit is used to receive the designated text Recognize the picture text text sent by the terminal, calculate the similarity value between the picture text text and the pre-stored text by using a preset text similarity calculation method, and determine whether the similarity value is greater than a preset similarity threshold , Wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture
- the present application provides a computer device including a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the above methods when the computer program is executed.
- the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
- This application reduces the additional network overhead caused by repeated sending of text information corresponding to repeated pictures, and realizes real-time display of recognized text.
- FIG. 1 is a schematic flowchart of a data transmission method based on a configuration platform according to an embodiment of the application;
- FIG. 2 is a schematic block diagram of the structure of a data transmission device based on a configuration platform according to an embodiment of the application;
- FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
- an embodiment of the present application provides a data transmission method based on a configuration platform, including the following steps:
- Recognizing the text in the picture is a technology often used in current production and life.
- the traditional text recognition method is that the upload terminal directly uploads the picture including the text to the recognition terminal, then the recognition terminal recognizes the picture to obtain the recognized text, and the recognition terminal sends the recognized text to the upload terminal.
- This traditional method requires repeated recognition for duplicate pictures, wasting computing power; and it cannot send the recognized text to a third-party terminal in real time. If the recognized text is to be sent to a third-party terminal, the upload terminal needs to further send the recognized text. To a third-party terminal, there is an extra step of sending information, a waste of resources, and it is impossible to display recognized text in real time.
- This application uses the configuration platform to control the data transfer process, and uses two similarity calculations to ensure that the specified picture is a new picture, and then the text of the picture recognized from the specified picture is sent to the specified text display terminal, thereby It has realized the technical effect of saving computing power, saving process, real-time and displaying recognized text at the same time.
- a text recognition application sent by an upload terminal is received, the text recognition application specifies a text display terminal, and the text recognition application carries a specified picture.
- the execution subject of this application is a configuration platform, which is used to control the data transfer process between the upload terminal, the recognition terminal, and the text display terminal, and is preferably a configuration platform based on big data technology, such as the big data engine spark , Using a large database HBase, etc., so that the configuration platform can store and process a large amount of data from a large number of users.
- the upload terminal may be any terminal, such as a terminal with a scanning function, a terminal with a photographing function, etc., preferably a terminal that can perform image collection to obtain a specified picture.
- the designated picture is a picture with text.
- a preset picture similarity determination method is used to determine whether the designated picture is similar to a pre-stored picture.
- the preset picture similarity judgment method is, for example: sequentially comparing the corresponding pixels in the specified picture and the pre-stored picture, and if the number of the same pixel points in all the pixels is greater than a predetermined threshold, then it is determined If the designated picture is similar to the pre-stored picture, it means that the designated picture is pre-stored in the configuration platform and is a duplicate picture.
- the pre-stored picture Since the pre-stored picture has already used text recognition technology to recognize the text, there is no need to perform another recognition; if If the proportion of the number of the same pixels in the number of all pixels is not greater than a predetermined threshold, it is determined that the specified picture is not similar to the pre-stored picture, indicating that the specified picture is a new picture and text recognition technology is not used for recognition, Therefore, identification is required.
- step S3 if the designated picture is not similar to the pre-stored picture, the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture as Picture text text. If the designated picture is not similar to the pre-stored picture, then the designated picture needs text recognition, so the designated picture is sent to the designated text recognition terminal.
- This application adopts the setting of separating the designated text recognition terminal from the configuration platform to separate the text recognition function and the designated text recognition terminal for recognition.
- the recognition terminal of the corresponding text recognition algorithm can be used for the recognition according to the specific picture. Hierarchical management, saving resources (simple pictures can be identified by simple algorithms), and easy error tracking.
- the technology for recognizing the text content in the specified picture as the text text of the picture can use the existing mature recognition technology, such as OCR technology (OCR technology is the abbreviation of Optical Character Recognition (Optical Character Recognition), which is available). (The image information is converted into usable computer input technology), which will not be repeated here.
- OCR technology is the abbreviation of Optical Character Recognition (Optical Character Recognition), which is available).
- Optical Character Recognition Optical Character Recognition
- the picture text text sent by the designated text recognition terminal is received, and the preset text similarity calculation method is used to calculate the similarity value between the picture text text and the pre-stored text, and determine the Whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture.
- the calculation of the similarity value between the image text text and the pre-stored text can be any method, for example: using WMD algorithm (word move's distance), based on cosine similarity, simhash algorithm, word frequency
- the vector algorithm is based on the similarity value between the text of the picture and the pre-stored text.
- the similarity threshold may be any value, such as 100%. Further, in order to avoid misjudgment, the similarity threshold may be set to be less than 100%, for example, greater than or equal to 80%.
- the text text of the picture is sent to the text display terminal.
- the similarity value is used to determine whether the text of the picture is the same as the pre-stored text, that is, whether the designated picture is the same as the pre-stored picture. If the similarity value is not greater than the preset similarity threshold, it indicates that the specified picture is a new picture. Therefore, the text display terminal does not save the text of the picture recognized by the specified picture, and converts the text of the picture accordingly The text is sent to the text display terminal to display the recognized text in real time and simultaneously. Further, if the similarity value is greater than the preset similarity threshold, it indicates that the specified picture is a duplicate picture.
- the text display terminal saves the picture text text recognized by the specified picture, so there is no need to send the picture text text. It only needs to inform the text display terminal of the storage location of the picture text and text, and the text display terminal can directly call the local storage data, thereby saving network overhead.
- the step S2 of judging whether the designated picture is similar to a pre-stored picture by using a preset picture similarity judgment method includes:
- S201 Perform gray-scale processing on the designated picture and the pre-stored picture respectively to obtain a first gray-scale picture and a second gray-scale picture;
- S202 Calculate the average value Am of the gray values of all pixels in the m-th column or the m-th row of the gray-scale picture, and calculate the average value B of the gray values of all the pixels in the gray-scale picture;
- grayscale refers to the color representing a grayscale color.
- the color represents a grayscale color
- the gray scale range is, for example, 0-255 (when the values of R, G, and B are all 0-255, of course it will also change with the change of the value range of R, G, and B).
- the gray-scale processing method can be any method, such as the component method, the maximum method, the average method, and the weighted average method. Among them, since there are only 256 value ranges for the gray value, comparison of pictures on this basis can greatly reduce the amount of calculation. Then calculate the average value Am of the gray values of all pixels in the m-th column or the m-th row of the gray-scale picture, and calculate the average value B of the gray values of all the pixels in the gray-scale picture.
- the process of calculating the average value Am of the gray values of all pixels in the m-th column or m-th row of the gray-scale picture includes: collecting all the pixels in the m-th column or m-th row of the gray-scale picture Add the gray values of all pixels in the mth column or mth row, and divide the sum of the gray values obtained by the summation by the mth column or The number of all pixels in the m rows is the average value Am of the gray values of all the pixels in the mth column or mth row of the grayscale image.
- the process of calculating the average value B of the gray values of all pixels in the gray image includes: calculating the sum of the gray values of all pixels in the gray image, and dividing the sum of the gray values by According to the number of pixels, the average value B of the gray values of all pixels in the gray image is obtained.
- the overall variance is used to measure the average of the gray values Am of the pixels in the m-th column or the m-th row of the gray-scale image and the average of the gray-scale values of all pixels in the gray-scale image. The difference between the value B.
- the gray value of the mth column or row of the first grayscale image is the same or approximately the same as the gray value of the mth column or row of the second grayscale image (approximate judgment to save computing power , And because the overall variance of the two different pictures is generally not equal, the accuracy of the judgment is very high), on the contrary, the gray value of the mth column or mth row of the first grayscale image is the same as the second grayscale value.
- the gray value of the mth column or mth row of the picture is different.
- the return value is The maximum value in. If it is less than the preset variance error threshold, it is determined that the specified picture is similar to the pre-stored picture. Thus, approximate judgment is used (because all gray values of grayscale pictures converted from two different pictures are generally not equal, and all grayscale values of grayscale pictures converted from the same picture are generally equal), it achieves less consumption Under the premise of computing resources, it is determined whether the specified picture is similar to the pre-stored picture.
- the step S2 of judging whether the designated picture is similar to a pre-stored picture by using a preset picture similarity judgment method includes:
- S203 Determine whether the proportion of the same pixel points is greater than a preset proportion threshold
- the use of a preset picture similarity judgment method is realized to judge whether the specified picture is similar to the pre-stored picture.
- the method includes:
- S22 Search for the text text corresponding to the pre-stored picture in all texts corresponding to the upload terminal, so as to obtain position information of the text text corresponding to the pre-stored picture in all texts corresponding to the upload terminal;
- the location information is sent to the text display terminal.
- the designated picture is similar to the pre-stored picture, only the position information of the text corresponding to the pre-stored picture in all the texts corresponding to the upload terminal is sent to the text display terminal, and the text display terminal uses the position information All the text corresponding to the upload terminal can be retrieved from local storage, and the text content corresponding to the designated picture can be obtained according to the location information.
- a Kafka message queue can also be used to transmit location information, that is, the location information is put into a preset Kafka message queue for consumption by the text display terminal.
- Kafka is a high-throughput distributed publish-subscribe message queue, which can process all action flow data in consumer-scale websites.
- the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture Step S3 is the text of the picture, including:
- the designated picture is not similar to the pre-stored picture, use a preset preliminary text recognition technology to recognize a predetermined area in the picture text text picture to obtain a preliminary recognized text, wherein the area of the predetermined area is smaller than that of the designated picture area;
- S302 Obtain the text text corresponding to the pre-stored picture according to the corresponding relationship between the preset picture and the pre-stored text text;
- this embodiment adopts preliminary text recognition technology to further determine whether the designated picture is similar to the pre-stored picture.
- the preliminary character recognition technology can be any character recognition technology, for example, OCR recognition technology.
- the area of the predetermined area is smaller than the area of the designated picture, for example, an edge area of the designated picture.
- this embodiment can further determine whether the designated picture is similar to the pre-stored picture under the premise of only consuming a small amount of computing power, and when the text corresponding to the pre-stored picture does not contain the preliminary recognized text (that is, the designated The picture is not similar to the pre-stored picture), the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture as text text of the picture.
- Step S4 includes:
- S401 Receive the picture text text sent by the designated text recognition terminal
- the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture
- similarity is the similarity value
- A is the word frequency of the picture text text Vector
- B is the word frequency vector of the pre-stored text
- Ai is the number of occurrences of the i-th word of the image text
- Bi is the number of occurrences of the i-th word of the pre-stored text
- S403 Determine whether the similarity value is greater than a preset similarity threshold.
- the similarity algorithm is calculated based on the cosine similarity of the text content of the two nodes to reflect the degree of similarity between the text content of the two nodes. When the value of similarity is closer to 1, the more similar is; the closer to 0, the less similar. Based on this, it is determined whether the similarity value is greater than a preset similarity threshold.
- the similarity threshold is preferably 100%.
- the receiving the picture text text sent by the designated text recognition terminal and using a preset text similarity calculation method to calculate the similarity value between the picture text text and the pre-stored text, and determine Whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture after step S4, including:
- the location information is sent to the text display terminal. If the similarity value is greater than the preset similarity threshold, it indicates that the specified picture is similar to the pre-stored picture (the text of the picture is similar to the pre-stored text), so only the pre-stored text in all texts corresponding to the upload terminal
- the location information can be sent to the text display terminal, and the text display terminal can retrieve all the text corresponding to the upload terminal from the local storage through the location information, and learn the text content corresponding to the specified picture according to the location information .
- a Kafka message queue can also be used to transmit location information, that is, the location information is put into a preset Kafka message queue for consumption by the text display terminal.
- Kafka is a high-throughput distributed publish-subscribe message queue, which can process all action flow data in consumer-scale websites.
- the method includes:
- the similarity threshold is obtained by reducing the value of the preset standard threshold.
- this application adopts obtaining the flow value sent to the text display terminal within a predetermined time; determining whether the flow value is greater than a preset flow threshold; if the flow value is greater than the preset flow threshold, Then, the similarity threshold is obtained by reducing the value of the preset standard threshold, and the value is reduced on the basis of the standard threshold to reduce the number of times of sending text to the text display terminal, thereby reducing the pressure on the configuration platform.
- the data transmission method based on the configuration platform of this application receives the text recognition application sent by the upload terminal; determines whether the specified picture is similar to the prestored picture; if the specified picture is not similar to the prestored picture, then the specified picture is sent to A designated text recognition terminal, the designated text recognition terminal is used to recognize the text content in the designated picture as picture text text; receive the picture text text sent by the designated text recognition terminal, calculate the picture text text and The similarity value of the pre-stored text; if the similarity value is not greater than the preset similarity threshold, the text of the picture is sent to the text display terminal. This reduces the additional network overhead caused by the repeated sending of text information corresponding to the repeated pictures, and realizes real-time display of recognized text.
- an embodiment of the present application provides a data transmission device based on a configuration platform, including:
- the text recognition application receiving unit 10 is configured to receive a text recognition application sent by an upload terminal, where the text recognition application specifies a text display terminal, and the text recognition application carries a specified picture;
- the picture similarity judgment unit 20 is configured to use a preset picture similarity judgment method to judge whether the designated picture is similar to a pre-stored picture;
- the designated picture sending unit 30 is configured to send the designated picture to a designated text recognition terminal if the designated picture is not similar to the prestored picture, and the designated text recognition terminal is used to recognize the text content in the designated picture Is the text of the picture;
- the picture text text receiving unit 40 is configured to receive the picture text text sent by the designated text recognition terminal, and use a preset text similarity calculation method to calculate the similarity value between the picture text text and the prestored text, and Judging whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture;
- the picture text text sending unit 50 is configured to send the picture text text to the text display terminal if the similarity value is not greater than a preset similarity threshold.
- Recognizing the text in the picture is a technology often used in current production and life.
- the traditional text recognition method is that the upload terminal directly uploads the picture including the text to the recognition terminal, then the recognition terminal recognizes the picture to obtain the recognized text, and the recognition terminal sends the recognized text to the upload terminal.
- This traditional method requires repeated recognition for duplicate pictures, wasting computing power; and it cannot send the recognized text to a third-party terminal in real time. If the recognized text is to be sent to a third-party terminal, the upload terminal needs to further send the recognized text. To a third-party terminal, there is an extra step of sending information, a waste of resources, and it is impossible to display recognized text in real time.
- This application uses the configuration platform to control the data transfer process, and uses two similarity calculations to ensure that the specified picture is a new picture, and then the text of the picture recognized from the specified picture is sent to the specified text display terminal, thereby It has realized the technical effect of saving computing power, saving process, real-time and displaying recognized text at the same time.
- a text recognition application sent by an upload terminal is received, where the text recognition application specifies a text display terminal, and the text recognition application carries a specified picture.
- the execution subject of this application is a configuration platform, which is used to control the data transfer process between the upload terminal, the recognition terminal, and the text display terminal, and is preferably a configuration platform based on big data technology, such as the big data engine spark , Using a large database HBase, etc., so that the configuration platform can store and process a large amount of data from a large number of users.
- the upload terminal may be any terminal, such as a terminal with a scanning function, a terminal with a photographing function, etc., preferably a terminal that can perform image collection to obtain a specified picture.
- the designated picture is a picture with text.
- a preset picture similarity determination method is used to determine whether the designated picture is similar to a pre-stored picture.
- the preset picture similarity judgment method is, for example: sequentially comparing the corresponding pixels in the specified picture and the pre-stored picture, and if the number of the same pixel points in all the pixels is greater than a predetermined threshold, then it is determined If the designated picture is similar to the pre-stored picture, it means that the designated picture is pre-stored in the configuration platform and is a duplicate picture.
- the pre-stored picture Since the pre-stored picture has already used text recognition technology to recognize the text, there is no need to perform another recognition; if If the proportion of the number of the same pixels in the number of all pixels is not greater than a predetermined threshold, it is determined that the specified picture is not similar to the pre-stored picture, indicating that the specified picture is a new picture and text recognition technology is not used for recognition, Therefore, identification is required.
- the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture as Picture text text. If the designated picture is not similar to the pre-stored picture, then the designated picture needs text recognition, so the designated picture is sent to the designated text recognition terminal.
- This application adopts the setting of separating the designated text recognition terminal from the configuration platform to separate the text recognition function and the designated text recognition terminal for recognition.
- the recognition terminal of the corresponding text recognition algorithm can be used for the recognition according to the specific picture. Hierarchical management, saving resources (simple pictures can be identified by simple algorithms), and easy error tracking.
- the technology for recognizing the text content in the specified picture as the text text of the picture can use the existing mature recognition technology, such as OCR technology (OCR technology is the abbreviation of Optical Character Recognition (Optical Character Recognition), which is available). (The image information is converted into usable computer input technology), which will not be repeated here.
- OCR technology is the abbreviation of Optical Character Recognition (Optical Character Recognition), which is available).
- Optical Character Recognition Optical Character Recognition
- the picture text text sent by the designated text recognition terminal is received, and a preset text similarity calculation method is used to calculate the similarity value between the picture text text and the pre-stored text, and determine the Whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture.
- the calculation of the similarity value between the image text text and the pre-stored text can be any method, for example: using WMD algorithm (word move's distance), based on cosine similarity, simhash algorithm, word frequency
- WMD algorithm word move's distance
- cosine similarity based on cosine similarity
- simhash algorithm word frequency
- the vector algorithm is based on the similarity value between the text of the picture and the pre-stored text.
- the similarity threshold may be any value, such as 100%. Further, in order to avoid misjudgment, the similarity threshold may be set to be less than 100%, for example, greater than or equal to 80%.
- the text of the picture is sent to the text display terminal.
- the similarity value is used to determine whether the text of the picture is the same as the pre-stored text, that is, whether the designated picture is the same as the pre-stored picture. If the similarity value is not greater than the preset similarity threshold, it indicates that the specified picture is a new picture. Therefore, the text display terminal does not save the text of the picture recognized by the specified picture, and converts the text of the picture accordingly The text is sent to the text display terminal to display the recognized text in real time and simultaneously. Further, if the similarity value is greater than the preset similarity threshold, it indicates that the specified picture is a duplicate picture.
- the text display terminal saves the picture text text recognized by the specified picture, so there is no need to send the picture text text. It only needs to inform the text display terminal of the storage location of the picture text and text, and the text display terminal can directly call the local storage data, thereby saving network overhead.
- the picture similarity judgment unit 20 includes:
- the gray-scale processing subunit is used to perform gray-scale processing on the designated picture and the pre-stored picture to obtain a first gray-scale picture and a second gray-scale picture;
- the average gray value calculation subunit is used to calculate the average value Am of the gray values of all pixels in the m-th column or m-th row of the gray-scale image, and to calculate all the pixels in the gray-scale image
- the overall variance gets the sub-unit, which is used according to the formula: Calculate the overall variance of the m-th column or m-th row of the grayscale image Where N is the total number of columns or rows in the grayscale picture;
- the difference of the overall variance gets the sub-unit, which is used according to the formula: Obtain the difference between the overall variance of the m-th column or m-th row of the two grayscale images among them, Is the overall variance of the mth column or mth row of the first grayscale image, Is the overall variance of the mth column or mth row of the second grayscale image;
- Variance error threshold judgment subunit used to judge Whether it is less than the preset variance error threshold
- Picture similarity determination subunit used if If it is less than the preset variance error threshold, it is determined that the specified picture is similar to the pre-stored picture.
- grayscale refers to the color representing a grayscale color.
- the color represents a grayscale color
- the gray scale range is, for example, 0-255 (when the values of R, G, and B are all 0-255, of course it will also change with the change of the value range of R, G, and B).
- the gray-scale processing method can be any method, such as the component method, the maximum method, the average method, and the weighted average method. Among them, since there are only 256 value ranges for the gray value, comparison of pictures on this basis can greatly reduce the amount of calculation. Then calculate the average value Am of the gray values of all pixels in the m-th column or the m-th row of the gray-scale picture, and calculate the average value B of the gray values of all the pixels in the gray-scale picture.
- the process of calculating the average value Am of the gray values of all pixels in the m-th column or m-th row of the gray-scale picture includes: collecting all the pixels in the m-th column or m-th row of the gray-scale picture Add the gray values of all pixels in the mth column or mth row, and divide the sum of the gray values obtained by the summation by the mth column or The number of all pixels in the m rows is the average value Am of the gray values of all the pixels in the mth column or mth row of the grayscale image.
- the process of calculating the average value B of the gray values of all pixels in the gray image includes: calculating the sum of the gray values of all pixels in the gray image, and dividing the sum of the gray values by According to the number of pixels, the average value B of the gray values of all pixels in the gray image is obtained.
- the overall variance is used to measure the average of the gray values Am of the pixels in the m-th column or the m-th row of the gray-scale image and the average of the gray-scale values of all pixels in the gray-scale image. The difference between the value B.
- the gray value of the mth column or row of the first grayscale image is the same or approximately the same as the gray value of the mth column or row of the second grayscale image (approximate judgment to save computing power , And because the overall variance of the two different pictures is generally not equal, the accuracy of the judgment is very high), on the contrary, the gray value of the mth column or mth row of the first grayscale image is the same as the second grayscale value.
- the gray value of the mth column or mth row of the picture is different.
- the return value is The maximum value in. If it is less than the preset variance error threshold, it is determined that the specified picture is similar to the pre-stored picture. Thus, approximate judgment is used (because all gray values of grayscale pictures converted from two different pictures are generally not equal, and all grayscale values of grayscale pictures converted from the same picture are generally equal), it achieves less consumption Under the premise of computing resources, it is determined whether the specified picture is similar to the pre-stored picture.
- the picture similarity judgment unit 20 includes:
- Counting the same pixel points subunit used to sequentially compare the corresponding pixels in the designated picture and the pre-stored picture, and count the number of the same pixels
- the proportion threshold judgment subunit is used to judge whether the proportion of the same pixel is greater than a preset proportion threshold
- the similarity determination subunit is configured to determine that the specified picture is similar to a pre-stored picture if the proportion of the same pixel is greater than a preset proportion threshold.
- the use of a preset picture similarity judgment method is realized to judge whether the specified picture is similar to the pre-stored picture.
- the device includes:
- the all text acquisition unit is configured to, if the designated picture is similar to the pre-stored picture, acquire all the text corresponding to the upload terminal, and obtain the corresponding relationship of the pre-stored picture according to the correspondence between the preset picture and the pre-stored text and text Text text
- the location information obtaining unit is configured to search for the text text corresponding to the pre-stored picture in all texts corresponding to the upload terminal, so as to obtain the location information of the text text corresponding to the pre-stored picture in all texts corresponding to the upload terminal ;
- the location information sending unit is configured to send the location information to the text display terminal.
- the location information is sent to the text display terminal.
- the designated picture is similar to the pre-stored picture, only the position information of the text corresponding to the pre-stored picture in all the texts corresponding to the upload terminal is sent to the text display terminal, and the text display terminal uses the position information All the text corresponding to the upload terminal can be retrieved from local storage, and the text content corresponding to the designated picture can be obtained according to the location information.
- a Kafka message queue can also be used to transmit location information, that is, the location information is put into a preset Kafka message queue for consumption by the text display terminal.
- Kafka is a high-throughput distributed publish-subscribe message queue, which can process all action flow data in consumer-scale websites.
- the designated picture sending unit 30 includes:
- the preliminary recognition text acquisition sub-unit is used for if the designated picture is not similar to the pre-stored picture, use a preset preliminary text recognition technology to recognize a predetermined area in the picture text text picture to obtain a preliminary recognition text.
- the area is smaller than the area of the designated picture;
- the text text obtaining subunit is used to obtain the text text corresponding to the pre-stored picture according to the corresponding relationship between the preset picture and the pre-stored text text;
- the preliminary recognition text judgment subunit is used to compare the preliminary recognition text and the text text corresponding to the pre-stored picture, so as to determine whether the text text corresponding to the pre-stored picture contains the preliminary recognition text;
- the designated picture sending subunit is configured to send the designated picture to a designated text recognition terminal if the text corresponding to the prestored picture does not contain the preliminary recognized text, and the designated text recognition terminal is used to send the designated text
- the text content in the picture is recognized as picture text text.
- this embodiment adopts preliminary text recognition technology to further determine whether the designated picture is similar to the pre-stored picture.
- the preliminary character recognition technology can be any character recognition technology, for example, OCR recognition technology.
- the area of the predetermined area is smaller than the area of the designated picture, for example, an edge area of the designated picture.
- this embodiment can further determine whether the designated picture is similar to the pre-stored picture under the premise of only consuming a small amount of computing power, and when the text corresponding to the pre-stored picture does not contain the preliminary recognized text (that is, the designated The picture is not similar to the pre-stored picture), the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture as text text of the picture.
- the picture text text receiving unit 40 includes:
- the picture text text receiving subunit is configured to receive the picture text text sent by the designated text recognition terminal;
- the similarity value calculation subunit is used to adopt the formula:
- the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture
- similarity is the similarity value
- A is the word frequency of the picture text text Vector
- B is the word frequency vector of the pre-stored text
- Ai is the number of occurrences of the i-th word of the image text
- Bi is the number of occurrences of the i-th word of the pre-stored text
- the similarity threshold judgment subunit is used to judge whether the similarity value is greater than a preset similarity threshold.
- the similarity algorithm is calculated based on the cosine similarity of the text content of the two nodes to reflect the degree of similarity between the text content of the two nodes. When the value of similarity is closer to 1, the more similar is; the closer to 0, the less similar. Based on this, it is determined whether the similarity value is greater than a preset similarity threshold.
- the similarity threshold is preferably 100%.
- the device includes:
- An all text acquisition unit configured to acquire all the text corresponding to the upload terminal if the similarity value is greater than a preset similarity threshold
- a location information acquiring unit configured to acquire location information of the pre-stored text in all texts corresponding to the upload terminal
- the location information sending unit is configured to send the location information to the text display terminal.
- the location information is sent to the text display terminal. If the similarity value is greater than the preset similarity threshold, it indicates that the specified picture is similar to the pre-stored picture (the text of the picture is similar to the pre-stored text), so only the pre-stored text in all texts corresponding to the upload terminal
- the location information can be sent to the text display terminal, and the text display terminal can retrieve all the text corresponding to the upload terminal from the local storage through the location information, and learn the text content corresponding to the specified picture according to the location information .
- a Kafka message queue can also be used to transmit location information, that is, the location information is put into a preset Kafka message queue for consumption by the text display terminal.
- Kafka is a high-throughput distributed publish-subscribe message queue, which can process all action flow data in consumer-scale websites.
- the device includes:
- a flow value obtaining unit configured to obtain a flow value sent to the text display terminal within a predetermined time
- a flow threshold judging unit configured to judge whether the flow value is greater than a preset flow threshold
- the similarity threshold obtaining unit is configured to obtain the similarity threshold by reducing the value of the preset standard threshold if the flow value is greater than the preset flow threshold.
- this application adopts acquiring the flow value sent to the text display terminal within a predetermined time; determining whether the flow value is greater than a preset flow threshold; if the flow value is greater than the preset flow threshold, Then, the similarity threshold is obtained by reducing the value of the preset standard threshold, and the value is reduced on the basis of the standard threshold to reduce the number of times of sending text to the text display terminal, thereby reducing the pressure on the configuration platform.
- the data transmission device based on the configuration platform of this application receives the text recognition application sent by the upload terminal; determines whether the specified picture is similar to the pre-stored picture; if the specified picture is not similar to the pre-stored picture, then the specified picture is sent to A designated text recognition terminal, the designated text recognition terminal is used to recognize the text content in the designated picture as picture text text; receive the picture text text sent by the designated text recognition terminal, calculate the picture text text and Prestore the similarity value of the text; if the similarity value is not greater than the preset similarity threshold, the text of the picture is sent to the text display terminal. This reduces the additional network overhead caused by repeated sending of text information corresponding to the repeated pictures, and realizes real-time display of recognized text.
- an embodiment of the present invention also provides a computer device.
- the computer device may be a server, and its internal structure may be as shown in the figure.
- the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, a computer program, and a database.
- the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
- the database of the computer equipment is used to store the data used in the data transmission method based on the configuration platform.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the computer program is executed by the processor to realize a data transmission method based on the configuration platform.
- the processor executes the data transmission method based on the configuration platform, including the following steps: receiving a text recognition application sent by an upload terminal, where the text recognition application specifies a text display terminal, and the text recognition application carries a specified picture; Set the picture similarity judgment method to determine whether the designated picture is similar to the pre-stored picture; if the designated picture is not similar to the pre-stored picture, the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal uses Recognizing the text content in the designated picture as picture text text; receiving the picture text text sent by the designated text recognition terminal, and using a preset text similarity calculation method to calculate the picture text text and pre-stored The similarity value of the text, and determine whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture; if the similarity value is not greater than The preset similarity threshold is then sent to the text display terminal.
- the step of judging whether the designated picture is similar to a pre-stored picture by using a preset picture similarity judgment method includes: performing gray-scale processing on the designated picture and the pre-stored picture respectively, Obtain the first grayscale picture and the second grayscale picture; calculate the average value Am of the grayscale values of all pixels in the mth column or mth row of the grayscale picture, and calculate all pixels in the grayscale picture The average value B of the gray value of the point; according to the formula: Calculate the overall variance of the m-th column or m-th row of the grayscale image Where N is the total number of columns or rows in the grayscale picture; according to the formula: Obtain the difference between the overall variance of the m-th column or m-th row of the two grayscale images among them, Is the overall variance of the mth column or mth row of the first grayscale image, Is the overall variance of the mth column or mth row of the second grayscale image; judge Is it less than the preset variance error
- the method includes: if the designated picture is similar to a pre-stored picture, acquiring the upload terminal Corresponding to all texts, and obtain the text text corresponding to the pre-stored picture according to the corresponding relationship between the preset picture and the pre-stored text text; search for the text text corresponding to the pre-stored picture in all texts corresponding to the upload terminal, In this way, the position information of the text corresponding to the pre-stored picture in all the texts corresponding to the upload terminal is acquired; the position information is sent to the text display terminal.
- the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture
- the step of being a picture text text includes: if the designated picture is not similar to the pre-stored picture, using a preset preliminary text recognition technology to recognize a predetermined area in the picture text text picture to obtain a preliminary recognized text, wherein The area is smaller than the area of the designated picture; the text text corresponding to the pre-stored picture is obtained according to the correspondence between the preset picture and the pre-stored text and text; the preliminary recognized text is compared with the text text corresponding to the pre-stored picture, thereby Determine whether the text text corresponding to the pre-stored picture contains the preliminary recognized text; if the text text corresponding to the pre-stored picture does not contain the preliminary recognized text, the specified picture is sent to a specified text recognition terminal, and the specified The text recognition terminal is used for recognizing the text content in the designated picture as picture text.
- the receiving the picture text text sent by the designated text recognition terminal and using a preset text similarity calculation method to calculate the similarity value between the picture text text and the pre-stored text, and determine Whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the step of text obtained by performing text recognition on the pre-stored picture, including: receiving the picture sent by the designated text recognition terminal Text text; use formula: Calculate the similarity value between the picture text text and the pre-stored text, where the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture; where similarity is the similarity value, and A is the word frequency of the picture text text Vector, B is the word frequency vector of the pre-stored text, Ai is the number of occurrences of the i-th word of the image text, Bi is the number of occurrences of the i-th word of the pre-stored text; judge whether the similarity value Greater than the preset similarity threshold.
- the receiving the picture text text sent by the designated text recognition terminal and using a preset text similarity calculation method to calculate the similarity value between the picture text text and the pre-stored text, and determine Whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture, after the step, including: if the similarity value is greater than the preset similarity If the threshold value is higher than the threshold value, all the characters corresponding to the upload terminal are acquired; the position information of the pre-stored characters in all the characters corresponding to the upload terminal is obtained; the position information is sent to the character display terminal.
- the step includes: acquiring and sending it to all The text displays the flow value of the terminal; it is determined whether the flow value is greater than the preset flow threshold; if the flow value is greater than the preset flow threshold, the similarity is obtained by reducing the value of the preset standard threshold Threshold.
- the computer device of this application receives a text recognition application sent by an upload terminal; determines whether the designated picture is similar to a pre-stored picture; if the designated picture is not similar to a pre-stored picture, sends the designated picture to a designated text recognition terminal,
- the designated text recognition terminal is used for recognizing the text content in the designated picture as picture text text; receiving the picture text text sent by the designated text recognition terminal, and calculating the similarity between the picture text text and the prestored text Value; if the similarity value is not greater than a preset similarity threshold, the text of the picture is sent to the text display terminal. This reduces the additional network overhead caused by the repeated sending of text information corresponding to the repeated pictures, and realizes real-time display of recognized text.
- An embodiment of the present application also provides a computer-readable storage medium.
- the computer-readable storage medium may be non-volatile or volatile, and has a computer program stored thereon, which is realized when the computer program is executed by a processor.
- the data transmission method based on the configuration platform includes the following steps: receiving a text recognition application sent by an upload terminal, the text recognition application specifies a text display terminal, and the text recognition application carries a specified picture; using a preset picture similarity
- the judging method is to judge whether the designated picture is similar to the pre-stored picture; if the designated picture is not similar to the pre-stored picture, the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to transfer the designated
- the text content in the picture is recognized as picture text text; receiving the picture text text sent by the designated text recognition terminal, and using a preset text similarity calculation method to calculate the similarity value between the picture text text and the pre-stored text , And determine whether the similarity value is greater than a
- the step of judging whether the designated picture is similar to a pre-stored picture by using a preset picture similarity judgment method includes: performing gray-scale processing on the designated picture and the pre-stored picture respectively, Obtain the first grayscale picture and the second grayscale picture; calculate the average value Am of the grayscale values of all pixels in the mth column or mth row of the grayscale picture, and calculate all pixels in the grayscale picture The average value B of the gray value of the point; according to the formula: Calculate the overall variance of the m-th column or m-th row of the grayscale image Where N is the total number of columns or rows in the grayscale picture; according to the formula: Obtain the difference between the overall variance of the m-th column or m-th row of the two grayscale images among them, Is the overall variance of the mth column or mth row of the first grayscale image, Is the overall variance of the mth column or mth row of the second grayscale image; judge Is it less than the preset variance error
- the method includes: if the designated picture is similar to a pre-stored picture, acquiring the upload terminal Corresponding to all texts, and obtain the text text corresponding to the pre-stored picture according to the corresponding relationship between the preset picture and the pre-stored text text; search for the text text corresponding to the pre-stored picture in all texts corresponding to the upload terminal, In this way, the position information of the text corresponding to the pre-stored picture in all the texts corresponding to the upload terminal is acquired; the position information is sent to the text display terminal.
- the designated picture is sent to a designated text recognition terminal, and the designated text recognition terminal is used to recognize the text content in the designated picture
- the step of being a picture text text includes: if the designated picture is not similar to the pre-stored picture, using a preset preliminary text recognition technology to recognize a predetermined area in the picture text text picture to obtain a preliminary recognized text, wherein The area is smaller than the area of the designated picture; the text text corresponding to the pre-stored picture is obtained according to the correspondence between the preset picture and the pre-stored text and text; the preliminary recognized text is compared with the text text corresponding to the pre-stored picture, thereby Determine whether the text text corresponding to the pre-stored picture contains the preliminary recognized text; if the text text corresponding to the pre-stored picture does not contain the preliminary recognized text, the specified picture is sent to a specified text recognition terminal, and the specified The text recognition terminal is used for recognizing the text content in the designated picture as the text of
- the receiving the picture text text sent by the designated text recognition terminal and using a preset text similarity calculation method to calculate the similarity value between the picture text text and the pre-stored text, and determine Whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the step of text obtained by performing text recognition on the pre-stored picture, including: receiving the picture sent by the designated text recognition terminal Text text; use formula: Calculate the similarity value between the picture text text and the pre-stored text, where the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture; where similarity is the similarity value, and A is the word frequency of the picture text text Vector, B is the word frequency vector of the pre-stored text, Ai is the number of occurrences of the i-th word of the image text, Bi is the number of occurrences of the i-th word of the pre-stored text; judge whether the similarity value Greater than the preset similarity threshold.
- the receiving the picture text text sent by the designated text recognition terminal and using a preset text similarity calculation method to calculate the similarity value between the picture text text and the pre-stored text, and determine Whether the similarity value is greater than a preset similarity threshold, wherein the pre-stored text refers to the text obtained by performing text recognition on the pre-stored picture, after the step, including: if the similarity value is greater than the preset similarity If the threshold value is higher than the threshold value, all the characters corresponding to the upload terminal are acquired; the position information of the pre-stored characters in all the characters corresponding to the upload terminal is obtained; the position information is sent to the character display terminal.
- the step includes: acquiring and sending it to all The text displays the flow value of the terminal; it is determined whether the flow value is greater than the preset flow threshold; if the flow value is greater than the preset flow threshold, the similarity is obtained by reducing the value of the preset standard threshold Threshold.
- the computer-readable storage medium of this application receives a text recognition application sent by an upload terminal; determines whether the designated picture is similar to a pre-stored picture; if the designated picture is not similar to the pre-stored picture, then the designated picture is sent to the designated text A recognition terminal, where the designated text recognition terminal is used to recognize the text content in the designated picture as picture text text; receive the picture text text sent by the designated text recognition terminal, and calculate the picture text text and pre-stored text If the similarity value is not greater than the preset similarity threshold, the text of the picture is sent to the text display terminal. This reduces the additional network overhead caused by the repeated sending of text information corresponding to the repeated pictures, and realizes real-time display of recognized text.
- Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
Abstract
Description
Claims (21)
- 一种基于配置平台的数据传输方法,其中,包括:接收上传终端发送的文字识别申请,所述文字识别申请指定了文字展示终端,并且所述文字识别申请携带有指定图片;利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似;若所述指定图片与预存图片不相似,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本;接收所述指定文本识别终端发送的所述图片文字文本,并利用预设的文本相似度计算方法,计算所述图片文字文本与预存文字的相似度值,并判断所述相似度值是否大于预设的相似度阈值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字;若所述相似度值不大于预设的相似度阈值,则将所述图片文字文本发送给所述文字展示终端。
- 根据权利要求1所述的基于配置平台的数据传输方法,其中,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤,包括:分别对所述指定图片与所述预存图片进行灰度化处理,得到第一灰度图片和第二灰度图片;计算所述灰度图片的第m列或者第m行的所有像素点的灰度值的平均值Am,以及计算所述灰度图片中所有像素点的灰度值的平均值B;
- 根据权利要求1所述的基于配置平台的数据传输方法,其中,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤,包括:依次对比所述指定图片与预存图片中对应的像素点,并统计相同像素点的数量;根据公式:相同像素点占比=所述相同像素点的数量/所述指定图片中所有像素点的数量,计算出所述相同像素点占比;判断所述相同像素点占比是否大于预设的占比阈值;若所述相同像素点占比大于预设的占比阈值,则判定所述指定图片与预存图片相似。
- 根据权利要求1所述的基于配置平台的数据传输方法,其中,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤之后,包括:若所述指定图片与预存图片相似,则获取所述上传终端对应的所有文字,并根据预设的图片与预存的文字文本的对应关系,获取所述预存图片对应的文字文本;在所述上传终端对应的所有文字中搜索所述预存图片对应的文字文本,从而获取所述预存图片对应的文字文本在所述上传终端对应的所有文字中的位置信息;将所述位置信息发送给所述文字展示终端。
- 根据权利要求1所述的基于配置平台的数据传输方法,其中,所述若所述指定图片 与预存图片不相似,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本的步骤,包括:若所述指定图片与预存图片不相似,则利用预设的初步文字识别技术识别所述图片文字文本图片中的预定区域,得到初步识别文字,其中预定区域的面积小于所述指定图片的面积;根据预设的图片与预存的文字文本的对应关系,获取所述预存图片对应的文字文本;对比所述初步识别文字与所述预存图片对应的文字文本,从而判断所述预存图片对应的文字文本是否包含所述初步识别文字;若所述预存图片对应的文字文本不包含所述初步识别文字,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本。
- 根据权利要求1所述的基于配置平台的数据传输方法,其中,所述接收所述指定文本识别终端发送的所述图片文字文本,并利用预设的文本相似度计算方法,计算所述图片文字文本与预存文字的相似度值,并判断所述相似度值是否大于预设的相似度阈值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字的步骤,包括:接收所述指定文本识别终端发送的所述图片文字文本;采用公式:计算所述图片文字文本与预存文字的相似度值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字;其中similarity为相似度值,A为所述图片文字文本的词频向量,B为所述预存文字的词频向量,Ai为所述图片文字文本的第i个单词出现的次数,Bi为所述预存文字的第i个单词出现的次数;判断所述相似度值是否大于预设的相似度阈值。
- 根据权利要求1所述的基于配置平台的数据传输方法,其中,所述若所述相似度值不大于预设的相似度阈值,则将所述图片文字文本发送给所述文字展示终端的步骤之前,包括:获取预定时间内发送至所述文字展示终端的流量值;判断所述流量值是否大于预设的流量阈值;若所述流量值大于预设的流量阈值,则通过降低预设的标准阈值的数值的方式获得所述相似度阈值。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:接收上传终端发送的文字识别申请,所述文字识别申请指定了文字展示终端,并且所述文字识别申请携带有指定图片;利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似;若所述指定图片与预存图片不相似,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本;接收所述指定文本识别终端发送的所述图片文字文本,并利用预设的文本相似度计算方法,计算所述图片文字文本与预存文字的相似度值,并判断所述相似度值是否大于预设的相似度阈值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字;若所述相似度值不大于预设的相似度阈值,则将所述图片文字文本发送给所述文字展示终端。
- 根据权利要求8所述的计算机设备,其特征在于,所述利用预设的图片相似度判断 方法,判断所述指定图片与预存图片是否相似的步骤,包括:分别对所述指定图片与所述预存图片进行灰度化处理,得到第一灰度图片和第二灰度图片;计算所述灰度图片的第m列或者第m行的所有像素点的灰度值的平均值Am,以及计算所述灰度图片中所有像素点的灰度值的平均值B;
- 根据权利要求8所述的计算机设备,其特征在于,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤,包括:依次对比所述指定图片与预存图片中对应的像素点,并统计相同像素点的数量;根据公式:相同像素点占比=所述相同像素点的数量/所述指定图片中所有像素点的数量,计算出所述相同像素点占比;判断所述相同像素点占比是否大于预设的占比阈值;若所述相同像素点占比大于预设的占比阈值,则判定所述指定图片与预存图片相似。
- 根据权利要求8所述的计算机设备,其特征在于,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤之后,包括:若所述指定图片与预存图片相似,则获取所述上传终端对应的所有文字,并根据预设的图片与预存的文字文本的对应关系,获取所述预存图片对应的文字文本;在所述上传终端对应的所有文字中搜索所述预存图片对应的文字文本,从而获取所述预存图片对应的文字文本在所述上传终端对应的所有文字中的位置信息;将所述位置信息发送给所述文字展示终端。
- 根据权利要求8所述的计算机设备,其特征在于,所述若所述指定图片与预存图片不相似,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本的步骤,包括:若所述指定图片与预存图片不相似,则利用预设的初步文字识别技术识别所述图片文字文本图片中的预定区域,得到初步识别文字,其中预定区域的面积小于所述指定图片的面积;根据预设的图片与预存的文字文本的对应关系,获取所述预存图片对应的文字文本;对比所述初步识别文字与所述预存图片对应的文字文本,从而判断所述预存图片对应的文字文本是否包含所述初步识别文字;若所述预存图片对应的文字文本不包含所述初步识别文字,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本。
- 根据权利要求8所述的计算机设备,其特征在于,所述接收所述指定文本识别终端发送的所述图片文字文本,并利用预设的文本相似度计算方法,计算所述图片文字文本与预存文字的相似度值,并判断所述相似度值是否大于预设的相似度阈值,其中所述预存文 字指通过对所述预存图片进行文字识别而获得的文字的步骤,包括:接收所述指定文本识别终端发送的所述图片文字文本;采用公式:计算所述图片文字文本与预存文字的相似度值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字;其中similarity为相似度值,A为所述图片文字文本的词频向量,B为所述预存文字的词频向量,Ai为所述图片文字文本的第i个单词出现的次数,Bi为所述预存文字的第i个单词出现的次数;判断所述相似度值是否大于预设的相似度阈值。
- 根据权利要求8所述的计算机设备,其特征在于,所述若所述相似度值不大于预设的相似度阈值,则将所述图片文字文本发送给所述文字展示终端的步骤之前,包括:获取预定时间内发送至所述文字展示终端的流量值;判断所述流量值是否大于预设的流量阈值;若所述流量值大于预设的流量阈值,则通过降低预设的标准阈值的数值的方式获得所述相似度阈值。
- 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:接收上传终端发送的文字识别申请,所述文字识别申请指定了文字展示终端,并且所述文字识别申请携带有指定图片;利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似;若所述指定图片与预存图片不相似,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本;接收所述指定文本识别终端发送的所述图片文字文本,并利用预设的文本相似度计算方法,计算所述图片文字文本与预存文字的相似度值,并判断所述相似度值是否大于预设的相似度阈值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字;若所述相似度值不大于预设的相似度阈值,则将所述图片文字文本发送给所述文字展示终端。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤,包括:分别对所述指定图片与所述预存图片进行灰度化处理,得到第一灰度图片和第二灰度图片;计算所述灰度图片的第m列或者第m行的所有像素点的灰度值的平均值Am,以及计算所述灰度图片中所有像素点的灰度值的平均值B;
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤,包括:依次对比所述指定图片与预存图片中对应的像素点,并统计相同像素点的数量;根据公式:相同像素点占比=所述相同像素点的数量/所述指定图片中所有像素点的数量,计算出所述相同像素点占比;判断所述相同像素点占比是否大于预设的占比阈值;若所述相同像素点占比大于预设的占比阈值,则判定所述指定图片与预存图片相似。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述利用预设的图片相似度判断方法,判断所述指定图片与预存图片是否相似的步骤之后,包括:若所述指定图片与预存图片相似,则获取所述上传终端对应的所有文字,并根据预设的图片与预存的文字文本的对应关系,获取所述预存图片对应的文字文本;在所述上传终端对应的所有文字中搜索所述预存图片对应的文字文本,从而获取所述预存图片对应的文字文本在所述上传终端对应的所有文字中的位置信息;将所述位置信息发送给所述文字展示终端。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述若所述指定图片与预存图片不相似,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本的步骤,包括:若所述指定图片与预存图片不相似,则利用预设的初步文字识别技术识别所述图片文字文本图片中的预定区域,得到初步识别文字,其中预定区域的面积小于所述指定图片的面积;根据预设的图片与预存的文字文本的对应关系,获取所述预存图片对应的文字文本;对比所述初步识别文字与所述预存图片对应的文字文本,从而判断所述预存图片对应的文字文本是否包含所述初步识别文字;若所述预存图片对应的文字文本不包含所述初步识别文字,则将所述指定图片发送给指定文本识别终端,所述指定文本识别终端用于将所述指定图片中的文字内容识别为图片文字文本。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述接收所述指定文本识别终端发送的所述图片文字文本,并利用预设的文本相似度计算方法,计算所述图片文字文本与预存文字的相似度值,并判断所述相似度值是否大于预设的相似度阈值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字的步骤,包括:接收所述指定文本识别终端发送的所述图片文字文本;采用公式:计算所述图片文字文本与预存文字的相似度值,其中所述预存文字指通过对所述预存图片进行文字识别而获得的文字;其中similarity为相似度值,A为所述图片文字文本的词频向量,B为所述预存文字的词频向量,Ai为所述图片文字文本的第i个单词出现的次数,Bi为所述预存文字的第i个单词出现的次数;判断所述相似度值是否大于预设的相似度阈值。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述若所述相似度值不大于预设的相似度阈值,则将所述图片文字文本发送给所述文字展示终端的步骤之前, 包括:获取预定时间内发送至所述文字展示终端的流量值;判断所述流量值是否大于预设的流量阈值;若所述流量值大于预设的流量阈值,则通过降低预设的标准阈值的数值的方式获得所述相似度阈值。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910463920.X | 2019-05-30 | ||
CN201910463920.XA CN110334702B (zh) | 2019-05-30 | 2019-05-30 | 基于配置平台的数据传输方法、装置和计算机设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020238556A1 true WO2020238556A1 (zh) | 2020-12-03 |
Family
ID=68140683
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/088049 WO2020238556A1 (zh) | 2019-05-30 | 2020-04-30 | 基于配置平台的数据传输方法、装置和计算机设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110334702B (zh) |
WO (1) | WO2020238556A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116389227A (zh) * | 2023-03-23 | 2023-07-04 | 江苏锦花电子股份有限公司 | 一种基于物联网的智能预警系统及方法 |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110334702B (zh) * | 2019-05-30 | 2023-04-18 | 深圳壹账通智能科技有限公司 | 基于配置平台的数据传输方法、装置和计算机设备 |
CN111191552A (zh) * | 2019-12-23 | 2020-05-22 | 合肥美的智能科技有限公司 | 基于视觉终端的图像识别方法以及视觉终端 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106469310A (zh) * | 2015-08-17 | 2017-03-01 | 腾讯科技(深圳)有限公司 | 图片中字符提取方法及装置 |
CN108805115A (zh) * | 2018-04-24 | 2018-11-13 | 五八同城信息技术有限公司 | 一种图片中文字的识别方法、装置、设备及存储介质 |
CN109325159A (zh) * | 2018-08-01 | 2019-02-12 | 昆明理工大学 | 一种微博热点事件挖掘方法 |
CN109583438A (zh) * | 2018-10-17 | 2019-04-05 | 龙马智芯(珠海横琴)科技有限公司 | 电子图像的文字的识别方法及图像处理装置 |
CN110334702A (zh) * | 2019-05-30 | 2019-10-15 | 深圳壹账通智能科技有限公司 | 基于配置平台的数据传输方法、装置和计算机设备 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106325750A (zh) * | 2016-08-26 | 2017-01-11 | 曹蕊 | 一种应用于终端设备的文字识别方法及系统 |
CN107992872B (zh) * | 2017-12-25 | 2020-04-28 | 广东小天才科技有限公司 | 一种对图片进行文本识别的方法及移动终端 |
CN108256523B (zh) * | 2018-01-11 | 2022-06-10 | 上海展扬通信技术有限公司 | 基于移动终端的识别方法、装置及计算机可读存储介质 |
-
2019
- 2019-05-30 CN CN201910463920.XA patent/CN110334702B/zh active Active
-
2020
- 2020-04-30 WO PCT/CN2020/088049 patent/WO2020238556A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106469310A (zh) * | 2015-08-17 | 2017-03-01 | 腾讯科技(深圳)有限公司 | 图片中字符提取方法及装置 |
CN108805115A (zh) * | 2018-04-24 | 2018-11-13 | 五八同城信息技术有限公司 | 一种图片中文字的识别方法、装置、设备及存储介质 |
CN109325159A (zh) * | 2018-08-01 | 2019-02-12 | 昆明理工大学 | 一种微博热点事件挖掘方法 |
CN109583438A (zh) * | 2018-10-17 | 2019-04-05 | 龙马智芯(珠海横琴)科技有限公司 | 电子图像的文字的识别方法及图像处理装置 |
CN110334702A (zh) * | 2019-05-30 | 2019-10-15 | 深圳壹账通智能科技有限公司 | 基于配置平台的数据传输方法、装置和计算机设备 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116389227A (zh) * | 2023-03-23 | 2023-07-04 | 江苏锦花电子股份有限公司 | 一种基于物联网的智能预警系统及方法 |
CN116389227B (zh) * | 2023-03-23 | 2023-11-17 | 江苏锦花电子股份有限公司 | 一种基于物联网的智能预警系统及方法 |
Also Published As
Publication number | Publication date |
---|---|
CN110334702A (zh) | 2019-10-15 |
CN110334702B (zh) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020238556A1 (zh) | 基于配置平台的数据传输方法、装置和计算机设备 | |
CN109146892B (zh) | 一种基于美学的图像裁剪方法及装置 | |
WO2020232872A1 (zh) | 表格识别方法、装置、计算机设备和存储介质 | |
WO2020238054A1 (zh) | Pdf文档中图表的定位方法、装置及计算机设备 | |
WO2020037898A1 (zh) | 人脸特征点检测方法、装置、计算机设备及存储介质 | |
WO2019056503A1 (zh) | 门店监控评价方法、装置及存储介质 | |
CN111666907B (zh) | 一种视频中对象信息的识别方法、装置及服务器 | |
CN110049310B (zh) | 视频图像获取、视频质量检测方法和装置 | |
US11714921B2 (en) | Image processing method with ash code on local feature vectors, image processing device and storage medium | |
CN112149733B (zh) | 模型训练、质量确定方法、装置、电子设备及存储介质 | |
CN113222942A (zh) | 多标签分类模型的训练方法和预测标签的方法 | |
CN111898735A (zh) | 蒸馏学习方法、装置、计算机设备和存储介质 | |
WO2022042609A1 (zh) | 提取热词的方法、装置、电子设备及介质 | |
WO2021169642A1 (zh) | 基于视频的眼球转向确定方法与系统 | |
WO2023061082A1 (zh) | 图像安全处理方法和装置、电子设备和存储介质 | |
CN115331150A (zh) | 图像识别方法、装置、电子设备、存储介质 | |
CN111104917A (zh) | 基于人脸的活体检测方法、装置、电子设备及介质 | |
CN110942456B (zh) | 篡改图像检测方法、装置、设备及存储介质 | |
CN114463567A (zh) | 一种基于区块链的智慧教育作业大数据防抄袭方法与系统 | |
CN111078924B (zh) | 图像检索方法、装置、终端及存储介质 | |
CN105162931A (zh) | 一种通信号码的分类方法及装置 | |
CN115527106A (zh) | 基于量化鱼类识别神经网络模型的成像识别方法及装置 | |
CN110929118B (zh) | 网络数据处理方法、设备、装置、介质 | |
GB2608063A (en) | Device and method for providing missing child search service based on face recognition using deep learning | |
CN111275183B (zh) | 视觉任务的处理方法、装置和电子系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20812516 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20812516 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.03.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20812516 Country of ref document: EP Kind code of ref document: A1 |