Form processing method and apparatus, distributed form system, and computer storage medium

By combining DDD microservice architecture with a cache database, the problem of low efficiency in distributed form service processing is solved, and efficient and reliable form data processing and consistency management are achieved.

CN116186022BActive Publication Date: 2026-05-22ULTRAPOWER SOFTWARE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ULTRAPOWER SOFTWARE
Filing Date
2021-11-26
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing technologies cannot efficiently implement distributed form services, resulting in low processing efficiency and insufficient reliability.

Method used

The microservice architecture adopts Domain-Driven Design (DDD) and divides the form processing method into presentation layer, application layer, domain layer and infrastructure layer. Form data is processed through these layers, and data persistence and consistency management are achieved by combining caching and database.

Benefits of technology

It improves the efficiency and reliability of form data processing, ensures the final consistency of form data, reduces human development and maintenance costs, and improves application delivery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116186022B_ABST
    Figure CN116186022B_ABST
Patent Text Reader

Abstract

The application discloses a form processing method and device, a distributed form system and a computer storage medium. The form processing method comprises the following steps: receiving a form processing instruction through a presentation layer; sending a form storage file generated based on the form processing instruction to an application layer through the presentation layer; acquiring a form service corresponding to the form storage file through the application layer, and sending the form storage file and the form service to a domain layer; performing business logic processing on the form service and performing analysis processing on the form storage file through the domain layer, obtaining form data, and sending the form data to an infrastructure layer; persisting the form data through the infrastructure layer, and querying whether form configuration information corresponding to a form identifier of the form data exists in a cache according to the form identifier, updating the form data in the cache if the form configuration information exists, or writing the form data into the cache if the form configuration information does not exist. The technical scheme can efficiently and reliably process form data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a form processing method, apparatus, distributed form system, and computer storage medium. Background Technology

[0002] In modern society, business approval processes are frequently used across various industries, with the specific processes varying significantly from industry to industry. Workflows have emerged to address the complex and ever-changing nature of these processes and reduce the workload of development personnel. The form engine processes the relevant definition information and the actual business data within these approval processes.

[0003] With the development of the times, single form services can no longer meet the current needs. Complex business logic has created an increasingly strong demand for distributed form services. Based on business needs, distributed form services have been developed. Requests are distributed, data operations are read-write separated, and many complex underlying services that need to be written by ourselves are shielded. Distributed form services can reduce the cost of human development and maintenance and improve the efficiency of application delivery.

[0004] The inventors of this application discovered during their research and practice of distributed form services that related technologies could not efficiently implement form services. Summary of the Invention

[0005] This application provides a form processing method, apparatus, distributed form system, and computer storage medium to efficiently and reliably process form data in a distributed form system.

[0006] The embodiments of this application adopt the following technical solutions:

[0007] In a first aspect, embodiments of this application provide a form processing method applied to a distributed form system. The distributed form system employs a Domain-Driven Design (DDD) microservice architecture, wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer. The method includes: receiving form processing instructions through the presentation layer; sending a form storage file generated based on the form processing instructions to the application layer through the presentation layer; obtaining a form service corresponding to the form storage file through the application layer, and sending the form storage file and the form service to the domain layer; performing business logic processing on the form service and parsing the form storage file through the domain layer to obtain form data, and sending the form data to the infrastructure layer; persisting the form data to a database through the infrastructure layer, and querying the cache in the distributed form system based on the form identifier of the form data to see if form configuration information corresponding to the form identifier exists. If it exists, the form data in the cache is updated; if it does not exist, the form data is written to the cache.

[0008] Secondly, embodiments of this application also provide a form processing device applied to a distributed form system. The distributed form system adopts a Domain-Driven Design (DDD) microservice architecture, wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer. The form processing device includes: a first processing unit, configured to receive form processing instructions through the presentation layer and send a form storage file generated based on the form processing instructions to the application layer; a second processing unit, configured to obtain a form service corresponding to the form storage file through the application layer and send the form storage file and the form service to the domain layer; a third processing unit, configured to perform business logic processing on the form service and parse the form storage file through the domain layer to obtain form data, and send the form data to the infrastructure layer through the domain layer; and a fourth processing unit, configured to persist the form data to a database through the infrastructure layer, and query whether there is form configuration information corresponding to the form identifier in the cache of the distributed form system according to the form identifier of the form data. If it exists, the form data in the cache is updated; if it does not exist, the form data is written to the cache.

