CN110414497A - Method, apparatus, server and the storage medium of subject electronic - Google Patents

Method, apparatus, server and the storage medium of subject electronic Download PDF

Info

Publication number
CN110414497A
CN110414497A CN201910515808.6A CN201910515808A CN110414497A CN 110414497 A CN110414497 A CN 110414497A CN 201910515808 A CN201910515808 A CN 201910515808A CN 110414497 A CN110414497 A CN 110414497A
Authority
CN
China
Prior art keywords
text
line
location information
content information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910515808.6A
Other languages
Chinese (zh)
Inventor
汪祖臣
王佳军
龙力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rajax Network Technology Co Ltd
Original Assignee
Rajax Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rajax Network Technology Co Ltd filed Critical Rajax Network Technology Co Ltd
Priority to CN201910515808.6A priority Critical patent/CN110414497A/en
Publication of CN110414497A publication Critical patent/CN110414497A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/12Hotels or restaurants
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Primary Health Care (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Character Input (AREA)
  • Image Analysis (AREA)

Abstract

The present embodiments relate to technical field of information processing, disclose method, apparatus, server and the storage medium of a kind of subject electronic.The method of subject electronic, comprising: segmentation object object obtains the line of text of the target object and the location information of the line of text;It identifies the line of text, obtains the content information of the line of text;According to the location information of the content information of the line of text and the line of text, the target object of electronization is generated.Using embodiments of the present invention, effectively improve the efficiency and accuracy rate of papery subject electronic.

Description

Method, apparatus, server and the storage medium of subject electronic
Technical field
The present embodiments relate to technical field of information processing, in particular to a kind of method, apparatus of subject electronic, clothes Business device and storage medium.
Background technique
With the high speed development of mobile Internet, smart electronicsization have gradually applied the various aspects in life, such as eat The Room is ordered food using the menu of smart electronics has become a kind of trend with cash register etc.;In the related technology by papery menu When typing is electronic menu, usually papery menu is scanned, utilizes the image procossings skill such as traditional optical character identification Art carries out identification to the dish information in scanned copy and is entered into restaurant system.However inventor has found in the related technology at least There are the following problems: it is the object picture obtained to scanning identifies in the related technology, the subobject information that identification is obtained After being matched with pre-stored object picture library and subobject information, the information that identification is obtained carries out typing, and process is numerous Trivial, speed is slower, is easy to cause the wrongly written character hiatus of recognition result, thus cause subject electronic efficiency and order of accuarcy all compared with Low problem.
Summary of the invention
The method, apparatus for being designed to provide a kind of subject electronic, server and the storage of embodiment of the present invention are situated between Matter is effectively improved the efficiency and accuracy rate of papery subject electronic.
In order to solve the above technical problems, embodiments of the present invention provide a kind of method of subject electronic, comprising: point Target object is cut, the line of text of the target object and the location information of the line of text are obtained;It identifies the line of text, obtains The content information of the line of text;According to the location information of the content information of the line of text and the line of text, electronics is generated The target object changed.
Embodiments of the present invention additionally provide a kind of device of subject electronic, comprising: segmentation module, for dividing mesh Object is marked, the line of text of the target object and the location information of the line of text are obtained;Identification module, for identification text Current row obtains the content information of the line of text;Generation module, for the content information and the text according to the line of text Capable location information generates the target object of electronization.
Embodiments of the present invention additionally provide a kind of server, comprising: at least one processor;And with it is described extremely The memory of few processor communication connection;Wherein, the memory, which is stored with, to be executed by least one described processor Instruction, described instruction is executed by least one described processor, so that at least one described processor is able to carry out: segmentation mesh Object is marked, the line of text of the target object and the location information of the line of text are obtained;It identifies the line of text, obtains described The content information of line of text;According to the location information of the content information of the line of text and the line of text, electronization is generated The target object.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, calculate Machine program realizes above-mentioned subject electronic method when being executed by processor.
In terms of existing technologies, segmentation object object obtains the text of the target object to embodiment of the present invention The location information of the capable and described line of text;It identifies the line of text, obtains the content information of the line of text;According to the text The location information of capable content information and the line of text generates the target object of electronization.That is, this embodiment party It is that target object is divided into line of text in formula, the identification of progress content information as unit of line of text, and the text in object The included content information of row is usually complete text, to be less prone to the case where identifying hiatus when identifying line of text; Meanwhile being split without to single text, effectively prevent knowledge caused by due to the boundary segmentation between single text is unclear The case where other wrongly written character;Identify that obtained line of text is also the complete content information as unit of line of text, i.e., without to identifying To content information spliced and combined, be effectively simplified the step process of subject electronic;It is carried out as unit of by line of text When identification obtains the content information of line of text, content letter is carried out using context semantic information included in full line line of text The identification of breath, to effectively improve identification contents of object in the case where not departing from the connection of context word and semantic environment The accuracy of information;Finally according to the location information of line of text, the content information for the full line line of text that identification is obtained carries out position Reduction is set, to generate the target object of electronization.To sum up, it using present embodiment, simplifies papery subject electronic Process, improve the efficiency and accuracy rate of papery subject electronic.
In addition, described according to the content information of the line of text and the location information of the line of text, pairing of electrons as, Include: the content information and preset regular expression according to the line of text, obtains effective content information of the line of text; According to the location information of effective content information of the line of text and the line of text, the target object of electronization is generated; Regular expression is the filter logic formula of a kind of pair of string operation, describes a kind of mode of string matching, is usually used To retrieve legal text;In present embodiment, carried out by content information of the preset regular expression to line of text Filtering, obtains effective content information of line of text, and such as when object is menu, the effective content information for including in menu is dish The name of an article claims with vegetable price etc., to exhaust except information unrelated with vegetable in menu;Electronics is generated according to effective content information The target object of change enables the target object of electronization succinctly to show mostly important effective information for ground.
In addition, the content information of the line of text includes: the subobject title and subobject price of the target object.
In addition, it is described according to the content information of the line of text and the location information of the line of text, generate electronization The target object, comprising: according to the location information of the line of text, obtain the location information of the subobject title and described The location information of subobject price;According to the location information of the location information of the subobject title and the subobject price, Match the subobject title and the subobject price;The subobject title completed according to matching and the subobject valence The location information of lattice and the line of text generates the target object of electronization;Due to the target of the electronization ultimately generated Object needs clearly to provide correct subobject title and subobject price, and includes subobject title and subobject price Line of text has location information, therefore subobject title and subobject price are corresponded matching according to location information, It can guarantee the correctness of the target object of the electronization ultimately generated.
In addition, the segmentation object object, comprising: pass through the preset full convolutional neural networks model for segmented image Segmentation object object;Since full convolutional neural networks model can receive the input picture of arbitrary size, without requiring input The image used when image and training is of the same size, and compared to traditional convolutional Neural net in image segmentation calculating Network model is highly efficient, therefore uses housebroken full convolutional neural networks mould for the image of target object in present embodiment Type carries out the segmentation of line of text in target object, and what is exported is the location information of each line of text image and each line of text.
In addition, the identification line of text, comprising: pass through the convolution loop neural network of preset text for identification Model identifies the line of text;Since convolution loop neural network model is by convolutional neural networks model and Recognition with Recurrent Neural Network mould Type composition, in terms of large-scale image procossing have outstanding performance, compared to other neural network structures the scope of application more Extensively, the line of text image obtained for segmentation therefore in present embodiment, using housebroken convolutional neural networks model into The identification of text in style of writing current row image, what is exported is the word content information of accurate line of text.
Detailed description of the invention
Fig. 1 is the flow chart of the method for the subject electronic of first embodiment according to the present invention;
Fig. 2 is the schematic diagram of the menu image of the target menu of first embodiment according to the present invention;
Fig. 3 is the schematic diagram of the connected region of first embodiment according to the present invention;
Fig. 4 is the schematic diagram of the minimum circumscribed rectangle of first embodiment according to the present invention;
Fig. 5 is the flow chart of the method for the subject electronic of second embodiment according to the present invention;
Fig. 6 is the structural block diagram of the device of the subject electronic of third embodiment according to the present invention;
Fig. 7 is the structural block diagram of the server of the 4th embodiment according to the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.With Under the division of each embodiment be for convenience, any restriction should not to be constituted to specific implementation of the invention, it is each Embodiment can be combined with each other mutual reference under the premise of reconcilable.
The first embodiment of the present invention is related to a kind of methods of subject electronic.Object in present embodiment, including Various types of papery texts, the content of object include several subobjects, such as menu (including various vegetables), hotel's house type Lodging price list (including various house types), commercial product item quotation (including various products or project) etc., above-mentioned papery text This object can be used present embodiment and realize electronization, not limit its specific usage scenario in practical applications.Embodiment party In formula, specific embodiment to facilitate the understanding of the present invention is described in detail by taking the electronization to menu as an example.This implementation The method detailed process of subject electronic in mode is as shown in Figure 1, specifically include:
Step 101, segmentation object object obtains the line of text of target object and the location information of line of text;
Step 102, it identifies line of text, obtains the content information of line of text;
Step 103, according to the location information of the content information of line of text and line of text, the target object of electronization is generated.
In present embodiment, segmentation object object obtains the line of text of the target object and the position of the line of text Information;It identifies the line of text, obtains the content information of the line of text;According to the content information of the line of text and the text The location information of current row generates the target object of electronization.That is, being to divide target object in present embodiment For line of text, the identification of content information is carried out as unit of line of text, and the content information that the line of text in object is included is logical It is often complete text, to be less prone to the case where identifying hiatus when identifying line of text;Meanwhile without to single text The case where word is split, and wrongly written character is identified caused by effectively preventing due to the boundary segmentation between single text is unclear;It identifies To line of text be also complete content information as unit of line of text, i.e., the content information without obtaining to identification splices Combination, is effectively simplified the step process of subject electronic;It is identified to obtain the content of line of text as unit of by line of text When information, the identification of content information is carried out using context semantic information included in full line line of text, thus not taking off In the case where from the connection of context word and semantic environment, the accuracy of identification object content information is effectively improved;Last root According to the location information of line of text, the content information for the full line line of text that identification is obtained carries out position recovering, to generate electricity The target object of sonization.To sum up, it using present embodiment, simplifies the process of papery subject electronic, improves papery The efficiency and accuracy rate of subject electronic.
In a step 101, segmentation object menu obtains the line of text of target menu and the location information of line of text.This reality It applies in mode and the segmentation to the menu image of target menu, the menu map of target menu is referred specifically to the segmentation of target menu As can be the menu got by image capture device (such as the scanner for scanning, the camera for shooting or mobile phone) Image (such as the menu scanned copy image scanned, or shoot obtained menu photo);In present embodiment, by pre- If the full convolutional neural networks model for segmented image carry out segmentation object menu, below to complete used in present embodiment Convolutional neural networks model illustrates.
In present embodiment, full convolutional neural networks model is trained by preset image data set, is used In the full convolutional neural networks model of segmented image, preset image data set includes the menu for having carried out line of text mark in advance Image data;In addition, being also used in present embodiment to promote the training effect to full convolutional neural networks model ICDAR public data collection (the scene text data set that international documentation analysis is provided with identification conference) is used as preset image data Collection.That is, the menu image of the full convolutional neural networks mode input target menu obtained to training, output is by mesh Each line of text that Text segmentation on mark menu obtains, wherein the line of text divided also embodies in the form of images.
Full convolutional neural networks model used in present embodiment is by convolutional layer, maximum pond layer and up-sampling layer group At a kind of deep neural network model;After image to full convolutional neural networks mode input target menu, full convolution mind Classify through network model to each of menu image pixel, output be each pixel in menu image probability Information, probabilistic information is for indicating whether the pixel is in character area;It is preset when the probabilistic information of the pixel of output is greater than Threshold value when, then determine that pixel is in character area;Obtain whether each of menu image pixel is in text in judgement Behind the domain of block, what is obtained is the characteristic pattern of pixel in menu image, after characteristic pattern is carried out binary conversion treatment, it is believed that the pixel Characteristic pattern be a undirected unconnected graph;All connected regions of the characteristic pattern of the pixel are calculated, this can be obtained All connected regions in the characteristic pattern of pixel, that is, obtained the connected region of several expression line of text in menu image Domain.After obtaining the connected region that several indicate line of text, carried out by minimum circumscribed rectangle of the function to each connected region Label, that is, the apex coordinate of the minimum circumscribed rectangle of each connected region is obtained, thus according to the vertex of minimum circumscribed rectangle Coordinate can realize the positioning to connected region, that is, get the location information of line of text represented by connected region.In In practical application, it can realize for example, by the minAreaRect function in the OpenCV of computer vision library to connected region Telltale mark;OpenCV is a kind of computer vision library, it can be achieved that many general in terms of image procossing and computer vision is calculated Method, minAreaRect function therein can be used for seeking minimum circumscribed rectangle, input point set to minAreaRect function, output It is four apex coordinates of the minimum circumscribed rectangle of point set.
In an example, the menu image of target menu is as shown in Fig. 2, include several line of text in menu image; After being split by full convolutional neural networks model to menu image, several in obtained menu image indicate line of text Connected region, as shown in figure 3, each black solid square in Fig. 3 indicates each connected region;Each black solid square is indicated Connected region included by pixel point set input minAreaRect function, obtained output is the minimum of each connected region Four apex coordinates of boundary rectangle indicate the external square of minimum of each connected region in the form of for example shown in Fig. 4 on the image Shape;In practical applications, the minimum circumscribed rectangle of each connected region shown in Fig. 4 will be distinguished with different colors.
In addition, the unlimited mode for making specific segmentation object menu in present embodiment, can also pass through another kind based on company The partitioning scheme in logical region, or the partitioning scheme based on sliding window, to realize the segmentation to target menu.
Specifically, another partitioning scheme based on connected region is the text for belonging to one text region in the picture Carried out in the case where with same color using.Partitioning scheme of the another kind based on connected region, specifically includes connected region It extracts link and text connected region judges link: link is extracted in connected region, due to belonging to the text in one text region Color having the same, and text color and the color difference of image background color are larger, therefore can pass through color color difference in image Image is split by difference, that is, solid colour part is divided into a connected region;Judge in text connected region Link, will divide obtained connected region and inputs preset classifier, belong to text for the connected region of classifier judgement input Connected region or non-legible connected region;Wherein, preset classifier refers to capable of distinguishing the image containing text and not A kind of disaggregated model of image containing text is trained by the image largely containing text and the image without containing text It arrives, in practical applications, is often used support vector machines, logistic regression classifier or random forest grader etc. as preset Classifier;After judgement obtains text connected region, telltale mark is carried out to text connected region using function with by above-mentioned Method, realize the acquisition of the location information to line of text and line of text.
Specifically, the partitioning scheme based on sliding window is the menu map for successively scanning target menu using sliding window Picture carries out the extraction of feature to the image section of the scanning of sliding window each time, and the feature extracted is inputted preset point Class device judges whether the feature in sliding window includes text for classifier;After obtaining the image section comprising text, it will scheme Morphological scale-space is carried out as being converted into bianry image, telltale mark is carried out to the connected region in bianry image by function.
Due to being target menu to be divided into line of text, rather than be split to single text, therefore have in this step Effect avoids individual character segmentation errors caused by due to the boundary segmentation between single text is unclear and subsequent individual character identifies mistake Situation.
In a step 102, it identifies line of text, obtains the content information of line of text;In present embodiment, pass through preset use Line of text is identified in the convolution loop neural network model of identification text, below to convolution loop used in present embodiment Neural network model illustrates:
In present embodiment, the convolution loop neural network model used is by convolutional neural networks model and circulation nerve net Network model is composed, and is trained, is obtained for knowing to convolution loop neural network model by preset text diagram image set The convolution loop neural network model of other text;Wherein, the image data that preset text diagram image set includes is by computer journey The sequence image data that random writing presets the text in literal pool to be formed on the background image arbitrarily without text, preset text Character library may include the word contents abundant such as more than 7,000 Chinese characters in common use, 26 English alphabets and common Chinese and English punctuate, with Guarantee trained material abundant to the offer of convolution loop neural network model.It should be noted that convolution loop nerve When network model is trained, the Recognition with Recurrent Neural Network model learning of composition convolution loop neural network model text is enabled emphatically In include context semantic information, that is, have trained Recognition with Recurrent Neural Network model do not departing from context word connection and language Identify that the ability of text reduces knowledge to effectively improve the accuracy of identification menu content information in the case where adopted environment The case where not clear and coherent enough, meaning missing of the menu content information not obtained etc. influences recognition effect.
In present embodiment, the input to convolution loop neural network model is divided by full convolutional neural networks model The line of text embodied with image format arrived;Line of text is inputted to the convolutional neural networks of composition convolution loop neural network model Model, for the line of text feature in convolutional neural networks model extraction line of text image;The line of text feature extracted is inputted The Recognition with Recurrent Neural Network model for forming convolution loop neural network model, for including in Recognition with Recurrent Neural Network models coupling line of text Context semantic information, the feature of full line line of text is identified, output obtains the content information of line of text, that is, defeated The specific text information for including in line of text image is obtained out.For example, for the line of text of target menu, the text of output Capable content information may include the text informations such as menu name, vegetable price, trade company's slogan, trade company's phone.
Due to being to carry out the identification of content information as unit of line of text, and the line of text in menu is included in this step Content information be usually complete text, thus when identifying line of text, the case where being less prone to identification hiatus;Convolution loop Complete content information of neural network model as unit of what is exported after identifying line of text is also by line of text, i.e., without to identification Obtained content information is spliced and combined, and the step process of menu electronization is effectively simplified.
In step 103, according to the location information of the content information of line of text and line of text, the target dish of electronization is generated It is single.Specifically, the content information for the full line line of text for obtaining identification carries out position also according to the location information of line of text Original, to generate the target menu of electronization.In an example, segmentation object menu obtains 10 line of text and 10 texts Row respective positions information, the location information of line of text are embodied in the form of coordinate, identify that each line of text obtains a line of text Content information be menu name and vegetable price;For example, the content information of line of text 1 is " 15 yuan of vegetable A ", line of text 1 Location information is (1,1) (indicating that line of text 1 is in the first row first row), and 2 content information of line of text is " 15 yuan of vegetable B ", text The location information of current row 2 is (1,2) (indicating that line of text 1 is in the first row secondary series), and the content information of line of text 3 is " vegetable C 20 yuan ", the location information of line of text 3 is (2,1) (indicating that line of text 1 is in the second row first row), the content information of line of text 4 For " 25 yuan of vegetable D ", the location information of line of text 4 is (2,2) (indicating that line of text 1 is in the second row secondary series) ... ... etc., Then according to the location information of each line of text, the content information for each line of text that identification is obtained carries out permutation and combination, generates electronics The target menu of change, such as shown in following table:
15 yuan of vegetable A 15 yuan of vegetable B
20 yuan of vegetable C 25 yuan of vegetable D
…… ……
Present embodiment in terms of existing technologies, passes through the preset full convolutional neural networks mould for segmented image Type segmentation object object obtains the line of text of the target object and the location information of the line of text;It is used for by preset It identifies that the convolution loop neural network model of text identifies the line of text, obtains the content information of the line of text;According to institute The content information of line of text and the location information of the line of text are stated, the target object of electronization is generated.That is, this It is that target object is divided into line of text in embodiment, the identification of content information is carried out as unit of line of text, and in object The line of text content information that is included be usually complete text, to be less prone to identification hiatus when identifying line of text The case where;Meanwhile being split without to single text, it effectively prevents making because the boundary segmentation between single text is unclear At identification wrongly written character the case where;Identify that obtained line of text is also the complete content information as unit of line of text, i.e., without pair It identifies that obtained content information is spliced and combined, is effectively simplified the step process of subject electronic;With text behavior list When position is identified to obtain the content information of line of text, carried out using context semantic information included in full line line of text The identification of content information, to effectively improve identification pair in the case where not departing from the connection of context word and semantic environment As the accuracy of content information;Finally according to the location information of line of text, the content information for the full line line of text that identification is obtained Position recovering is carried out, to generate the target object of electronization.To sum up, it using present embodiment, simplifies papery object The process of electronization, improves the efficiency and accuracy rate of papery subject electronic.
Second embodiment of the invention is related to a kind of method of subject electronic, and present embodiment is big with first embodiment Cause it is identical, in second embodiment of the invention, after identification obtains line of text content information, according to preset regular expressions Formula obtains effective content information of line of text to carry out the generation of the target object of electronization.In present embodiment, still with object To be illustrated for menu, the method for subject electronic is as shown in figure 5, below to Fig. 5's in second embodiment of the invention Process illustrates:
Step 201, segmentation object object obtains the line of text of target object and the location information of line of text;This step with Step 101 is roughly the same, and details are not described herein again.
Step 202, it identifies line of text, obtains the content information of line of text;This step is roughly the same with step 102, herein It repeats no more.
Step 203, according to the content information of line of text and preset regular expression, effective content letter of line of text is obtained Breath.
Specifically, regular expression is the filter logic formula of a kind of pair of string operation, a kind of character string is described Matched mode, commonly used to retrieve legal text;In present embodiment, by preset regular expression to text Capable content information is filtered, and is obtained effective content information in the line of text of target menu, is excluded in target menu Irrelevant information, so that it is succinct according to the electronic target menu content that effective content information generates, it can pointedly open up Show the effective informations such as mostly important menu name and vegetable price.In an example, preset regular expression is for examining Rope menu name and vegetable price refer to the vegetable name for including in menu by effective content information that regular expression is obtained by filtration Claim and vegetable price, the irrelevant information exhausted refer to text information unrelated with vegetable in menu.
In the above-described example, the text about vegetable price is retrieved first, it can be according to the currency list often occurred in menu The unit (such as: part, cup, position, jin etc.) of position (member) and vegetable price is matched, such as: preset regular expression are as follows: " $ ..* [0-9 .oO]+member .*/[part cup pricks bottle example cup and the secondary two jin of boxes of bucket bowl string root is listened to cover item position to people] ", pass through Above-mentioned regular expression retrieves the content information of line of text, can be matched to such as " $10 member/part " about vegetable The text of price, that is, the vegetable price as effective content information can be filtered out;In addition, equally can according in menu with The unrelated text information of vegetable is matched, for example, default regular expression is for example: " ^ [point is used] meal | [lower point] is single | business | Phone | add dish ", retrieved by content information of the above-mentioned regular expression to line of text, can be matched to such as " phone ", The text information unrelated with vegetable such as " placing an order ";When the text filtered out about vegetable price and after filter out unrelated text, The content information of remaining line of text is the text in relation to menu name, that is, has been got as effective content information Menu name and vegetable price.
Step 204, according to effective content information of line of text and the location information of line of text, the target pair of electronization is generated As.
Specifically, that is, effective content information is menu name and dish in present embodiment by taking subobject is vegetable as an example For product price, following sub-step 2041 to sub-step 2043 is subdivided into step 204 and is described in detail:
Step 2041, according to the location information of the line of text, the location information of the subobject title and described is obtained The location information of subobject price;
Specifically, effective content information of the line of text got in present embodiment includes menu name and vegetable valence Lattice, and the location information of line of text is it is known that the therefore position of the available menu name for including into line of text and vegetable price Confidence breath.
Step 2042, according to the location information of the location information of the subobject title and the subobject price, matching The subobject title and the subobject price;
Specifically, it is contemplated that the menu format in actual scene, usually with menu name on a left side, vegetable price is on the right side Carry out arranging menu, menu name can be ordered as a column on a left side, vegetable price is ordered as a column on the right side, then with vegetable valence On the basis of lattice, menu name is successively matched from right to left, until all vegetable prices all match corresponding menu name.Example Such as, vegetable A and price A belongs to line of text 1, and vegetable A is in 1 left side of line of text, and price A is in the right side of line of text 1, and by It is (1,1) (indicating that line of text 1 is in the first row first row) in the location information of line of text 1, gets the location information of vegetable A For (1,1) (indicating that vegetable A is in the first row first row), the location information for getting price A is that (1,1) (indicates that price A is in The first row first row);Therefore in sequence, vegetable A is arranged in left side the first row first row, and price A is arranged in right side the first row First row, then right side price A can Corresponding matching upper left side with a line vegetable A.
Either, it is contemplated that, can be by dish with menu name in upper, the menu format of form arrangement of the vegetable price under The name of an article claims to be ordered as a line upper, and vegetable price is ordered as a line under, then on the basis of vegetable price, from bottom to top according to Secondary matching menu name, until all vegetable prices all match corresponding menu name.For example, vegetable B is in line of text The location information of 1, vegetable B are (1,1) (indicating that vegetable B is in the first row first row), and price B is in line of text 2, price B's Location information is (2,1) (indicating that price A is in the second row first row);Therefore in sequence, vegetable B is arranged in lastrow First row, price B are arranged in the first row in next line, then the price B under can be on Corresponding matching in the vegetable of upper same row B。
It should be noted that be only in this step to match the menu name and the vegetable price for example, It is not intended to limit specific matching benchmark and matching way.
Step 2043, the position of the subobject title and the subobject price and the line of text completed according to matching Confidence breath, generates the target object of electronization;
Specifically, corresponding menu name will be matched after matching obtains one-to-one menu name and vegetable price Reduction combination is carried out according to the position of affiliated line of text with vegetable price, generates the target menu of electronization;This step and step 103 is roughly the same, and details are not described herein again.
Present embodiment in terms of existing technologies, by preset regular expression to the content information of line of text into Row filtering, obtains effective content information of line of text, the menu name for including in menu and vegetable price etc., to exhaust Except information unrelated with vegetable in menu, and according to the location information of effective content information, corresponds and match effective content letter Breath, it is ensured that the correctness of the target menu of the electronization ultimately generated enables the target menu of electronization to be succinctly directed to Ground shows the effective informations such as mostly important menu name and vegetable price.
Third embodiment of the invention is related to a kind of device of subject electronic, as shown in fig. 6, the device of menu electronization It include: segmentation module 301, identification module 302 and generation module 303.
Divide module 301, is used for segmentation object object, obtains the line of text of the target object and the position of the line of text Confidence breath;
Identification module 302, the line of text, obtains the content information of the line of text for identification;
Generation module 303, for generating electricity according to the content information of the line of text and the location information of the line of text The target object of sonization.
In an example, generation module 303 is also used to content information and preset canonical table according to the line of text Up to formula, effective content information of the line of text is obtained;According to effective content information of the line of text and the line of text Location information generates the target object of electronization.
In an example, the content information for the line of text that identification module 302 obtains includes the target object Subobject title and subobject price.
In an example, generation module 303 is also used to the location information according to the line of text, obtains the subobject The location information of the location information of title and the subobject price;According to the location information and the son of the subobject title The location information of object price matches the subobject title and the subobject price;The son completed according to matching is right As the location information of title and the subobject price and the line of text, the target object of electronization is generated.
In an example, segmentation module 301 passes through the preset full convolutional neural networks model for segmented image point Cut target object.
In an example, identification module 302 passes through the convolution loop neural network model of preset text for identification Identify the line of text.
It is not difficult to find that present embodiment is to implement with the corresponding device of first embodiment or second embodiment Example, present embodiment can work in coordination implementation with first embodiment or second embodiment.First embodiment or second is in fact It is still effective in the present embodiment to apply the relevant technical details mentioned in mode, in order to reduce repetition, which is not described herein again.Phase It answers, the relevant technical details mentioned in present embodiment are also applicable in first embodiment or second embodiment.
It is noted that each module involved in present embodiment is logic module, and in practical applications, one A logic unit can be a physical unit, be also possible to a part of a physical unit, can also be with multiple physics lists The combination of member is realized.In addition, in order to protrude innovative part of the invention, it will not be with solution institute of the present invention in present embodiment The technical issues of proposition, the less close unit of relationship introduced, but this does not indicate that there is no other single in present embodiment Member.
Four embodiment of the invention is related to a kind of server, as shown in fig. 7, comprises at least one processor 401;With And the memory 402 with the communication connection of at least one processor 401;And it is logical with the device communication connection of subject electronic Believe that component 403, communication component 403 send and receive data under the control of processor 401;Wherein, be stored with can for memory 402 The instruction executed by least one processor 401, instruction are executed by least one processor 401 to realize: segmentation object object, Obtain the line of text of the target object and the location information of the line of text;It identifies the line of text, obtains the line of text Content information;According to the location information of the content information of the line of text and the line of text, the mesh of electronization is generated Mark object.
In addition, instruction can also be to realize when being executed by least one processor 401: the content according to the line of text The location information of information and the line of text, pairing of electrons as, comprising: according to the content information of the line of text and preset Regular expression obtains effective content information of the line of text;According to the effective content information and the text of the line of text The location information of current row generates the target object of electronization.
In addition, instruction can also be to realize when being executed by least one processor 401: the content information packet of the line of text It includes: the subobject title and subobject price of the target object.
In addition, instruction can also be to realize when being executed by least one processor 401: the content according to the line of text The location information of information and the line of text generates the target object of electronization, comprising: according to the position of the line of text Information obtains the location information of the subobject title and the location information of the subobject price;According to the subobject name The location information of the location information of title and the subobject price matches the subobject title and the subobject price;Root The location information of the subobject title and the subobject price and the line of text completed according to matching generates electronization The target object.
In addition, instruction can also be to realize when being executed by least one processor 401: the segmentation object object, comprising: logical Cross the preset full convolutional neural networks model segmentation object object for segmented image.
In addition, instruction can also be to realize when being executed by least one processor 401: the identification line of text, comprising: The line of text is identified by the convolution loop neural network model of preset text for identification.
Specifically, which includes: one or more processors 401 and memory 402, is handled in Fig. 7 with one For device 401.Processor 401, memory 402 can be connected by bus or other modes, to be connected by bus in Fig. 7 For.Memory 402 is used as a kind of computer readable storage medium, and can be used for storing computer software programs, computer can hold Line program and module.Computer software programs, instruction and the mould that processor 401 is stored in memory 402 by operation Block realizes the method for above-mentioned subject electronic thereby executing the various function application and data processing of equipment.
Memory 402 may include storing program area and storage data area, wherein storing program area can store operation system Application program required for system, at least one function;It storage data area can the Save option list etc..In addition, memory 402 can be with It can also include nonvolatile memory, for example, at least disk memory, a flash memory including high-speed random access memory Device or other non-volatile solid state memory parts.In some embodiments, it includes relative to processing that memory 402 is optional The remotely located memory of device 401, these remote memories can pass through network connection to external equipment.The example of above-mentioned network Including but not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more module is stored in memory 402, when being executed by one or more processor 401, is held The method of subject electronic in the above-mentioned any means embodiment of row.
The said goods can be performed the application embodiment provided by method, have the corresponding functional module of execution method and Beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to method provided by the application embodiment.
In the present embodiment, server is able to carry out: segmentation object object, obtain the target object line of text and The location information of the line of text;It identifies the line of text, obtains the content information of the line of text;According to the line of text The location information of content information and the line of text generates the target object of electronization.That is, in present embodiment It is that target object is divided into line of text, the identification of progress content information as unit of line of text, and the line of text institute in object The content information for including is usually complete text, to be less prone to the case where identifying hiatus when identifying line of text;Together When, it is split without to single text, effectively prevents identification caused by due to the boundary segmentation between single text is unclear The case where wrongly written character;Identify that obtained line of text is also the complete content information as unit of line of text, i.e., without obtaining to identification Content information spliced and combined, be effectively simplified the step process of subject electronic;Known as unit of by line of text When not obtaining the content information of line of text, content information is carried out using context semantic information included in full line line of text Identification, thus not departing from the connection of context word and in the case where semantic environment, effectively improving identification contents of object letter The accuracy of breath;Finally according to the location information of line of text, the content information for the full line line of text that identification is obtained carries out position Reduction, to generate the target object of electronization.To sum up, it using present embodiment, simplifies papery subject electronic Process is improved the efficiency and accuracy rate of papery subject electronic.
Fifth embodiment of the invention is related to a kind of computer readable storage medium, is stored with computer program.Computer The embodiment of the method for above-mentioned subject electronic is realized when program is executed by processor.
That is, it will be understood by those skilled in the art that realizing the whole in the embodiment of the method for above-mentioned subject electronic or portion It is that relevant hardware can be instructed to complete by program step by step, which is stored in a storage medium, if including Dry instruction is used so that an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) execution the application are each The all or part of the steps of embodiment method.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. it is various It can store the medium of program code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.
The embodiment of the present application discloses a kind of method of subject electronic of A1., comprising:
Segmentation object object obtains the line of text of the target object and the location information of the line of text;
It identifies the line of text, obtains the content information of the line of text;
According to the location information of the content information of the line of text and the line of text, the target pair of electronization is generated As.
A2. the method for subject electronic as described in a1, the content information and the text according to the line of text Capable location information, pairing of electrons as, comprising:
According to the content information of the line of text and preset regular expression, effective content letter of the line of text is obtained Breath;
According to the location information of effective content information of the line of text and the line of text, the mesh of electronization is generated Mark object.
A3. the method for subject electronic as described in a1, the content information of the line of text include: the target object Subobject title and subobject price.
A4. the method for the subject electronic as described in A3, the content information and the text according to the line of text Capable location information generates the target object of electronization, comprising:
According to the location information of the line of text, obtain the subobject title location information and the subobject price Location information;
According to the location information of the location information of the subobject title and the subobject price, the subobject is matched Title and the subobject price;
The location information of the subobject title and the subobject price and the line of text completed according to matching, it is raw At the target object of electronization.
A5. the method for subject electronic as described in a1, the segmentation object object, comprising: by preset for dividing Cut the full convolutional neural networks model segmentation object object of image.
A6. the method for subject electronic as described in a1, the identification line of text, comprising: be used for by preset Identify that the convolution loop neural network model of text identifies the line of text.
The embodiment of the present application discloses a kind of device of subject electronic of B1., comprising:
Divide module, is used for segmentation object object, obtains the line of text of the target object and the position of the line of text Information;
Identification module, the line of text, obtains the content information of the line of text for identification;
Generation module, for generating electronics according to the content information of the line of text and the location information of the line of text The target object changed.
The embodiment of the present application discloses a kind of server of C1., comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one A processor executes, so that at least one described processor is able to carry out:
Segmentation object object obtains the line of text of the target object and the location information of the line of text;
It identifies the line of text, obtains the content information of the line of text;
According to the location information of the content information of the line of text and the line of text, the target pair of electronization is generated As.
C2. the server as described in C1, it is described to be believed according to the content information of the line of text and the position of the line of text Breath, pairing of electrons as, comprising:
According to the content information of the line of text and preset regular expression, effective content letter of the line of text is obtained Breath;
According to the location information of effective content information of the line of text and the line of text, the mesh of electronization is generated Mark object.
C3. the server as described in C1, the content information of the line of text include: the subobject title of the target object With subobject price.
C4. the server as described in C3, it is described to be believed according to the content information of the line of text and the position of the line of text Breath generates the target object of electronization, comprising:
According to the location information of the line of text, obtain the subobject title location information and the subobject price Location information;
According to the location information of the location information of the subobject title and the subobject price, the subobject is matched Title and the subobject price;
The location information of the subobject title and the subobject price and the line of text completed according to matching, it is raw At the target object of electronization.
C5. the server as described in C1, the segmentation object object, comprising: by preset for the complete of segmented image Convolutional neural networks model segmentation object object.
C6. the server as described in C1, the identification line of text, comprising: pass through preset text for identification Convolution loop neural network model identifies the line of text.
The embodiment of the present application discloses a kind of computer readable storage medium of D1., is stored with computer program, the calculating The method of the described in any item subject electronics of A1-A6 is realized when machine program is executed by processor.

