CN107944013A - A kind of database code generation method and system - Google Patents

A kind of database code generation method and system Download PDF

Info

Publication number
CN107944013A
CN107944013A CN201711298940.3A CN201711298940A CN107944013A CN 107944013 A CN107944013 A CN 107944013A CN 201711298940 A CN201711298940 A CN 201711298940A CN 107944013 A CN107944013 A CN 107944013A
Authority
CN
China
Prior art keywords
database
code
list
database table
generating
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
CN201711298940.3A
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.)
Zhuhai Huasuo Software Technology Co Ltd
Original Assignee
Zhuhai Huasuo Software 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 Zhuhai Huasuo Software Technology Co Ltd filed Critical Zhuhai Huasuo Software Technology Co Ltd
Priority to CN201711298940.3A priority Critical patent/CN107944013A/en
Publication of CN107944013A publication Critical patent/CN107944013A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention discloses a kind of database code generation method and system, is related to database technical field, the database code generation method includes:The list in image is identified by OCR, and generates corresponding Excel file;According to the Excel file, the corresponding database table of the list is generated in the database;According to the database table, corresponding database code is generated.The present invention quickly generates form database by OCR technique, improves efficiency to a greater extent, reduces development cost.

Description

A kind of database code generation method and system
Technical field
The present invention relates to database technical field, more particularly to a kind of database code generation method and system.
Background technology
At present, Code automatic build technology has been applied, and developer is effectively raised by code Generation Development efficiency.
Traditional code Generation is exactly to need personnel to carry out the generation of Code Template, it is necessary to compare more artificial ginsengs With that can't see effect very well, and also need to design the scheme of form database in advance.Such as Publication No. The patent of CN103412749A discloses a kind of database code generation method and system, the database code generation method bag Include:S101, obtain the attended operation for accessing database relevant information progress database;S102, the conjunction for verifying username and password Method, shows all tables of data under the user name if be proved to be successful in the form of a list, while with data The form of structure table shows data list structure information;S103, the acquisition tables of data to be operated it is corresponding need carry out the page The row name and generation file type of display;S104, call template engine to obtain template file from corresponding template file path And corresponding client file or server-side file are generated according to template file;And S105, by the client file of generation or Server-side file is stored under the file data path in configuration file.The code generating method that the patent provides is, it is necessary to write Template, the process manually participated in is more, the limited efficacy improved.
The content of the invention
The technical problems to be solved by the invention are that traditional code generating method needs manually carry out Code Template Generation is, it is necessary to which relatively more manually participates in, it is impossible to timely preview code effect, and also need to design form data in advance The scheme in storehouse.
For the above-mentioned deficiency of the prior art, a kind of database code generation method and system are proposed.
The database code generation method includes:
The list in image is identified by OCR, and generates corresponding Excel file;
According to the Excel file, the corresponding database table of the list is generated in the database;
According to the database table, corresponding database code is generated.
Further, it is described according to the Excel file, the corresponding database table bag of the list is generated in the database Include:
The field of generation database table is read from the Excel file;
Determine the major key of the database table;
According to the Excel file, the corresponding database table of the list is generated.
Further, described according to the database table, generating corresponding database code includes:
Obtain the setting to generating database code;It is described to set selection, the selection of field for including database table;
According to the setting, the corresponding database code of the database table is generated.
Further, according to the database table, after generating corresponding database code, further include:
Generate the preview of the database code.
Further, before the list in image is identified by OCR, further include:
Using scanner scanning list, to obtain the image for including the list.
The database code generation system includes:
Excel file generation module, for the list in image to be identified by OCR, and generates corresponding Excel File;
Database table generation module, for according to the Excel file, generating the corresponding number of the list in the database According to storehouse table;
Code generation module, for according to the database table, generating corresponding database code.
Further, the database table generation module includes:
Field generates submodule, for reading the field of generation database table from the Excel file;
Major key generates submodule, for determining the major key of the database table;
Database table generates submodule, for according to the Excel file, generating the corresponding database table of the list.
Further, the code generation module includes:
Acquisition submodule is set, for obtaining the setting to generating database code;The setting includes database table Selection, the selection of field;
Code building submodule, for according to the setting, generating the corresponding database code of the database table.
Further, further include:
Preview generation module, for generating the preview of the database code.
Further, further include:
Image generation module, for using scanner scanning list, to obtain the image for including the list.
The present invention by OCR technique quickly generates form database, improves efficiency to a greater extent, reduce exploitation into This.The present invention also provides the preview for generating the database code.
Brief description of the drawings
Fig. 1 is a kind of flow chart for database code generation method that the embodiment of the present invention one provides;
Fig. 2 is a kind of structure diagram of database code generation system provided by Embodiment 2 of the present invention.
Embodiment
It is the specific embodiment of the present invention and with reference to attached drawing below, technical scheme is further described, But the present invention is not limited to these embodiments.
It is also understood that specific embodiment described herein is used only for understanding the present invention, it is not used to limit this hair It is bright.
Embodiment one
The present embodiment provides a kind of database code generation method, its flow chart is as shown in Figure 1, details are as follows:
Step S101, is identified the list in image by OCR, and generates corresponding Excel file.
Alternatively, the SDK kits of the OCR provided by ABBYY companies carry out image recognition, are extracted from described image The list.
The list can include multiple tables of data.
Further, generation includes the Excel file of the list.
Further, before the list in image is identified by OCR, further include:
Using scanner scanning list, to obtain the image for including the list.
When the list is not electronic format, the list can be scanned into electronic document using scanner, then, Use OCR processing.
Step S102, according to the Excel file, generates the corresponding database table of the list in the database.
Further, it is described according to the Excel file, the corresponding database table bag of the list is generated in the database Include:
The field of generation database table is read from the Excel file;
Determine the major key of the database table;
According to the Excel file, the corresponding database table of the list is generated.
In general, the first behavior row name of table, and the field in database.Read the row name in the Excel file Field as database table.
, can be using the corresponding phonetic of the Chinese as field if arranging entitled Chinese, Chinese character is as explanation of field.
Further, major key is generated for database table.
After field and major key generation, the data in the Excel file are imported into database table.
Alternatively, the xml document of correspondence mappings is generated according to Excel file, and according to the xml document, generates data Bank code.
Step S103, according to the database table, generates corresponding database code.
Further, described according to the database table, generating corresponding database code includes:
Obtain the setting to generating database code;It is described to set selection, the selection of field for including database table;
According to the setting, the corresponding database code of the database table is generated.
It can be set before code is produced, developer may be selected, such as:The selection of database table, the selection of field.
Further, according to the database table, after generating corresponding database code, further include:
Generate the preview of the database code.
Developer can judge whether the code is correct by the preview, to change.
Embodiment two
The present embodiment provides a kind of database code to generate system, its structure diagram is as shown in Fig. 2, details are as follows:
The database code generation system includes:
Excel file generation module 210, for the list in image to be identified by OCR, and generates corresponding Excel file;
Database table generation module 220, for according to the Excel file, generating the list in the database and corresponding to Database table;
Code generation module 230, for according to the database table, generating corresponding database code.
Further, the database table generation module 220 includes:
Field generates submodule, for reading the field of generation database table from the Excel file;
Major key generates submodule, for determining the major key of the database table;
Database table generates submodule, for according to the Excel file, generating the corresponding database table of the list.
Further, the code generation module 230 includes:
Acquisition submodule is set, for obtaining the setting to generating database code;The setting includes database table Selection, the selection of field;
Code building submodule, for according to the setting, generating the corresponding database code of the database table.
Further, further include:
Preview generation module, for generating the preview of the database code.
Further, further include:
Image generation module, for using scanner scanning list, to obtain the image for including the list.
The embodiment of the method being applied to due to database code provided in this embodiment generation system in embodiment one, is described in detail Referring to embodiment one, which is not described herein again.
In embodiment provided herein, it should be appreciated that described method and system is all schematical, in reality By adjusting can difference in the implementation process of border.
In addition, the specific name of each functional unit or module is also only to facilitate mutually differentiation, is not used to the present invention Protection domain.
Specific embodiment described herein is only to spirit explanation for example of the invention.Technology belonging to the present invention is led The technical staff in domain can do various modifications or additions to described specific embodiment or replace in a similar way Generation, but without departing from spirit of the invention or beyond the scope of the appended claims.