[0009] Thirdly, embodiments of this application also provide a distributed form system, employing a Domain-Driven Design (DDD) microservice architecture, wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer; the distributed form system includes:

[0010] A processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the form processing method described in any of the above embodiments.

[0011] Fourthly, embodiments of this application also provide a computer storage medium that stores one or more programs, which, when executed by a distributed form system comprising multiple applications, cause the distributed form system to perform the form processing method described in any of the above embodiments.

[0012] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects:

[0013] In a distributed form system, pre-defined model levels are used to process form data according to corresponding processes, improving the efficiency and reliability of form data processing. After persisting the form data to the database, the cached form data is also processed based on whether the form configuration item corresponding to the form exists in the cache, ensuring the eventual consistency of the form data and further improving the reliability of form data processing. Attached Figure Description

[0014] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0015] Figure 1 This is a flowchart illustrating a form processing method in one embodiment of this application;

[0016] Figure 2 This is a schematic diagram illustrating a distributed multi-point access form service in one embodiment of this application;

[0017] Figure 3 This is a flowchart illustrating a form posting process using a microservice architecture employing DDD in one embodiment of this application;

[0018] Figure 4 This is a schematic diagram of form data publishing-subscription shown in one embodiment of this application;

[0019] Figure 5 This is a schematic diagram of the structure of a form processing device shown in one embodiment of this application;

[0020] Figure 6 This is a schematic diagram of the structure of a distributed form system shown in one embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0023] This application provides a form processing method for efficiently and reliably processing form data. The form processing method of this application is applied to a distributed form system, which adopts a DDD (Domain-Driven Design) microservice architecture, wherein the microservice architecture includes a presentation layer (UserInterface), an application layer (Application Layer), a domain layer (Domain Layer), and an infrastructure layer (Infrastructure Layer).

[0024] In this embodiment, microservices are hierarchically divided based on DDD, resulting in multiple relatively small model layers. This facilitates development and debugging, effectively avoiding inefficiencies and inaccuracies caused by unclear microservice boundaries. It also significantly improves the efficiency and reliability of handling user requests. Furthermore, each model layer in this embodiment is relatively independent, allowing each service to be developed and deployed independently, further enhancing the efficiency of user request processing and response.

[0025] Figure 1 This is a flowchart illustrating a form processing method in one embodiment of this application, as shown below. Figure 1 As shown, the form processing method includes at least the following steps S110-S150:

[0026] Step S110: Receive form processing instructions through the presentation layer.

[0027] Step S120: The form storage file generated based on the form processing instructions is sent to the application layer through the presentation layer.

[0028] In this embodiment, the presentation layer is used to display information to the user and to obtain and parse user behavior; the application layer has no business logic code and is used to call the form engine interface to send the requests and data sent by the presentation layer to the corresponding domain layer for business logic processing.

[0029] When form data needs to be processed, form processing instructions can be received through the presentation layer. These instructions refer to form design, which is done using a graphical interface. The presentation layer provides a visual web form builder, which includes layout components, basic fields, and advanced fields. Layout components are those that set the form structure layout, including tabs, form blocks, and rows. Basic fields are simple and commonly used form fields, such as text boxes, text fields, number boxes, dropdown lists, radio buttons, checkboxes, and time selection boxes. Advanced fields are complex form fields that can implement complex logic, including rich text, dropdown trees, cascading selectors, person selection components, dynamic tables, and custom fields. Custom fields can embed fields with special formats and styles according to form requirements.

[0030] Based on the form components used, such as layout components, basic fields, and / or advanced fields, and the relationships between these components, a JSON-structured form storage file is generated. After generating the form storage file, a request is sent to the application layer's form service to retrieve the corresponding data information. Here, the presentation layer and application layer use JWT (JSON Web Token, an open standard based on JSON for transmitting claims between web application environments) for user authentication.

[0031] Step S130: Obtain the form service corresponding to the form storage file through the application layer, and send the form storage file and form service to the domain layer.

[0032] Step S140: The domain layer performs business logic processing on the form service and parses the form storage file to obtain form data, and then sends the form data to the infrastructure layer.

[0033] Step S150: The form data is persisted to the database through the infrastructure layer, and the cache in the distributed form system is queried according to the form identifier of the form data. If the form configuration information corresponding to the form identifier exists, the form data in the cache is updated; otherwise, the form data is written to the cache.

