Government form generation method and system based on knowledge graph, equipment and medium

By constructing a knowledge graph-based method for generating government forms, a knowledge graph structure for forms is built, and government forms are automatically generated. This solves the problems of high labor costs and the inability to automatically update forms when rules change in existing technologies, and achieves efficient and flexible form generation and updating.

CN115794835BActive Publication Date: 2026-03-03HUNAN CREATOR INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing government form designer software suffers from high labor costs and an inability to automatically update rule changes during the generation and updating process, resulting in a large amount of repetitive work and hindering the construction of digital government.

Method used

Based on knowledge graphs, a knowledge graph structure for forms is constructed, extracting elements and rules from government forms. Forms are automatically generated through the relationships and dependencies between elements and rules, including the construction of element sets, the loading of rules, and page layout, reducing manual intervention.

Benefits of technology

It enables the autonomous generation and rapid updating of government service forms, reducing the waste of human resources, improving the flexibility and efficiency of adjustments, and reducing repetitive workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115794835B_ABST
    Figure CN115794835B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on knowledge graph's government affair form generation method and system, equipment, medium, the method first extracts all elements and rules contained in each government affair form, and similar elements are associated to form element set, then construct form knowledge graph structure, when loading government affair form, according to the element contained in government affair form and form knowledge graph structure retrieve all rules contained between elements, load form rule to automatically generate government affair form.One hand, without relying on artificial through form designer to drag configuration one by one, beautify form design, realize government affair form completely self-generating;On the other hand, when government affair matter business changes and then causes the element of multiple forms to change, only need to modify the associated rule of element, it can be based on form knowledge graph structure quickly batch generation new form, do not need to re-produce form, compared with traditional way, save time and effort, adjustment is more flexible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of government form generation technology, and in particular, to a knowledge graph-based government form generation method and system, electronic device, and computer-readable storage medium. Background Technology

[0002] In accordance with the requirements of digital government construction, we are deeply promoting innovative practices such as "at most one visit" and "one-stop online service." "One-stop online service" is a typical scenario in the e-government field. It integrates the business of multiple departments, consolidating processes that previously required multiple forms and applications into a single transaction. During the application process, users only need to fill out a form once to complete all information entry and initiate the process. To support this type of service, most currently rely on form designer software. Users drag, drop, and configure event rules for each form element on the software interface. Event rules consist of related elements and operation logic expressions, and are ultimately stored and updated as form metadata. When a user accesses the form, the corresponding event rules are extracted from the rule template in the database, and the resulting Javascript code is parsed and embedded into the form's HTML to load the form instance, thus completing the entire form process.

[0003] However, as government services become more complex, on the one hand, form design itself incurs a learning curve for form designers, and the process of designing forms also requires significant manpower for manual layout and design; on the other hand, once rules change, relevant forms need to be redesigned and form metadata information needs to be updated, especially when the rules for the same elements between different matters change, requiring the form designer to modify the forms one by one, which also brings a huge amount of repetitive work, seriously wastes human and financial resources, and seriously hinders the construction of digital government. Summary of the Invention

[0004] This invention provides a knowledge graph-based method and system for generating government forms, an electronic device, and a computer-readable storage medium to solve the technical problems of high labor costs and the inability to automatically update forms when rules change in existing methods for generating government forms using form designer software.

[0005] According to one aspect of the present invention, a method for generating government forms based on knowledge graphs is provided, comprising the following:

[0006] Extract all elements and rules contained in each government service form, and associate similar elements to form an element set;

[0007] Using elements and rules as entities, the relationships between elements and rules, and the dependencies between rules and dependent elements as entity relationships, and the attributes of event elements and the operational logic expressions of rules as entity attributes, a form knowledge graph structure is constructed.

[0008] When loading government service forms, all rules between the elements are retrieved based on the elements contained in the government service forms and the form knowledge graph structure, and the form rules are loaded to automatically generate government service forms.

[0009] Furthermore, the process of retrieving all rules contained between elements based on the elements contained in the government affairs form and the form knowledge graph structure specifically involves:

[0010] Based on a certain element contained in the government affairs form, each element set is traversed, and the rule associated with that element is found in each element set based on the relationship between the element and the rule.

[0011] Based on the dependency relationship between the rule and the dependent elements, find all dependent elements. If all dependent elements belong to the element set, the rule is considered to be effective in government forms; otherwise, the rule is excluded.

[0012] Repeat the above process for all elements contained in the government service form to filter out all rules that meet the conditions for effectiveness.

[0013] Furthermore, it also includes the following:

[0014] The page layout of government forms is automatically arranged based on the dependencies between elements.

