Structured data entry method based on configurable template
By splitting the business documents into basic information and data entry parts, and using a configurable template injecting the data model, the problems of high development costs of business data entry and difficulty in modifying applications in the existing technology are solved, and the separation of business data management and software system functional design is achieved, the development and implementation costs are reduced, and the stability of applications is improved.
Patent Information
- Application Number
- CN202311756760.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-06-20
AI Technical Summary
The existing technology requires a lot of development work and database table design in the development of client application for business data entry, resulting in high development costs, difficult application modification and maintenance, and the separation of business data management and software system functional design cannot be achieved.
By splitting the business documents into the basic information part of the document and the data entry part, the one-dimensional data model and the two-dimensional data model are abstracted, and the data model is injected into the corresponding input view through a configurable template to form a data entry interface. When storing data, use a data converter to store data and templates into the database. When data is loaded, the template is loaded first and then the data is loaded to ensure that the template changes do not affect the display and analysis of historical data.
The template configuration and storage of business data entry are realized, and the separation of applications and business data are made universal, reducing the workload and code of developers, reducing development and implementation costs, and improving the stability and maintainability of applications.
Smart Images

Figure CN120179626A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of client application development for structured data entry, and realizes the configurable implementation of data entry for business documents containing multiple one-dimensional and two-dimensional data. It realizes the functions of decomposing document data, automatically generating a template-configured data entry interface, and subsequent data loading. Background Art
[0002] In the development of client applications for business data entry, many applications design relevant data tables according to different business documents, and then develop relevant business data entry interfaces, which have been widely used. This method enables each data unit to be stored and implemented through relevant database tables, requiring a large amount of development work. Although it is relatively easy to implement, it requires the technical support of developers. After designing the business document, it is necessary to continuously increase the design of data tables for storing data, and develop relevant entry and storage functions. For the front-end and back-end applications developed for specific businesses, the function usage has limitations and is limited to the business data documents specified by customers. When the business data documents change, it is necessary to continuously modify the code and continuously upgrade and release the business program.
[0003] This method requires software technicians to engage in a large amount of design and development work for various business forms, increasing the input of development and operation and maintenance personnel. At the same time, this method requires relevant design and development for different businesses, without separating the business from the software functions, resulting in developers participating in a large amount of business function design, unable to separate business data management from software system function design, unable to achieve the business division of labor between development and implementation, and causing developers to engage in a large amount of design and modification work for business data entry. At the same time, the design and application development of a large number of database tables make the application development project huge. For some program problems, a large number of code files need to be modified. The application program is difficult to modify and debug, with a large amount of workload, the application program is unstable, and the development and implementation costs of the project are increased. Summary of the Invention
[0004] Aiming at the above-mentioned current technical deficiencies, the present invention classifies the business document data involved by developers, splits the business documents into a basic document information part and a data entry part. The basic document information is designed according to the actual business documents. For the data entry part, two unit data models are abstracted: a one-dimensional data model and a two-dimensional data model. Through a configured template, different model data are respectively injected into the input view units of their respective types to form a data input view, and customers can directly enter business data into the relevant management interface. When storing, through a data converter, the data information and the template are stored in the database. When loading data, the template is loaded first and then the data is loaded, and the data is displayed through a view converter, so as to ensure that the change of the template does not affect the display and analysis of historical data.
[0005] The technical solution adopted by the present invention to achieve the above object is: a structured data entry method based on a configurable template, comprising the following steps:
[0006] A basic template configuration layer that splits the entire business data into the smallest unit of input data for structure configuration: classifies the data structure according to the data entry method, defines the interface input information, and forms the rule information of the basic template; the basic template includes a one-dimensional data template and a two-dimensional data template;
[0007] A data template configuration layer that constructs the data structure to be entered through the basic template, selects a plurality of one-dimensional data templates and two-dimensional data templates to form a data template for business information;
[0008] A parser, including a one-dimensional data template parser and a two-dimensional data template parser; used to inject the input data of the basic template configuration layer into the data view unit for view loading and parsing; the one-dimensional data template parser and the two-dimensional data template parser respectively receive the one-dimensional data template and the two-dimensional data template, and parse each rule information of the basic template one by one. Each basic template generates an input view, thereby forming the business data input view of the entire document;
[0009] A data storage unit that parses the data entered in the business data input view according to the rule information of the basic template, forms the stored data information, stores the data information in a relational database, and at the same time stores the data template of the business data input view in the relational database in the form of a Json text for solidifying the data template to prevent data from being unable to be converted and entered when the data template changes.
[0010] The basic template configuration layer performs the following steps:
[0011] Template Classification: Determine whether the template is a one-dimensional data template or a two-dimensional data template, and select a matching data view unit when injecting data into the data view unit;
[0012] Set Basic Data Attributes: Define the category of the data, the default value of the data, and the number of entries;
[0013] Constraint Value Setting: Specify the standard limit value and warning value, which are used to view the data change trend during business data, and perform real-time warning on the data entered by the user through the warning value;
[0014] Data Calculation Type: Specify the processing method of business data, which is used to calculate the processing value of this part of business data, and the supported processing types of business data include at least one of mean, range, maximum, minimum, and summation.
[0015] The basic template includes multiple one-dimensional data templates and multiple two-dimensional data templates.
[0016] The data view unit includes: a one-dimensional data view unit and a two-dimensional data view unit, which are respectively configured with a one-dimensional data template parser and a two-dimensional data template parser. This part is the user interface for entering business data.
[0017] The data converter includes a one-dimensional data converter and a two-dimensional data converter, which are respectively used to convert the business data in the business data entry view. According to the rule information of the one-dimensional data template and the two-dimensional data template, the business data is converted into storable entity data, and through the mapping relationship between the entity and the relational database, the underlying service is called to store the entity data into the relational database.
[0018] A structured data entry system based on a configurable template, including:
[0019] Basic Template Configuration Layer, which is used to split the entire business data into the smallest unit of entry data for structure configuration: classify the data structure according to the data entry method, define the interface entry information, and form the rule information of the basic template; the basic template includes a one-dimensional data template and a two-dimensional data template;
[0020] Data Template Configuration Layer, which is used to build the data structure to be entered through the basic template, select multiple one-dimensional data templates and two-dimensional data templates, and form the data template of business information;
[0021] A parser, including a one-dimensional data template parser and a two-dimensional data template parser, is used to inject the input data in the basic template configuration layer into the data view unit for view loading and parsing. The one-dimensional data template parser and the two-dimensional data template parser respectively receive a one-dimensional data template and a two-dimensional data template, and parse each rule information of the basic template one by one. Each basic template generates an input view, thereby forming a business data input view for the entire document.
[0022] A data storage unit is used to parse the data input in the business data input view according to the rule information of the basic template, form the stored data information, store the data information in a relational database, and at the same time store the data template of the business data input view in the relational database in the form of a Json text to solidify the data template to prevent data from not being convertible and input when the data template changes.
[0023] The present invention has the following beneficial effects and advantages:
[0024] 1. The present invention realizes the access of business data through an ORM framework, separates the document information and data information of business data based on an abstract template, and realizes the templatized configuration and storage of the data input function by modeling the data input part, so that the application program is separated from the business data, making the application program universal. Instead of designing the function of the data input part for each business document, it is completely applicable to the inherent data types: one-dimensional data model and two-dimensional data model. As long as the business data document can be decomposed into this type, the data input can be realized through this method.
[0025] 2. By this way, the business is abstracted into expandable units, enabling developers to only focus on the expansion and flexibility of the application program. The specific business data input function can be realized by implementers through the method of configuring templates. This separates the work of developers and implementers, frees developers from the format design work of various business data tables, reduces the code of the application program, forms the separation of business data management and development, and enables different business data documents to realize the input interface of business documents through model splitting and template configuration.
[0026] 3. By this way, it greatly reduces the personnel input structure and working mode in the implementation process of the software system, can reduce the development workload and shorten the business deployment cycle (the realization of business data input can be achieved only by implementers for configuration), and can greatly reduce the development and implementation costs of the application system.
[0027] 4. Through the unified modeling of data, not only can the rapid input of data be achieved, but also the operation and maintenance workload caused by a large amount of application code due to designing different table structures for different data structures can be reduced, the stability of the application program can be improved, and the code maintenance cost can be lowered. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 FIG. is an implementation architecture diagram of current typical business data input;
[0029] Figure 2 FIG. is an implementation architecture diagram of the input method of the present invention;
[0030] Figure 3 FIG. is a schematic diagram of a model entity;
[0031] Figure 4 FIG. is a schematic diagram of multiple one-dimensional data and multiple two-dimensional data models;
[0032] Figure 5 FIG. is an example diagram of a basic template;
[0033] Figure 6 FIG. is an effect diagram of one-dimensional data template injection;
[0034] Figure 7 FIG. is an effect diagram of two-dimensional data template injection;
[0035] Figure 8 FIG. is a data input interface based on data template loading;
[0036] Figure 9 FIG. is a template structured data query interface. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] The present invention will be further described in detail below with reference to the accompanying drawings and examples.
[0038] The present invention discloses a method for inputting structured data based on a configurable template. By abstractly classifying common structured data and forming basic templates of related typical structured data, structured data templates are combined based on the basic templates. According to the relevant rules of data template loading, the configured template data is injected into the view display unit one by one to form a visual interface for structured data input. In order not to affect the subsequent data loading and data analysis when the template changes, the data template will be stored in the structured data at the same time when storing the data. This method can abstract complex structured data into a combination of two types of basic templates:
[0039] 1. One-dimensional data template
[0040] The structured data has only column headers and no row headers, and multiple data can be input;
[0041] 2. Two-dimensional data template
[0042] Structured data has both row headers and column headers, and data is entered into the specified row and column space.
[0043] By configuring and combining basic templates, structured data templates can be formed to achieve the entry of common structured data.
[0044] The present invention is developed and implemented based on an object-oriented language, and can store various complex data in a database through data modeling, template configuration, template injection, view conversion, and storage conversion. The structured data entry method based on templates, as Figure 1 , Figure 2 shown, includes the following steps:
[0045] 1. Creation and mapping configuration of model entities. This part is used to construct the entities of the general template, and the basic template information can be stored through these model entities. The model entities are as Figure 3 shown.
[0046] 2. Splitting of document data models. This part splits the business data documents. Generally, the data structure may contain combinations of various forms of data. According to different data documents, the data is split into multiple one-dimensional and multiple two-dimensional data models that can be entered, as Figure 4 shown.
[0047] 3. Basic template configuration. In the visual configuration template interface in 1, the basic data templates of each template split in 2 are configured one by one through the foreground. For the specific visual configuration function, see Figure 5 .
[0048] 4. Assembly of data templates. Combine the basic data templates of the documents configured in 3 to form a complete document data template.
[0049] 5. Binding of data templates. Bind the management interface of the business document data to the corresponding data template to implement the data template of the complete business document data.
[0050] 6. Loading of the business data entry view. This part injects all the basic template data of the data template into the view display unit and the document part to form a data entry view. The effect diagram of the one-dimensional template entry view after injecting the template is shown in Figure 6 , and the effect diagram of the two-dimensional template entry view after injecting the template is shown in Figure 7 .
[0051] a) One-dimensional data view unit: All basic one-dimensional data templates are injected into the one-dimensional data view in a traversal manner. After being parsed by the parser, all one-dimensional data entry interfaces are formed. The parser analyzes the data item by item in the data template and converts the information into view units that can be entered according to the template rules.
[0052] b) Two-dimensional data view unit: All basic two-dimensional data templates are injected into the two-dimensional data view in a traversal manner. After being parsed by the parser, all two-dimensional data entry interfaces are formed. The function of the parser is the same as above.
[0053] 7. Data entry. Through the generated view entry interface, the document information is entered into the corresponding data entry positions according to the actual data. The entry loading interface formed by the template is as Figure 8 shown.
[0054] 8. Implement data processing. According to the configured rules, the entered raw data can be calculated and processed in real time, including trend viewing, warning prompts, and data secondary processing values. The data secondary processing value is the data processing value obtained by calculating in real time according to the calculation rules (mean, range, maximum value, minimum value, sum) configured in the template.
[0055] 9. Data storage. This part stores the entered data into the database. It is necessary to pass through a data converter (which converts the data in the view unit into relational data that can be stored according to relevant template rules), store the converted data into the database, and at the same time inject the relevant data templates into the business document in the format of Json to realize the binding of data and the corresponding template.
[0056] 10. Business data display. This part is the process of loading the stored data onto the front-end interface for display. It is necessary to pass through a data converter (the same as above) to convert the template into a view unit, and inject the relevant data of the Json template into the display view to view the relevant business document data. The data query interface is as Figure 9 shown.
[0057] 11. Business data analysis. This part analyzes the business data. The method of 10 can be adopted to parse and load the data through the data converter and the Json template, and then perform data analysis in different dimensions on the data.
Claims
1. A method for structured data entry based on a configurable template, characterized in that, It includes the following steps: The basic template configuration layer splits the entire business data into the smallest unit of input data for structure configuration: classifies the data structure according to the data input method, defines the interface input information, and forms the rule information of the basic template; the basic template includes a one-dimensional data template and a two-dimensional data template; The data template configuration layer builds the data structure of the data to be input through the basic template, selects multiple one-dimensional data templates and two-dimensional data templates, and forms the data template of the business information; The parser includes a one-dimensional data template parser and a two-dimensional data template parser; It is used to inject the input data of the basic template configuration layer into the data view unit for view loading and parsing; The one-dimensional data template parser and the two-dimensional data template parser respectively receive the one-dimensional data template and the two-dimensional data template, parse each rule information of the basic template one by one, and generate an input view for each basic template, so as to form the business data input view of the entire document; The data storage unit parses the data input through the business data input view according to the rule information of the basic template, forms the stored data information, stores the data information in the relational database, and at the same time stores the data template of the business data input view in the relational database in the form of Json text to solidify the data template to prevent data from not being convertible and input when the data template changes.
2. The method for structured data entry based on a configurable template according to claim 1, characterized in that, The basic template configuration layer performs the following steps: Template classification: Determine whether the template is a one-dimensional data template or a two-dimensional data template, and select a matching data view unit when injecting into the data view unit; Set the basic data attributes: Define the data category, data default value, and input quantity; Constraint value setting: Specify the standard limit value and warning value to view the data change trend during business data, and perform real-time warning on the data input by the user through the warning value; Data calculation type: Specify the processing method of the business data to calculate the processing value of this part of the business data, and the processing types supported for business data include at least one of mean, range, maximum value, minimum value, and summation.
3. The method for structured data entry based on a configurable template according to claim 1, characterized in that, The basic template contains multiple one-dimensional data templates and multiple two-dimensional data templates.
4. The method for structured data entry based on a configurable template according to claim 1, characterized in that, The data view unit includes: a one-dimensional data view unit and a two-dimensional data view unit, which are respectively configured with a one-dimensional data template parser and a two-dimensional data template parser, and this part is the user interface for inputting business data.
5. The method for structured data entry based on a configurable template according to claim 1, characterized in that, The data converter includes a one-dimensional data converter and a two-dimensional data converter, which are respectively used to convert the business data in the business data input view into storable entity data according to the rule information of the one-dimensional data template and the two-dimensional data template, and call the underlying service to store the entity data in the relational database through the mapping relationship between the entity and the relational database.
6. A system for structured data entry based on a configurable template, characterized in that, It includes: The basic template configuration layer is used to split the entire business data into the smallest unit of input data for structure configuration: classifies the data structure according to the data input method, defines the interface input information, and forms the rule information of the basic template; the basic template includes a one-dimensional data template and a two-dimensional data template; The data template configuration layer is used to build the data structure of the data to be entered through the basic template, select multiple one-dimensional data templates and two-dimensional data templates to form the data template of business information; The parser includes a one-dimensional data template parser and a two-dimensional data template parser; It is used to inject the input data of the basic template configuration layer into the data view unit for view loading and parsing; The one-dimensional data template parser and the two-dimensional data template parser respectively receive the one-dimensional data template and the two-dimensional data template, and parse the rule information of the basic template item by item. Each basic template generates an input view, so as to form the business data input view of the whole document; The data storage unit is used to parse the data entered in the business data input view according to the rule information of the basic template, form the stored data information, store the data information in the relational database, and store the data template of the business data input view in the relational database in the format of Json text to solidify the data template to prevent the data from being unable to be converted and entered when the data template changes.