Universal form implementation system and method in microservice scenario
By integrating the data source management and form design engine in the microservice scenario, the form configuration and business data are managed in a unified manner, which solves the problem of separation of general forms and business data, realizes efficient form data query and development, and alleviates the burden of general form microservices. load.
Patent Information
- Application Number
- CN202410634370.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-22
AI Technical Summary
In the existing technology, the database of general forms and business microservices is separated, which makes business form data query difficult and inefficient, and increases the pressure on general form microservices.
Design a universal form implementation system in a microservice scenario. Through the data source management device and the form design engine device, the form configuration and business data are integrated into the business microservice database to achieve unified management and operation of data and reduce the need for common form microservices. Service dependencies.
It realizes rapid development of business functions, saves 80% of development time, solves the problem of difficult business form data query, reduces the pressure on general form microservices, and improves query efficiency.
Smart Images

Figure CN118210480B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular to a system and method for realizing a universal form in a microservice scenario. Background Art
[0002] In the prior art, general forms manage form configuration and form data in a unified manner. Basically, form configuration and business form data are centrally stored in the database configured by the general form microservice, which is separated from the database of the business microservice. This makes it difficult for each business microservice to query the business form data in the form. As the amount of business form data and the number of forms increase, the efficiency of adding, deleting, modifying and checking data decreases, and the pressure on the general form microservice increases. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a universal form implementation system and method in a microservice scenario, so as to solve the problems of business data fragmentation and difficulty in business form data query caused by the use of universal form development functions, as well as solve the bottleneck of form business number query and reduce the pressure of universal form microservices.
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0005] On the one hand, the present invention provides a universal form implementation system in a microservice scenario, which is used in a microservice system. The microservice system includes a business microservice module and a universal form microservice module. The business microservice module is provided with a business service component. The business microservice module is connected to a business microservice database. The universal form microservice module is connected to a form microservice database. The universal form implementation system includes a data source management device, a form design engine device and a form data engine device, wherein:
[0006] The data source management device includes a data source registration component and a data source management component connected to each other;
[0007] The data source registration component and the form data engine device are both integrated in the business microservice module and connected to the business service component;
[0008] The data source management component and the form design engine device are both integrated in the general form micro-service module and connected to each other, and the form design engine device is also connected to the form data engine device.
[0009] On the other hand, the present invention provides a method for implementing a general form in a microservice scenario, using the general form implementation system in the microservice scenario, the method includes a form creation method, and the form creation method includes:
[0010] Select the business microservice database and fill in the basic information;
[0011] Design the form and save it to the form microservice database;
[0012] Deploy the form and create a table in the selected business microservice database.
[0013] On the other hand, the present invention provides a method for implementing a general form in a microservice scenario, using the general form implementation system in the microservice scenario, the method includes a form data operation method, and the form data operation method includes:
[0014] Get form configuration;
[0015] Generate form data operation object according to form configuration;
[0016] Business microservices use form operation objects to operate form data.
[0017] The present invention has the following beneficial effects:
[0018] The general form implementation system and method in the microservice scenario provided by the present invention can realize rapid and effective development of business functions and save 80% of development time; it solves the problem that the business form data and business data of the existing general form are separated, resulting in difficulty in querying the business form data; it also solves the bottleneck of querying the business number of the business form, and distributes the business form business data processing requests to each business system, thereby reducing the pressure on the general form microservice. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a schematic diagram of the overall structure of the general form implementation system in the microservice scenario of the present invention;
[0020] Figure 2 A schematic diagram of the process of creating a form in the present invention;
[0021] Figure 3 It is a flowchart of the form data operation method in the present invention. DETAILED DESCRIPTION
[0022] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0023] In the description of the present invention, it is necessary to understand that the directions or positional relationships indicated by the terms "up", "down", "front", "back", "left", "right", etc. are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.
[0024] On the one hand, the present invention provides a general form implementation system in a microservice scenario, such as Figure 1 As shown, it is used for a microservice system, and the microservice system includes a business microservice module 1 ( Figure 1 The example is microservice A) and the general form microservice module 2 (i.e. Figure 1 In the general form microservice, the business microservice module 1 has a business service component 11 (i.e. Figure 1 In microservice A business service component), the business microservice module 1 is connected to the business microservice database 3 (i.e. Figure 1 The general form microservice module 2 is connected to the form microservice database 4, and the general form implementation system includes a data source management device (not shown), a form design engine device 5 and a form data engine device 6, wherein:
[0025] The data source management device comprises a data source registration component 7 and a data source management component 8 connected to each other;
[0026] The data source registration component 7 and the form data engine device 6 are both integrated in the business microservice module 1 and connected to the business service component 11;
[0027] The data source management component 8 and the form design engine device 5 are both integrated in the general form microservice module 2 and connected to each other, and the form design engine device 5 is also connected to the form data engine device 6 .
[0028] Furthermore, the data source management device can be implemented based on the springboot automatic loading configuration function.
[0029] Furthermore, the data source registration component 7 is used to (automatically) read the database information of the business microservice module 1 (ie, the business microservice) and register the database information to the data source management component 8 (through an interface).
[0030] During specific implementation, the data source registration component 7 needs to be integrated into the code of the business microservice that needs to use the general form. The component will actively read the database (configuration) information of the business microservice and send the database information of the business microservice to the data source management component 8.
[0031] Furthermore, the data source management component 8 is used to manage the data source information registered by the data source registration component 7 and provide the data source information to the form design engine device 5 .
[0032] During specific implementation, the data source management component 8 receives the database information sent by the data source registration component 7 and saves the database information; and provides the form design engine device 5 with a database information query function; at the same time, the data source management component 8 can also manually add database information; in short, the data source management component 8 provides the function of adding, deleting, modifying and checking the data source, and provides services for the form design engine device 5.
[0033] Furthermore, the form design engine device 5 is used to design and generate a form, and deploy the form into the database of the corresponding business microservice module 1 according to the database information registered in the form design engine device 5 by the data source management device.
[0034] In specific implementation, the main function of the form design engine device 5 is to manage the form configuration, parse the form configuration into the corresponding database table structure, and create a data table in the corresponding database (that is, the business form data is stored in the database of each business microservice).
[0035] Furthermore, the form design engine device 5 can be implemented based on the vform666 form engine.
[0036] Furthermore, the form data engine device 6 is used to obtain the form configuration data from the form design engine device 5 and then perform addition, deletion, modification and query processing on the data in the form.
[0037] During specific implementation, the main function of the form data engine device 6 is to provide users with an interface for managing form data, so as to facilitate users to use form data; this component requires users to integrate it into the corresponding business microservice and call the corresponding interface when form data is needed.
[0038] Furthermore, the form data engine device 6 can be implemented based on mybatisplus.
[0039] On the other hand, the present invention provides a general form implementation method in a microservice scenario, using the general form implementation system in the microservice scenario, the general form implementation method includes a form creation method, such as Figure 2 As shown, the form creation method includes:
[0040] S101: Select the business microservice database and fill in basic information;
[0041] See also Figure 1In step a4-a5, when the form design engine device 5 receives the form creation request, the form design engine device 5 obtains the database list from the data source management component 8 (the database list actually comes from the form microservice database 4), and then executes this step, that is, the user selects the required business microservice database from the database list as the data source and fills in the basic information. The database list is formed as follows:
[0042] See also Figure 1 In steps a1-a3, first, the data source registration component 7 obtains the data source information from the business service component 11, and then sends the data source information to the data source management component 8 for registration. After that, the data source management component 8 stores the registered data source information in the form microservice database 4.
[0043] S102: Design a form and save the form to the form microservice database;
[0044] This step is based on the form design engine device 5, designs the form, and after the form design is completed, saves the form configuration (see Figure 1 In step a6), the form is stored in the form microservice database 4.
[0045] S103: Deploy the form and create a table in the selected business microservice database.
[0046] In this step, deploy the form and create the form database table (see Figure 1 Step a7 in the above example) creates a table in the database corresponding to the selected business microservice.
[0047] On the other hand, the present invention provides a general form implementation method in a microservice scenario, using the general form implementation system in the microservice scenario, the general form implementation method includes a form data operation method, such as Figure 3 As shown, the form data operation method includes:
[0048] S201: Get form configuration;
[0049] When this step is specifically implemented, first, the business service component 11 receives the query form data request (see Figure 1 Then the business service component 11 requests the form data engine device 6 to obtain the form operation object (see step b1). Figure 1 Step b2 in the above example) triggers this step (see Figure 1 In step b3), the form data engine device 6 obtains the form configuration from the form design engine device 5 (the form design engine device 5 obtains the form configuration from the form microservice database 4 with the help of the data source management component 8).
[0050] S202: Generate a form operation object according to the form configuration;
[0051] In this step, the form data engine device 6 generates a form (data) operation object according to the form configuration.
[0052] S203: The business microservice (business microservice module / business service component) uses the form operation object to operate the form data.
[0053] In this step, the business service component 11 obtains the form operation object from the form data engine device 6 (see Figure 1 In step b4, the business service component 11 uses the obtained form operation object to operate the form data, and stores the operated form data into the corresponding business microservice database 3 (see Figure 1 Step b5).
[0054] In summary, the present invention provides an implementation method of a universal dynamic form, through which the functions implemented by the dynamic form can closely combine business data with form data, solve the separation of business data and form data, and solve the problem that business data and form data cannot be processed jointly.
[0055] The present invention distributes query requests for form business data to corresponding business microservices, reduces the pressure on general form microservices, solves the bottleneck of form business data query, and improves the query efficiency of form business data.
[0056] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for implementing a general form in a microservice scenario, using a general form implementation system in a microservice scenario, wherein the general form implementation system in a microservice scenario is used in a microservice system, wherein the microservice system includes a business microservice module and a general form microservice module, wherein the business microservice module is provided with a business service component, wherein the business microservice module is connected to a business microservice database, and wherein the general form microservice module is connected to a form microservice database, wherein: The universal form implementation system includes a data source management device, a form design engine device and a form data engine device, wherein: The data source management device includes a data source registration component and a data source management component connected to each other; The data source registration component and the form data engine device are both integrated in the business microservice module and connected to the business service component; The data source management component and the form design engine device are both integrated in the general form microservice module and connected to each other, and the form design engine device is also connected to the form data engine device; The data source registration component is used to read the database information of the business microservice module and register the database information to the data source management component; The data source management component is used to manage the data source information registered by the data source registration component and provide the data source information for the form design engine device; The form design engine device is used to design and generate a form, and deploy the form into the database of the corresponding business microservice module according to the database information registered in the form design engine device by the data source management device; The form data engine device is used to obtain form configuration data from the form design engine device and then perform addition, deletion, modification and query processing on the data in the form; The method includes a form creation method, and the form creation method includes: Select the business microservice database and fill in the basic information; Design the form and save it to the form microservice database; Deploy the form and create a table in the selected business microservice database.
2. The method according to claim 1, characterized in that: The data source management device is implemented based on the springboot automatic loading configuration function.
3. The method according to claim 1, characterized in that The form design engine device is implemented based on the vform666 form engine.
4. The method according to claim 1, characterized in that: The form data engine device is implemented based on mybatisplus.
5. The method according to claim 1, characterized in that The method further includes a form data operation method, and the form data operation method includes: Get form configuration; Generate form operation object according to form configuration; Business microservices use form operation objects to operate form data.