[0015] Furthermore, the process of automatically arranging the pages of government service forms based on the dependencies between elements includes the following:

[0016] All elements contained in government service forms are categorized according to their associated sets of elements;

[0017] Construct a feature dependency tree based on all retrieved rules and rule dependencies;

[0018] Calculate the dependency weights between feature sets, determine the final dependency relationships between feature sets based on the magnitude of the dependency weights, and derive the feature set dependency tree;

[0019] Based on the element dependency tree, the elements within each element set are sorted by dependency. Based on the element set dependency tree, multiple element sets are sorted by dependency. Combined with the form adaptation and generation service, the pages of government forms are automatically arranged through the form automatic generation method based on form element dependencies.

[0020] Furthermore, the process of calculating the dependency weights between the sets of elements is as follows:

[0021] When an element in a certain element set has a dependency on an element in another element set, the dependency weight of that element set is counted once. The dependency weight of that element set is calculated by iterating through all elements in that element set.

[0022] Furthermore, the types of rules include value calculation rules, display dependency rules, and value verification rules. The value calculation rule refers to the fact that the value of a certain element can be calculated from the values ​​of other elements. The display dependency rule refers to the fact that the display of a certain element depends on the values ​​of other elements. The value verification rule refers to the fact that when a value of a certain element is entered, it needs to be verified based on the values ​​of other elements.

[0023] In addition, the present invention also provides a government form generation system based on knowledge graphs, comprising:

[0024] The element and rule extraction module is used to extract all elements and rules contained in each government form and associate similar elements to form an element set;

[0025] The knowledge graph construction module is used to construct a form knowledge graph structure using elements and rules as entities, the relationships between elements and rules and the dependencies between rules and dependent elements as entity relationships, and the attributes of item elements and the operational logic expressions of rules as entity attributes.

[0026] The government form generation module is used to automatically generate government forms by retrieving all rules between elements based on the elements contained in the government form and the form knowledge graph structure when a government form is loaded.

[0027] Furthermore, it also includes:

[0028] The form page layout module is used to automatically layout the pages of government forms based on the dependencies between elements.

[0029] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.

[0030] In addition, the present invention also provides a computer-readable storage medium for storing a computer program for generating government forms based on a knowledge graph, wherein the computer program executes the steps of the method described above when running on a computer.

[0031] The present invention has the following effects:

[0032] The knowledge graph-based government form generation method of this invention first extracts all elements and rules contained in each government form and associates similar elements to form an element set. Then, using elements and rules as entities, the association relationship between elements and rules, and the dependency relationship between rules and dependent elements as entity relationships, and the attributes of the matter elements and the operational logic expression of the rules as entity attributes, a form knowledge graph structure is constructed. When a government form is loaded, all rules contained between the elements are retrieved based on the elements contained in the government form and the form knowledge graph structure, and the form rules are loaded to automatically generate the government form. On the one hand, it eliminates the need for manual drag-and-drop configuration and beautification of form designs through a form designer, achieving completely autonomous generation of government forms; on the other hand, when changes occur in government matters, leading to changes in the elements of multiple forms, only the association rules of the elements need to be modified, and new forms can be quickly and batch-generated based on the form knowledge graph structure without remaking the forms. Compared with traditional methods, it saves time and effort and is more flexible in adjustments.

[0033] In addition, the knowledge graph-based government form generation system of the present invention also has the above-mentioned advantages.

[0034] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0036] Figure 1 This is a flowchart illustrating a preferred embodiment of the knowledge graph-based government form generation method of the present invention.

[0037] Figure 2 This is a schematic diagram of the form knowledge graph structure constructed in a preferred embodiment of the present invention.

[0038] Figure 3 yes Figure 1 A schematic diagram of the sub-process of step S3.

[0039] Figure 4 This is a flowchart illustrating another embodiment of the knowledge graph-based government form generation method of the present invention.

[0040] Figure 5 yes Figure 4 A schematic diagram of the sub-process of step S4.

[0041] Figure 6This is a schematic diagram of the dependency hierarchy between element sets and between elements within an element set, constructed in another embodiment of the present invention.

[0042] Figure 7 This is a schematic diagram of the module structure of a government form generation system based on knowledge graphs, according to another embodiment of the present invention. Detailed Implementation

[0043] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, the present invention can be implemented in many different ways as defined and covered below.

[0044] Understandable, such as Figure 1 As shown, a preferred embodiment of the present invention provides a method for generating government forms based on knowledge graphs, including the following:

[0045] Step S1: Extract all elements and rules contained in each government service form, and associate similar elements to form an element set;