[0034] The domain layer contains domain information and is the core of business processing; the infrastructure layer provides underlying dependency operations for other layers, including persistent data and event-driven operations.

[0035] like Figure 2As shown, after being called by the application layer, the domain layer parses the form storage file. Text boxes, dropdown lists, time boxes, person selection components, and custom components all have their own type identifiers in the JSON file. The domain layer determines the type of each component based on these identifiers, thus parsing the form storage file. After parsing, the infrastructure layer writes the relational data contained in the form data into a relational master database and synchronizes it to a relational slave database. Then, it writes the parsed form data into a non-relational database. Here, relational database tables include, but are not limited to, SQL databases, and non-relational databases include, but are not limited to, MongoDB databases.

[0036] After the form data persistence process is completed, it is checked whether the form configuration information corresponding to the form data exists in the cache. If it exists, the form data in the cache is updated. If it does not exist, the form data is added to the cache. In this way, when using form data, it can first query the cache data. If the required form data does not exist in the cache, it can then query the database, ensuring the eventual consistency of distributed form data.

[0037] visible, Figure 1 The method shown in the diagram, in a distributed form system, utilizes pre-defined model levels to process form data according to corresponding processes, thereby improving the efficiency and reliability of form data processing. After persisting the form data to the database, it also processes the cached form data based on whether the form configuration item corresponding to the form exists in the cache, ensuring the eventual consistency of the form data and further improving the reliability of form data processing.

[0038] In some embodiments, the distributed form system also employs the Spring Cloud framework (Spring Cloud is a cloud application development tool based on Spring Boot, and there is no clear Chinese translation for it). Accordingly, the application layer obtains the form service corresponding to the form storage file, including: the application layer calls the service query interface to obtain the form service corresponding to the form storage file; wherein, the service query interface uses Spring Cloud Gateway to determine the form service corresponding to the form storage file from the distributed form service cluster through a distributed multi-point access strategy and a load balancing strategy.

[0039] Distributed multi-point access strategies can make full use of existing resources and have good scalability; load balancing can expand the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and improve network flexibility and availability.

[0040] like Figure 3As shown, after receiving the form processing instructions through the presentation layer, the service query interface adopts a distributed multi-point access strategy and a load balancing strategy, and uses Spring Cloud Gateway to query the corresponding form service from the distributed multi-node form service. The application layer can then obtain the corresponding form service by calling the service query interface. After obtaining the form service corresponding to the form storage file, the application layer sends the form storage file and the obtained form service to the domain layer.

[0041] In some embodiments, after the form data is persisted to the database by the infrastructure layer... Figure 1 The form processing methods shown also include:

[0042] The infrastructure layer sends form messages carrying form identifiers to the outside world. The infrastructure layer listens for the form messages based on the event publish-subscribe bus. When the form message is detected, the infrastructure layer queries the cache to see if there is form configuration information corresponding to the form identifier.

[0043] like Figure 4 As shown, in this embodiment, each microservice adopts the publish-subscriber pattern. Taking microservice A as an example, after microservice A completes the persistence of form data, it sends a form message to the outside world. This message is published in the form of an event and is listened to using the event bus. When an event is listened to, it checks whether there is a corresponding form configuration information in the cache according to the form identifier. If there is, the form data is updated according to the event; otherwise, the form data is added to the cache according to the event, thereby achieving eventual consistency of form data.

[0044] This embodiment demonstrates the saving of form data through the above embodiments. The following embodiments illustrate the use of form data. The use of form data mainly includes two parts: First, during the processing flow, the corresponding data is entered according to the form's definition information, saved as form instance information, and the instance information is updated. Second, the form is rendered and displayed on the page.

[0045] For the first part, form instance processing:

[0046] In some embodiments, the presentation layer receives a form instantiation instruction and obtains the form structure data and the values ​​of each form component corresponding to the form instantiation instruction. The application layer calls the domain layer based on the form structure data and the values ​​of each form component. The domain layer parses the form structure data and assembles the parsed data types and the values ​​of each form component to obtain the form instance data. The infrastructure layer calls the domain object related to the form instance to persist the form instance data to the database.