Claims (10)

1. a kind of method of subject electronic characterized by comprising
Segmentation object object obtains the line of text of the target object and the location information of the line of text;
It identifies the line of text, obtains the content information of the line of text;
According to the location information of the content information of the line of text and the line of text, the target object of electronization is generated.
2. the method for subject electronic according to claim 1, which is characterized in that the content according to the line of text The location information of information and the line of text, pairing of electrons as, comprising:
According to the content information of the line of text and preset regular expression, effective content information of the line of text is obtained;
According to the location information of effective content information of the line of text and the line of text, the target pair of electronization is generated As.
3. the method for subject electronic according to claim 1, which is characterized in that the content information packet of the line of text It includes: the subobject title and subobject price of the target object.
4. the method for subject electronic according to claim 3, which is characterized in that the content according to the line of text The location information of information and the line of text generates the target object of electronization, comprising:
According to the location information of the line of text, the location information of the subobject title and the position of the subobject price are obtained Confidence breath;
According to the location information of the location information of the subobject title and the subobject price, the subobject title is matched With the subobject price;
The location information of the subobject title and the subobject price and the line of text completed according to matching generates electricity The target object of sonization.
5. the method for subject electronic according to claim 1, which is characterized in that the segmentation object object, comprising: logical Cross the preset full convolutional neural networks model segmentation object object for segmented image.
6. the method for subject electronic according to claim 1, which is characterized in that the identification line of text, comprising: The line of text is identified by the convolution loop neural network model of preset text for identification.
7. a kind of device of subject electronic characterized by comprising
Divide module, is used for segmentation object object, obtains the line of text of the target object and the location information of the line of text;
Identification module, the line of text, obtains the content information of the line of text for identification;
Generation module, for generating electronization according to the content information of the line of text and the location information of the line of text The target object.
8. a kind of server characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one Device is managed to execute, so that at least one described processor is able to carry out:
Segmentation object object obtains the line of text of the target object and the location information of the line of text;
It identifies the line of text, obtains the content information of the line of text;
According to the location information of the content information of the line of text and the line of text, the target object of electronization is generated.
9. server according to claim 8, which is characterized in that the content information according to the line of text and described The location information of line of text, pairing of electrons as, comprising:
According to the content information of the line of text and preset regular expression, effective content information of the line of text is obtained;
According to the location information of effective content information of the line of text and the line of text, the target pair of electronization is generated As.
10. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program is located The method that reason device realizes subject electronic described in any one of claims 1-6 when executing.
CN201910515808.6A 2019-06-14 2019-06-14 Method, apparatus, server and the storage medium of subject electronic Pending CN110414497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910515808.6A CN110414497A (en) 2019-06-14 2019-06-14 Method, apparatus, server and the storage medium of subject electronic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910515808.6A CN110414497A (en) 2019-06-14 2019-06-14 Method, apparatus, server and the storage medium of subject electronic

Publications (1)

Publication Number Publication Date
CN110414497A true CN110414497A (en) 2019-11-05

Family

ID=68359087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910515808.6A Pending CN110414497A (en) 2019-06-14 2019-06-14 Method, apparatus, server and the storage medium of subject electronic

Country Status (1)

Country Link
CN (1) CN110414497A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256168A (en) * 2020-09-30 2021-01-22 北京百度网讯科技有限公司 Method and device for electronizing handwritten content, electronic equipment and storage medium
CN112883769A (en) * 2020-01-15 2021-06-01 赛义德·皮拉斯特 Method for identifying human interaction behavior in aerial video of unmanned aerial vehicle

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5253305A (en) * 1991-06-25 1993-10-12 Industrial Technology Research Institute Character boundary identification method and system
US20110299779A1 (en) * 2008-05-23 2011-12-08 Ahmet Mufit Ferman Methods and Systems for Detecting Numerals in a Digital Image
CN104966051A (en) * 2015-06-03 2015-10-07 中国科学院信息工程研究所 Method of recognizing layout of document image
CN108416279A (en) * 2018-02-26 2018-08-17 阿博茨德(北京)科技有限公司 Form analysis method and device in file and picture
CN109299798A (en) * 2017-07-25 2019-02-01 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of travel information
CN109308476A (en) * 2018-09-06 2019-02-05 邬国锐 Billing information processing method, system and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5253305A (en) * 1991-06-25 1993-10-12 Industrial Technology Research Institute Character boundary identification method and system
US20110299779A1 (en) * 2008-05-23 2011-12-08 Ahmet Mufit Ferman Methods and Systems for Detecting Numerals in a Digital Image
CN104966051A (en) * 2015-06-03 2015-10-07 中国科学院信息工程研究所 Method of recognizing layout of document image
CN109299798A (en) * 2017-07-25 2019-02-01 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of travel information
CN108416279A (en) * 2018-02-26 2018-08-17 阿博茨德(北京)科技有限公司 Form analysis method and device in file and picture
CN109308476A (en) * 2018-09-06 2019-02-05 邬国锐 Billing information processing method, system and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨秀璋等: "《Python网络数据爬取即分析从入门到精通》", 30 June 2018 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883769A (en) * 2020-01-15 2021-06-01 赛义德·皮拉斯特 Method for identifying human interaction behavior in aerial video of unmanned aerial vehicle
CN112256168A (en) * 2020-09-30 2021-01-22 北京百度网讯科技有限公司 Method and device for electronizing handwritten content, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11176443B1 (en) Application control and text detection from application screen images
Kaur et al. Tools, techniques, datasets and application areas for object detection in an image: a review
EP3660733B1 (en) Method and system for information extraction from document images using conversational interface and database querying
US10489682B1 (en) Optical character recognition employing deep learning with machine generated training data
CN107358242B (en) Target area color identification method and device and monitoring terminal
US20210295114A1 (en) Method and apparatus for extracting structured data from image, and device
CN109522816A (en) Table recognition method and device, computer storage medium
CN109117228A (en) The generation method and device of graphical interfaces
CN105740931B (en) Multidimensional security code label, its production method and recognition methods
US11651150B2 (en) Deep learning based table detection and associated data extraction from scanned image documents
Wilkinson et al. Neural Ctrl-F: segmentation-free query-by-string word spotting in handwritten manuscript collections
CN110348294A (en) The localization method of chart, device and computer equipment in PDF document
CN111353491B (en) Text direction determining method, device, equipment and storage medium
CN109710907A (en) A kind of generation method and equipment of electronic document
US10586104B2 (en) System and method for theme extraction
Prusty et al. Indiscapes: Instance segmentation networks for layout parsing of historical indic manuscripts
CN112949455B (en) Value-added tax invoice recognition system and method
CN109685065A (en) Printed page analysis method, the system of paper automatic content classification
CN109800750A (en) A kind of character area mask method of the text based on morphological image for rule composing
CN110119460A (en) Image search method, device and electronic equipment
CN113841161A (en) Extensible architecture for automatically generating content distribution images
Den Hartog et al. Knowledge-based interpretation of utility maps
CN110414497A (en) Method, apparatus, server and the storage medium of subject electronic
Bharath et al. Scalable scene understanding using saliency-guided object localization
CN110245349A (en) A kind of syntax dependency parsing method, apparatus and a kind of electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191105