CN112905681A - Data conversion method - Google Patents

Data conversion method Download PDF

Info

Publication number
CN112905681A
CN112905681A CN202110177430.0A CN202110177430A CN112905681A CN 112905681 A CN112905681 A CN 112905681A CN 202110177430 A CN202110177430 A CN 202110177430A CN 112905681 A CN112905681 A CN 112905681A
Authority
CN
China
Prior art keywords
data
type
configuration
database
form control
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
CN202110177430.0A
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.)
Shanghai Yixiao Information Technology Co ltd
Original Assignee
Shanghai Yixiao Information 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 Shanghai Yixiao Information Technology Co ltd filed Critical Shanghai Yixiao Information Technology Co ltd
Priority to CN202110177430.0A priority Critical patent/CN112905681A/en
Publication of CN112905681A publication Critical patent/CN112905681A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data conversion method, which converts data of a database structure into data of a form control structure and converts the data of the form control structure into data of a unified database structure, so that configuration information stored in a database can be normally used on different form controls, and information of different structures input in different form controls by a user is stored in the database in the same data structure. The invention has the beneficial effects that: the efficiency of data conversion is improved, the flexibility is higher, and new form controls can be expanded rapidly.

Description

Data conversion method
Technical Field
The present invention relates to data structures and databases, and more particularly, to a data conversion method.
Background
Many types of form controls are included in most form engines, for example, there are 22 types in my form engine, and also in extensions. The configuration information of each form control is stored in the same table in the database, and the structure is consistent. The configuration information data structure that the form control needs to accept at the UI layer is not consistent with the configuration information data structure stored in the database, for example:
data structure of single item selection configuration information stored in database
options [ { optId:1, optValue: 'apple', optUrl: null, beingDefault: true }, { optId:2, optValue: 'Banana', optUrl: null, beingDefault: false } ]
Data structure of configuration information required for single item selection UI control
options [ { value:1, label: 'apple' }, { value:2, label: 'banana' } ]
The scheme designs and realizes a data conversion method, so that the configuration information stored in the database can be normally used on various different form controls, the information input by a user in the form controls is stored in the database in the same data structure, and new form controls can be rapidly expanded.
Disclosure of Invention
In order to solve the above technical problem, the present invention discloses a data conversion method, and the technical solution of the present invention is implemented as follows:
the data conversion method converts the data of the database structure into the data of the form control structure and converts the data of the form control structure into the data of the unified database structure, so that the configuration information stored in the database can be normally used on different form controls, and the information of different structures input by a user in different form controls is stored in the database in the same data structure.
Preferably, the step of converting the data of the database structure into the data of the form control structure is as follows:
s1, acquiring the configuration information of all form controls from the database;
s2, acquiring BaseOptions common to all form controls from the configuration;
s3, judging the type of the form control;
s4, acquiring unique configuration information of the form controls according to the form control types, converting and saving in options;
s5, generating configuration information unique to the form controls through the BaseOptions of S2 and the OptinalOptions of S4;
s6, the UI layer of the form control is initialized according to the unique configuration information.
Preferably, the step of converting the data of the form control structure into the data of the database structure is as follows:
s7, acquiring all data in the form control;
s8, judging the type of the form control;
s9, converting the data into data of a database structure according to the form control type;
and S10, storing the converted data into a database.
Preferably, the form control types include a text input type, a form type, a selection type, a time type, and an address type.
Preferably, the types of data include a character type, an array type, a file type, an address type, a location type, and a table type.
Preferably, in the form control types, selecting type generation option information; the date type generates a date format and a date range configuration; generating address format configuration and address range configuration by the address type; generating a verification configuration and a word number limiting configuration by the text type; the table type generates a child control configuration and a table row number configuration.
Preferably, the verification configuration includes a mobile phone verification, a mailbox verification and a link verification.
By implementing the technical scheme of the invention, the technical problems that the enterprise form control data can not be mutually converted or the conversion efficiency is low, the working efficiency is influenced and the management cost is high in the prior art can be solved; by implementing the technical scheme of the invention, the configuration information stored in the database can be normally used on various different form controls, the information input by the user in the form controls is stored in the database in the same data structure, and new form controls can be rapidly expanded by using the data conversion method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only one embodiment of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
In which like parts are designated by like reference numerals. It should be noted that the terms "front," "back," "left," "right," "upper" and "lower" used in the following description refer to directions in the drawings, and the terms "bottom" and "top," "inner" and "outer" refer to directions toward and away from, respectively, the geometric center of a particular component.
FIG. 1 is a simplified flow diagram of the conversion of data from a database structure to a form control structure;
FIG. 2 is a simplified flow chart of data transformation from a form control structure to a database structure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
In a specific embodiment, as shown in fig. 1 and fig. 2, a data conversion method converts data of a database structure into data of a form control structure and converts data of the form control structure into data of a unified database structure, so that configuration information stored in a database can be normally used on different form controls, and information of different structures input by a user in different form controls is stored in the database in the same data structure.
The steps of converting the data of the database structure into the data of the form control structure are as follows:
acquiring configuration information of all form controls from a database to initialize form configuration;
traversing the form control configuration information, and converting and storing part of configuration information common to all controls in a local variable BaseOptions;
acquiring the BaseOptions common to all form controls from the configuration: traversing the form control configuration information, and converting and storing part of configuration information common to all controls in a local variable BaseOptions;
judging the type of the form control;
acquiring unique configuration information of the form controls according to the types of the form controls, and converting and storing the unique configuration information in options; the form control types comprise a text input type, a form type, a selection type, a time type and an address type;
selecting the type to generate option information, and providing the option information for the UI control to select;
the date type generates a date format and a date range configuration;
generating address format configuration and address range configuration by the address type;
generating and checking configuration (mobile phone checking, mailbox checking and link checking) and word number limiting configuration for text types;
and generating a sub control configuration and a table line number configuration by the table type.
Combining the BaseOptions and the optional Options to generate configuration information required by a UI layer of a form control;
the UI layer of the form control is initialized according to the unique configuration information.
The steps of converting the data of the form control structure into the data of the database structure are as follows:
acquiring all form control data in the form as a data source, and performing conversion processing;
traversing form control data, and converting data input by a user into consistent data types acceptable at the back end according to different control types;
judging the type of the form control;
converting the data into data of a database structure according to the form control type:
the character type control data directly takes the character value to return;
the data of the array type control acquires the option id of the selected option and returns an id array;
the uploaded file type control acquires a file resource link of the uploaded file and returns the file resource link;
the address type control acquires the values of all levels of options, adds comma separation and returns an address character string;
the positioning type control acquires a positioned address and returns an address character string;
the form type control will loop through each row of the form, each control, and return a two-dimensional array of form control values.
And finally, storing the converted data into a database.
The present embodiment provides a user interface for a user to interact with a database system by converting user-entered data into consistent, backend-acceptable database format types based on different control types,
it should be understood that the above-described embodiments are merely exemplary of the present invention, and are not intended to limit the present invention, and that any modification, equivalent replacement, or improvement made without departing from the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (7)