Claims (10)

  1. A kind of 1. database code generation method, it is characterised in that including:
    The list in image is identified by OCR, and generates corresponding Excel file;
    According to the Excel file, the corresponding database table of the list is generated in the database;
    According to the database table, corresponding database code is generated.
  2. 2. database code generation method according to claim 1, it is characterised in that it is described according to the Excel file, Generating the corresponding database table of the list in the database includes:
    The field of generation database table is read from the Excel file;
    Determine the major key of the database table;
    According to the Excel file, the corresponding database table of the list is generated.
  3. 3. database code generation method according to claim 1, it is characterised in that it is described according to the database table, Generating corresponding database code includes:
    Obtain the setting to generating database code;It is described to set selection, the selection of field for including database table;
    According to the setting, the corresponding database code of the database table is generated.
  4. 4. according to claim 1-3 any one of them database code generation methods, it is characterised in that according to the data Storehouse table, after generating corresponding database code, further includes:
    Generate the preview of the database code.
  5. 5. database code generation method according to claim 4, it is characterised in that by OCR to the table in image Before being singly identified, further include:
    Using scanner scanning list, to obtain the image for including the list.
  6. 6. a kind of database code generates system, it is characterised in that including:
    Excel file generation module, for the list in image to be identified by OCR, and generates corresponding Excel texts Part;
    Database table generation module, for according to the Excel file, generating the corresponding database of the list in the database Table;
    Code generation module, for according to the database table, generating corresponding database code.
  7. 7. database code according to claim 6 generates system, it is characterised in that the database table generation module bag Include:
    Field generates submodule, for reading the field of generation database table from the Excel file;
    Major key generates submodule, for determining the major key of the database table;
    Database table generates submodule, for according to the Excel file, generating the corresponding database table of the list.
  8. 8. database code according to claim 6 generates system, it is characterised in that the code generation module includes:
    Acquisition submodule is set, for obtaining the setting to generating database code;It is described set include database table selection, The selection of field;
    Code building submodule, for according to the setting, generating the corresponding database code of the database table.
  9. 9. system is generated according to claim 6-8 any one of them database code, it is characterised in that further include:
    Preview generation module, for generating the preview of the database code.
  10. 10. database code according to claim 9 generates system, it is characterised in that further includes:
    Image generation module, for using scanner scanning list, to obtain the image for including the list.