[0047] Specifically, the production form instance is initiated when a user command sends a request to the application layer's form service. This request includes the JSON structure data defining the form, as well as information on the values ​​to be filled in for each component. After obtaining the JSON structure data and the required values, the domain layer associated with the form instance is invoked. The domain layer processes and parses the data, assembling it based on the parsed JSON structure data and the required values ​​for each component. For example, text-type components only need to select the entered data, while dropdown components need to parse the corresponding data dictionary, matching the code with the values. After all data processing is complete, the infrastructure layer is invoked to retrieve the domain object, persisting the data to a NoSQL database and sending a message so that other services can access the information.

[0048] Regarding the first aspect of Part Two, the rendering of the form processing page:

[0049] In some embodiments, the presentation layer receives the form processing page rendering instruction and calls the form engine interface; the form engine interface retrieves the form data corresponding to the form identifier of the form processing page from the cache, and renders the form page according to the form data to achieve intelligent form filling.

[0050] The form processing page here can be understood as the form page that users need to fill in and process. The form engine can retrieve the corresponding form data from the cache based on the form identifier of the form processing page, and render the combined data into a form page by parsing and matching the corresponding data dictionary and other information, so as to realize intelligent filling.

[0051] Regarding the second aspect of Part Two, the rendering of the form viewing page:

[0052] In some embodiments, the presentation layer receives a form viewing page rendering instruction and obtains a form instance corresponding to the form viewing page; the presentation layer requests the form instance from the form service of the application layer; the form service of the application layer calls the infrastructure layer, the infrastructure layer obtains the domain object of the form instance, obtains the form instance information from the database, and returns the form instance information to the presentation layer; the presentation layer renders the form instance information into a form page.

[0053] The form viewing page here can be understood as a form page for users to view. When rendering the form viewing page, a form instance has already been generated. Therefore, based on the form instance corresponding to this form viewing page, a request to query the form instance from the application layer's form service can be made. This request will directly call the infrastructure layer, obtain the domain object of the form instance through the infrastructure layer, query the NoSQL non-relational database to retrieve the form instance data of the process, and send a message outward to facilitate other services to obtain information. After obtaining the form instance data, it is returned to the presentation layer, rendering the JSON structured data into a more intuitive page for easy user querying.

[0054] In summary, the form processing method of this application combines a form engine with a DDD-based microservice architecture to implement a distributed form engine service. Through distributed multi-point access and load balancing strategies, it quickly responds to business needs, improves production efficiency, and comprehensively utilizes server resources. Furthermore, the form service provides dynamic form data for different processes, offering personalized forms for each process. The distributed form engine service of this application has at least the following advantages:

[0055] (1) Increase system capacity. As the volume of business increases, the performance of a single machine is no longer sufficient to handle the ever-increasing volume of business. Multiple machines are needed to cope with large-scale application scenarios. A form engine with a distributed architecture can handle large volumes of business.

[0056] (2) Enhance system availability. As business needs become increasingly critical, it is necessary to improve the availability of the entire system architecture. This means that there cannot be any single point of failure in the architecture, and the entire system cannot become unavailable due to the failure of a single machine. Therefore, it is necessary to use a distributed architecture to redundancy the system to eliminate single points of failure, thereby improving system availability.

[0057] (3) Higher system reuse. The system is modularized through a strict and clear layered model, which facilitates rapid system development and deployment.

[0058] This application also provides a form processing apparatus for implementing the form processing method in any of the above embodiments. The form processing apparatus of this embodiment is applied to a distributed form system, which adopts a DDD microservice architecture, wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer.

[0059] Figure 5 This is a schematic diagram of the structure of a form processing device shown in one embodiment of this application, as follows: Figure 5 As shown, the form processing device 500 includes:

[0060] The first processing unit 510 is used to receive form processing instructions through the presentation layer and send the form storage file generated based on the form processing instructions to the application layer;

[0061] The second processing unit 520 is used to obtain the form service corresponding to the form storage file through the application layer, and send the form storage file and the form service to the domain layer;

[0062] The third processing unit 530 is used to perform business logic processing on the form service through the domain layer and to parse the form storage file to obtain form data, and then send the form data to the infrastructure layer.

[0063] The fourth processing unit 540 is used to persist form data to the database through the infrastructure layer, and query the cache of the distributed form system to see if there is form configuration information corresponding to the form identifier based on the form identifier of the form data. If it exists, the form data in the cache is updated; if it does not exist, the form data is written to the cache.

[0064] In some embodiments, the fourth processing unit 540 is configured to, after persisting form data to the database through the infrastructure layer, send a form message carrying a form identifier to the outside world through the infrastructure layer; listen to the form message based on the event publish-subscribe bus; and when a form message is listened to, query the cache for whether there is form configuration information corresponding to the form identifier.

