Unlock instant, AI-driven research and patent intelligence for your innovation.

Data importing method and device and server

A technology of data import and data business, applied in the database field, can solve the problems of no effective solution proposed, low processing efficiency of parsing and storing in the database, etc., and achieve the effect of improving the overall processing efficiency and reducing the time

Active Publication Date: 2017-11-21
WANBANG CHARGING EQUIP CO LTD +1
View PDF7 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] For the above-mentioned problem of low processing efficiency of parsing and storing in the database, no effective solution has been proposed yet

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data importing method and device and server
  • Data importing method and device and server
  • Data importing method and device and server

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] The embodiment of the present invention provides a data import method, see figure 1 A schematic flow diagram of a data import method is shown, and the method flow shown in this embodiment includes the following steps:

[0030] Step S11, using Apache POI technology to parse the excel file to obtain the data to be imported into the Mysql database.

[0031] Among them, Apache POI is an open source function library of the Apache Software Foundation. POI provides APIs for Java programs to read and write files in Microsoft Office format. In this embodiment, Apache POI technology is used to parse the excel file, and the data in the excel file is imported into the Mysql database. The above excel file may be a file uploaded by the user to the server, or a file pre-saved in the server. Compared with Jxl, POI is more efficient in parsing excel files, especially when parsing large excel files, using POI technology can improve efficiency and is compatible with excel files with suf...

Embodiment 2

[0053] The embodiment of the present invention provides a data import method, taking the data in the excel file having business constraints with other data as an example, see figure 2 A schematic flow diagram of a data import method is shown, and the method flow shown in this embodiment includes the following steps:

[0054] Step S21, uploading the excel file containing the data to be imported to the server.

[0055] In this embodiment, the Mysql database that needs to be imported is described on the server as an example, and it may also be stored in other locations. When the Mysql database is on the server, first upload the excel file to be imported.

[0056] Step S22, using Apache POI technology to parse the excel file to obtain the data to be imported into the Mysql database.

[0057] After parsing the data that needs to be imported, load the data into the content of the system.

[0058] Step S23, judging whether business processing needs to be performed based on data i...

Embodiment 3

[0067] The embodiment of the present invention provides a data import method, taking the data in an excel file as an example with a unique constraint, see image 3 A schematic flow diagram of a data import method is shown, and the method flow shown in this embodiment includes the following steps:

[0068] Step S31, uploading the excel file containing the data to be imported to the server.

[0069] Step S32, using Apache POI technology to parse the excel file to obtain the data to be imported into the Mysql database.

[0070] Step S33, judging whether there is a unique constraint according to the acquired import mode. If yes, execute step S34; if no, execute step S37.

[0071] Specifically, it is necessary to judge whether the uniqueness of the data needs to be guaranteed to avoid repeated import.

[0072] Step S34, data processing is performed through ON DUPLICATE KEY UPDATE syntax in Mysql.

[0073] Step S35, judging whether stored procedures are used for data processing....

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a data importing method and device and a server, and relates to the technical field of databases. The method comprises the steps that the Apache POI technology is adopted, an excel file is analyzed to obtain data to be imported into a Mysql database; the data importing mode is obtained, and the importing modes include the direct importing mode and the postprocessed importing mode; when the direct data importing mode is adopted, data is directly imported into the Mysql database through batch processing; when the postprocessed data importing mode is adopted, data processing is performed according to a service corresponding to the data, and the processed data is imported into the Mysql database. According to the data importing method and device and the server, more excel versions are supported, the excel file analysis efficiency is improved, the time spent when the data is stored into the database is shortened, and the overall processing efficiency is improved.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a data import method, device and server. Background technique [0002] Jxl is an open source Java Excel API project, you can easily manipulate Excel documents through Jxl. However, using Jxl has advantages when parsing small excel files, but it is not efficient when parsing large files. At the same time, Jxl only supports lower versions of excel, such as Excel 95, 97, 2000, and 2003. In the process of importing the data in the excel file into the database, there is a situation where the amount of data is relatively large. At this time, saving the data one by one to the database requires frequent database connections, which increases the connection overhead of the database, and the efficiency of saving data is also low. high. [0003] For the above-mentioned problem of low processing efficiency of parsing and storing in the database, no effective solution has been proposed so ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/258
Inventor 刘玉龙邵丹薇郑隽一储丹
Owner WANBANG CHARGING EQUIP CO LTD