CN201711298940.3A 2017-12-08 2017-12-08 A kind of database code generation method and system Pending CN107944013A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711298940.3A CN107944013A (en) 2017-12-08 2017-12-08 A kind of database code generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711298940.3A CN107944013A (en) 2017-12-08 2017-12-08 A kind of database code generation method and system

Publications (1)

Publication Number Publication Date
CN107944013A true CN107944013A (en) 2018-04-20

Family

ID=61946375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711298940.3A Pending CN107944013A (en) 2017-12-08 2017-12-08 A kind of database code generation method and system

Country Status (1)

Country Link
CN (1) CN107944013A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241351A (en) * 2018-07-19 2019-01-18 佛山科学技术学院 A kind of multi-source heterogeneous data preparation method of board production
CN110427949A (en) * 2019-07-31 2019-11-08 中国工商银行股份有限公司 The method, apparatus of list verification calculates equipment and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090087112A1 (en) * 2007-09-28 2009-04-02 German Zyuzin Enhanced method of multilayer compression of pdf (image) files using ocr systems
CN101533429A (en) * 2008-03-14 2009-09-16 余淼淼 Optimization method for processing human body dimension data and database system therefor
US20090282009A1 (en) * 2008-05-09 2009-11-12 Tags Ltd System, method, and program product for automated grading
CN101645010A (en) * 2009-08-20 2010-02-10 深圳市珍爱网信息技术有限公司 System and method for automatically generating code
CN102262616A (en) * 2010-05-24 2011-11-30 株式会社Pfu Form processing system, OCR device, and form creation device
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
CN103135976A (en) * 2011-11-30 2013-06-05 阿里巴巴集团控股有限公司 Code automatic generation method and device
CN105740857A (en) * 2016-01-31 2016-07-06 华南理工大学 OCR based automatic acquisition and recognition system for fast pencil-and-paper voting result
CN106528684A (en) * 2016-10-25 2017-03-22 北京瑞风协同科技股份有限公司 Method and system for establishing engineering material database

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090087112A1 (en) * 2007-09-28 2009-04-02 German Zyuzin Enhanced method of multilayer compression of pdf (image) files using ocr systems
CN101533429A (en) * 2008-03-14 2009-09-16 余淼淼 Optimization method for processing human body dimension data and database system therefor
US20090282009A1 (en) * 2008-05-09 2009-11-12 Tags Ltd System, method, and program product for automated grading
CN101645010A (en) * 2009-08-20 2010-02-10 深圳市珍爱网信息技术有限公司 System and method for automatically generating code
CN102262616A (en) * 2010-05-24 2011-11-30 株式会社Pfu Form processing system, OCR device, and form creation device
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
CN103135976A (en) * 2011-11-30 2013-06-05 阿里巴巴集团控股有限公司 Code automatic generation method and device
CN105740857A (en) * 2016-01-31 2016-07-06 华南理工大学 OCR based automatic acquisition and recognition system for fast pencil-and-paper voting result
CN106528684A (en) * 2016-10-25 2017-03-22 北京瑞风协同科技股份有限公司 Method and system for establishing engineering material database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周云玲等: "《计算机文化基础教程》", 31 August 2015, 中国铁道出版社 *
周子江等: "浅谈水文资料整编成果的数字化", 《治淮》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241351A (en) * 2018-07-19 2019-01-18 佛山科学技术学院 A kind of multi-source heterogeneous data preparation method of board production
CN110427949A (en) * 2019-07-31 2019-11-08 中国工商银行股份有限公司 The method, apparatus of list verification calculates equipment and medium