[0065] In some embodiments, the distributed form system also employs the Spring Cloud framework, and the second processing unit 520 is further configured to call a service query interface through the application layer to obtain the form service corresponding to the form storage file through the service query interface; wherein, the service query interface uses Spring Cloud Gateway to determine the form service corresponding to the form storage file from the distributed form service cluster through a distributed multi-point access strategy and a load balancing strategy.

[0066] In some embodiments, the first processing unit 510 is configured to receive a form instantiation instruction through the presentation layer and obtain information on the form structure data and the values ​​of each form component corresponding to the form instantiation instruction;

[0067] The second processing unit 520 is used by the application layer to call the domain layer based on the form structure data and the values ​​of each form component.

[0068] The third processing unit 530 is used to parse the form structure data by the domain layer, assemble the parsed data types and the value information of each form component to obtain form instance data;

[0069] The fourth processing unit 540 is used to persist form instance data to the database by calling the domain object related to the form instance through the infrastructure layer.

[0070] In some embodiments, the first processing unit 510 is configured to receive a form processing page rendering instruction through the presentation layer and call the form engine interface; retrieve form data corresponding to the form identifier of the form processing page from the cache through the form engine interface, render the form page according to the form data, and realize intelligent filling.

[0071] In some embodiments, the first processing unit 510 is configured to receive a form viewing page rendering instruction through the presentation layer, obtain a form instance corresponding to the form viewing page, and request the form instance from the form service of the application layer.

[0072] The second processing unit 520 is used to call the infrastructure layer through the form service of the application layer;

[0073] The fourth processing unit 540 is used to obtain the domain object of the form instance from the infrastructure layer, obtain the form instance information from the database, and return the form instance information to the presentation layer;

[0074] The first processing unit 510 is also used to render the form instance information into a form page through the presentation layer.

[0075] It is understood that the above-mentioned form processing device can implement each step of the form processing method provided in the foregoing embodiments. The relevant explanations of the form processing method are applicable to the form processing device and will not be repeated here.

[0076] Figure 6 This is a schematic diagram of the structure of a distributed form system according to an embodiment of this application. The distributed form system of this embodiment adopts a DDD microservice architecture, wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer.

[0077] refer to Figure 6At the hardware level, this distributed form system includes a processor and memory, and optionally also includes an internal bus and network interface. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, this distributed form system may also include other hardware required for other business operations.

[0078] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0079] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0080] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a form processing device at the logical level. The processor executes the program stored in memory and specifically performs the following operations:

[0081] The system receives form processing instructions through the presentation layer; sends the form storage file generated based on the form processing instructions to the application layer through the presentation layer; obtains the form service corresponding to the form storage file through the application layer, and sends the form storage file and form service to the domain layer; performs business logic processing on the form service and parses the form storage file through the domain layer to obtain form data, and sends the form data to the infrastructure layer; persists the form data to the database through the infrastructure layer, and queries the cache of the distributed form system based on the form identifier of the form data to see if there is form configuration information corresponding to the form identifier. If it exists, the form data in the cache is updated; if it does not exist, the form data is written to the cache.

[0082] The above is as stated in this application. Figure 1The form processing device disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0083] This distributed form system can also perform Figure 1 The method executed by the form processing device, and the implementation of the form processing device in Figure 5 The functions of the embodiments shown are not described in detail here.

[0084] This application also proposes a computer storage medium that stores one or more programs, each program including instructions that, when executed by a distributed form system comprising multiple applications, enable the distributed form system to perform... Figure 1 The method executed by the form processing device in the illustrated embodiment is specifically used to perform:

[0085] The system receives form processing instructions through the presentation layer; sends the form storage file generated based on the form processing instructions to the application layer through the presentation layer; obtains the form service corresponding to the form storage file through the application layer, and sends the form storage file and form service to the domain layer; performs business logic processing on the form service and parses the form storage file through the domain layer to obtain form data, and sends the form data to the infrastructure layer; persists the form data to the database through the infrastructure layer, and queries the cache of the distributed form system based on the form identifier of the form data to see if there is form configuration information corresponding to the form identifier. If it exists, the form data in the cache is updated; if it does not exist, the form data is written to the cache.

[0086] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0089] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0090] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0091] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0092] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0093] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0094] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0095] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A form processing method, characterized in that, The method is applied to a distributed form system that adopts a microservice architecture based on Domain-Driven Design (DDD), wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer; the method includes: The presentation layer receives form processing instructions. The presentation layer sends the form storage file generated based on the form processing instructions to the application layer. The form service corresponding to the form storage file is obtained through the application layer, and the form storage file and the form service are sent to the domain layer. The domain layer performs business logic processing on the form service and parses the form storage file to obtain form data, and then sends the form data to the infrastructure layer. The form data is persisted to the database through the infrastructure layer, and the form configuration information corresponding to the form identifier in the distributed form system is queried according to the form identifier of the form data. If it exists, the form data in the cache is updated; if it does not exist, the form data is written to the cache. After persisting the form data to the database through the infrastructure layer, the method further includes: The infrastructure layer sends out form messages carrying the form identifier. The form messages are monitored based on the event publish-subscribe bus. When the form message is detected, the infrastructure layer queries the cache to see if there is form configuration information corresponding to the form identifier. If it exists, update the form data according to the form message; If it does not exist, add form data to the cache based on the form message.

2. The method as described in claim 1, characterized in that, The distributed form system also employs the Spring Cloud framework, obtaining form services corresponding to the form storage files through the application layer, including: The application layer calls the service query interface to obtain the form service corresponding to the form storage file. The service query interface uses Spring Cloud Gateway to determine the form service corresponding to the form storage file from the distributed form service cluster through a distributed multi-point access strategy and a load balancing strategy.

3. The method as described in claim 1, characterized in that, The method further includes: The presentation layer receives form instantiation instructions and obtains the form structure data and values ​​of each form component corresponding to the form instantiation instructions. The application layer calls the domain layer based on the form structure data and the values ​​of each form component. The domain layer parses the form structure data and assembles the parsed data types and the values ​​of each form component to obtain form instance data. The form instance data is persisted to the database by calling the domain object associated with the form instance through the infrastructure layer.

4. The method as described in claim 1, characterized in that, The method further includes: The presentation layer receives form processing page rendering instructions and calls the form engine interface; The form engine interface retrieves form data corresponding to the form identifier of the form processing page from the cache, and renders the form page based on the form data to achieve intelligent data filling.

5. The method as described in claim 1, characterized in that, The method further includes: The presentation layer receives the form viewing page rendering instruction and obtains the form instance corresponding to the form viewing page; The presentation layer requests the form instance from the form service of the application layer. The application layer calls the infrastructure layer through the form service, the infrastructure layer obtains the domain object of the form instance, retrieves the form instance information from the database, and returns the form instance information to the presentation layer; The presentation layer renders the form instance information into a form page.

6. The method as described in claim 1, characterized in that, The presentation layer provides a visual Web form builder, which includes layout components, basic fields, and advanced fields.

7. A form processing device, characterized in that, This is applied to a distributed form system, which adopts a microservice architecture based on Domain-Driven Design (DDD), wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer. The form processing device includes: The first processing unit is configured to receive form processing instructions through the presentation layer and send the form storage file generated based on the form processing instructions to the application layer. The second processing unit is used to obtain the form service corresponding to the form storage file through the application layer, and send the form storage file and the form service to the domain layer. The third processing unit is used to perform business logic processing on the form service through the domain layer and to parse the form storage file to obtain form data, and then send the form data to the infrastructure layer. The fourth processing unit is used to persist the form data to the database through the infrastructure layer, and query the cache of the distributed form system according to the form identifier of the form data to see if there is form configuration information corresponding to the form identifier. If it exists, the form data in the cache is updated; if it does not exist, the form data is written to the cache. The fourth processing unit is configured to, after persisting the form data to the database through the infrastructure layer, send a form message carrying the form identifier to the outside world through the infrastructure layer; listen for the form message based on the event publish-subscribe bus; when the form message is listened for, the infrastructure layer queries the cache to see if there is form configuration information corresponding to the form identifier; if it exists, the form data is updated according to the form message; if it does not exist, the form data is added to the cache according to the form message.

8. A distributed form system adopting a microservice architecture based on Domain-Driven Design (DDD), wherein the microservice architecture includes a presentation layer, an application layer, a domain layer, and an infrastructure layer; The distributed form system includes: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method of any one of claims 1 to 6.

9. A computer storage medium storing one or more programs, which, when executed by a distributed form system comprising multiple applications, cause the distributed form system to perform the method of any one of claims 1 to 6.