CN109241167B - Table data importing method based on BS framework - Google Patents
Table data importing method based on BS framework Download PDFInfo
- Publication number
- CN109241167B CN109241167B CN201811090224.0A CN201811090224A CN109241167B CN 109241167 B CN109241167 B CN 109241167B CN 201811090224 A CN201811090224 A CN 201811090224A CN 109241167 B CN109241167 B CN 109241167B
- Authority
- CN
- China
- Prior art keywords
- data
- entering
- character string
- date
- type
- 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.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a data import technology, and discloses a table data import method based on a BS (browser/server) architecture, which solves the problems of long import period and high possibility of errors in the traditional technology of manually importing table data. When data is imported, the type of the data is judged firstly, the data is directly stored for the type of a character string, the data types with different formats are converted into a unified date format and then stored, and the data types with different types of numbers are converted into effective numbers and then stored, so that the normalized automatic import of the data of the form is realized, the analysis and the processing of subsequent services are convenient, in addition, the data imported into a database by the form and the data of a data table are ensured to be in one-to-one correspondence through the design of unique fields, and the repeated import can be modified.
Description
Technical Field
The invention relates to a data import technology, in particular to a table data import method based on a BS framework.
Background
The B/S structure (Browser/Server, Browser/Server mode) is a network structure system mode after WEB is started, the Server is responsible for processing background business, and an operator can perform human-computer interaction and complete related business operation only by opening the Browser.
With the development of informatization technology, computer automated office becomes an effective tool for improving work efficiency and effect of companies, and to realize automated office, historical data of a system is generally required to be imported, so that services can be normally linked and developed.
At present, table data is generally imported manually, and the problems of long import period and high error probability exist.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method for importing the table data based on the BS architecture is provided, and the problems that the manual table data importing is long in importing period and prone to errors in the traditional technology are solved.
The technical scheme adopted by the invention for solving the technical problems is as follows:
the table data importing method based on the BS architecture is applied to an information system of the BS architecture, and comprises the following steps:
A. when the system imports the form, firstly judging the validity of the form according to the header information and the number, if the form is valid, reading a piece of data and entering data matching, entering the step B, otherwise, reporting an error, and ending the process;
B. judging the data type according to the data matching result, if the data type is a character string and the data item is also the character string, directly storing the read data, and entering a step K; if the data type is date, entering step C, and if the data type is number, entering step H;
C. judging whether the input data is in a date format, if so, directly storing the data, and entering a step K; if not, entering step D;
D. judging whether the input data is in a character string date format, if so, converting the input data into the date format, then storing the data, and entering the step K, otherwise, entering the step E;
E. judging whether the character string contains a date, if not, the date data is empty, storing the character string in remark information, and entering a step K; if the character string contains a date, entering step F;
F. judging whether effective dates can be extracted according to dates in the character strings, if not, setting the dates to be null, storing the character strings in remark information, and entering a step K; if the effective date can be extracted, entering a step G;
G. extracting effective dates, storing the character strings in remark information, and entering a step K;
H. judging whether the input data is a valid number, if so, storing the data, entering a step K, otherwise, judging that the input data is character string data, and entering a step I;
I. judging whether the character string data is a calculation formula character string or not, if not, setting the data to be null, storing the character string data in remark information, and entering a step K; if the character string is a calculation formula character string, entering a step J;
J. extracting numbers and operators in the character string formula, modeling the mathematical formula according to the numbers and the operators, obtaining data according to the mathematical formula, storing the data, and entering a step K;
K. searching corresponding data in a database through the unique field of the input data, judging whether the corresponding data can be found, if so, updating the corresponding data in the database, and entering the step L, otherwise, inserting the input data into the database, and entering the step L;
and L, judging whether the data table import is finished or not, if so, finishing the flow, otherwise, returning to read the next piece of data for data matching, and returning to the step B.
As a further optimization, the data matching refers to matching definitions of columns in which each data is located one by one: if the column of the data is the order date or the planned delivery date, the type of the data is the date type; if the data is listed as a customer name, a customer code or a product material code, the type of the data is a character string type; if the data is listed as a tax-containing order or product quantity or tax-containing amount, the type of the data is a digital type.
As a further optimization, in step D, if the character string is in a date format, the input data is converted into the date format by using a strtotime method.
As a further optimization, the unique fields are derived from data tables, and one unique field uniquely corresponds to one item of data in the data tables.
As a further optimization, step a further includes:
before a system imports a table, firstly, the table to be imported is specified, the table header content and data in the table are required to be the same as the table header content and data required by a back-end service, then, a table sequence number column is added, the sequence number value of each row of data is set, and the sequence number value of each row of each table is unique.
The invention has the beneficial effects that:
1) the automatic and efficient importing of the form data of the information system is realized, and the problems that the manual importing period is long and mistakes are easy to occur are avoided.
2) Through the design of unique fields, the data of the table import database and the data of the data table are ensured to be in one-to-one correspondence, and the repeated import can be modified.
3) And the various date formats are distinguished and converted into the unified date format, so that the normalized automatic import of the data of the form is realized, and the analysis and the processing of subsequent services are facilitated.
4) And the various digital types are distinguished and converted into effective numbers, so that the automatic import of the data standardization of the table is realized, and the analysis and the processing of subsequent services are facilitated.
Drawings
FIG. 1 is a flow chart of a method for importing table data based on a BS architecture according to the present invention.
Detailed Description
The invention aims to provide a table data importing method based on a BS (base station) architecture, which solves the problems of long importing period and high possibility of errors in the traditional technology of manually importing table data.
The form data importing method based on the BS framework is applied to an information system of the BS framework, the information system of the BS framework comprises a front-end display part, a rear-end service part and a database part, and the front-end display part refers to a display page and a control interface which are seen by a user through a browser; the background service runs in the server to complete the realization of background service logic; the database realizes the effective storage and reading of data.
When the table data import is realized by using the information system of the BS framework, firstly, the table to be imported is specified, the header content and the data are the same as the header content and the data required by the back-end service, a table sequence number column is added, the sequence number value of each row of data is set, and each row of sequence number value of each table is unique; and then logging in an information management system, clicking an uploading file on a corresponding front-end display page, selecting a form to be imported, clicking the form to be imported, and completing the import of form data. And the back end finishes effective reading and storage of data according to a designed program and a related algorithm.
The background refers to fig. 1 for the import processing flow of the table data, and the method includes the following steps:
A. when the system imports the form, firstly judging the validity of the form according to the header information and the number, if the form is valid, reading a piece of data and entering data matching, entering the step B, otherwise, reporting an error, and ending the process;
B. judging the data type according to the data matching result, if the data type is a character string and the data item is also the character string, directly storing the read data, and entering a step K; if the data type is date, entering step C, and if the data type is number, entering step H;
C. judging whether the input data is in a date format, if so, directly storing the data, and entering a step K; if not, entering step D;
D. judging whether the input data is in a character string date format, if so, converting the input data into the date format, then storing the data, and entering the step K, otherwise, entering the step E;
E. judging whether the character string contains a date, if not, the date data is empty, storing the character string in remark information, and entering a step K; if the character string contains a date, entering step F;
F. judging whether effective dates can be extracted according to dates in the character strings, if not, setting the dates to be null, storing the character strings in remark information, and entering a step K; if the effective date can be extracted, entering a step G;
G. extracting effective dates, storing the character strings in remark information, and entering a step K;
H. judging whether the input data is a valid number, if so, storing the data, entering a step K, otherwise, judging that the input data is character string data, and entering a step I;
I. judging whether the character string data is a calculation formula character string or not, if not, setting the data to be null, storing the character string data in remark information, and entering a step K; if the character string is a calculation formula character string, entering a step J;
J. extracting numbers and operators in the character string formula, modeling the mathematical formula according to the numbers and the operators, obtaining data according to the mathematical formula, storing the data, and entering a step K;
K. searching corresponding data in a database through the unique field of the input data, judging whether the corresponding data can be found, if so, updating the corresponding data in the database, and entering the step L, otherwise, inserting the input data into the database, and entering the step L;
and L, judging whether the data table import is finished or not, if so, finishing the flow, otherwise, returning to read the next piece of data for data matching, and returning to the step B.
In the above step flow, the data matching refers to matching definitions of columns in which each data is located one by one: if the column of the data is the order date or the planned delivery date, the type of the data is the date type; if the data is listed as a customer name, a customer code or a product material code, the type of the data is a character string type; if the data is listed as a tax-containing order or product quantity or tax-containing amount, the type of the data is a digital type.
The unique field is a field which cannot be repeated in the database storage, and is equivalent to a data ID, unique corresponding data can be found through the unique field, the design rule of the unique field is 'client code _ data serial number', the client code and the serial number are connected by using '_', the data serial number is not a serial number automatically generated/displayed by a form, but a manually added number serial number, and the serial number is unique in a form, so that the data serial number cannot be changed even if the form is inserted into the data serial number.
Searching corresponding data in a database through the Unique field, if the Unique field is found, updating corresponding data of the database, and then finishing the addition of one piece of data, wherein the Unique field indicates that the data is added; if not, the piece of data is inserted into the database. Through the design of unique field, and the unique field data comes from the form data, the modification and repeated import of the data can be realized, the data can also be exported and then imported after being processed, and the valid data is always the only valid data.
Claims (5)
1. The table data importing method based on the BS architecture is applied to an information system of the BS architecture, and is characterized by comprising the following steps:
A. when the system imports the form, firstly judging the validity of the form according to the header information and the number, if the form is valid, reading a piece of data and entering data matching, entering the step B, otherwise, reporting an error, and ending the process;
B. judging the data type according to the data matching result, if the data type is a character string and the data item is also the character string, directly storing the read data, and entering a step K; if the data type is date, entering step C, and if the data type is number, entering step H;
C. judging whether the input data is in a date format, if so, directly storing the data, and entering a step K; if not, entering step D;
D. judging whether the input data is in a character string date format, if so, converting the input data into the date format, then storing the data, and entering the step K, otherwise, entering the step E;
E. judging whether the character string contains a date, if not, the date data is empty, storing the character string in remark information, and entering a step K; if the character string contains a date, entering step F;
F. judging whether effective dates can be extracted according to dates in the character strings, if not, setting the dates to be null, storing the character strings in remark information, and entering a step K; if the effective date can be extracted, entering a step G;
G. extracting effective dates, storing the character strings in remark information, and entering a step K;
H. judging whether the input data is a valid number, if so, storing the data, entering a step K, otherwise, judging that the input data is character string data, and entering a step I;
I. judging whether the character string data is a calculation formula character string or not, if not, setting the data to be null, storing the character string data in remark information, and entering a step K; if the character string is a calculation formula character string, entering a step J;
J. extracting numbers and operators in the character string formula, modeling the mathematical formula according to the numbers and the operators, obtaining data according to the mathematical formula, storing the data, and entering a step K;
K. searching corresponding data in a database through the unique field of the input data, judging whether the corresponding data can be found, if so, updating the corresponding data in the database, and entering the step L, otherwise, inserting the input data into the database, and entering the step L;
and L, judging whether the data table import is finished or not, if so, finishing the flow, otherwise, returning to read the next piece of data for data matching, and returning to the step B.
2. The BS-architecture-based table data import method of claim 1, wherein the data matching refers to matching definitions of columns in which each data is located one by one: if the column of the data is the order date or the planned delivery date, the type of the data is the date type; if the data is listed as a customer name, a customer code or a product material code, the type of the data is a character string type; if the data is listed as a tax-containing order or product quantity or tax-containing amount, the type of the data is a digital type.
3. The BS architecture-based tabular data import method of claim 1, wherein in step D, if it is a string date format, the strtotime method is used to convert the input data into a date format.
4. The BS-based tabular data import method of claim 1, wherein the unique fields are derived from data tables, and wherein a unique field uniquely corresponds to a data in a data table.
5. The BS-architecture-based tabular data importing method of claim 1, wherein in step a, further comprising: before a system imports a table, firstly, the table to be imported is specified, the table header content and data in the table are required to be the same as the table header content and data required by a back-end service, then, a table sequence number column is added, the sequence number value of each row of data is set, and the sequence number value of each row of each table is unique.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811090224.0A CN109241167B (en) | 2018-09-18 | 2018-09-18 | Table data importing method based on BS framework |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811090224.0A CN109241167B (en) | 2018-09-18 | 2018-09-18 | Table data importing method based on BS framework |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109241167A CN109241167A (en) | 2019-01-18 |
CN109241167B true CN109241167B (en) | 2022-03-25 |
Family
ID=65058139
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811090224.0A Active CN109241167B (en) | 2018-09-18 | 2018-09-18 | Table data importing method based on BS framework |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109241167B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111737404A (en) * | 2020-06-26 | 2020-10-02 | 豆盟(北京)科技股份有限公司 | Data processing method, device, equipment and computer storage medium |
CN114861614A (en) * | 2022-03-01 | 2022-08-05 | 重庆波谷信息技术有限公司 | Method and device for filling data, electronic equipment and medium |
CN116029271B (en) * | 2023-02-01 | 2023-06-13 | 南京维拓科技股份有限公司 | Method for importing tree-type structure data in batches based on easy excel |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7010360B2 (en) * | 2003-11-20 | 2006-03-07 | International Business Machines Corporation | Automatic conversion of dates and times for messaging |
CN1862522A (en) * | 2005-09-14 | 2006-11-15 | 华为技术有限公司 | Data checking apparatus and checking method |
CN103246651A (en) * | 2012-02-02 | 2013-08-14 | 金蝶软件(中国)有限公司 | Method and system for data inputting |
CN106874243A (en) * | 2016-12-21 | 2017-06-20 | 武汉斗鱼网络科技有限公司 | Formula processing method and device based on character string |
CN107436872A (en) * | 2016-05-25 | 2017-12-05 | 阿里巴巴集团控股有限公司 | A kind of processing method and processing device of isomeric data |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6507682B2 (en) * | 2015-01-30 | 2019-05-08 | 富士通株式会社 | Encoding program, encoding method and encoding apparatus |
-
2018
- 2018-09-18 CN CN201811090224.0A patent/CN109241167B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7010360B2 (en) * | 2003-11-20 | 2006-03-07 | International Business Machines Corporation | Automatic conversion of dates and times for messaging |
CN1862522A (en) * | 2005-09-14 | 2006-11-15 | 华为技术有限公司 | Data checking apparatus and checking method |
CN103246651A (en) * | 2012-02-02 | 2013-08-14 | 金蝶软件(中国)有限公司 | Method and system for data inputting |
CN107436872A (en) * | 2016-05-25 | 2017-12-05 | 阿里巴巴集团控股有限公司 | A kind of processing method and processing device of isomeric data |
CN106874243A (en) * | 2016-12-21 | 2017-06-20 | 武汉斗鱼网络科技有限公司 | Formula processing method and device based on character string |
Also Published As
Publication number | Publication date |
---|---|
CN109241167A (en) | 2019-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107168940B (en) | Report generation system and method | |
CN109241167B (en) | Table data importing method based on BS framework | |
US11797503B2 (en) | Systems and methods for enhanced mapping and classification of data | |
US20100280990A1 (en) | Etl for process data warehouse | |
US20050080755A1 (en) | System for getting conversion rules | |
US8019759B2 (en) | Conversion of data from a first file type to a second file type for use by a telecommunications equipment inventory system | |
CN106844320B (en) | Financial statement integration method and equipment | |
CN110990403A (en) | Business data storage method, system, computer equipment and storage medium | |
CN111598535A (en) | Basic material importing method and system and computer equipment | |
CN109636303B (en) | Storage method and system for semi-automatically extracting and structuring document information | |
Walton et al. | A cost analysis of transcription systems | |
US20070282804A1 (en) | Apparatus and method for extracting database information from a report | |
CN113342921A (en) | Resource cataloging method and device | |
CN116303641B (en) | Laboratory report management method supporting multi-data source visual configuration | |
CN117708102A (en) | Intelligent matching and checking method for data standard | |
CN111242751A (en) | Express order updating method, device, equipment and storage medium | |
CN101635711B (en) | Programmable character communication method | |
CN116227454A (en) | Universal automatic report generation method and system | |
CN114979251B (en) | Cross-system collaborative service heterogeneous data exchange system | |
US20100023517A1 (en) | Method and system for extracting data-points from a data file | |
CN116010439A (en) | Visual Chinese SQL system and query construction method | |
CN115587098A (en) | Method and system for intelligently identifying chart data | |
CN115713309A (en) | Internal auditing system | |
CN113674115B (en) | University data management auxiliary system and method based on data management technology | |
CN109815297A (en) | A kind of tree access arithmetic system not depending on relational database |
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 | ||
CB02 | Change of applicant information |
Address after: 621000 Sichuan Ailian Technology Co., Ltd Applicant after: Sichuan Ailian Technology Co., Ltd Address before: 621000 Mianyang city of Sichuan Province, Sichuan Industrial Park, love science and Technology Co. Applicant before: SICHUAN AI-LINK TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |