CN117908876A - Method, device and equipment for generating system page under complex authority scene in government or enterprise informatization field based on model driving - Google Patents
Method, device and equipment for generating system page under complex authority scene in government or enterprise informatization field based on model driving Download PDFInfo
- Publication number
- CN117908876A CN117908876A CN202410045417.3A CN202410045417A CN117908876A CN 117908876 A CN117908876 A CN 117908876A CN 202410045417 A CN202410045417 A CN 202410045417A CN 117908876 A CN117908876 A CN 117908876A
- Authority
- CN
- China
- Prior art keywords
- page
- model
- component
- data
- information
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000013499 data model Methods 0.000 claims abstract description 85
- 230000003993 interaction Effects 0.000 claims abstract description 66
- 238000013507 mapping Methods 0.000 claims abstract description 66
- 238000006243 chemical reaction Methods 0.000 claims abstract description 39
- 230000000007 visual effect Effects 0.000 claims abstract description 24
- 238000010276 construction Methods 0.000 claims abstract description 16
- 230000006870 function Effects 0.000 claims abstract description 13
- 238000004458 analytical method Methods 0.000 claims description 19
- 238000012546 transfer Methods 0.000 claims description 17
- 238000012216 screening Methods 0.000 claims description 12
- 230000006399 behavior Effects 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 7
- 230000009466 transformation Effects 0.000 claims description 7
- 230000004931 aggregating effect Effects 0.000 claims description 4
- 230000000977 initiatory effect Effects 0.000 claims description 4
- 238000012544 monitoring process Methods 0.000 claims description 4
- 238000011161 development Methods 0.000 abstract description 29
- 230000004044 response Effects 0.000 abstract description 5
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000009877 rendering Methods 0.000 description 3
- 238000012827 research and development Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 2
- 238000003062 neural network model Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012800 visualization Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a system page generation method, a device and equipment based on model driven construction of complex authority scenes in the government or enterprise informatization field, wherein the method comprises the following steps: the method comprises the steps of obtaining a predefined application system model, generating a conversion rule engine for mapping page configuration information and page assembly information into a data structure based on a mapping relation of the data model and the page view model, converting the page view model into an actual visual page based on the page conversion rule engine, separating construction and interaction logic of the visual page, modifying and expanding interaction functions of the visual page, improving development efficiency, reducing code repeatability, reducing cost and efficiency, rapidly responding to service development, responding to service uncertainty at any time, and facilitating a developer to create an application program through a visual interface without writing a large amount of codes. Not only reduces the development time and cost, but also improves the development efficiency, and can improve the flexibility and the agility of response business under the condition of larger business demand.
Description
Technical Field
The application relates to the field of software development, in particular to a system page generation method, device and equipment based on model driven construction of complex authority scenes in the field of government affairs or enterprise informatization.
Background
In many government and enterprise application system building scenes, the iterative upgrading of the application system is fast, the requirements of clients on what you see is what you get are higher and higher, meanwhile, the government and enterprise business management system is increased in the digital transformation tide in a blowout mode, the uncertainty of business system requirements is more and more, the authority relationship is quite complex, the research and development period of the business system is long, and the research and development cost is high.
Most of the current implementation modes are constructed in a hard coding mode, and the custom research and development is performed to meet the business requirements of customers, wherein flexibility and agility cannot quickly respond to changeable business requirements.
Disclosure of Invention
In view of the above-mentioned drawbacks of the related art, the present application provides a method, an apparatus, and a device for generating a system page under a complex authority scenario in the field of creating government or enterprise informatization based on model driving, so as to solve the above-mentioned technical problems.
The application provides a system page generation method based on model driven construction of complex authority scenes in the government or enterprise informatization field, which comprises the following steps: obtaining a predefined application system model, wherein the application system model comprises: a data model and a page view model, the data model comprising a data structure, the page view model comprising page configuration information and page component information; generating a conversion rule engine for mapping page configuration information and page component information into the data structure based on the mapping relation between the data model and the page view model; according to interaction logic defined in the page view model, utilizing the page configuration information and the conversion rule engine to abstract the page view model structure to generate a page descriptive data structure; utilizing page component information and the conversion rule engine to abstract and generate a page component tree structure of a component hierarchy structure of the page view model; and forming a tree-shaped hierarchical link structure based on the page descriptive data structure and the page component tree structure by taking the page as a root node and the component as a leaf node, and generating target codes corresponding to the tree-shaped hierarchical link structure, so that a browser directly renders and generates a document based on the target codes, and a visualized page for generating the application system model is constructed.
In one embodiment of the present application, abstracting the page view model structure to generate the page descriptive data structure using the page configuration information and the transformation rule engine includes: extracting page information from the page configuration information, wherein the page information comprises a page name, a page size, a page style and a page type; determining a page structure according to the page configuration information, wherein the page structure comprises page layout, component arrangement and component nesting relation; and abstracting a page view model structure to generate a page descriptive data structure based on the page information, the page structure and the conversion rule engine, wherein the page descriptive data structure comprises a tree structure or a graph structure.
In one embodiment of the present application, abstracting the component hierarchy of the page view model into a page component tree structure using page component information and the transformation rules engine includes: extracting component data information from the page component information, wherein the component data information comprises a component name, a component type, a component position, a component size and a component style; determining a hierarchical structure of the component according to the component nesting relationship; and abstracting the component hierarchical structure through a conversion rule engine to generate a page component tree structure, wherein the page component tree structure comprises component positions, component sizes, component styles, component parent-child level relations, component model information and component linkage information.
In an embodiment of the present application, before generating the conversion rule engine for mapping the page configuration information and the page component information into the data structure based on the mapping relationship between the data model and the page view model, the method further includes: acquiring sample demand information, and analyzing attribute information of the data structure based on the sample demand information to obtain an attribute information analysis result; and according to a preset specification and a preset style, mapping and binding the component information of the page view model and the attribute information analysis result.
In an embodiment of the present application, after mapping and binding the component information of the page view model with the attribute information analysis result, the method further includes: receiving user demand information, comparing the user demand information with the sample demand information, if the comparison is inconsistent, analyzing the user demand information, determining a model adjustment target based on the analysis result, and rebinding the mapping relation between a page view model and a data model based on the model adjustment target so as to generate page content and a structure which accord with the user demand information; if the comparison is consistent, the current setting is maintained.
In one embodiment of the present application, the process of defining interaction logic in the page view model includes: defining necessary attributes and behaviors of a preset interaction component, and writing logic codes of the component according to the attributes and behaviors; or creating an event handler function based on the interaction event, and associating the event handler with the corresponding interaction event.
In one embodiment of the present application, the process of defining interaction logic in the page view model includes: determining an initial state of a page view model, setting an attribute value of the page view model according to the initial state, and binding a corresponding event monitor to an element in a page to define the initialization interaction logic; and/or creating a shell layer, wherein the shell layer comprises a modal box and a dialog box, setting the content and the style of the shell layer and monitoring a closing event of the shell layer to define page view model shell layer interaction logic; and/or determining transfer parameters, setting the transfer parameters in the data structure, and acquiring the transfer parameters in the visualized page to define a page view model context parameter transfer logic; and/or determining the type and the number of the components, creating events according to the type and the number of the components, and setting the attribute and the event monitor of the components to define the initialization interaction logic of the components in the page view model; and/or determining a linkage relation condition, and defining linkage operation based on the linkage relation condition to define a component linkage interaction logic in the page view model; and/or determining a source of the data model, initiating a data request, and returning data information based on the data request to define data model definition logic in the page view model.
In an embodiment of the present application, after obtaining the application system model, the method further includes: constructing entity data models by defining a main key and an external key, wherein the main key is a unique identifier of the entity data models and is used for uniquely identifying each entity data model, and the external key is used for establishing an association relation between the entity data models; and/or, aggregating, converting and integrating the data of different data sources according to the service requirements of the application system to construct a view data model conforming to the service requirements; and/or, based on preset scene data, associating the data model with the view model according to preset connection conditions and preset sequences to obtain an association model, screening the association model through preset screening conditions, and screening out a structured query language data model conforming to a preset scene; and/or setting corresponding interface data based on the service requirement of the application system, and generating an interface data model through the interface data; wherein, the business requirement comprises distributed transaction processing, message queue and asynchronous callback.
The application provides a system page generating device based on model driving under the complex authority scene in the government or enterprise informatization field, which comprises the following components: the acquisition module is used for acquiring a predefined application system model, and the application system model comprises: a data model and a page view model, the data model comprising a data structure, the page view model comprising page configuration information and page component information; the mapping module is used for generating a conversion rule engine for mapping the page configuration information and the page component information into the data structure based on the mapping relation between the data model and the page view model; the generation module is used for abstracting the page view model structure to generate a page descriptive data structure by utilizing the page configuration information and the conversion rule engine according to interaction logic defined in the page view model; utilizing page component information and the conversion rule engine to abstract and generate a page component tree structure of a component hierarchy structure of the page view model; the visual page construction module is used for forming a tree-shaped hierarchical link structure based on the page descriptive data structure and the page assembly tree structure by taking the page as a root node and taking the assembly as a leaf node, and generating target codes corresponding to the tree-shaped hierarchical link structure, so that a browser directly renders and generates a document based on the target codes to construct a visual page for generating the application system model.
The beneficial effects are that: the method comprises the steps of obtaining a predefined application system model, establishing a mapping relation between a data model and a page view model, generating a conversion rule engine for mapping page configuration information and page assembly information into a data structure based on the mapping relation between the data model and the page view model, converting the page view model into an actual visual page based on interaction logic defined in the page view model, separating the construction and interaction logic of the visual page, and modifying and expanding the functions of the visual page. Meanwhile, development efficiency can be improved, code repeatability can be reduced, cost and efficiency can be reduced, business development can be responded quickly, uncertainty of the business can be responded at any time, and a developer can conveniently create an application program through a visual interface without writing a large number of codes. Not only reduces the development time and cost, but also improves the development efficiency, and can improve the flexibility and the agility of response business under the condition of larger business demand.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
FIG. 1 is a flow chart of a system page generation method under a complex rights scenario in the field of building government or enterprise informatization based on model driven, as shown in an exemplary embodiment of the application;
FIG. 2 is a block diagram illustrating a system page generation apparatus in a complex rights scenario for building government or enterprise informatization domains based on model driven, in accordance with an exemplary embodiment of the present application;
Fig. 3 is a schematic structural view of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present application with reference to specific examples. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present application by way of illustration, and only the components related to the present application are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
It should be noted that, in the present application, "first", "second", and the like are merely distinguishing between similar objects, and are not limited to the order or precedence of similar objects. The description of variations such as "comprising," "having," etc., means that the subject of the word is not exclusive, except for the examples shown by the word.
It should be understood that the various numbers and steps described in this disclosure are for convenience of description and are not to be construed as limiting the scope of the application. The magnitude of the present application reference numerals does not mean the order of execution, and the order of execution of the processes should be determined by their functions and inherent logic.
In the following description, numerous details are set forth in order to provide a more thorough explanation of embodiments of the present application, it will be apparent, however, to one skilled in the art that embodiments of the present application may be practiced without these specific details, in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the embodiments of the present application.
The embodiment of the application provides a system page generation method based on a model driven to construct a complex authority scene in the government or enterprise informatization field, a system page generation device based on a model driven to construct a complex authority scene in the government or enterprise informatization field and an electronic device, wherein the embodiments are described in detail below.
Referring to fig. 1, fig. 1 is a schematic flow chart of a system page generating method in a complex authority scenario in the field of building government affairs or enterprise informatization based on model drivers according to an exemplary embodiment of the present application, and as shown in fig. 1, the system page generating method in the complex authority scenario in the field of building government affairs or enterprise informatization based on model drivers at least includes steps S110 to S140, which are described in detail as follows:
Step S110, a predefined application system model is obtained, wherein the application system model comprises: the data model comprises a data structure, and the page view model comprises page configuration information and page component information.
In one embodiment of the application, a computer application system, abbreviated as an application system; typically consisting of a computer hardware system, system software, application software. The basic hardware system of the computer consists of an arithmetic unit, a controller, a memory, a peripheral interface and peripheral equipment. The system software includes an operating system, a compiler, a database management system, various high-level languages, and the like. The application software is composed of general support software and various application software packages.
In one embodiment of the application, the data model includes a solid data model, a view data model, an SQL data model (Structured Query Language language data model), a dictionary data model, an API data model (interface data model).
In one embodiment of the application, the page component information of the page view model includes interface components, data models, time processors, layout information, style information, and scripts. Configuration information for the page view model includes view names, view paths, view functions, template engines, context data, response types, cache configurations, and view decorators.
Step S120, generating a conversion rule engine for mapping the page configuration information and the page component information into a data structure based on the mapping relationship of the data model and the page view model.
In one embodiment of the present application, a mapping manner of mapping each element in the page view model to a corresponding standard data structure of HTML (HyperText Markup Language ), CSS (CASCADING STYLE SHEETS cascading style sheet) or JavaScript code is defined in a mapping relationship between the data model and the page view model, where the element in the page view model includes a page title, a page layout, a content area or a footer, and the like.
In one embodiment of the application, the conversion rules engine may be used as a stand-alone service or library, through an API (Application Programming Interface application programming interface) or using a programming language; in actual use, the visual interface is created by the page translation rules engine.
Step S130, abstracting the page view model structure to generate a page descriptive data structure by using page configuration information and a conversion rule engine according to interaction logic defined in the page view model; and abstracting the component hierarchy of the page view model to generate a page component tree structure by using the page component information and the conversion rule engine.
In one embodiment of the application, the interaction logic comprises page view model initialization interaction logic, page view model elastic layer interaction logic, page view model context parameter transfer logic, page view model in-component initialization interaction logic, page view model in-component linkage interaction logic, page view model in-component data definition logic and the like, and in the embodiment, the interaction logic comprises button clicking and form submitting.
And step S140, using the page as a root node and the component as a leaf node, forming a tree-shaped hierarchical link structure based on the page descriptive data structure and the page component tree structure, and generating target codes corresponding to the tree-shaped hierarchical link structure, so that the browser directly renders and generates a document based on the target codes, and constructing a visualized page for generating an application system model.
In fig. 1, a mapping relationship between a data model and a page view model is established by acquiring a predefined application system model, a conversion rule engine for mapping page configuration information and page component information into a data structure is generated based on the mapping relationship between the data model and the page view model, interaction logic defined in the page view model is defined, and the page view model is converted into an actual visual page based on the page conversion rule engine, so that the construction and interaction logic of the visual page are separated, and functions of the visual page can be modified and expanded. Meanwhile, development efficiency can be improved, code repeatability can be reduced, cost and efficiency can be reduced, business development can be responded quickly, uncertainty of the business can be responded at any time, and therefore development of an application program through a visual interface can be facilitated for a developer without writing a large amount of codes. Not only reduces the development time and cost, but also improves the development efficiency, and can improve the flexibility and the agility of response business under the condition of larger business demand.
In one embodiment of the application, the method is applied to model driven construction of complex authority scenes in the field of government affairs or enterprise informatization, and visual pages are built.
In one embodiment of the application, before generating the conversion rule engine for mapping the page configuration information and the page component information into the data structure based on the mapping relation between the data model and the page view model, the method further comprises the steps of obtaining sample requirement information, and analyzing attribute information of the data structure based on the sample requirement information to obtain an attribute information analysis result; and according to the preset specification and the preset style, mapping and binding the component information of the page view model and the analysis result of the attribute information.
In one embodiment of the application, model mapping is typically used to map parameters or structures of one model to parameters or structures of another model in machine learning and deep learning. This may be a mapping between different models within the same framework, for example mapping parameters of one neural network model onto another neural network model, or a mapping between different frameworks, for example mapping parameters of a deep learning model onto a simpler model.
In one embodiment of the application, the sample requirement information comprises characteristics and requirements of a source model and a target model, the attribute information of the data structure is analyzed based on the sample requirement information, an attribute information analysis result is obtained, a corresponding mapping rule is determined, and the component information of the page view model and the attribute information analysis result are mapped and bound.
In one embodiment of the present application, after mapping and binding the component information of the page view model with the analysis result of the attribute information, the method further includes: receiving user demand information, comparing the user demand information with sample demand information, if the comparison is inconsistent, analyzing the user demand information, determining a model adjustment target based on an analysis result, and rebinding the mapping relation between the page view model and the data model based on the model adjustment target so as to generate page content and structure which accord with the user demand information; if the comparison is consistent, the current setting is maintained. Therefore, the workload of manual coding and debugging can be reduced, the possibility of human errors is reduced, the mapping is performed based on certain rules and algorithms, the possible errors during manual coding are avoided, the development speed is increased, the development efficiency is improved, the data structure and page view of an application system are clearer and more consistent, and the subsequent maintenance and upgrading are facilitated.
In one embodiment of the application, user demand information is received, the user demand information and sample demand information are compared, if the comparison is inconsistent, the user demand information is analyzed, real-time online adjustment of a model is determined based on an analysis result, a model adjustment target is obtained, and the mapping relation between a page view model and a data model is rebinding based on the model adjustment target, so that page content and structure which accord with the user demand information are generated. By performing online adjustment on the model, user feedback can be responded quickly. Therefore, user feedback is responded quickly according to the requirements and resources of the project, and user experience is improved.
In one embodiment of the application, user demand information is received, the user demand information and sample demand information are compared, if the comparison is inconsistent, the user demand information is analyzed, real-time online adjustment of the model is determined based on an analysis result, and after a model adjustment target is obtained, the model is modified according to the determined model adjustment target in a safe and isolated environment. This may involve parameter adjustment of the model, redesign of the algorithm, addition or deletion of functions, etc. By performing offline adjustment of the model adjustment targets, modifications can be safely made without affecting the existing operating environment.
In one embodiment of the application, the data model-page view mapping is established according to the application system model, and the method comprises two modes of automatic model mapping and model fine tuning mapping: the automatic model mapping mainly utilizes a data model driving technology, a system automatically analyzes attribute information of the data model to realize mapping binding of a page view model component and the data model, and a page conversion rule engine generates a page structure and contents meeting requirements according to preset specifications and preset styles; when the model fine adjustment mapping is mainly different from the customized demand, the model mapping relation can be rebinding and adjusted through the visual interface. The automatic model mapping and the model fine tuning mapping can reduce the workload of manual coding and debugging, reduce the possibility of human errors, map based on a certain rule and algorithm, avoid possible errors during manual coding, accelerate development speed, improve development efficiency, enable the data structure and page view of an application system to be clearer and more consistent, and facilitate subsequent maintenance and upgrading.
In one embodiment of the application, the abstract generation of the page view model structure into the page descriptive data structure using the page configuration information and the transformation rules engine comprises: extracting page information from the page configuration information, wherein the page information comprises page names, page sizes, page styles and page types; determining a page structure according to the page configuration information, wherein the page structure comprises page layout, component arrangement and component nesting relation; the page view model structure is abstracted to generate a page descriptive data structure based on the page information, the page structure and the conversion rule engine, wherein the page descriptive data structure comprises a tree structure or a graph structure.
In one embodiment of the application, the relationship between the structure and components of the page view model can be clearly represented by a tree structure or a graph structure. The tree structure can well express layering and nesting relations, can find the position and the level of a specific component in the whole page structure, and the graph structure can better represent global relations and the connection between components, so that the relation and the connection between any two components can be quickly found. And both the tree structure and the graph structure support various complex operations such as adding, deleting, looking up and updating components. These operations can be performed without changing the overall page structure, making development and maintenance more flexible and efficient, reducing data redundancy and errors. Meanwhile, the tree structure and the graph structure can support the development and application of an automation tool. For example, a template engine may be used to generate data for a tree structure or graph structure, and visualization tools may also be used to view and analyze page structures, so that the tree structure or graph structure can improve development efficiency, reduce maintenance costs, and enhance code reusability and maintainability.
In one embodiment of the application, utilizing the page component information and the transformation rules engine, abstracting the component hierarchy of the page view model into a page component tree structure comprises: extracting component data information from the page component information, wherein the component data information comprises a component name, a component type, a component position, a component size and a component style; determining a hierarchical structure of the component according to the component nesting relationship; the component hierarchy structure is abstracted to generate a page component tree structure through a conversion rule engine, wherein the page component tree structure comprises component positions, component sizes, component styles, component parent-child level relations, component model information and component linkage information.
In one embodiment of the application, the page transformation rule engine generates a page descriptive data structure according to page structure abstraction by utilizing page view model configuration information, wherein the data structure contains page basic information such as page name, page size, page style, page type, page initialization interaction logic and the like; utilizing the component information in the page view model, the page conversion rule engine abstracts and generates a page component tree structure according to a component hierarchy structure, wherein the page component tree structure comprises component positions, component sizes, component styles, component parent-child level relations, component model information, component linkage information and the like, and finally forms a tree hierarchy link structure with pages as root nodes and components as leaf nodes; storing the page descriptive data structure and the page component tree structure, and automatically generating target codes, wherein the target codes are as follows: HTML, JS, CSS codes reach document documents which can be directly rendered by a browser, and the model is converted into a visual page. The tree-shaped hierarchical link structure can clearly represent the hierarchical relationship and the dependency relationship among page components, so that the browser can quickly find out the components to be rendered and render according to the correct sequence, unnecessary calculation and rendering are avoided, the rendering efficiency is improved, and the page rendering of an application system can be faster and smoother by using the tree-shaped hierarchical link structure and the object code. The method and the system are convenient for users to access and apply different pages and functions in the system more quickly, and improve user experience and satisfaction.
In one embodiment of the application, the process of defining interaction logic in a page view model comprises defining necessary attributes and behaviors of a preset interaction component, and writing logic codes of the component according to the attributes and behaviors; or creating an event handler function based on the interaction event, and associating the event handler with the corresponding interaction event.
In one embodiment of the application, the code may be made more modular and reusable by the interaction component defining interaction logic. Creating reusable components can reduce code duplication, improve development efficiency, and make the application easier to maintain and expand. In addition, components can be easily replaced, modified or expanded by using the componentized development method to meet the changing requirements, so that the application program is more flexible. Defining interaction logic by an event handler enables the interaction logic to be associated with specific user operations or system events, thereby making the code easier to understand and maintain. Furthermore, the use of event handlers may add, modify, or delete event handlers to alter the interaction behavior of an application, enabling the application to be more flexible and extensible.
In one embodiment of the application, a process for defining interaction logic in a page view model includes: determining an initial state of a page view model, setting an attribute value of the page view model according to the initial state, and binding a corresponding event monitor to an element in a page to define an initialization interaction logic; and/or creating a shell layer, wherein the shell layer comprises a modal box and a dialog box, setting the content and the style of the shell layer and monitoring a closing event of the shell layer to define page view model shell layer interaction logic; and/or determining transfer parameters, setting the transfer parameters in a data structure, and acquiring the transfer parameters in the visualized page to define a page view model context parameter transfer logic; and/or determining the type and the number of the components, creating events according to the type and the number of the components, and setting the attribute and the event monitor of the components to define the initialization interaction logic of the components in the page view model; and/or determining a linkage relation condition, and defining linkage operation based on the linkage relation condition to define a component linkage interaction logic in the page view model; and/or determining a source of the data model, initiating a data request, and returning data information based on the data request to define data model definition logic in the page view model. By definitely defining and standardizing the initialization interaction, linkage interaction and data loading logic of the components, the workload of developers in processing the general operations can be reduced, and the development efficiency is improved.
In one embodiment of the present application, after obtaining the application system model, the method further includes: constructing entity data models by defining a main key and an external key, wherein the main key is a unique identifier of the entity data models and is used for uniquely identifying each entity data model, and the external key is used for establishing an association relation between the entity data models; and/or, aggregating, converting and integrating the data of different data sources according to the service requirements of the application system to construct a view data model meeting the service requirements; and/or, based on the preset scene data, associating the data model with the view model according to preset connection conditions and preset sequences to obtain an association model, screening the association model through preset screening conditions, and screening out a structured query language data model conforming to the preset scene; and/or setting corresponding interface data based on the service requirement of the application system, and generating an interface data model through the interface data; the business requirements comprise distributed transaction processing, message queues and asynchronous callback. By definitely defining and standardizing the initialization interaction, linkage interaction and data loading logic of the components, the workload of developers in processing the general operations can be reduced, and the development efficiency is improved.
Referring to fig. 2, fig. 2 is a block diagram illustrating a system page generating apparatus in a complex authority scenario for constructing government or enterprise informatization fields based on model drivers according to an exemplary embodiment of the present application.
As shown in fig. 2, the exemplary system page generating device under complex authority scenarios in the field of government affairs or enterprise informatization based on model driving includes: the system comprises an acquisition module 210, a mapping module 220, a generation module 230 and a visualization page construction module 240, wherein the acquisition module 210 is configured to acquire a predefined application system model, and the application system model includes: a data model and a page view model, the data model comprising a data structure, the page view model comprising page configuration information and page component information; the mapping module 220 is configured to generate a conversion rule engine for mapping the page configuration information and the page component information into a data structure based on a mapping relationship between the data model and the page view model, and the generating module 230 is configured to abstract the page view model structure to generate a page descriptive data structure by using the page configuration information and the conversion rule engine according to interaction logic defined in the page view model; and abstracting the component hierarchy of the page view model to generate a page component tree structure by using the page component information and the conversion rule engine, wherein the visualized page construction module 240 is used for forming a tree-shaped hierarchical link structure based on the page descriptive data structure and the page component tree structure by taking the page as a root node and the component as a leaf node, and generating target codes corresponding to the tree-shaped hierarchical link structure, so that a browser directly renders and generates a document based on the target codes to construct a visualized page for generating the application system model. The method comprises the steps of obtaining a predefined application system model, establishing a mapping relation between a data model and a page view model, generating a conversion rule engine for mapping page configuration information and page assembly information into a data structure based on the mapping relation between the data model and the page view model, converting the page view model into an actual visual page based on interaction logic defined in the page view model, separating the construction and interaction logic of the visual page, and modifying and expanding the functions of the visual page. Meanwhile, development efficiency can be improved, code repeatability can be reduced, cost and efficiency can be reduced, business development can be responded quickly, uncertainty of the business can be responded at any time, and therefore development of an application program through a visual interface can be facilitated for a developer without writing a large amount of codes. Not only reduces the development time and cost, but also improves the development efficiency, and can improve the flexibility and the agility of response business under the condition of larger business demand.
In an embodiment of the present application, the generating module is configured to extract page information from the page configuration information, where the page information includes a page name, a page size, a page style, and a page type; determining a page structure according to the page configuration information, wherein the page structure comprises page layout, component arrangement and component nesting relation; the page view model structure is abstracted to generate a page descriptive data structure based on the page information, the page structure and the conversion rule engine, wherein the page descriptive data structure comprises a tree structure or a graph structure.
In an embodiment of the present application, the generating module is configured to extract component data information from the page component information, where the component data information includes a component name, a component type, a component position, a component size, and a component style; determining a hierarchical structure of the component according to the component nesting relationship; the component hierarchy structure is abstracted to generate a page component tree structure through a conversion rule engine, wherein the page component tree structure comprises component positions, component sizes, component styles, component parent-child level relations, component model information and component linkage information.
In an embodiment of the present application, the mapping module is configured to obtain sample requirement information, analyze attribute information of a data structure based on the sample requirement information, and obtain an attribute information analysis result; according to the preset specification and the preset style, mapping and binding the component information and the attribute information analysis result of the page view model
In an embodiment of the application, the mapping module is used for receiving user demand information, comparing the user demand information with sample demand information, if the comparison is inconsistent, analyzing the user demand information, determining a model adjustment target based on an analysis result, and rebinding the mapping relation between the page view model and the data model based on the model adjustment target so as to generate page content and structure which accord with the user demand information; if the comparison is consistent, the current setting is maintained.
In an embodiment of the present application, the generating module is configured to define necessary properties and behaviors of the preset interaction component, and write a logic code of the component according to the properties and behaviors; or creating an event handler function based on the interaction event, and associating the event handler with the corresponding interaction event.
In one embodiment of the application, the generating module determines an initial state of the page view model, sets an attribute value of the page view model according to the initial state, and binds a corresponding event listener to an element in the page to define an initialization interaction logic; and/or creating a shell layer, wherein the shell layer comprises a modal box and a dialog box, setting the content and the style of the shell layer and monitoring a closing event of the shell layer to define page view model shell layer interaction logic; and/or determining transfer parameters, setting the transfer parameters in a data structure, and acquiring the transfer parameters in the visualized page to define a page view model context parameter transfer logic; and/or determining the type and the number of the components, creating events according to the type and the number of the components, and setting the attribute and the event monitor of the components to define the initialization interaction logic of the components in the page view model; and/or determining a linkage relation condition, and defining linkage operation based on the linkage relation condition to define a component linkage interaction logic in the page view model; and/or determining a source of the data model, initiating a data request, and returning data information based on the data request to define data model definition logic in the page view model.
In an embodiment of the present application, the obtaining module is configured to construct entity data models by defining a primary key and a foreign key, where the primary key is a unique identifier of the entity data model and is used to uniquely identify each entity data model, and the foreign key is used to establish an association relationship between the entity data models; and/or, aggregating, converting and integrating the data of different data sources according to the service requirements of the application system to construct a view data model meeting the service requirements; and/or, based on the preset scene data, associating the data model with the view model according to preset connection conditions and preset sequences to obtain an association model, screening the association model through preset screening conditions, and screening out a structured query language data model conforming to the preset scene; and/or setting corresponding interface data based on the service requirement of the application system, and generating an interface data model through the interface data; the business requirements comprise distributed transaction processing, message queues and asynchronous callback.
The embodiment also provides an electronic device, including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic equipment realizes the system page generation method based on the complex authority scene in the field of model-driven construction government affairs or enterprise informatization.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. It should be noted that, the electronic device 300 shown in fig. 3 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 3, the electronic device 300 includes a processor 301, a memory 302, and a communication bus 303; a communication bus 303 for connecting the processor 301 to the memory connection 302; the processor 301 is configured to execute computer programs stored in the memory 302 to implement the methods of one or more of the embodiments described above.
The electronic device provided in this embodiment includes a processor, a memory, a transceiver, and a communication interface, where the memory and the communication interface are connected to the processor and the transceiver and perform communication therebetween, the memory is used to store a computer program, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer program, so that the electronic device performs each step of the above method.
In this embodiment, the memory may include a random access memory (Random Access Memory, abbreviated as RAM), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The above embodiments are merely illustrative of the principles of the present application and its effectiveness, and are not intended to limit the application. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the application. It is therefore intended that all equivalent modifications and changes made by those skilled in the art without departing from the spirit and technical spirit of the present application shall be covered by the appended claims.
Claims (10)
1. A system page generation method based on model driven construction of complex authority scenes in government or enterprise informatization fields is characterized by comprising the following steps:
obtaining a predefined application system model, wherein the application system model comprises: a data model and a page view model, the data model comprising a data structure, the page view model comprising page configuration information and page component information;
Generating a conversion rule engine for mapping page configuration information and page component information into the data structure based on the mapping relation between the data model and the page view model;
According to interaction logic defined in the page view model, utilizing the page configuration information and the conversion rule engine to abstract the page view model structure to generate a page descriptive data structure; utilizing page component information and the conversion rule engine to abstract the component hierarchy of the page view model to generate a page component tree structure, wherein the interaction logic is realized through an event processor or an interaction component;
And forming a tree-shaped hierarchical link structure based on the page descriptive data structure and the page component tree structure by taking the page as a root node and the component as a leaf node, and generating target codes corresponding to the tree-shaped hierarchical link structure, so that a browser directly renders and generates a document based on the target codes, and a visualized page for generating the application system model is constructed.
2. The method for generating the system page under the complex authority scene in the field of government or enterprise informatization based on model driving according to claim 1, wherein the step of abstracting the page view model structure to generate the page descriptive data structure by using the page configuration information and the conversion rule engine comprises the following steps:
Extracting page information from the page configuration information, wherein the page information comprises a page name, a page size, a page style and a page type;
Determining a page structure according to the page configuration information, wherein the page structure comprises page layout, component arrangement and component nesting relation;
And abstracting a page view model structure to generate a page descriptive data structure based on the page information, the page structure and the conversion rule engine, wherein the page descriptive data structure comprises a tree structure or a graph structure.
3. The system page generation method based on model driven construction of complex authority scenarios in government or enterprise informatization fields according to claim 2, wherein the step of abstracting the component hierarchy of the page view model into a page component tree structure by using page component information and the transformation rule engine comprises the steps of:
extracting component data information from the page component information, wherein the component data information comprises a component name, a component type, a component position, a component size and a component style;
determining a hierarchical structure of the component according to the component nesting relationship;
and abstracting the component hierarchical structure through a conversion rule engine to generate a page component tree structure, wherein the page component tree structure comprises component positions, component sizes, component styles, component parent-child level relations, component model information and component linkage information.
4. A system page generation method in a complex rights scenario in a field of building government or enterprise informatization based on model driving according to any one of claims 1 to 3, wherein before generating a conversion rule engine for mapping page configuration information and page component information into the data structure based on the mapping relation between the data model and the page view model, the method further comprises:
Acquiring sample demand information, and analyzing attribute information of the data structure based on the sample demand information to obtain an attribute information analysis result;
And according to a preset specification and a preset style, mapping and binding the component information of the page view model and the attribute information analysis result.
5. The method for generating the system page under the complex authority scene in the government or enterprise informatization field based on the model driving according to claim 4, wherein after mapping and binding the component information of the page view model with the analysis result of the attribute information, the method further comprises:
receiving user demand information, comparing the user demand information with the sample demand information,
If the comparison is inconsistent, analyzing the user demand information, determining a model adjustment target based on the analysis result, and rebinding the mapping relation between the page view model and the data model based on the model adjustment target so as to generate page content and structure which meet the user demand information;
if the comparison is consistent, the current setting is maintained.
6. The method for generating the system page under the complex authority scene in the field of government or enterprise informatization based on model driving according to claim 1, wherein the process of defining the interaction logic in the page view model comprises the following steps: defining necessary attributes and behaviors of a preset interaction component, and writing logic codes of the component according to the attributes and behaviors; or (b)
An event handler function is created based on the interaction event, and the event handler is associated with the corresponding interaction event.
7. The method for generating the system page under the complex authority scene in the field of government or enterprise informatization based on model driving according to claim 1, wherein the process of defining the interaction logic in the page view model comprises the following steps:
Determining an initial state of a page view model, setting an attribute value of the page view model according to the initial state, and binding a corresponding event monitor to an element in a page to define the initialization interaction logic; and/or the number of the groups of groups,
Creating a shell layer, wherein the shell layer comprises a modal frame and a dialog box, setting the content and the style of the shell layer and monitoring a closing event of the shell layer to define page view model shell layer interaction logic; and/or the number of the groups of groups,
Determining transfer parameters, setting the transfer parameters in the data structure, and acquiring the transfer parameters in the visualized page to define a page view model context parameter transfer logic; and/or the number of the groups of groups,
Determining the type and the number of components, creating events according to the type and the number of the components, and setting the attribute and the event monitor of the components to define the initialization interaction logic of the components in the page view model; and/or the number of the groups of groups,
Determining a linkage relation condition, and defining linkage operation based on the linkage relation condition to define a component linkage interaction logic in a page view model; and/or the number of the groups of groups,
Determining a source of the data model, initiating a data request, and returning data information based on the data request to define data model definition logic in the page view model.
8. The system page generation method under the complex authority scenario in the field of government affairs or enterprise informatization based on model driving according to claim 1 or 2, wherein after the application system model is acquired, the method further comprises:
constructing entity data models by defining a main key and an external key, wherein the main key is a unique identifier of the entity data models and is used for uniquely identifying each entity data model, and the external key is used for establishing an association relation between the entity data models; and/or the number of the groups of groups,
The method comprises the steps of aggregating, converting and integrating data of different data sources according to service requirements of an application system to construct a view data model conforming to the service requirements; and/or the number of the groups of groups,
Based on preset scene data, associating the data model with the view model according to preset connection conditions and preset sequences to obtain an association model, screening the association model through preset screening conditions, and screening out a structured query language data model conforming to a preset scene; and/or the number of the groups of groups,
Setting corresponding interface data based on the service requirement of the application system, and generating an interface data model through the interface data; wherein, the business requirement comprises distributed transaction processing, message queue and asynchronous callback.
9. A system page generating device based on model driven construction government affairs or enterprise informatization field complex authority scene is characterized in that the device comprises:
The acquisition module is used for acquiring a predefined application system model, and the application system model comprises: a data model and a page view model, the data model comprising a data structure, the page view model comprising page configuration information and page component information;
The mapping module is used for generating a conversion rule engine for mapping the page configuration information and the page component information into the data structure based on the mapping relation between the data model and the page view model;
The generation module is used for abstracting the page view model structure to generate a page descriptive data structure by utilizing the page configuration information and the conversion rule engine according to interaction logic defined in the page view model; utilizing page component information and the conversion rule engine to abstract and generate a page component tree structure of a component hierarchy structure of the page view model;
The visual page construction module is used for forming a tree-shaped hierarchical link structure based on the page descriptive data structure and the page assembly tree structure by taking the page as a root node and taking the assembly as a leaf node, and generating target codes corresponding to the tree-shaped hierarchical link structure, so that a browser directly renders and generates a document based on the target codes to construct a visual page for generating the application system model.
10. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the system page generation method in the complex rights scenarios of model-based drive building government or enterprise informatization domain as claimed in any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410045417.3A CN117908876A (en) | 2024-01-11 | 2024-01-11 | Method, device and equipment for generating system page under complex authority scene in government or enterprise informatization field based on model driving |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410045417.3A CN117908876A (en) | 2024-01-11 | 2024-01-11 | Method, device and equipment for generating system page under complex authority scene in government or enterprise informatization field based on model driving |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117908876A true CN117908876A (en) | 2024-04-19 |
Family
ID=90693298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410045417.3A Pending CN117908876A (en) | 2024-01-11 | 2024-01-11 | Method, device and equipment for generating system page under complex authority scene in government or enterprise informatization field based on model driving |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117908876A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118484181A (en) * | 2024-04-24 | 2024-08-13 | 成都虚谷伟业科技有限公司 | Software generation method, device, storage medium and generation equipment |
-
2024
- 2024-01-11 CN CN202410045417.3A patent/CN117908876A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118484181A (en) * | 2024-04-24 | 2024-08-13 | 成都虚谷伟业科技有限公司 | Software generation method, device, storage medium and generation equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10162612B2 (en) | Method and apparatus for inventory analysis | |
US7424702B1 (en) | Data integration techniques for use in enterprise architecture modeling | |
US7216340B1 (en) | Analysis data validation tool for use in enterprise architecture modeling with result based model updating | |
US7269792B2 (en) | System and method for generating high-function browser widgets with full addressability | |
CN112199086B (en) | Automatic programming control system, method, device, electronic equipment and storage medium | |
US7007266B1 (en) | Method and software system for modularizing software components for business transaction applications | |
CN108984155B (en) | Data processing flow setting method and device | |
CN112328226B (en) | Embedded system automatic test code generation method and device | |
CN113238740B (en) | Code generation method, code generation device, storage medium and electronic device | |
Khurshid et al. | Exploring the design of an intentional naming scheme with an automatic constraint analyzer | |
JP2018514878A (en) | A computer-implemented method for displaying software-type applications based on design specifications | |
CN117908876A (en) | Method, device and equipment for generating system page under complex authority scene in government or enterprise informatization field based on model driving | |
US20020066074A1 (en) | Method and system for developing and executing software applications at an abstract design level | |
CN114138244A (en) | Method and device for automatically generating model files, storage medium and electronic equipment | |
US20060031817A1 (en) | Integrated dynamic control flow and functionality generation for network computing environments | |
Paganelli et al. | A tool for creating design models from web site code | |
CN113448678A (en) | Application information generation method, deployment method, device, system and storage medium | |
CN112699042B (en) | Unit test case generation method and device | |
CN114385148A (en) | Method, device, equipment and storage medium for realizing linkage function | |
CN112416333A (en) | Software model training method, device, system, equipment and storage medium | |
US20230004477A1 (en) | Providing a pseudo language for manipulating complex variables of an orchestration flow | |
TWI643083B (en) | Electronic application developing method and,non-transitory computer-readable storage medium and system | |
Gonçalves et al. | ReFlO: An interactive tool for pipe-and-filter domain specification and program generation | |
Milovanovic et al. | Python Data Visualization Cookbook | |
US20240296350A1 (en) | Computed values for knowledge graph |
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 |