WO2019153514A1 - Service system dynamic generation method and apparatus, computer device, and storage medium - Google Patents

Service system dynamic generation method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2019153514A1
WO2019153514A1 PCT/CN2018/083819 CN2018083819W WO2019153514A1 WO 2019153514 A1 WO2019153514 A1 WO 2019153514A1 CN 2018083819 W CN2018083819 W CN 2018083819W WO 2019153514 A1 WO2019153514 A1 WO 2019153514A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data table
model
display page
configuration
Prior art date
Application number
PCT/CN2018/083819
Other languages
French (fr)
Chinese (zh)
Inventor
林水明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019153514A1 publication Critical patent/WO2019153514A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to the field of database configuration management technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for dynamically generating a service system.
  • the CMDB Configuration Management Database
  • the CMDB software focuses on the management of information (acquisition, integration, recording, maintenance, inspection, update, etc.), while the database focuses on the physical storage of information, and the two are closely related.
  • the function of CMDB requires specialized CMDB management software, which is difficult to complete directly on traditional databases. Because the management of configuration information is the core function of CMDB, and this part of the function is difficult to implement by database software.
  • CMDB system generally stores business data and configuration data in a data table of a relational database, which has the following defects:
  • the configuration data is coupled with the business data dependency, which causes the enterprise to perform data conversion according to its fixed mode;
  • the database ER model does not reflect the business model. Once the application is switched, there is a major hidden danger in data migration.
  • the service configuration data exists in a table, and the data query speed is inefficient.
  • the present application provides a method, an apparatus, a computer device and a storage medium for dynamically generating a business system, which are intended to solve the data table in the prior art in which the configuration data of the CMDB based on the graph database is coupled with the service data and stored in the relational database.
  • the database ER model does not reflect the business model, and the data query speed is inefficient.
  • the present application provides a method for dynamically generating a service system, including: if it is detected that a menu in a user interface is selected, obtaining a configuration code corresponding to a selected menu; and correspondingly searching for a query according to a configuration code in a graphic database.
  • the configuration model is loaded into the memory for storage; the display page including the data table is generated according to the configuration model stored in the memory; if the data operation on the data table is detected, the operation type and data operation according to the data operation are selected.
  • the specified business data is generated corresponding to the SQL script; the SQL script is executed, and the corresponding business data processing result is fed back.
  • the application provides a service system dynamic generation apparatus, including:
  • Configuring a code retrieval unit configured to: if it is detected that a menu in the user interface is selected, obtain a configuration code corresponding to the selected menu;
  • the code loading unit is configured to retrieve a configuration model corresponding to the query in the graphic database according to the configuration code, and load the file into the memory for storage;
  • a display page generating unit configured to generate a display page including a data table according to a configuration model stored in the memory
  • the SQL script generating unit is configured to generate a SQL script according to the operation type of the data operation and the service data selected by the data operation if the data operation on the data table is detected;
  • the data result feedback unit is configured to execute the SQL script and feed back the corresponding business data processing result.
  • the present application further provides a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the computer program
  • a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the computer program
  • the present application also provides a storage medium, wherein the storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute the application
  • the business system dynamic generation method of any of the provided
  • the application provides a method, an apparatus, a computer device and a storage medium for dynamically generating a business system.
  • the method saves the configuration data through the graphic database, and the relational database stores the business data. After the configuration is completed, the display of the business data and the related operations of the data can be completed without editing the script.
  • 1a is a schematic diagram of a three-layer structure of a specific graphics database in an embodiment of the present application
  • FIG. 1b is a schematic flowchart of a method for dynamically generating a service system according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a sub-flow of a method for dynamically generating a service system according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of another sub-flow of a method for dynamically generating a service system according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of another sub-flow of a method for dynamically generating a service system according to an embodiment of the present disclosure
  • FIG. 5 is a schematic block diagram of a service system dynamic generation apparatus according to an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a subunit of a service system dynamic generation apparatus according to an embodiment of the present disclosure
  • FIG. 7 is a schematic block diagram of another subunit of a service system dynamic generating apparatus according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic block diagram of another subunit of a service system dynamic generating apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • kernel configuration can also be called a configuration model.
  • the configuration model is a standard graphical structure. Refer to Figure 1a for the specific graphic structure. As shown in FIG. 1a, the configuration model is divided into three layers, as follows:
  • the top layer is the page layer (ViewGroup), which is an abstraction of the basic information of the page, mainly including the basic information of the page, such as: page name, page encoding and other information.
  • PageGroup is an abstraction of the basic information of the page, mainly including the basic information of the page, such as: page name, page encoding and other information.
  • the middle layer is the business view layer (View), which is an abstraction of business data.
  • View can be understood as a data table in the page, which mainly contains the name, code, View type and View component type of the business view.
  • Each business view View is composed of one or more Entities of the ER layer.
  • the View type mainly includes: a. Topology map type, mainly used to display data association view; b. Business data type, mainly used to display page table data.
  • the component types of View mainly include: a. data table; b. other data display components, such as tree diagrams, histograms and other data display components.
  • the bottom layer is the ER layer, which is mainly a representation of the relational database ER model. It is used to provide the basis for the management of the business data required by the business view layer View.
  • the ER layer mainly contains Entity/Attribute (where Entity represents Entity, Attribute represents the attribute of the entity) and the relationship between Entity and Entity, and the relationship between Entity and its Attribute.
  • Entity mainly contains information such as table name, table alias and other information, whether it is editable or not;
  • Attribute mainly contains information such as attribute name, encoding, whether it is visible, and whether it can be edited.
  • the CMDB application system is divided into three layers.
  • the user-oriented and directly visible to the user is the page.
  • the next layer of the page is the CMDB application system layer, and the next layer is the background graphics database and the relational database (graphic database, And the relational database is connected with the CMDB application system layer, that is, the CMDB application system layer can obtain data from the graphical database and the relational database).
  • the graphics database includes multiple configuration models, and each configuration model is composed of the above three layers (ie, a page layer, a service view layer, and an ER layer), and each of the service model layers in the configuration model includes at least one service view. Layer nodes are displayed in the business view layer.
  • FIG. 1b is a schematic flowchart of a method for dynamically generating a service system according to an embodiment of the present application.
  • the method is applied to terminals such as desktop computers, laptop computers, and tablet computers.
  • the method includes steps S101 to S105.
  • a plurality of menus are set on the user-oriented user interface, that is, the menu is set on the interface in the CMDB application system.
  • the menu is set on the interface in the CMDB application system.
  • a new interface will be displayed, which is a feedback to the user's selected action. Since each menu set on the user interface corresponds to a unique configuration code, when the menu is selected, its configuration code is obtained according to the selected menu.
  • the configuration code is a configuration model in a mapping graph database. Each time a menu is clicked, the configuration database corresponding to the configuration code is retrieved in the graphics database, and the page including the data table is rendered according to the retrieved configuration model to visually display the business data on the page in the CMDB application system.
  • the root retrieves a configuration model corresponding to the query in the graphics database according to the configuration code, and loads the file into the memory for storage.
  • a plurality of configuration models are stored in the graphics database, and each configuration model includes a page layer, a service view layer, and an ER layer.
  • the configuration models in the graph database are all pre-set, that is, the user pre-configures various configuration models in the graph database, and these configuration models are stored in the graph database to realize separation from the business data.
  • the graphics database is a NEO4J graphics database.
  • NEO4J is a high-performance NOSQL (NOSQL refers to non-relational database) graphical database that stores structured data on the network rather than in the table.
  • NOSQL non-relational database
  • NEO4J can also be seen as a high-performance graph engine with all the features of a mature database.
  • a diagram of the NEO4J graph database contains two basic data types: Nodes and Relationships. Nodes and Relationships contain attributes in the form of key/value. Nodes are connected by relationships defined by Relationships to form a relational network structure.
  • the configuration model corresponding to the configuration code is queried by using a Cypher script.
  • the query language of the Cypher script contains the following obvious parts:
  • the configuration model corresponding to the configuration code is queried by the Cypher script, the configuration model is stored in the memory.
  • the data table needs to be rendered according to the configuration model.
  • the configuration model needs to be parsed and the data table is created correspondingly, and the service data is filled in the data table.
  • the area of the display page in the CMDB application system is displayed.
  • the business data corresponding to the selected menu is displayed, and the business data can be selected for other operations (such as adding business data, modifying business data, editing business data, querying business data, etc.) ).
  • the ER relationship between the business data is managed by the configuration model and stored in the graph database, which reduces the dependency coupling between the configuration data and the business data.
  • the step S103 includes the following sub-steps:
  • S1032 Obtain a data model corresponding to the configuration model by using js parsing at a front end of the browser; wherein the data model includes a service view layer and an ER layer;
  • the configuration model stored in the memory is transmitted to the browser (the browser can be regarded as a specific example of the user interface), and parsed, acquired, and configured in the corresponding area of the display page of the browser.
  • the configuration model is transmitted to the browser in a data format of json (JavaScript Object Notation, which is a lightweight data exchange format), and is parsed at the front end of the browser to obtain and configure the business view layer included in the model.
  • the corresponding data and the corresponding data of the ER layer (the data corresponding to the page layer in the configuration model need not be acquired), and the data model is composed of the corresponding data of the business view layer and the corresponding data of the ER layer.
  • the data table can be rendered in the corresponding area of the browser display page according to the data model, and the business data is filled.
  • the table creation script is automatically generated according to the corresponding data of the business view layer, and the business data is extracted according to the corresponding data of the ER layer and correspondingly inserted into the corresponding position of the data table, thereby realizing automatic table construction in the background of the browser, and the user viewing the business data is more intuitive.
  • the ER layer model corresponding to the business data can be called in real time, and the ER model of the business data can be visually reflected.
  • step S1033 a data table is created in the display page according to the data model, and the data rendering corresponding to the data model is filled into the data table, including the following sub-steps:
  • S10333 Fill the corresponding data with the entity to the corresponding column in the data table.
  • the process of creating a data table in the display page according to the data model, and filling the data rendering corresponding to the data model into the data table is an automated execution process. That is, the data table is first generated by the table name corresponding to the business view layer of the data model, such as by the create statement; then the columns in the data table are generated according to the attributes of each entity included in the ER layer, such as by the add colnew statement. Finally, the corresponding data rendering with the entity is filled into the corresponding column in the data table, that is, the automated table construction and data rendering filling process is completed.
  • the SQL script is generated according to the operation type of the data operation and the service data selected by the data operation.
  • step S104 includes the following sub-steps:
  • the operation type of the data operation needs to be determined first.
  • the operations for the database generally include adding data operations, deleting data operations, editing data operations, and querying data operations. Therefore, when the business data is selected and the data operation is performed, the SQL script is automatically generated by displaying the business view layer node corresponding to the data table in the page and the data to be operated; for example, if the operation type of the data operation is increasing data operation, Then, according to the business view layer node corresponding to the data table in the display page, and the data to be added, a first SQL script including an insert statement is generated; similarly, if the operation type of the data operation is a delete data operation, according to the data table in the display page Corresponding business view layer node and data to be deleted generate a second SQL script including a delete statement; if the operation type of the data operation is an edit data operation, according to the business view layer node corresponding to the data table in the display page, and to be edited The data generates a
  • the SQL script is executed in the Mybatis framework, and the target data is operated according to the SQL script in the relational database (such as adding data operations, deleting data operations, editing data operations, and querying data operations), completing the data.
  • the operation succeeds or the operation fails (ie, the corresponding service data processing result is fed back) on the user page.
  • data management can be performed by intuitively performing various operations on the background business data through the data table.
  • the method saves the configuration data through the graphic database, and the relational database saves the business data.
  • the display of the business data and the related operations of the data can be completed without editing the script, thereby realizing the separation from the business data and reducing the configuration.
  • Dependency coupling between data and business data Moreover, the configuration data and the service data configuration data and the business data are not stored in the same table, which improves the efficiency of data operation.
  • FIG. 5 is a schematic block diagram of a service system dynamic generation apparatus according to an embodiment of the present application.
  • the business system dynamic generation device 100 can be installed in a desktop computer, a tablet computer, a laptop computer, or the like.
  • the business system dynamic generation apparatus 100 includes a configuration code retrieval unit 101, a configuration code loading unit 102, a presentation page generation unit 103, an SQL script generation unit 104, and a data result feedback unit 105.
  • the configuration code retrieval unit 101 is configured to acquire a configuration code corresponding to the selected menu if it is detected that the menu in the user interface is selected.
  • a plurality of menus are set on the user-oriented user interface, that is, the menu is set on the interface in the CMDB application system.
  • the menu is set on the interface in the CMDB application system.
  • a new interface will be displayed, which is a feedback to the user's selected action. Since each menu set on the user interface corresponds to a unique configuration code, when the menu is selected, the configuration code is obtained according to the selected menu.
  • the configuration code is a configuration model in a mapping graph database. Each time a menu is clicked, the configuration database corresponding to the configuration code is retrieved in the graphics database, and the page including the data table is rendered according to the retrieved configuration model to visually display the business data on the page in the CMDB application system.
  • the configuration code loading unit 102 is configured to retrieve a configuration model corresponding to the query in the graphics database according to the configuration code, and load it into the memory for storage.
  • a plurality of configuration models are stored in the graphics database, and each configuration model includes a page layer, a service view layer, and an ER layer.
  • the configuration models in the graph database are all pre-set, that is, the user pre-configures various configuration models in the graph database, and these configuration models are stored in the graph database to realize separation from the business data.
  • the display page generating unit 103 is configured to generate a display page including the data table according to the configuration model stored in the memory.
  • the data table needs to be rendered according to the configuration model.
  • the configuration model needs to be parsed and the data table is created correspondingly, and the service data is filled in the data table.
  • the area of the display page in the CMDB application system is displayed.
  • the business data corresponding to the selected menu is displayed, and the business data can be selected for other operations (such as adding business data, modifying business data, editing business data, querying business data, etc.) ).
  • the ER relationship between the business data is managed by the configuration model and stored in the graph database, which reduces the dependency coupling between the configuration data and the business data.
  • the SQL script generating unit 104 is configured to generate a SQL script according to the operation type of the data operation and the service data selected by the data operation if the data operation on the data table is detected;
  • the data result feedback unit 105 is configured to execute the SQL script and feed back the corresponding service data processing result.
  • the SQL script is executed in the Mybatis framework, and the target data is operated according to the SQL script in the relational database (such as adding data operations, deleting data operations, editing data operations, and querying data operations), completing the data.
  • the operation succeeds or the operation fails (ie, the corresponding service data processing result is fed back) on the user page.
  • data management can be performed by intuitively performing various operations on the background business data through the data table.
  • the presentation page generating unit 103 includes the following subunits:
  • the configuration model transmission unit 1031 is configured to transmit the configuration model stored in the memory to the browser; the parsing unit 1032 is configured to obtain a data model corresponding to the configuration model by parsing the front end of the browser; wherein The data model includes a business view layer and an ER layer; a data table generating unit 1033 is configured to create a data table in the display page according to the data model, fill the data table corresponding to the data model into the data table, and display the data table in the display page. display.
  • the configuration model stored in the memory is transmitted to the browser (the browser can be regarded as a specific example of the user interface), and parsed, acquired, and configured in the corresponding area of the display page of the browser.
  • the configuration model is transmitted to the browser in a data format of json (JavaScript Object Notation, which is a lightweight data exchange format), and is parsed at the front end of the browser to obtain and configure the business view layer included in the model.
  • the corresponding data and the corresponding data of the ER layer (the data corresponding to the page layer in the configuration model need not be acquired), and the data model is composed of the corresponding data of the business view layer and the corresponding data of the ER layer.
  • the data table can be rendered in the corresponding area of the browser display page according to the data model, and the business data is filled.
  • the table creation script is automatically generated according to the corresponding data of the business view layer, and the business data is extracted according to the corresponding data of the ER layer and correspondingly inserted into the corresponding position of the data table, thereby realizing automatic table construction in the background of the browser, and the user viewing the business data is more intuitive.
  • the ER layer model corresponding to the business data can be called in real time, and the ER model of the business data can be visually reflected.
  • the data table generating unit 1033 includes the following subunits: a table producing unit 10331 for generating a data table according to the business view layer of the data model, and a column generating unit 10332 for including each of the ER layers
  • the attribute of an entity generates a column in the data table
  • the data rendering unit 10333 is configured to fill the corresponding data of the entity to the corresponding column in the data table.
  • the process of creating a data table in the display page according to the data model, and filling the data rendering corresponding to the data model into the data table is an automated execution process. That is, the data table is first generated by the table name corresponding to the business view layer of the data model, such as by the create statement; then the columns in the data table are generated according to the attributes of each entity included in the ER layer, such as by the add colnew statement. Finally, the corresponding data rendering with the entity is filled into the corresponding column in the data table, that is, the automated table construction and data rendering filling process is completed.
  • the SQL script generating unit 104 includes the following subunits:
  • the first script generating unit 1041 is configured to generate a first SQL script according to the service view layer node corresponding to the data table in the display page and the data to be added if the operation type of the data operation is an increase data operation;
  • the second script generating unit 1042 is configured to generate a second SQL script according to the service view layer node corresponding to the data table in the display page and the data to be deleted if the operation type of the data operation is a delete data operation;
  • the third script generating unit 1043 is configured to generate a third SQL script according to the business view layer node corresponding to the data table in the display page and the data to be edited if the operation type of the data operation is an edit data operation;
  • the fourth script generating unit 1044 is configured to generate a fourth SQL script according to the service view layer node corresponding to the data table in the display page and the data to be queried if the operation type of the data operation is a query data operation.
  • the operation type of the data operation needs to be determined first.
  • the operations for the database generally include adding data operations, deleting data operations, editing data operations, and querying data operations. Therefore, when the business data is selected and the data operation is performed, the SQL script is automatically generated by displaying the business view layer node corresponding to the data table in the page and the data to be operated; for example, if the operation type of the data operation is increasing data operation, Then, according to the business view layer node corresponding to the data table in the display page, and the data to be added, a first SQL script including an insert statement is generated; similarly, if the operation type of the data operation is a delete data operation, according to the data table in the display page Corresponding business view layer node and data to be deleted generate a second SQL script including a delete statement; if the operation type of the data operation is an edit data operation, according to the business view layer node corresponding to the data table in the display page, and to be edited The data generates a
  • the device saves the configuration data through the graphic database, and the relational database stores the business data. After the configuration is completed, the display of the business data and the related operations of the data can be completed without editing the script, thereby realizing the separation from the business data and reducing the configuration. Dependency coupling between data and business data. Moreover, the configuration data and the service data configuration data and the business data are not stored in the same table, which improves the efficiency of data operation.
  • the above business system dynamic generation device can be implemented in the form of a computer program that can be run on a computer device as shown in FIG.
  • FIG. 9 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer device 500 device can be a terminal.
  • the terminal can be an electronic device such as a tablet computer, a notebook computer, a desktop computer, or a personal digital assistant.
  • the computer device 500 includes a processor 502, a memory, and a network interface 505 connected by a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a business system dynamic generation method.
  • the processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, which when executed by the processor 502, may cause the processor 502 to perform a business system dynamic generation method.
  • the network interface 505 is used for network communication, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device 500 to which the solution of the present application is applied, and a specific computer device. 500 may include more or fewer components than shown, or some components may be combined, or have different component arrangements.
  • the processor 502 is configured to run a computer program 5032 stored in the memory to implement a function of: if it is detected that a menu in the user interface is selected, acquiring a configuration code corresponding to the selected menu; Retrieving the configuration model corresponding to the query in the database, and loading it into the memory for storage; generating a display page including the data table according to the configuration model stored in the memory; if the data operation on the data table is detected, the operation type according to the data operation And the business data selected by the data operation corresponds to generate a SQL script; execute the SQL script, and feed back the corresponding business data processing result.
  • the graphic database stores a plurality of configuration models, and each configuration model includes a page layer, a business view layer, and an ER layer.
  • the processor 502 further performs the operations of: transmitting the configuration model stored in the memory to the browser; and parsing through the js at the front end of the browser to obtain a data model corresponding to the configuration model;
  • the data model includes a business view layer and an ER layer; a data table is created in the display page according to the data model, data rendering corresponding to the data model is filled into the data table, and the data table is displayed on the display page.
  • the processor 502 further performs: generating a data table according to the business view layer of the data model; generating a column in the data table according to an attribute of each entity included in the ER layer; and rendering the data corresponding to the entity Go to the corresponding column in the data table.
  • the processor 502 further performs the following operations: if the operation type of the data operation is an increase data operation, generating a first SQL script according to the service view layer node corresponding to the data table in the display page and the data to be added;
  • the operation type of the data operation is a delete data operation, and a second SQL script is generated according to the business view layer node corresponding to the data table in the display page and the data to be deleted;
  • the operation type of the data operation is an edit data operation, according to the data in the display page
  • the service view layer node corresponding to the table and the data to be edited generate a third SQL script; if the operation type of the data operation is a query data operation, the business view layer node corresponding to the data table in the display page and the data to be queried are generated.
  • the embodiment of the computer device shown in FIG. 9 does not constitute a limitation on the specific configuration of the computer device.
  • the computer device may include more or fewer components than illustrated. Or combine some parts, or different parts.
  • the computer device may include only a memory and a processor. In such an embodiment, the structure and functions of the memory and the processor are the same as those of the embodiment shown in FIG. 9, and details are not described herein.
  • the processor 502 may be a central processing unit (CPU), and the processor 502 may also be another general-purpose processor, a digital signal processor (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • a storage medium in another embodiment of the present application, is provided.
  • the storage medium can be a non-transitory computer readable storage medium.
  • the storage medium stores a computer program, wherein the computer program includes program instructions.
  • the program instruction is executed by the processor, the business system dynamic generation method of the embodiment of the present application is implemented.
  • the storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or a memory of the device.
  • the storage medium may also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (SMC), a secure digital (SD) card, and a flash memory card. (Flash Card), etc.
  • the storage medium may also include both an internal storage unit of the device and an external storage device.

Landscapes

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

Abstract

Embodiments of the present application disclose a service system dynamic generation method and apparatus, a computer device, and a storage medium. The method comprises: if it is detected that a menu in a user interface is selected, obtaining a configuration code corresponding to the selected menu; retrieving and querying a corresponding configuration model in a graph database according to the configuration code, and loading the configuration model into a memory for storage; correspondingly generating a display page comprising a data table according to the configuration model stored in the memory; if a data operation on the data table is detected, correspondingly generating an SQL script according to an operation type of the data operation and service data selected by the data operation; and executing the SQL script and feeding back a corresponding service data processing result. According to the method, configuration data is stored in a graph database and service data is stored in a relational database, so that after configuration is completed, service data can be displayed and correlatively operated without editing a script.

Description

业务系统动态生成方法、装置、计算机设备及存储介质Business system dynamic generation method, device, computer equipment and storage medium
本申请要求于2018年2月12日提交中国专利局、申请号为201810144173.9、申请名称为“业务系统动态生成方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on February 12, 2018, the Chinese Patent Office, application number 201810144173.9, and the application name is "business system dynamic generation method, device, computer equipment and storage medium", the entire contents of which are The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及数据库配置管理技术领域,尤其涉及一种业务系统动态生成方法、装置、计算机设备及存储介质。The present application relates to the field of database configuration management technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for dynamically generating a service system.
背景技术Background technique
CMDB(Configuration Management Database,即配置管理数据库)存储与管理企业IT架构中设备的各种配置信息,它与所有服务支持和服务交付流程都紧密相联,支持这些流程的运转、发挥配置信息的价值,同时依赖于相关流程保证数据的准确性。CMDB软件侧重于信息的管理(采集、整合、记录、维护、检验、更新等),而数据库侧重于信息的物理存储,两者是密切联系的。CMDB的功能需要专门的CMDB管理软件,很难在传统数据库上直接完成。因为对配置信息的管理是CMDB的核心功能,而这一部分功能很难由数据库软件实现。The CMDB (Configuration Management Database) stores and manages various configuration information of devices in the enterprise IT architecture. It is closely linked to all service support and service delivery processes to support the operation of these processes and the value of configuration information. At the same time, relying on relevant processes to ensure the accuracy of the data. The CMDB software focuses on the management of information (acquisition, integration, recording, maintenance, inspection, update, etc.), while the database focuses on the physical storage of information, and the two are closely related. The function of CMDB requires specialized CMDB management software, which is difficult to complete directly on traditional databases. Because the management of configuration information is the core function of CMDB, and this part of the function is difficult to implement by database software.
目前常用的CMDB系统一般将业务数据和配置数据均存储在关系型数据库的数据表中,其存在以下缺陷:At present, the commonly used CMDB system generally stores business data and configuration data in a data table of a relational database, which has the following defects:
1.配置数据与业务数据依赖耦合,导致企业必须按照其固定的模式进行数据转换;1. The configuration data is coupled with the business data dependency, which causes the enterprise to perform data conversion according to its fixed mode;
2.数据库ER模型体现不出业务模型,一旦应用切换,数据迁移存在重大隐患;2. The database ER model does not reflect the business model. Once the application is switched, there is a major hidden danger in data migration.
3.业务配置数据都存在一张表中,数据查询速度存在效率低下的问题。3. The service configuration data exists in a table, and the data query speed is inefficient.
发明内容Summary of the invention
本申请提供了一种业务系统动态生成方法、装置、计算机设备及存储介质,旨在解决现有技术中基于图形数据库的CMDB中配置数据与业务数据依赖耦合 且均存储在关系型数据库的数据表中,导致数据库ER模型体现不出业务模型,同时数据查询速度存在效率低下的问题。The present application provides a method, an apparatus, a computer device and a storage medium for dynamically generating a business system, which are intended to solve the data table in the prior art in which the configuration data of the CMDB based on the graph database is coupled with the service data and stored in the relational database. In the middle, the database ER model does not reflect the business model, and the data query speed is inefficient.
第一方面,本申请提供了一种业务系统动态生成方法,其包括:若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码;根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储;根据内存中所存储的配置模型对应生成包括数据表格的展示页面;若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;执行SQL脚本,反馈对应的业务数据处理结果。In a first aspect, the present application provides a method for dynamically generating a service system, including: if it is detected that a menu in a user interface is selected, obtaining a configuration code corresponding to a selected menu; and correspondingly searching for a query according to a configuration code in a graphic database. The configuration model is loaded into the memory for storage; the display page including the data table is generated according to the configuration model stored in the memory; if the data operation on the data table is detected, the operation type and data operation according to the data operation are selected. The specified business data is generated corresponding to the SQL script; the SQL script is executed, and the corresponding business data processing result is fed back.
第二方面,本申请提供了一种业务系统动态生成装置,其包括:In a second aspect, the application provides a service system dynamic generation apparatus, including:
配置编码检索单元,用于若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码;Configuring a code retrieval unit, configured to: if it is detected that a menu in the user interface is selected, obtain a configuration code corresponding to the selected menu;
配置编码加载单元,用于根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储;The code loading unit is configured to retrieve a configuration model corresponding to the query in the graphic database according to the configuration code, and load the file into the memory for storage;
展示页面生成单元,用于根据内存中所存储的配置模型对应生成包括数据表格的展示页面;a display page generating unit, configured to generate a display page including a data table according to a configuration model stored in the memory;
SQL脚本生成单元,用于若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;The SQL script generating unit is configured to generate a SQL script according to the operation type of the data operation and the service data selected by the data operation if the data operation on the data table is detected;
数据结果反馈单元,用于执行SQL脚本,反馈对应的业务数据处理结果。The data result feedback unit is configured to execute the SQL script and feed back the corresponding business data processing result.
第三方面,本申请又提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本申请提供的任一项所述的业务系统动态生成方法。In a third aspect, the present application further provides a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the computer program The business system dynamic generation method according to any one of the preceding claims.
第四方面,本申请还提供了一种存储介质,其中所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行本申请提供的任一项所述的业务系统动态生成方法。In a fourth aspect, the present application also provides a storage medium, wherein the storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute the application The business system dynamic generation method of any of the provided.
本申请提供一种业务系统动态生成方法、装置、计算机设备及存储介质。该方法通过图形数据库保存配置数据,关系型数据库保存业务数据,在完成配置后无需编辑脚本就可完成对业务数据的展示及数据的相关操作。The application provides a method, an apparatus, a computer device and a storage medium for dynamically generating a business system. The method saves the configuration data through the graphic database, and the relational database stores the business data. After the configuration is completed, the display of the business data and the related operations of the data can be completed without editing the script.
附图说明DRAWINGS
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要 使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are some embodiments of the present application, For the ordinary technicians, other drawings can be obtained based on these drawings without any creative work.
图1a为本申请实施例中一具体图形数据库的三层结构示意图;1a is a schematic diagram of a three-layer structure of a specific graphics database in an embodiment of the present application;
图1b为本申请实施例提供的一种业务系统动态生成方法的示意流程图;FIG. 1b is a schematic flowchart of a method for dynamically generating a service system according to an embodiment of the present application;
图2是本申请实施例提供的一种业务系统动态生成方法的子流程示意图;2 is a schematic diagram of a sub-flow of a method for dynamically generating a service system according to an embodiment of the present application;
图3是本申请实施例提供的一种业务系统动态生成方法的另一子流程示意图;FIG. 3 is a schematic diagram of another sub-flow of a method for dynamically generating a service system according to an embodiment of the present application;
图4为本申请实施例提供的一种业务系统动态生成方法的另一子流程示意流程图;FIG. 4 is a schematic flowchart of another sub-flow of a method for dynamically generating a service system according to an embodiment of the present disclosure;
图5为本申请实施例提供的一种业务系统动态生成装置的示意性框图;FIG. 5 is a schematic block diagram of a service system dynamic generation apparatus according to an embodiment of the present application;
图6为本申请实施例提供的一种业务系统动态生成装置的子单元示意性框图;FIG. 6 is a schematic block diagram of a subunit of a service system dynamic generation apparatus according to an embodiment of the present disclosure;
图7为本申请实施例提供的一种业务系统动态生成装置的另一子单元示意性框图;FIG. 7 is a schematic block diagram of another subunit of a service system dynamic generating apparatus according to an embodiment of the present disclosure;
图8为本申请实施例提供的一种业务系统动态生成装置的另一子单元示意性框图;FIG. 8 is a schematic block diagram of another subunit of a service system dynamic generating apparatus according to an embodiment of the present disclosure;
图9为本申请实施例提供的一种计算机设备的示意性框图。FIG. 9 is a schematic block diagram of a computer device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
为了方便理解,下面对本申请实施例中涉及的图形数据库,及CMDB应用系统及关系型数据库进行介绍。For convenience of understanding, the graphic database, the CMDB application system and the relational database involved in the embodiments of the present application are introduced below.
在图形数据库中,存储有多个内核配置(内核配置也可称为配置模型)。配置模型是一种标准的图形结构,具体图形结构参考图1a。如图1a所示,所述配置模型被划分为三层,具体如下:In a graph database, multiple kernel configurations are stored (kernel configuration can also be called a configuration model). The configuration model is a standard graphical structure. Refer to Figure 1a for the specific graphic structure. As shown in FIG. 1a, the configuration model is divided into three layers, as follows:
最上面一层是页面层(ViewGroup),该层是对页面基础信息的抽象,主要 包含页面的基础信息,例如:页面名称,页面编码等信息。The top layer is the page layer (ViewGroup), which is an abstraction of the basic information of the page, mainly including the basic information of the page, such as: page name, page encoding and other information.
中间一层是业务视图层(View),该层是对业务数据的抽象,每个View在页面当中可以理解成一个数据表格,主要包含业务视图的名称、编码、View类型以及View组件类型等信息,每个业务视图View都是由ER层的一个或多个Entity(实体)组成。其中,View类型主要包含:a.拓扑图类型,主要用于展示数据关联视图;b.业务数据类型,主要用于展示页面表格数据。View的组件类型主要包含:a.数据表格;b.其他数据展示组件,例如树状图、柱状图等其他数据展示组件。The middle layer is the business view layer (View), which is an abstraction of business data. Each View can be understood as a data table in the page, which mainly contains the name, code, View type and View component type of the business view. Each business view View is composed of one or more Entities of the ER layer. Among them, the View type mainly includes: a. Topology map type, mainly used to display data association view; b. Business data type, mainly used to display page table data. The component types of View mainly include: a. data table; b. other data display components, such as tree diagrams, histograms and other data display components.
最下面一层是ER层,主要是对关系型数据库E-R模型的表示,用于在对业务视图层View所需业务数据的管理提供基础,在ER层中主要包含Entity/Attribute(其中,Entity表示实体,Attribute表示实体的属性)以及Entity(实体)与Entity(实体)的关系,以及Entity与其Attribute(属性)的关系。其中,Entity主要包含表名、表别名等信息是否可见、是否可编辑等信息;Attribute主要包含属性名称、编码、是否可见、是否可编辑等信息。The bottom layer is the ER layer, which is mainly a representation of the relational database ER model. It is used to provide the basis for the management of the business data required by the business view layer View. The ER layer mainly contains Entity/Attribute (where Entity represents Entity, Attribute represents the attribute of the entity) and the relationship between Entity and Entity, and the relationship between Entity and its Attribute. Among them, Entity mainly contains information such as table name, table alias and other information, whether it is editable or not; Attribute mainly contains information such as attribute name, encoding, whether it is visible, and whether it can be edited.
在了解图形数据库的基本知识后,下面对CMDB应用系统进行简要介绍。CMDB应用系统分为三层,其中面向用户且能被用户直接看到的是页面,页面的下一层是CMDB应用系统层,再下一层是后台的图形数据库及关系型数据库(图形数据库、及关系型数据库均与CMDB应用系统层通讯连接,也就是CMDB应用系统层能从图形数据库、及关系型数据库获取数据)。After understanding the basics of the graphical database, the following is a brief introduction to the CMDB application system. The CMDB application system is divided into three layers. The user-oriented and directly visible to the user is the page. The next layer of the page is the CMDB application system layer, and the next layer is the background graphics database and the relational database (graphic database, And the relational database is connected with the CMDB application system layer, that is, the CMDB application system layer can obtain data from the graphical database and the relational database).
其中,图形数据库包括多个配置模型,每一配置模型均由上述三层结构组成(即页面层、业务视图层、和ER层),每个配置模型中的业务视图层均包括至少一个业务视图层节点,并在业务视图层进行显示。The graphics database includes multiple configuration models, and each configuration model is composed of the above three layers (ie, a page layer, a service view layer, and an ER layer), and each of the service model layers in the configuration model includes at least one service view. Layer nodes are displayed in the business view layer.
请参阅图1b,图1b是本申请实施例提供的一种业务系统动态生成方法的示意流程图。该方法应用于台式电脑、手提电脑、平板电脑等终端中。如图1b所示,该方法包括步骤S101~S105。Referring to FIG. 1b, FIG. 1b is a schematic flowchart of a method for dynamically generating a service system according to an embodiment of the present application. The method is applied to terminals such as desktop computers, laptop computers, and tablet computers. As shown in FIG. 1b, the method includes steps S101 to S105.
S101、若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码。S101. If it is detected that a menu in the user interface is selected, obtain a configuration code corresponding to the selected menu.
在本实施例中,在面向用户的用户界面上设置有多个菜单,即菜单是设置在CMDB应用系统中的界面上。每点击一个菜单,均会对应展示一个新界面,也即对用户选中动作的一个反馈。由于用户界面上设置的每一菜单均对应唯一 的配置编码,当菜单被选中时则根据被选中菜单得到其配置编码。本申请中,所述配置编码是映射图形数据库中的配置模型。每点击一个菜单,都会在图形数据库检索是否存在与配置编码对应的配置模型,并根据检索得到的配置模型来渲染包括数据表格的页面,以直观的在CMDB应用系统中的页面上展示业务数据。In this embodiment, a plurality of menus are set on the user-oriented user interface, that is, the menu is set on the interface in the CMDB application system. Each time you click on a menu, a new interface will be displayed, which is a feedback to the user's selected action. Since each menu set on the user interface corresponds to a unique configuration code, when the menu is selected, its configuration code is obtained according to the selected menu. In the present application, the configuration code is a configuration model in a mapping graph database. Each time a menu is clicked, the configuration database corresponding to the configuration code is retrieved in the graphics database, and the page including the data table is rendered according to the retrieved configuration model to visually display the business data on the page in the CMDB application system.
S102、根根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储。S102. The root retrieves a configuration model corresponding to the query in the graphics database according to the configuration code, and loads the file into the memory for storage.
在本实施例中,所述图形数据库中存储有多个配置模型,每一配置模型均包括页面层、业务视图层和ER层。图形数据库中的配置模型均是预先设置好的,即用户预先在图形数据库中配置好各种配置模型,且这些配置模型是存储在图形数据库中,实现了与业务数据的分离。In this embodiment, a plurality of configuration models are stored in the graphics database, and each configuration model includes a page layer, a service view layer, and an ER layer. The configuration models in the graph database are all pre-set, that is, the user pre-configures various configuration models in the graph database, and these configuration models are stored in the graph database to realize separation from the business data.
在一实施例中,所述图形数据库为NEO4J图形数据库。NEO4J是一个高性能的NOSQL(NOSQL泛指非关系型的数据库)图形数据库,它将结构化数据存储在网络上而不是表中。NEO4J也可以被看作是一个高性能的图引擎,该引擎具有成熟数据库的所有特性。NEO4J图形数据库的一个图中包含两种基本的数据类型:Nodes(节点)和Relationships(关系)。Nodes和Relationships包含key/value形式的属性。Nodes通过Relationships所定义的关系相连起来,形成关系型网络结构。In an embodiment, the graphics database is a NEO4J graphics database. NEO4J is a high-performance NOSQL (NOSQL refers to non-relational database) graphical database that stores structured data on the network rather than in the table. NEO4J can also be seen as a high-performance graph engine with all the features of a mature database. A diagram of the NEO4J graph database contains two basic data types: Nodes and Relationships. Nodes and Relationships contain attributes in the form of key/value. Nodes are connected by relationships defined by Relationships to form a relational network structure.
在一实施例中,在获取了菜单的配置编码后,通过Cypher脚本查询与配置编码相对应的配置模型。Cypher脚本的查询语言包含以下几个明显的部分:In an embodiment, after obtaining the configuration code of the menu, the configuration model corresponding to the configuration code is queried by using a Cypher script. The query language of the Cypher script contains the following obvious parts:
1)START:在图中的开始点,通过元素的ID或索引查找获得。2)MATCH:图形的匹配模式,束缚于开始点。3)WHERE:过滤条件。4)RETURN:返回所需要的。1) START: At the beginning of the graph, it is obtained by the ID or index of the element. 2) MATCH: The matching mode of the graphic, bound to the starting point. 3) WHERE: Filter conditions. 4) RETURN: Returns what is needed.
例如,有个查询,通过遍历图找到索引里一个叫John的朋友的朋友(不是他的直接朋友),返回John和找到的朋友的朋友,对应的Cypher脚本如下:For example, there is a query that finds a friend of a friend named John in the index (not his direct friend) by traversing the graph, and returns the friend of John and the friend who found it. The corresponding Cypher script is as follows:
START john=node:node_auto_index(name=′John′)START john=node:node_auto_index(name='John')
MATCH john-[:friend]->()-[:friend]->fofMATCH john-[:friend]->()-[:friend]->fof
RETURN john,fofRETURN john,fof
通过Cypher脚本查询与配置编码相对应的配置模型后,则将该配置模型存储至内存。After the configuration model corresponding to the configuration code is queried by the Cypher script, the configuration model is stored in the memory.
S103、根据内存中所存储的配置模型对应生成包括数据表格的展示页面。S103. Generate a display page including a data table according to a configuration model stored in the memory.
在本实施例中,在CMDB应用系统中的内存中存储配置模型后,需根据配置模型渲染出数据表格,此时需解析配置模型而对应创建数据表格,并在数据表格中填充业务数据后在CMDB应用系统中的展示页面的区域进行显示。这样,通过数据表格的方式,展示出了与所选定的菜单相对应的业务数据,并可选定业务数据进行其他操作(如增加业务数据,修改业务数据,编辑业务数据,查询业务数据等)。本申请中,将业务数据之间的ER关系通过配置模型来管理,并存储在图形数据库中,降低了配置数据与业务数据之间的依赖耦合。In this embodiment, after the configuration model is stored in the memory in the CMDB application system, the data table needs to be rendered according to the configuration model. At this time, the configuration model needs to be parsed and the data table is created correspondingly, and the service data is filled in the data table. The area of the display page in the CMDB application system is displayed. In this way, through the data table, the business data corresponding to the selected menu is displayed, and the business data can be selected for other operations (such as adding business data, modifying business data, editing business data, querying business data, etc.) ). In the present application, the ER relationship between the business data is managed by the configuration model and stored in the graph database, which reduces the dependency coupling between the configuration data and the business data.
如图2所示,该步骤S103包括以下子步骤:As shown in FIG. 2, the step S103 includes the following sub-steps:
S1031、将内存中所存储的配置模型传输至浏览器;S1031: Transfer the configuration model stored in the memory to the browser;
S1032、在浏览器的前端通过js解析,获取与配置模型相对应的数据模型;其中,所述数据模型包括业务视图层和ER层;S1032: Obtain a data model corresponding to the configuration model by using js parsing at a front end of the browser; wherein the data model includes a service view layer and an ER layer;
S1033、根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,并将数据表格在展示页面中显示。S1033. Create a data table in the display page according to the data model, fill the data table corresponding to the data model into the data table, and display the data table on the display page.
在本实施例中,将内存中所存储的配置模型传输至浏览器(浏览器可视为用户界面的一种具体实例),在浏览器的展示页面相应区域中先通过js解析,获取与配置模型相对应的数据模型。其中,配置模型是以json(JavaScript Object Notation,是一种轻量级的数据交换格式)的数据格式传输至浏览器,在浏览器的前端通过js解析,获取与配置模型中所包括业务视图层对应数据和ER层对应数据(无需获取配置模型中页面层对应数据),并由业务视图层对应数据和ER层对应数据组成数据模型。在获取了数据模型后,即可根据数据模型在浏览器的展示页面相应区域中渲染数据表格,并填充业务数据。本申请中,根据业务视图层对应数据自动生成建表脚本,根据ER层对应数据提取业务数据并对应插入至数据表格相应位置,实现了在浏览器的后台自动建表,用户查看业务数据更加直观。而且还能实时调用业务数据对应的ER层模型,能直观的体现出业务数据的ER模型。In this embodiment, the configuration model stored in the memory is transmitted to the browser (the browser can be regarded as a specific example of the user interface), and parsed, acquired, and configured in the corresponding area of the display page of the browser. The data model corresponding to the model. The configuration model is transmitted to the browser in a data format of json (JavaScript Object Notation, which is a lightweight data exchange format), and is parsed at the front end of the browser to obtain and configure the business view layer included in the model. The corresponding data and the corresponding data of the ER layer (the data corresponding to the page layer in the configuration model need not be acquired), and the data model is composed of the corresponding data of the business view layer and the corresponding data of the ER layer. After the data model is acquired, the data table can be rendered in the corresponding area of the browser display page according to the data model, and the business data is filled. In the application, the table creation script is automatically generated according to the corresponding data of the business view layer, and the business data is extracted according to the corresponding data of the ER layer and correspondingly inserted into the corresponding position of the data table, thereby realizing automatic table construction in the background of the browser, and the user viewing the business data is more intuitive. . Moreover, the ER layer model corresponding to the business data can be called in real time, and the ER model of the business data can be visually reflected.
如图3所示,该步骤S1033中根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格包括以下子步骤:As shown in FIG. 3, in step S1033, a data table is created in the display page according to the data model, and the data rendering corresponding to the data model is filled into the data table, including the following sub-steps:
S10331、根据数据模型的业务视图层生成数据表格;S10331. Generate a data table according to a business view layer of the data model.
S10332、根据ER层中所包括每一实体的属性生成数据表格中的列;S10332. Generate a column in the data table according to an attribute of each entity included in the ER layer.
S10333、将与实体对应数据渲染填充至数据表格中对应的列。S10333: Fill the corresponding data with the entity to the corresponding column in the data table.
在本实施例中,根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格的过程是一自动化的执行过程。即先通过数据模型的业务视图层对应的表名生成数据表格,如通过create语句来生成;然后根据ER层中所包括每一实体的属性生成数据表格中的列,如通过add colnew语句来生成;最后将与实体对应数据渲染填充至数据表格中对应的列,即完成了自动化的建表和数据渲染填充过程。In this embodiment, the process of creating a data table in the display page according to the data model, and filling the data rendering corresponding to the data model into the data table is an automated execution process. That is, the data table is first generated by the table name corresponding to the business view layer of the data model, such as by the create statement; then the columns in the data table are generated according to the attributes of each entity included in the ER layer, such as by the add colnew statement. Finally, the corresponding data rendering with the entity is filled into the corresponding column in the data table, that is, the automated table construction and data rendering filling process is completed.
S104、若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本。S104. If a data operation on the data table is detected, the SQL script is generated according to the operation type of the data operation and the service data selected by the data operation.
如图4所示,步骤S104包括以下子步骤:As shown in FIG. 4, step S104 includes the following sub-steps:
S1041、若数据操作的操作类型为增加数据操作,根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成第一SQL脚本;S1041: If the operation type of the data operation is an increase data operation, generate a first SQL script according to the service view layer node corresponding to the data table in the display page, and the data to be added;
S1042、若数据操作的操作类型为删除数据操作,根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成第二SQL脚本;S1042: If the operation type of the data operation is a delete data operation, generate a second SQL script according to the service view layer node corresponding to the data table in the display page and the data to be deleted;
S1043、若数据操作的操作类型为编辑数据操作,根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成第三SQL脚本;S1043. If the operation type of the data operation is an edit data operation, generate a third SQL script according to the service view layer node corresponding to the data table in the display page and the data to be edited;
S1044、若数据操作的操作类型为查询数据操作,根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成第四SQL脚本。S1044. If the operation type of the data operation is a query data operation, generate a fourth SQL script according to the service view layer node corresponding to the data table in the display page and the data to be queried.
在本实施例中,若检测到对数据表格的数据操作,需先判断数据操作的操作类型。而针对数据库的操作一般包括增加数据操作、删除数据操作、编辑数据操作和查询数据操作。故当选定了业务数据并对应进行数据操作时,通过展示页面中数据表格对应的业务视图层节点、及待操作的数据自动生成SQL脚本;例如,若数据操作的操作类型为增加数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成包括insert语句的第一SQL脚本;类似的,若数据操作的操作类型为删除数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成包括delete语句的第二SQL脚本;若数据操作的操作类型为编辑数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成包括update语句的第三SQL脚本;若数据操作的操作类型为查询数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成包括select语句的第四SQL脚本。In this embodiment, if the data operation on the data table is detected, the operation type of the data operation needs to be determined first. The operations for the database generally include adding data operations, deleting data operations, editing data operations, and querying data operations. Therefore, when the business data is selected and the data operation is performed, the SQL script is automatically generated by displaying the business view layer node corresponding to the data table in the page and the data to be operated; for example, if the operation type of the data operation is increasing data operation, Then, according to the business view layer node corresponding to the data table in the display page, and the data to be added, a first SQL script including an insert statement is generated; similarly, if the operation type of the data operation is a delete data operation, according to the data table in the display page Corresponding business view layer node and data to be deleted generate a second SQL script including a delete statement; if the operation type of the data operation is an edit data operation, according to the business view layer node corresponding to the data table in the display page, and to be edited The data generates a third SQL script including an update statement; if the operation type of the data operation is a query data operation, generating a fourth SQL including a select statement according to the business view layer node corresponding to the data table in the display page and the data to be queried script.
S105、执行SQL脚本,反馈对应的业务数据处理结果。S105. Execute the SQL script and feed back the corresponding service data processing result.
在本实施例中,在Mybatis框架中执行SQL脚本,在关系型数据库中根据SQL脚本对目标数据进行相应操作(如增加数据操作、删除数据操作、编辑数据操作和查询数据操作),在完成数据操作后,在用户页面上进行操作成功或操作失败的提示(即反馈对应的业务数据处理结果)。这样,能直观的通过数据表格对后台的业务数据进行各种操作,从而进行数据管理。In this embodiment, the SQL script is executed in the Mybatis framework, and the target data is operated according to the SQL script in the relational database (such as adding data operations, deleting data operations, editing data operations, and querying data operations), completing the data. After the operation, the operation succeeds or the operation fails (ie, the corresponding service data processing result is fed back) on the user page. In this way, data management can be performed by intuitively performing various operations on the background business data through the data table.
可见,该方法通过图形数据库保存配置数据,关系型数据库保存业务数据,在完成配置后无需编辑脚本就可完成对业务数据的展示及数据的相关操作,实现了与业务数据的分离,降低了配置数据与业务数据之间的依赖耦合。而且配置数据与业务数据配置数据与业务数据由于未存储在同一张表中,提高了数据操作的效率。It can be seen that the method saves the configuration data through the graphic database, and the relational database saves the business data. After the configuration is completed, the display of the business data and the related operations of the data can be completed without editing the script, thereby realizing the separation from the business data and reducing the configuration. Dependency coupling between data and business data. Moreover, the configuration data and the service data configuration data and the business data are not stored in the same table, which improves the efficiency of data operation.
本申请实施例还提供一种业务系统动态生成装置,该业务系统动态生成装置用于执行前述任一项业务系统动态生成方法。具体地,请参阅图5,图5是本申请实施例提供的一种业务系统动态生成装置的示意性框图。业务系统动态生成装置100可以安装于台式电脑、平板电脑、手提电脑、等终端中。The embodiment of the present application further provides a service system dynamic generation device, where the service system dynamic generation device is configured to execute any of the foregoing business system dynamic generation methods. Specifically, please refer to FIG. 5. FIG. 5 is a schematic block diagram of a service system dynamic generation apparatus according to an embodiment of the present application. The business system dynamic generation device 100 can be installed in a desktop computer, a tablet computer, a laptop computer, or the like.
如图5所示,业务系统动态生成装置100包括配置编码检索单元101、配置编码加载单元102、展示页面生成单元103、SQL脚本生成单元104、数据结果反馈单元105。As shown in FIG. 5, the business system dynamic generation apparatus 100 includes a configuration code retrieval unit 101, a configuration code loading unit 102, a presentation page generation unit 103, an SQL script generation unit 104, and a data result feedback unit 105.
配置编码检索单元101,用于若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码。The configuration code retrieval unit 101 is configured to acquire a configuration code corresponding to the selected menu if it is detected that the menu in the user interface is selected.
在本实施例中,在面向用户的用户界面上设置有多个菜单,即菜单是设置在CMDB应用系统中的界面上。每点击一个菜单,均会对应展示一个新界面,也即对用户选中动作的一个反馈。由于用户界面上设置的每一菜单均对应唯一的配置编码,当菜单被选中时则根据被选中菜单得到其配置编码。本申请中,所述配置编码是映射图形数据库中的配置模型。每点击一个菜单,都会在图形数据库检索是否存在与配置编码对应的配置模型,并根据检索得到的配置模型来渲染包括数据表格的页面,以直观的在CMDB应用系统中的页面上展示业务数据。In this embodiment, a plurality of menus are set on the user-oriented user interface, that is, the menu is set on the interface in the CMDB application system. Each time you click on a menu, a new interface will be displayed, which is a feedback to the user's selected action. Since each menu set on the user interface corresponds to a unique configuration code, when the menu is selected, the configuration code is obtained according to the selected menu. In the present application, the configuration code is a configuration model in a mapping graph database. Each time a menu is clicked, the configuration database corresponding to the configuration code is retrieved in the graphics database, and the page including the data table is rendered according to the retrieved configuration model to visually display the business data on the page in the CMDB application system.
配置编码加载单元102,用于根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储。The configuration code loading unit 102 is configured to retrieve a configuration model corresponding to the query in the graphics database according to the configuration code, and load it into the memory for storage.
在本实施例中,所述图形数据库中存储有多个配置模型,每一配置模型均包括页面层、业务视图层和ER层。图形数据库中的配置模型均是预先设置好的,即用户预先在图形数据库中配置好各种配置模型,且这些配置模型是存储在图形数据库中,实现了与业务数据的分离。In this embodiment, a plurality of configuration models are stored in the graphics database, and each configuration model includes a page layer, a service view layer, and an ER layer. The configuration models in the graph database are all pre-set, that is, the user pre-configures various configuration models in the graph database, and these configuration models are stored in the graph database to realize separation from the business data.
展示页面生成单元103,用于根据内存中所存储的配置模型对应生成包括数据表格的展示页面。The display page generating unit 103 is configured to generate a display page including the data table according to the configuration model stored in the memory.
在本实施例中,在CMDB应用系统中的内存中存储配置模型后,需根据配置模型渲染出数据表格,此时需解析配置模型而对应创建数据表格,并在数据表格中填充业务数据后在CMDB应用系统中的展示页面的区域进行显示。这样,通过数据表格的方式,展示出了与所选定的菜单相对应的业务数据,并可选定业务数据进行其他操作(如增加业务数据,修改业务数据,编辑业务数据,查询业务数据等)。本申请中,将业务数据之间的ER关系通过配置模型来管理,并存储在图形数据库中,降低了配置数据与业务数据之间的依赖耦合。In this embodiment, after the configuration model is stored in the memory in the CMDB application system, the data table needs to be rendered according to the configuration model. At this time, the configuration model needs to be parsed and the data table is created correspondingly, and the service data is filled in the data table. The area of the display page in the CMDB application system is displayed. In this way, through the data table, the business data corresponding to the selected menu is displayed, and the business data can be selected for other operations (such as adding business data, modifying business data, editing business data, querying business data, etc.) ). In the present application, the ER relationship between the business data is managed by the configuration model and stored in the graph database, which reduces the dependency coupling between the configuration data and the business data.
SQL脚本生成单元104,用于若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;The SQL script generating unit 104 is configured to generate a SQL script according to the operation type of the data operation and the service data selected by the data operation if the data operation on the data table is detected;
数据结果反馈单元105,用于执行SQL脚本,反馈对应的业务数据处理结果。The data result feedback unit 105 is configured to execute the SQL script and feed back the corresponding service data processing result.
在本实施例中,在Mybatis框架中执行SQL脚本,在关系型数据库中根据SQL脚本对目标数据进行相应操作(如增加数据操作、删除数据操作、编辑数据操作和查询数据操作),在完成数据操作后,在用户页面上进行操作成功或操作失败的提示(即反馈对应的业务数据处理结果)。这样,能直观的通过数据表格对后台的业务数据进行各种操作,从而进行数据管理。In this embodiment, the SQL script is executed in the Mybatis framework, and the target data is operated according to the SQL script in the relational database (such as adding data operations, deleting data operations, editing data operations, and querying data operations), completing the data. After the operation, the operation succeeds or the operation fails (ie, the corresponding service data processing result is fed back) on the user page. In this way, data management can be performed by intuitively performing various operations on the background business data through the data table.
如图6所示,所述展示页面生成单元103包括以下子单元:As shown in FIG. 6, the presentation page generating unit 103 includes the following subunits:
配置模型传输单元1031,用于将内存中所存储的配置模型传输至浏览器;解析单元1032,用于在浏览器的前端通过js解析,获取与配置模型相对应的数据模型;其中,所述数据模型包括业务视图层和ER层;数据表格生成单元1033,用于根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,并将数据表格在展示页面中显示。The configuration model transmission unit 1031 is configured to transmit the configuration model stored in the memory to the browser; the parsing unit 1032 is configured to obtain a data model corresponding to the configuration model by parsing the front end of the browser; wherein The data model includes a business view layer and an ER layer; a data table generating unit 1033 is configured to create a data table in the display page according to the data model, fill the data table corresponding to the data model into the data table, and display the data table in the display page. display.
在本实施例中,将内存中所存储的配置模型传输至浏览器(浏览器可视为用户界面的一种具体实例),在浏览器的展示页面相应区域中先通过js解析, 获取与配置模型相对应的数据模型。其中,配置模型是以json(JavaScript Object Notation,是一种轻量级的数据交换格式)的数据格式传输至浏览器,在浏览器的前端通过js解析,获取与配置模型中所包括业务视图层对应数据和ER层对应数据(无需获取配置模型中页面层对应数据),并由业务视图层对应数据和ER层对应数据组成数据模型。在获取了数据模型后,即可根据数据模型在浏览器的展示页面相应区域中渲染数据表格,并填充业务数据。本申请中,根据业务视图层对应数据自动生成建表脚本,根据ER层对应数据提取业务数据并对应插入至数据表格相应位置,实现了在浏览器的后台自动建表,用户查看业务数据更加直观。而且还能实时调用业务数据对应的ER层模型,能直观的体现出业务数据的ER模型。In this embodiment, the configuration model stored in the memory is transmitted to the browser (the browser can be regarded as a specific example of the user interface), and parsed, acquired, and configured in the corresponding area of the display page of the browser. The data model corresponding to the model. The configuration model is transmitted to the browser in a data format of json (JavaScript Object Notation, which is a lightweight data exchange format), and is parsed at the front end of the browser to obtain and configure the business view layer included in the model. The corresponding data and the corresponding data of the ER layer (the data corresponding to the page layer in the configuration model need not be acquired), and the data model is composed of the corresponding data of the business view layer and the corresponding data of the ER layer. After the data model is acquired, the data table can be rendered in the corresponding area of the browser display page according to the data model, and the business data is filled. In the application, the table creation script is automatically generated according to the corresponding data of the business view layer, and the business data is extracted according to the corresponding data of the ER layer and correspondingly inserted into the corresponding position of the data table, thereby realizing automatic table construction in the background of the browser, and the user viewing the business data is more intuitive. . Moreover, the ER layer model corresponding to the business data can be called in real time, and the ER model of the business data can be visually reflected.
如图7所示,所述数据表格生成单元1033包括以下子单元:表格生产单元10331,用于根据数据模型的业务视图层生成数据表格;列生成单元10332,用于根据ER层中所包括每一实体的属性生成数据表格中的列;数据渲染单元10333,用于将与实体对应数据渲染填充至数据表格中对应的列。As shown in FIG. 7, the data table generating unit 1033 includes the following subunits: a table producing unit 10331 for generating a data table according to the business view layer of the data model, and a column generating unit 10332 for including each of the ER layers The attribute of an entity generates a column in the data table; the data rendering unit 10333 is configured to fill the corresponding data of the entity to the corresponding column in the data table.
在本实施例中,根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格的过程是一自动化的执行过程。即先通过数据模型的业务视图层对应的表名生成数据表格,如通过create语句来生成;然后根据ER层中所包括每一实体的属性生成数据表格中的列,如通过add colnew语句来生成;最后将与实体对应数据渲染填充至数据表格中对应的列,即完成了自动化的建表和数据渲染填充过程。In this embodiment, the process of creating a data table in the display page according to the data model, and filling the data rendering corresponding to the data model into the data table is an automated execution process. That is, the data table is first generated by the table name corresponding to the business view layer of the data model, such as by the create statement; then the columns in the data table are generated according to the attributes of each entity included in the ER layer, such as by the add colnew statement. Finally, the corresponding data rendering with the entity is filled into the corresponding column in the data table, that is, the automated table construction and data rendering filling process is completed.
如图8所示,所述SQL脚本生成单元104包括以下子单元:As shown in FIG. 8, the SQL script generating unit 104 includes the following subunits:
第一脚本生成单元1041,用于若数据操作的操作类型为增加数据操作,根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成第一SQL脚本;The first script generating unit 1041 is configured to generate a first SQL script according to the service view layer node corresponding to the data table in the display page and the data to be added if the operation type of the data operation is an increase data operation;
第二脚本生成单元1042,用于若数据操作的操作类型为删除数据操作,根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成第二SQL脚本;The second script generating unit 1042 is configured to generate a second SQL script according to the service view layer node corresponding to the data table in the display page and the data to be deleted if the operation type of the data operation is a delete data operation;
第三脚本生成单元1043,用于若数据操作的操作类型为编辑数据操作,根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成第三SQL脚本;The third script generating unit 1043 is configured to generate a third SQL script according to the business view layer node corresponding to the data table in the display page and the data to be edited if the operation type of the data operation is an edit data operation;
第四脚本生成单元1044,用于若数据操作的操作类型为查询数据操作,根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成第四SQL脚本。The fourth script generating unit 1044 is configured to generate a fourth SQL script according to the service view layer node corresponding to the data table in the display page and the data to be queried if the operation type of the data operation is a query data operation.
在本实施例中,若检测到对数据表格的数据操作,需先判断数据操作的操作类型。而针对数据库的操作一般包括增加数据操作、删除数据操作、编辑数据操作和查询数据操作。故当选定了业务数据并对应进行数据操作时,通过展示页面中数据表格对应的业务视图层节点、及待操作的数据自动生成SQL脚本;例如,若数据操作的操作类型为增加数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成包括insert语句的第一SQL脚本;类似的,若数据操作的操作类型为删除数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成包括delete语句的第二SQL脚本;若数据操作的操作类型为编辑数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成包括update语句的第三SQL脚本;若数据操作的操作类型为查询数据操作,则根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成包括select语句的第四SQL脚本。In this embodiment, if the data operation on the data table is detected, the operation type of the data operation needs to be determined first. The operations for the database generally include adding data operations, deleting data operations, editing data operations, and querying data operations. Therefore, when the business data is selected and the data operation is performed, the SQL script is automatically generated by displaying the business view layer node corresponding to the data table in the page and the data to be operated; for example, if the operation type of the data operation is increasing data operation, Then, according to the business view layer node corresponding to the data table in the display page, and the data to be added, a first SQL script including an insert statement is generated; similarly, if the operation type of the data operation is a delete data operation, according to the data table in the display page Corresponding business view layer node and data to be deleted generate a second SQL script including a delete statement; if the operation type of the data operation is an edit data operation, according to the business view layer node corresponding to the data table in the display page, and to be edited The data generates a third SQL script including an update statement; if the operation type of the data operation is a query data operation, generating a fourth SQL including a select statement according to the business view layer node corresponding to the data table in the display page and the data to be queried script.
可见,该装置通过图形数据库保存配置数据,关系型数据库保存业务数据,在完成配置后无需编辑脚本就可完成对业务数据的展示及数据的相关操作,实现了与业务数据的分离,降低了配置数据与业务数据之间的依赖耦合。而且配置数据与业务数据配置数据与业务数据由于未存储在同一张表中,提高了数据操作的效率。It can be seen that the device saves the configuration data through the graphic database, and the relational database stores the business data. After the configuration is completed, the display of the business data and the related operations of the data can be completed without editing the script, thereby realizing the separation from the business data and reducing the configuration. Dependency coupling between data and business data. Moreover, the configuration data and the service data configuration data and the business data are not stored in the same table, which improves the efficiency of data operation.
上述业务系统动态生成装置可以实现为一种计算机程序的形式,该计算机程序可以在如图9所示的计算机设备上运行。The above business system dynamic generation device can be implemented in the form of a computer program that can be run on a computer device as shown in FIG.
请参阅图9,图9是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备500设备可以是终端。该终端可以是平板电脑、笔记本电脑、台式电脑、个人数字助理等电子设备。Please refer to FIG. 9. FIG. 9 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 device can be a terminal. The terminal can be an electronic device such as a tablet computer, a notebook computer, a desktop computer, or a personal digital assistant.
参阅图9,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032包括程序指令,该程序指令被执行时,可使得处理器502执行一种业务系统动态生成方法。该处理器502用于提供计算和控制能力,支撑整个 计算机设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行一种业务系统动态生成方法。该网络接口505用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Referring to FIG. 9, the computer device 500 includes a processor 502, a memory, and a network interface 505 connected by a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504. The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a business system dynamic generation method. The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500. The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, which when executed by the processor 502, may cause the processor 502 to perform a business system dynamic generation method. The network interface 505 is used for network communication, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device 500 to which the solution of the present application is applied, and a specific computer device. 500 may include more or fewer components than shown, or some components may be combined, or have different component arrangements.
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现如下功能:若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码;根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储;根据内存中所存储的配置模型对应生成包括数据表格的展示页面;若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;执行SQL脚本,反馈对应的业务数据处理结果。The processor 502 is configured to run a computer program 5032 stored in the memory to implement a function of: if it is detected that a menu in the user interface is selected, acquiring a configuration code corresponding to the selected menu; Retrieving the configuration model corresponding to the query in the database, and loading it into the memory for storage; generating a display page including the data table according to the configuration model stored in the memory; if the data operation on the data table is detected, the operation type according to the data operation And the business data selected by the data operation corresponds to generate a SQL script; execute the SQL script, and feed back the corresponding business data processing result.
其中,所述图形数据库中存储有多个配置模型,每一配置模型均包括页面层、业务视图层和ER层。The graphic database stores a plurality of configuration models, and each configuration model includes a page layer, a business view layer, and an ER layer.
在一实施例中,处理器502还执行如下操作:将内存中所存储的配置模型传输至浏览器;在浏览器的前端通过js解析,获取与配置模型相对应的数据模型;其中,所述数据模型包括业务视图层和ER层;根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,并将数据表格在展示页面中显示。In an embodiment, the processor 502 further performs the operations of: transmitting the configuration model stored in the memory to the browser; and parsing through the js at the front end of the browser to obtain a data model corresponding to the configuration model; The data model includes a business view layer and an ER layer; a data table is created in the display page according to the data model, data rendering corresponding to the data model is filled into the data table, and the data table is displayed on the display page.
在一实施例中,处理器502还执行如下操作:根据数据模型的业务视图层生成数据表格;根据ER层中所包括每一实体的属性生成数据表格中的列;将与实体对应数据渲染填充至数据表格中对应的列。In an embodiment, the processor 502 further performs: generating a data table according to the business view layer of the data model; generating a column in the data table according to an attribute of each entity included in the ER layer; and rendering the data corresponding to the entity Go to the corresponding column in the data table.
在一实施例中,处理器502还执行如下操作:若数据操作的操作类型为增加数据操作,根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成第一SQL脚本;若数据操作的操作类型为删除数据操作,根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成第二SQL脚本;若数据操作的操作类型为编辑数据操作,根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成第三SQL脚本;若数据操作的操作类型为查询数 据操作,根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成第四SQL脚本。In an embodiment, the processor 502 further performs the following operations: if the operation type of the data operation is an increase data operation, generating a first SQL script according to the service view layer node corresponding to the data table in the display page and the data to be added; The operation type of the data operation is a delete data operation, and a second SQL script is generated according to the business view layer node corresponding to the data table in the display page and the data to be deleted; if the operation type of the data operation is an edit data operation, according to the data in the display page The service view layer node corresponding to the table and the data to be edited generate a third SQL script; if the operation type of the data operation is a query data operation, the business view layer node corresponding to the data table in the display page and the data to be queried are generated. Four SQL scripts.
本领域技术人员可以理解,图9中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图9所示实施例一致,在此不再赘述。It will be understood by those skilled in the art that the embodiment of the computer device shown in FIG. 9 does not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated. Or combine some parts, or different parts. For example, in some embodiments, the computer device may include only a memory and a processor. In such an embodiment, the structure and functions of the memory and the processor are the same as those of the embodiment shown in FIG. 9, and details are not described herein.
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be another general-purpose processor, a digital signal processor (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
在本申请的另一实施例中提供一种存储介质。该存储介质可以为非易失性的计算机可读存储介质。该存储介质存储有计算机程序,其中计算机程序包括程序指令。该程序指令被处理器执行时实现本申请实施例的业务系统动态生成方法。In another embodiment of the present application, a storage medium is provided. The storage medium can be a non-transitory computer readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instruction is executed by the processor, the business system dynamic generation method of the embodiment of the present application is implemented.
所述存储介质可以是前述设备的内部存储单元,例如设备的硬盘或内存。所述存储介质也可以是所述设备的外部存储设备,例如所述设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储介质还可以既包括所述设备的内部存储单元也包括外部存储设备。The storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or a memory of the device. The storage medium may also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (SMC), a secure digital (SD) card, and a flash memory card. (Flash Card), etc. Further, the storage medium may also include both an internal storage unit of the device and an external storage device.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the device, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any equivalents can be easily conceived by those skilled in the art within the technical scope disclosed in the present application. Modifications or substitutions are intended to be included within the scope of the present application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.

Claims (20)

  1. 一种业务系统动态生成方法,其特征在于,包括:A method for dynamically generating a business system, comprising:
    若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码;If it is detected that the menu in the user interface is selected, the configuration code corresponding to the selected menu is obtained;
    根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储;Retrieving the configuration model corresponding to the query in the graphics database according to the configuration code, and loading it into the memory for storage;
    根据内存中所存储的配置模型对应生成包括数据表格的展示页面;Generating a display page including a data table according to a configuration model stored in the memory;
    若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;If the data operation on the data table is detected, the SQL script is generated according to the operation type of the data operation and the service data selected by the data operation;
    执行SQL脚本,反馈对应的业务数据处理结果。Execute the SQL script and feed back the corresponding business data processing results.
  2. 根据权利要求1所述的业务系统动态生成方法,其特征在于,所述图形数据库中存储有多个配置模型,每一配置模型均包括页面层、业务视图层和ER层。The method for dynamically generating a business system according to claim 1, wherein the graphic database stores a plurality of configuration models, each of which includes a page layer, a business view layer, and an ER layer.
  3. 根据权利要求1所述的业务系统动态生成方法,其特征在于,所述根据内存中所存储的配置模型对应生成包括数据表格的展示页面,包括:The method for dynamically generating a service system according to claim 1, wherein the generating a display page including the data table according to the configuration model stored in the memory comprises:
    将内存中所存储的配置模型传输至浏览器;Transfer the configuration model stored in the memory to the browser;
    在浏览器的前端通过js解析,获取与配置模型相对应的数据模型;其中,所述数据模型包括业务视图层和ER层;Obtaining a data model corresponding to the configuration model by parsing the front end of the browser; wherein the data model includes a business view layer and an ER layer;
    根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,并将数据表格在展示页面中显示。Create a data table in the display page according to the data model, fill the data table corresponding to the data model into the data table, and display the data table in the display page.
  4. 根据权利要求3所述的业务系统动态生成方法,其特征在于,所述根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,包括:The method for dynamically generating a business system according to claim 3, wherein the data table is created in the display page according to the data model, and the data corresponding to the data model is rendered into the data table, including:
    根据数据模型的业务视图层生成数据表格;Generating a data table according to the business view layer of the data model;
    根据ER层中所包括每一实体的属性生成数据表格中的列;Generating columns in the data table based on attributes of each entity included in the ER layer;
    将与实体对应数据渲染填充至数据表格中对应的列。The data corresponding to the entity is rendered into the corresponding column in the data table.
  5. 根据权利要求1所述的业务系统动态生成方法,其特征在于,所述根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本,包括:The method for dynamically generating a business system according to claim 1, wherein the generating the SQL script according to the operation type of the data operation and the service data selected by the data operation comprises:
    若数据操作的操作类型为增加数据操作,根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成第一SQL脚本;If the operation type of the data operation is an increase data operation, generate a first SQL script according to the service view layer node corresponding to the data table in the display page and the data to be added;
    若数据操作的操作类型为删除数据操作,根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成第二SQL脚本;If the operation type of the data operation is a delete data operation, generate a second SQL script according to the service view layer node corresponding to the data table in the display page and the data to be deleted;
    若数据操作的操作类型为编辑数据操作,根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成第三SQL脚本;If the operation type of the data operation is an edit data operation, generate a third SQL script according to the business view layer node corresponding to the data table in the display page and the data to be edited;
    若数据操作的操作类型为查询数据操作,根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成第四SQL脚本。If the operation type of the data operation is a query data operation, a fourth SQL script is generated according to the business view layer node corresponding to the data table in the display page and the data to be queried.
  6. 一种业务系统动态生成装置,其特征在于,包括:A service system dynamic generation device, comprising:
    配置编码检索单元,用于若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码;Configuring a code retrieval unit, configured to: if it is detected that a menu in the user interface is selected, obtain a configuration code corresponding to the selected menu;
    配置编码加载单元,用于根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储;The code loading unit is configured to retrieve a configuration model corresponding to the query in the graphic database according to the configuration code, and load the file into the memory for storage;
    展示页面生成单元,用于根据内存中所存储的配置模型对应生成包括数据表格的展示页面;a display page generating unit, configured to generate a display page including a data table according to a configuration model stored in the memory;
    SQL脚本生成单元,用于若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;The SQL script generating unit is configured to generate a SQL script according to the operation type of the data operation and the service data selected by the data operation if the data operation on the data table is detected;
    数据结果反馈单元,用于执行SQL脚本,反馈对应的业务数据处理结果。The data result feedback unit is configured to execute the SQL script and feed back the corresponding business data processing result.
  7. 根据权利要求6所述的业务系统动态生成装置,其特征在于,所述图形数据库中存储有多个配置模型,每一配置模型均包括页面层、业务视图层和ER层。The business system dynamic generation device according to claim 6, wherein the graphic database stores a plurality of configuration models, each of which includes a page layer, a business view layer, and an ER layer.
  8. 根据权利要求6所述的业务系统动态生成装置,其特征在于,所述展示页面生成单元,包括:The service system dynamic generating apparatus according to claim 6, wherein the display page generating unit comprises:
    配置模型传输单元,用于将内存中所存储的配置模型传输至浏览器;Configuring a model transmission unit for transmitting a configuration model stored in the memory to the browser;
    解析单元,用于在浏览器的前端通过js解析,获取与配置模型相对应的数据模型;其中,所述数据模型包括业务视图层和ER层;a parsing unit, configured to parse a data model corresponding to the configuration model by using js parsing at a front end of the browser; wherein the data model includes a service view layer and an ER layer;
    数据表格生成单元,用于根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,并将数据表格在展示页面中显示。The data table generating unit is configured to create a data table in the display page according to the data model, fill the data table corresponding to the data model into the data table, and display the data table in the display page.
  9. 根据权利要求8所述的业务系统动态生成装置,其特征在于,所述数据表格生成单元,包括:The service system dynamic generating apparatus according to claim 8, wherein the data table generating unit comprises:
    表格生产单元,用于根据数据模型的业务视图层生成数据表格;a form production unit for generating a data table according to a business view layer of the data model;
    列生成单元,用于根据ER层中所包括每一实体的属性生成数据表格中的列;a column generating unit, configured to generate a column in the data table according to an attribute of each entity included in the ER layer;
    数据渲染单元,用于将与实体对应数据渲染填充至数据表格中对应的列。A data rendering unit is configured to fill the corresponding data of the entity to the corresponding column in the data table.
  10. 根据权利要求6所述的业务系统动态生成装置,其特征在于,所述SQL脚本生成单元,包括:The business system dynamic generating apparatus according to claim 6, wherein the SQL script generating unit comprises:
    第一脚本生成单元,用于若数据操作的操作类型为增加数据操作,根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成第一SQL脚本;a first script generating unit, configured to generate a first SQL script according to the business view layer node corresponding to the data table in the display page and the data to be added if the operation type of the data operation is an increase data operation;
    第二脚本生成单元,用于若数据操作的操作类型为删除数据操作,根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成第二SQL脚本;a second script generating unit, configured to generate a second SQL script according to the service view layer node corresponding to the data table in the display page and the data to be deleted if the operation type of the data operation is a delete data operation;
    第三脚本生成单元,用于若数据操作的操作类型为编辑数据操作,根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成第三SQL脚本;a third script generating unit, configured to generate a third SQL script according to the business view layer node corresponding to the data table in the display page and the data to be edited if the operation type of the data operation is an edit data operation;
    第四脚本生成单元,用于若数据操作的操作类型为查询数据操作,根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成第四SQL脚本。The fourth script generating unit is configured to generate a fourth SQL script according to the business view layer node corresponding to the data table in the display page and the data to be queried if the operation type of the data operation is a query data operation.
  11. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现以下步骤:A computer apparatus comprising a memory, a processor, and a computer program stored on the memory and operative on the processor, wherein the processor, when executing the computer program, implements the following steps:
    若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码;If it is detected that the menu in the user interface is selected, the configuration code corresponding to the selected menu is obtained;
    根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储;Retrieving the configuration model corresponding to the query in the graphics database according to the configuration code, and loading it into the memory for storage;
    根据内存中所存储的配置模型对应生成包括数据表格的展示页面;Generating a display page including a data table according to a configuration model stored in the memory;
    若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;If the data operation on the data table is detected, the SQL script is generated according to the operation type of the data operation and the service data selected by the data operation;
    执行SQL脚本,反馈对应的业务数据处理结果。Execute the SQL script and feed back the corresponding business data processing results.
  12. 根据权利要求11所述的计算机设备,其特征在于,所述图形数据库中存储有多个配置模型,每一配置模型均包括页面层、业务视图层和ER层。The computer device according to claim 11, wherein the graphic database stores a plurality of configuration models, each of which includes a page layer, a business view layer, and an ER layer.
  13. 根据权利要求11所述的计算机设备,其特征在于,所述根据内存中所存储的配置模型对应生成包括数据表格的展示页面,包括:The computer device according to claim 11, wherein the generating a display page including the data table according to the configuration model stored in the memory comprises:
    将内存中所存储的配置模型传输至浏览器;Transfer the configuration model stored in the memory to the browser;
    在浏览器的前端通过js解析,获取与配置模型相对应的数据模型;其中,所述数据模型包括业务视图层和ER层;Obtaining a data model corresponding to the configuration model by parsing the front end of the browser; wherein the data model includes a business view layer and an ER layer;
    根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,并将数据表格在展示页面中显示。Create a data table in the display page according to the data model, fill the data table corresponding to the data model into the data table, and display the data table in the display page.
  14. 根据权利要求13所述的计算机设备,其特征在于,所述根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,包括:The computer device according to claim 13, wherein the data table is created in the display page according to the data model, and the data corresponding to the data model is rendered into the data table, including:
    根据数据模型的业务视图层生成数据表格;Generating a data table according to the business view layer of the data model;
    根据ER层中所包括每一实体的属性生成数据表格中的列;Generating columns in the data table based on attributes of each entity included in the ER layer;
    将与实体对应数据渲染填充至数据表格中对应的列。The data corresponding to the entity is rendered into the corresponding column in the data table.
  15. 根据权利要求11所述的计算机设备,其特征在于,所述根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本,包括:The computer device according to claim 11, wherein the operation data selected according to the data operation type and the data operation selected by the data operation correspondingly generate a SQL script, including:
    若数据操作的操作类型为增加数据操作,根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成第一SQL脚本;If the operation type of the data operation is an increase data operation, generate a first SQL script according to the service view layer node corresponding to the data table in the display page and the data to be added;
    若数据操作的操作类型为删除数据操作,根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成第二SQL脚本;If the operation type of the data operation is a delete data operation, generate a second SQL script according to the service view layer node corresponding to the data table in the display page and the data to be deleted;
    若数据操作的操作类型为编辑数据操作,根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成第三SQL脚本;If the operation type of the data operation is an edit data operation, generate a third SQL script according to the business view layer node corresponding to the data table in the display page and the data to be edited;
    若数据操作的操作类型为查询数据操作,根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成第四SQL脚本。If the operation type of the data operation is a query data operation, a fourth SQL script is generated according to the business view layer node corresponding to the data table in the display page and the data to be queried.
  16. 一种存储介质,其特征在于,所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行以下操作:A storage medium, characterized in that the storage medium stores a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the following operations:
    若检测到用户界面中的菜单被选中,获取被选中菜单所对应的配置编码;If it is detected that the menu in the user interface is selected, the configuration code corresponding to the selected menu is obtained;
    根据配置编码在图形数据库中检索查询对应的配置模型,并加载到内存中进行存储;Retrieving the configuration model corresponding to the query in the graphics database according to the configuration code, and loading it into the memory for storage;
    根据内存中所存储的配置模型对应生成包括数据表格的展示页面;Generating a display page including a data table according to a configuration model stored in the memory;
    若检测到对数据表格的数据操作,根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本;If the data operation on the data table is detected, the SQL script is generated according to the operation type of the data operation and the service data selected by the data operation;
    执行SQL脚本,反馈对应的业务数据处理结果。Execute the SQL script and feed back the corresponding business data processing results.
  17. 根据权利要求16所述的存储介质,其特征在于,所述图形数据库中存储有多个配置模型,每一配置模型均包括页面层、业务视图层和ER层。The storage medium according to claim 16, wherein the graphic database stores a plurality of configuration models, each of which includes a page layer, a business view layer, and an ER layer.
  18. 根据权利要求16所述的存储介质,其特征在于,所述根据内存中所存储的配置模型对应生成包括数据表格的展示页面,包括:The storage medium according to claim 16, wherein the generating a display page including the data table according to the configuration model stored in the memory comprises:
    将内存中所存储的配置模型传输至浏览器;Transfer the configuration model stored in the memory to the browser;
    在浏览器的前端通过js解析,获取与配置模型相对应的数据模型;其中,所述数据模型包括业务视图层和ER层;Obtaining a data model corresponding to the configuration model by parsing the front end of the browser; wherein the data model includes a business view layer and an ER layer;
    根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,并将数据表格在展示页面中显示。Create a data table in the display page according to the data model, fill the data table corresponding to the data model into the data table, and display the data table in the display page.
  19. 根据权利要求18所述的存储介质,其特征在于,所述根据数据模型在展示页面中创建数据表格,将与数据模型对应的数据渲染填充至数据表格,包括:The storage medium according to claim 18, wherein the creating a data table in the display page according to the data model, and populating the data corresponding to the data model into the data table, comprising:
    根据数据模型的业务视图层生成数据表格;Generating a data table according to the business view layer of the data model;
    根据ER层中所包括每一实体的属性生成数据表格中的列;Generating columns in the data table based on attributes of each entity included in the ER layer;
    将与实体对应数据渲染填充至数据表格中对应的列。The data corresponding to the entity is rendered into the corresponding column in the data table.
  20. 根据权利要求16所述的存储介质,其特征在于,所述根据数据操作的操作类型及数据操作所选定的业务数据对应生成SQL脚本,包括:The storage medium according to claim 16, wherein the operation data selected according to the data operation and the service data selected by the data operation are corresponding to generate a SQL script, including:
    若数据操作的操作类型为增加数据操作,根据展示页面中数据表格对应的业务视图层节点、及待增加的数据生成第一SQL脚本;If the operation type of the data operation is an increase data operation, generate a first SQL script according to the service view layer node corresponding to the data table in the display page and the data to be added;
    若数据操作的操作类型为删除数据操作,根据展示页面中数据表格对应的业务视图层节点、及待删除的数据生成第二SQL脚本;If the operation type of the data operation is a delete data operation, generate a second SQL script according to the service view layer node corresponding to the data table in the display page and the data to be deleted;
    若数据操作的操作类型为编辑数据操作,根据展示页面中数据表格对应的业务视图层节点、及待编辑的数据生成第三SQL脚本;If the operation type of the data operation is an edit data operation, generate a third SQL script according to the business view layer node corresponding to the data table in the display page and the data to be edited;
    若数据操作的操作类型为查询数据操作,根据展示页面中数据表格对应的业务视图层节点、及待查询的数据生成第四SQL脚本。If the operation type of the data operation is a query data operation, a fourth SQL script is generated according to the business view layer node corresponding to the data table in the display page and the data to be queried.
PCT/CN2018/083819 2018-02-12 2018-04-20 Service system dynamic generation method and apparatus, computer device, and storage medium WO2019153514A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810144173.9A CN108446327A (en) 2018-02-12 2018-02-12 Operation system dynamic creation method, device, computer equipment and storage medium
CN201810144173.9 2018-02-12

Publications (1)

Publication Number Publication Date
WO2019153514A1 true WO2019153514A1 (en) 2019-08-15

Family

ID=63192513

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083819 WO2019153514A1 (en) 2018-02-12 2018-04-20 Service system dynamic generation method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN108446327A (en)
WO (1) WO2019153514A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506943A (en) * 2020-10-30 2021-03-16 福建亿能达信息技术股份有限公司 Heterogeneous data service providing method, device, equipment and medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308296A (en) * 2018-09-30 2019-02-05 税友软件集团股份有限公司 A kind of generation method, device and the computer readable storage medium of business datum table
CN110673859B (en) * 2019-08-30 2022-06-17 北京浪潮数据技术有限公司 Graphic database deployment method, device, equipment and readable storage medium
CN110851420B (en) * 2019-10-31 2022-08-30 卡斯柯信号有限公司 Method for dynamically configuring data of general database model
CN111813926B (en) * 2019-11-13 2022-12-09 中国传媒大学 Operation method and system for database Neo4J interactive visualization
CN113779454A (en) * 2021-01-15 2021-12-10 北京沃东天骏信息技术有限公司 Data query method and device applied to single-page application
CN113434130A (en) * 2021-06-25 2021-09-24 平安科技(深圳)有限公司 SQL automatic generation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6212524B1 (en) * 1998-05-06 2001-04-03 E.Piphany, Inc. Method and apparatus for creating and populating a datamart
US20080126389A1 (en) * 2006-11-27 2008-05-29 Eyal Mush Schema modeler for generating an efficient database schema
CN102855332A (en) * 2012-09-24 2013-01-02 上海天玑科技股份有限公司 Graphic configuration management database based on graphic database
CN104123369A (en) * 2014-07-24 2014-10-29 中国移动通信集团广东有限公司 CMDB system based on graphic data base and implementation method
CN106933837A (en) * 2015-12-29 2017-07-07 航天信息股份有限公司 A kind of database table model and creation method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160055233A1 (en) * 2014-08-25 2016-02-25 Ca, Inc. Pre-join tags for entity-relationship modeling of databases
CN104866549B (en) * 2015-05-12 2018-09-04 中国人民解放军装甲兵工程学院 A kind of terrain environment Database Systems suitable for Multi-Agent simulation
CN105956163A (en) * 2016-05-19 2016-09-21 乐视控股(北京)有限公司 Method and device for managing graph database
CN107633016B (en) * 2017-08-23 2020-11-24 创新先进技术有限公司 Data processing method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6212524B1 (en) * 1998-05-06 2001-04-03 E.Piphany, Inc. Method and apparatus for creating and populating a datamart
US20080126389A1 (en) * 2006-11-27 2008-05-29 Eyal Mush Schema modeler for generating an efficient database schema
CN102855332A (en) * 2012-09-24 2013-01-02 上海天玑科技股份有限公司 Graphic configuration management database based on graphic database
CN104123369A (en) * 2014-07-24 2014-10-29 中国移动通信集团广东有限公司 CMDB system based on graphic data base and implementation method
CN106933837A (en) * 2015-12-29 2017-07-07 航天信息股份有限公司 A kind of database table model and creation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506943A (en) * 2020-10-30 2021-03-16 福建亿能达信息技术股份有限公司 Heterogeneous data service providing method, device, equipment and medium
CN112506943B (en) * 2020-10-30 2022-06-07 福建亿能达信息技术股份有限公司 Heterogeneous data service providing method, device, equipment and medium

Also Published As

Publication number Publication date
CN108446327A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
WO2019153514A1 (en) Service system dynamic generation method and apparatus, computer device, and storage medium
CN108519967B (en) Chart visualization method and device, terminal and storage medium
WO2019153554A1 (en) Data relationship display method and device, computer equipment and storage medium
US11216453B2 (en) Data visualization in a dashboard display using panel templates
JP7413306B2 (en) Data processing methods, devices, equipment and storage media
WO2020119485A1 (en) Page display method and device, apparatus, and storage medium
US11651012B1 (en) Coding commands using syntax templates
US10928970B2 (en) User-interface for developing applications that apply machine learning
CN108388622B (en) API interface dynamic generation method and device, computer equipment and storage medium
WO2019095424A1 (en) Data acquisition method and device, storage medium and terminal
WO2021217911A1 (en) Method and apparatus for constructing service website project, and computer device and storage medium
US10235391B2 (en) Method and apparatus for implementing dynamic database traversal
US20140330867A1 (en) Software design pattern for adapting a graph database visualization software
US10740771B2 (en) Method and system for two-dimensional charting using live queries
US8417690B2 (en) Automatically avoiding unconstrained cartesian product joins
CN108388623B (en) ER relationship generation method and device, computer equipment and storage medium
US11693873B2 (en) Systems and methods for using entity/relationship model data to enhance user interface engine
US20190005228A1 (en) Trusted and untrusted code execution in a workflow
US20140114916A1 (en) Code generation and implementation method, system, and storage medium for delivering bidirectional data aggregation and updates
CN116737127A (en) Low code development method, device, equipment and storage medium
WO2022066615A1 (en) Automatic graph database query construction and execution
US9280361B2 (en) Methods and systems for a real time transformation of declarative model and layout into interactive, digital, multi device forms
CN115062084B (en) Method and device for constructing API (application programming interface) based on database metadata
CN116028062A (en) Target code generation method, NPU instruction display method and device
CN115329150A (en) Method and device for generating search condition tree, electronic equipment and storage medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.11.2020)

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18904600

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18904600

Country of ref document: EP

Kind code of ref document: A1