[0046] Step S2: Using elements and rules as entities, the relationships between elements and rules, and the dependencies between rules and dependent elements as entity relationships, and the attributes of the event elements and the operational logic expressions of the rules as entity attributes, construct a form knowledge graph structure;

[0047] Step S3: When loading government service forms, retrieve all rules between the elements based on the elements contained in the government service forms and the form knowledge graph structure, and load the form rules to automatically generate government service forms.

[0048] As can be understood, the knowledge graph-based government form generation method in this embodiment first extracts all elements and rules contained in each government form and associates similar elements to form an element set. Then, using elements and rules as entities, the association relationship between elements and rules, and the dependency relationship between rules and dependent elements as entity relationships, and the attributes of the matter elements and the operational logic expression of the rules as entity attributes, a form knowledge graph structure is constructed. When a government form is loaded, all rules contained between the elements are retrieved based on the elements contained in the government form and the form knowledge graph structure, and the form rules are loaded to automatically generate the government form. On the one hand, there is no need to rely on manual drag-and-drop configuration and beautification of form design through a form designer, realizing the complete autonomous generation of government forms; on the other hand, when the business of government matters changes, resulting in changes to the elements of multiple forms, only the association rules of the elements need to be modified, and new forms can be quickly and batch-generated based on the form knowledge graph structure without remaking the forms. Compared with the traditional method, it saves time and effort and is more flexible in adjustment.

[0049] It is understood that in step S1, relying on a third-party knowledge base, all elements and rules contained in each government service form are extracted, and similar elements are associated to form an element set. An element defines the component information of each piece of information that can be entered in the government service form, such as the ID card number element. The attributes of an element include: component name, whether it is required, default value, and value constraint. An element set defines a grouping of similar elements; for example, the ID card number element and the age element are both included in the element set of user basic information. Rules define the logical relationships between each piece of information that can be entered in the form. The types of rules include value calculation rules, display dependency rules, and value validation rules. Value calculation rules refer to the fact that the value of a certain element can be calculated from the values ​​of other elements. Display dependency rules refer to the fact that the display of a certain element depends on the values ​​of other elements. Value validation rules refer to the fact that when entering the value of a certain element, it needs to be validated based on the values ​​of other elements. For example, the age element includes a value calculation rule, the rule depends on the ID card element, and the rule expression defines a function call to obtain the age from the ID card. In addition, dependent elements define the elements that the rule depends on, and the values ​​of the dependent elements can be referenced by defining #{ref_0} in the rule expression.

[0050] It can be understood that in step S2, elements and rules are used as entities, the relationships between elements and rules and the dependencies between rules and dependent elements are used as entity relationships, and the attributes of the event elements and the operational logic expressions of the rules are used as entity attributes to construct a form knowledge graph structure.

[0051] Specifically, based on the entity, relation, and attribute model definition of a knowledge graph, elements and rules are treated as entities. Entity relations are divided into two categories: associations between elements and rules, and dependencies between rules and their dependent elements. Attributes are divided into two categories: attributes of element entities, rule types, and operational logic expressions. Operational logic is extracted from rules and used as attributes of rule entities, while operational logic expressions serve as attribute values. The unique identifier of an element is used as an attribute of the element entity, and the identifier value serves as the attribute value of the element entity. Multiple triples are constructed, and the form knowledge graph structure can be built based on these triples. Figure 2 As shown. The operation logic expression is a logical operation expression containing rule-dependent elements, such as: "#{element1}.value+#{element2}.value+#{element3}.value+#{element4}.value".

[0052] Understandable, such as Figure 3 As shown, in step S3, the process of retrieving all rules contained between elements based on the elements contained in the government affairs form and the form knowledge graph structure specifically includes:

[0053] Step S31: Based on a certain element contained in the government affairs form, traverse each element set and find the rule associated with that element in each element set based on the relationship between the element and the rule;

[0054] Step S32: Find all dependent elements based on the dependency relationship between the rule and the dependent elements. If all dependent elements belong to the element set, the rule is considered to be effective in the government affairs form; otherwise, the rule is excluded.

[0055] Step S33: Repeat the above process for all elements contained in the government affairs form to filter out all rules that meet the conditions for effectiveness.

[0056] It is understood that in this invention, by abstracting the set of elements of the item form, the elements and their rule models, and storing them using the triple structure of a knowledge graph, and then using the rule fast retrieval method based on elements, the set of rules that need to be loaded in the item form can be quickly retrieved, so that the form rule configuration does not need to be adjusted one by one through the form designer after the item form rules are changed.

[0057] In addition, such as Figure 4 As shown, in another embodiment of the present invention, the knowledge graph-based government form generation method further includes the following:

[0058] Step S4: Automatically arrange the pages of government service forms based on the dependencies between elements.

[0059] Specifically, such as Figure 5 As shown, the process of automatically arranging the pages of government service forms based on the dependencies between elements includes the following:

[0060] Step S41: Categorize all elements contained in the government affairs form according to their associated element sets;

[0061] Step S42: Construct a feature dependency tree based on all retrieved rules and rule dependencies;

[0062] Step S43: Calculate the dependency weights between feature sets, determine the final dependency relationships between feature sets based on the magnitude of the dependency weights, and derive the feature set dependency tree;

[0063] Step S44: Based on the element dependency tree, sort the elements within each element set according to their dependencies. Based on the element set dependency tree, sort the multiple element sets according to their dependencies. Combined with the form adaptation and generation service, automatically arrange the pages of government forms using the form automatic generation method based on form element dependencies.

[0064] Specifically, firstly, all elements in the government service form are categorized according to their associated element sets. For example, age and ID number both belong to the personal information element set. Then, an element dependency tree is constructed based on all retrieved rules and rule dependencies. For instance, if there's a value calculation rule between the age and ID number elements, with the dependency relationship being age dependent on ID number, then ID number is the root node and age is the child node. Next, the dependency weights between element sets are calculated, and the final dependency relationships between element sets are determined based on these weights, deriving the element set dependency tree. Specifically, the process of calculating the dependency weights between element sets involves counting the dependency weight of an element set once when an element in one element set has a dependency on an element in another element set. This process is repeated for all elements in that element set, calculating the dependency weight of the element set. Finally, the elements within each element set are sorted according to the dependency tree. Multiple element sets are then sorted based on the dependency tree, and combined with a form adaptation and generation service, the form is adapted to relevant form designer products. This automatic form generation method based on form element dependencies automatically arranges the pages of the government service form. For example, based on the dependency weights of the feature set and the feature dependency tree, the dependency hierarchy and order of the feature set and features can be organized, providing data support for the arrangement and sorting of form components. The dependency hierarchy structure is as follows: Figure 6 As shown, based on the above dependency hierarchy and order, the element set is converted into grouped components by connecting to the relevant interfaces of the form designer. The elements are automatically arranged to generate form definitions according to their associated component types.

[0065] It is understood that in this invention, by using a form adaptation generation service, relying on the element set, elements, rule dependency weights and dependency relationships between elements, the form component dependency hierarchy and distribution are generated, thereby automatically arranging the form interface and realizing the automatic generation of form definitions.

[0066] In addition, such as Figure 7 As shown, another embodiment of the present invention also provides a government form generation system based on knowledge graphs, preferably employing the government form generation method described above. The system includes:

[0067] The element and rule extraction module is used to extract all elements and rules contained in each government form and associate similar elements to form an element set;

[0068] The knowledge graph construction module is used to construct a form knowledge graph structure using elements and rules as entities, the relationships between elements and rules and the dependencies between rules and dependent elements as entity relationships, and the attributes of item elements and the operational logic expressions of rules as entity attributes.

[0069] The government form generation module is used to automatically generate government forms by retrieving all rules between elements based on the elements contained in the government form and the form knowledge graph structure when a government form is loaded.

[0070] As can be understood, the knowledge graph-based government form generation system in this embodiment first extracts all elements and rules contained in each government form and associates similar elements to form an element set. Then, using elements and rules as entities, the association relationships between elements and rules, and the dependencies between rules and dependent elements as entity relationships, and the attributes of the matter elements and the operational logic expressions of the rules as entity attributes, a form knowledge graph structure is constructed. When a government form is loaded, all rules contained between the elements are retrieved based on the elements contained in the government form and the form knowledge graph structure, and the form rules are loaded to automatically generate the government form. On the one hand, there is no need to rely on manual drag-and-drop configuration and beautification of form designs through a form designer, achieving completely autonomous generation of government forms; on the other hand, when changes occur in government matters, resulting in changes to the elements of multiple forms, only the association rules of the elements need to be modified, and new forms can be quickly and batch-generated based on the form knowledge graph structure without remaking the forms. Compared with traditional methods, this saves time and effort and allows for more flexible adjustments.

[0071] In addition, the knowledge graph-based government form generation system also includes:

[0072] The form page layout module is used to automatically layout the pages of government forms based on the dependencies between elements.

[0073] In addition, another embodiment of the present invention provides an electronic device including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.

[0074] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program for generating government forms based on a knowledge graph, wherein the computer program executes the steps of the method described above when running on a computer.

[0075] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tapes, any other physical media with perforated patterns, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chips or cartridges, or any other media readable by a computer. Instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium used to store, encode, or carry instructions for machine execution, and includes digital or analog communication signals or intangible media that facilitate communication of such instructions. Transmission media include coaxial cables, copper wires, and optical fibers, which contain conductors for transmitting a bus of computer data signals.

[0076] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A government affair form generation method based on a knowledge graph, characterized in that, The method comprises the following steps: extracting all elements and rules contained in each government form, and associating similar elements to form an element set; wherein, the element defines the component information of each recordable information in the government form, the rule defines the logical relationship between the components of each recordable information in the form, and the dependent element defines the elements on which the rule depends; taking the element and the rule as entities, taking the association relationship between the element and the rule and the dependency relationship between the rule and the dependent element as entity relationships, and taking the attribute of the form element and the operation logic expression of the rule as entity attributes, to construct a form knowledge graph structure; when loading the government form, all rules contained between the elements are retrieved according to the elements contained in the government form and the form knowledge graph structure, and the form rules are loaded to automatically generate the government form; The process of retrieving all rules contained between the elements according to the elements contained in the government form and the form knowledge graph structure is specifically as follows: traverse each element set according to a certain element contained in the government form, and find out the rules associated with the element in each element set based on the association relationship between the element and the rule; find out all dependent elements according to the dependency relationship between the rule and the dependent element, if the dependent elements all belong to the element set, it is considered that the rule can be effective in the government form, otherwise the rule is excluded; repeat the above process for all elements contained in the government form, and select all rules that meet the effective conditions. 2.The knowledge graph-based government form generation method of claim 1, wherein, Further comprising the following content: Based on the dependency relationship between the elements, the pages of the government form are automatically arranged. 3.The knowledge graph-based government form generation method of claim 2, wherein, The process of automatically arranging the pages of the government form based on the dependency relationship between the elements comprises the following content: classify all elements contained in the government form according to their associated element sets; construct an element dependency tree according to all retrieved rules and rule dependency relationships; calculate the dependency weight between the element sets, and determine the final dependency relationship between the element sets according to the dependency weight between the element sets, and derive an element set dependency tree; based on the element dependency tree, the elements inside each element set are sorted in dependency, the element set dependency tree is used to sort multiple element sets in dependency, and combined with the form adaptation generation service, the pages of the government form are automatically arranged through the form automatic generation method based on form element dependency. 4.The knowledge graph-based government form generation method of claim 3, wherein, The process of calculating the dependency weight between the element sets is specifically as follows: when there is an element dependency between the elements in a certain element set and the elements in other element sets, the dependency weight of the element set is counted once, and the dependency weight of the element set is calculated by traversing all elements in the element set. 5.The knowledge graph-based government form generation method of claim 1, wherein, The type of the rule includes value calculation rule, display dependency rule and value verification rule, wherein, the value calculation rule means that the value of a certain element can be calculated by the value of other elements, the display dependency rule means that the display of a certain element depends on the value of other elements, and the value verification rule means that when entering the value of a certain element, the value needs to be verified based on the value of other elements. 6.A government form generation system based on a knowledge graph, adopting the government form generation method based on the knowledge graph according to any one of claims 1 to 5, characterized in that, ​ An element and rule extraction module is configured to extract all elements and rules contained in each government form and associate similar elements to form an element set; A knowledge graph construction module is configured to take the elements and rules as entities, take the association relationship between the elements and rules and the dependency relationship between the rules and dependent elements as entity relationships, and take the attributes of the matter elements and the operation logic expression of the rules as entity attributes, to construct a form knowledge graph structure; A government form generation module is configured to, when a government form is loaded, retrieve all rules contained between the elements according to the elements and the form knowledge graph structure contained in the government form, load the form rules to automatically generate the government form.

7. The knowledge graph based government form generation system of claim 6, wherein, Further comprising: A form page arrangement module is configured to automatically arrange the pages of the government form based on the dependency relationship between the elements.

8. An electronic device, comprising: A processor and a memory are included, the memory stores a computer program, and the processor is configured to execute the steps of the method according to any one of claims 1-5 by calling the computer program stored in the memory. 9.A computer readable storage medium, for storing a computer program for generating a government affair form based on a knowledge graph, characterized in that, The computer program executes the steps of the method according to any one of claims 1-5 when running on a computer.

Citation Information

Patent Citations

  • Government affair theme item joint handling method and system based on item association network

    CN111694878A

  • Knowledge management platform for knowledge graph

    CN113190694A