1. A method of data conversion, characterized by: the data of the database structure is converted into the data of the form control structure and the data of the form control structure is converted into the data of the unified database structure, so that the configuration information stored in the database can be normally used on different form controls, and the information of different structures input by a user in different form controls is stored in the database in the same data structure.
2. A data conversion method according to claim 1, characterized in that: the steps of converting the data of the database structure into the data of the form control structure are as follows:
s1, acquiring the configuration information of all form controls from the database;
s2, acquiring BaseOptions common to all form controls from the configuration;
s3, judging the type of the form control;
s4, acquiring unique configuration information of the form controls according to the form control types, converting and saving in options;
s5, generating configuration information unique to the form controls through the BaseOptions of S2 and the OptinalOptions of S4;
s6, the UI layer of the form control is initialized according to the unique configuration information.
3. A data conversion method according to claim 2, characterized in that: the steps of converting the data of the form control structure into the data of the database structure are as follows:
s7, acquiring all data in the form control;
s8, judging the type of the form control;
s9, converting the data into data of a database structure according to the form control type;
and S10, storing the converted data into a database.
4. A data conversion method according to claim 3, characterized in that: the form control types include a text entry type, a form type, a selection type, a time type, and an address type.
5. A data conversion method according to claim 4, characterized in that: the types of the data comprise a character type, an array type, a file type, an address type, a positioning type and a table type.
6. A data conversion method according to claim 5, characterized in that: selecting a type to generate option information in the form control types; the date type generates a date format and a date range configuration; generating address format configuration and address range configuration by the address type; generating a verification configuration and a word number limiting configuration by the text type; the table type generates a child control configuration and a table row number configuration.
7. A data conversion method according to claim 6, characterized in that: the verification configuration comprises mobile phone verification, mailbox verification and link verification.
CN202110177430.0A 2021-02-09 2021-02-09 Data conversion method Pending CN112905681A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110177430.0A CN112905681A (en) 2021-02-09 2021-02-09 Data conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110177430.0A CN112905681A (en) 2021-02-09 2021-02-09 Data conversion method