Similar Documents

Publication Publication Date Title
CN109190722B (en) Font style migration transformation method based on Manchu character picture
CN108960223B (en) Method for automatically generating voucher based on intelligent bill identification
CN1892642B (en) Method and system for processing forms
JP5851607B2 (en) Kanji composition method and apparatus, character composition method and apparatus, and font library construction method
CN110442744A (en) Extract method, apparatus, electronic equipment and the readable medium of target information in image
US20130181995A1 (en) Handwritten character font library
US20200034613A1 (en) Simulating image capture
CN101443790A (en) Efficient processing of non-reflow content in a digital image
CN109299663A (en) Hand-written script recognition methods, system and terminal device
CN107480688A (en) Fine granularity image-recognizing method based on zero sample learning
CN110490182A (en) A kind of point reads production method, system, storage medium and the electronic equipment of data
CN106951441A (en) The archiving method and system of a kind of engineering electronic drawing based on electronic signature
CN103632387A (en) Method and system for generation of brush writing copybook
CN107944013A (en) A kind of database code generation method and system
KR20200102238A (en) System, method and application for data visual service
CN104408403B (en) A kind of referee method that secondary typing is inconsistent and device
US20100053691A1 (en) Combining identity-linked images
Thammarak et al. Automated data digitization system for vehicle registration certificates using google cloud vision API
CN101853313A (en) Handwriting font object library generating method based on font categorization
KR102328034B1 (en) Database building device that can build a knowledge database from a table-inserted image and operating method thereof
CN102637256B (en) Shape cluster in rear optical character recognition process
CN111198664B (en) Document printing method and device, computer storage medium and terminal
CN110334710A (en) Legal documents recognition methods, device, computer equipment and storage medium
CN111241955B (en) Bill information extraction method and system
KR20100060691A (en) Method and system for authoring page layout for augmented reality based on printed matter, and method and system for augmented reality based on printed matter

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

Application publication date: 20180420

RJ01 Rejection of invention patent application after publication