Publications (1)

Publication Number Publication Date
CN112905681A true CN112905681A (en) 2021-06-04

Family

ID=76123037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110177430.0A Pending CN112905681A (en) 2021-02-09 2021-02-09 Data conversion method

Country Status (1)

Country Link
CN (1) CN112905681A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852825A (en) * 1994-12-05 1998-12-22 Trimble Navigation Limited Form data message formatting method, program and system
CN104182226A (en) * 2014-08-21 2014-12-03 北京勤哲软件技术有限责任公司 General mobile information system adaptation method and device
CN105912517A (en) * 2016-03-31 2016-08-31 深圳市八零年代网络科技有限公司 Data structure supporting design of flexible forms and conversion method and system thereof
CN106446116A (en) * 2016-09-18 2017-02-22 深圳麦亚信科技股份有限公司 Business rule parameter interaction method and business rule parameter interaction device applied to rule engine
CN109783555A (en) * 2018-12-13 2019-05-21 东软集团股份有限公司 Form templat storage method, device, storage medium and electronic equipment
CN109918370A (en) * 2019-01-24 2019-06-21 西安交通大学 A kind of development approach and system of the configurable forms application front end based on WEB
CN111897817A (en) * 2020-07-23 2020-11-06 苏州创腾软件有限公司 Visual form configuration method, device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852825A (en) * 1994-12-05 1998-12-22 Trimble Navigation Limited Form data message formatting method, program and system
CN104182226A (en) * 2014-08-21 2014-12-03 北京勤哲软件技术有限责任公司 General mobile information system adaptation method and device
CN105912517A (en) * 2016-03-31 2016-08-31 深圳市八零年代网络科技有限公司 Data structure supporting design of flexible forms and conversion method and system thereof
CN106446116A (en) * 2016-09-18 2017-02-22 深圳麦亚信科技股份有限公司 Business rule parameter interaction method and business rule parameter interaction device applied to rule engine
CN109783555A (en) * 2018-12-13 2019-05-21 东软集团股份有限公司 Form templat storage method, device, storage medium and electronic equipment
CN109918370A (en) * 2019-01-24 2019-06-21 西安交通大学 A kind of development approach and system of the configurable forms application front end based on WEB
CN111897817A (en) * 2020-07-23 2020-11-06 苏州创腾软件有限公司 Visual form configuration method, device and system

Similar Documents

Publication Publication Date Title
CN105487864A (en) Method and device for automatically generating code
CN103020158A (en) Report form creation method, device and system
CN105760534A (en) User-defined serializable data structure, hadoop cluster, server and application method thereof
CN106547729B (en) A kind of dynamic creation method and system of data sheet
WO2018210096A1 (en) Rule engine-based rule configuration method, terminal and device, and storage medium
CN113721892A (en) Domain modeling method, domain modeling device, computer equipment and storage medium
CN113467972B (en) Communication interface construction method and device, computer equipment and storage medium
CN106453536A (en) Network request processing method and system and server
CN101146281A (en) A GUI creation model for mobile terminal
CN111488332B (en) AI service opening middle platform and method
CN110968579B (en) Execution plan generation and execution method, database engine and storage medium
CN111221522A (en) Automatic code generation method of front-end and back-end separation architecture for government intensive application development
CN111506621A (en) Data statistical method and device
CN113821565B (en) Method for synchronizing data by multiple data sources
CN111435347A (en) Efficient expansion method and system for relational table in database
CN107229670A (en) Conventional data serializing and unserializing method based on Avro
US20030041071A1 (en) Database Management system and database
CN112860256A (en) Visual configuration system and method for Linux kernel device tree
CN107146095A (en) Exhibition information processing method, device and the mailing system of a kind of mail
CN110502645A (en) Information query method and device
CN112905681A (en) Data conversion method
CN108399251A (en) A kind of Intelligence Generator and data exhibiting process that multi-layer data shows
CN114328492B (en) Data processing method and related device for enterprise application integration
CN113407749B (en) Picture index construction method and device, electronic equipment and storage medium
CN108664604B (en) Method for realizing minimum data splitting storage and service calling presentation

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: 20210604