Document generation method, device, computer equipment and storage medium
By configuring the rule tree on the visual rule configuration interface and calling the rule engine to parse and execute the rules, the problem of low document generation efficiency in the existing technology is solved, and codeless configuration and efficient document generation are achieved.
Patent Information
- Application Number
- CN202011556478.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-12-24
AI Technical Summary
In the existing technology, the method of generating documents by writing codes is inefficient and cannot adapt to the needs of different documents, so the code needs to be rewritten.
Provides a document generation method that obtains and configures the rule tree through the visual rule configuration interface, calls the rule engine to parse and execute the rules, and generates the target document, eliminating the step of writing code.
The efficiency of document generation is improved. Users can flexibly configure the rule tree according to different source documents and generate different target documents without manually writing code.
Smart Images

Figure CN112613275B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a document generation method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, in the management industry, new documents are usually generated by rule engines. At present, the method of generating new documents by using rule engines is to obtain the rules for generating documents by writing corresponding codes, and the engine generates new documents after executing the rules for generating documents.
[0003] However, currently, the rules for generating documents are obtained by writing corresponding codes. As long as the documents to be generated are different, the already written codes cannot be used any more and the corresponding codes need to be rewritten. Therefore, the method of obtaining the rules for generating documents by writing corresponding codes will reduce the efficiency of document generation. Summary of the invention
[0004] Based on this, it is necessary to provide a document generation method, device, computer equipment and storage medium that can improve efficiency in response to the above technical problems.
[0005] A document generation method, the method comprising:
[0006] Obtaining rule information pre-configured for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the form of a tree structure in the visual rule configuration interface;
[0007] Call the rule engine to parse the acquired rule information and obtain the document processing rules;
[0008] Executing the document processing rule according to the rule engine, so as to trigger the output of the corresponding document generation operation in the document processing rule when a preset trigger condition in the document processing rule is met;
[0009] According to the document generation operation, corresponding processing is performed on the source document to generate a target document.
[0010] In one embodiment, the method further comprises:
[0011] In the visual rule configuration interface, the initial rule tree is displayed;
[0012] In response to the rule configuration operation for the initial rule tree, the rule information related to the document processing is configured to the corresponding tree nodes of the initial rule tree to obtain a configured rule tree.
[0013] In one embodiment, in response to the rule configuration operation on the initial rule tree, configuring the rule information related to document processing to the corresponding tree node of the initial rule tree includes:
[0014] In response to the rule configuration operation for the initial rule tree, document attributes are configured on tree nodes of the initial rule tree, and document-related operations for each document attribute under different condition values are configured to obtain a rule tree including a rule set;
[0015] Each document processing rule in the rule set includes a configured document attribute set, condition set, value set and operation set; each rule starting tree node and the subordinate nodes of the rule starting tree node constitute a complete document processing rule.
[0016] In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set;
[0017] The calling rule engine parses the acquired rule information to obtain the document processing rules, including:
[0018] The rule engine is called to parse the attribute set, condition set, value set and operation set obtained from the tree node in the rule tree to obtain the attributes in the attribute set, the conditions in the condition set, the values in the value set and the operation instructions in the operation set corresponding to the document processing rule.
[0019] In one embodiment, executing the document processing rule according to the rule engine includes:
[0020] The document processing rules are executed according to the rule engine, and part of the document processing rules currently being executed, as well as the status related to the source document obtained after the execution of part of the rules, are dynamically displayed.
[0021] In one embodiment, the method further comprises:
[0022] If a rule combination operation is received, then
[0023] Retrieving multiple existing document processing rules specified by the rule combination operation from a rule library;
[0024] The retrieved rule information of the document processing rule is configured correspondingly to the tree node position in the rule tree.
[0025] A document generating device, comprising:
[0026] An acquisition module, used to acquire pre-configured rule information for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the form of a tree structure in the visual rule configuration interface;
[0027] The calling module is used to call the rule engine to parse the acquired rule information and obtain the document processing rules;
[0028] The calling module is further used to execute the document processing rule according to the rule engine, so as to trigger and output the corresponding document generation operation in the document processing rule when the preset trigger condition in the document processing rule is met;
[0029] A generation module is used to perform corresponding processing on the source document according to the document generation operation to generate a target document.
[0030] In one of the embodiments, the device also includes a configuration module for displaying an initial rule tree in a visual rule configuration interface; in response to a rule configuration operation on the initial rule tree, rule information related to document processing is configured to corresponding tree nodes of the initial rule tree to obtain a configured rule tree.
[0031] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] Obtaining rule information pre-configured for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the form of a tree structure in the visual rule configuration interface;
[0033] Call the rule engine to parse the acquired rule information and obtain the document processing rules;
[0034] Executing the document processing rule according to the rule engine, so as to trigger the output of the corresponding document generation operation in the document processing rule when the preset trigger condition in the document processing rule is met;
[0035] According to the document generation operation, corresponding processing is performed on the source document to generate a target document.
[0036] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0037] Obtaining rule information pre-configured for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the form of a tree structure in the visual rule configuration interface;
[0038] Call the rule engine to parse the acquired rule information and obtain the document processing rules;
[0039] Executing the document processing rule according to the rule engine, so as to trigger the output of the corresponding document generation operation in the document processing rule when the preset trigger condition in the document processing rule is met;
[0040] According to the document generation operation, corresponding processing is performed on the source document to generate a target document.
[0041] The above-mentioned document generation method, device, computer equipment and storage medium can be configured to obtain a rule tree based on the source document without manually writing code. After the user configures the rule tree, the rule engine can obtain the rule information from the rule tree, parse the rule information to obtain the document processing rules, and finally execute the document processing rules to generate the target document. In the above steps, in the process of configuring the rule tree, the time and workload of writing code are saved, and the rule information is freely and flexibly configured by the user into a rule tree according to different source documents to generate different target documents, thereby effectively improving the efficiency of generating documents. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a process of generating a document in one embodiment;
[0043] Figure 2 A schematic diagram of specific steps of a document generation operation in an embodiment;
[0044] Figure 3 A schematic diagram of configuring a rule tree in an embodiment;
[0045] Figure 4 A schematic diagram showing the dynamic display of the process and results of rule engine execution in one embodiment;
[0046] Figure 5 It is a schematic diagram of the principle of a document generation method in another embodiment;
[0047] Figure 6 It is a structural block diagram of a document generating device in one embodiment;
[0048] Figure 7 It is a structural block diagram of a document generating device in another embodiment;
[0049] Figure 8FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] In one embodiment, Figure 1 As shown, a document generation method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server. In this embodiment, the method includes the following steps:
[0052] Step 102: Obtain pre-configured rule information for at least one source document from a rule tree pre-configured in a visual rule configuration interface.
[0053] The rule tree is the rule information related to document processing that is pre-configured in the visual rule configuration interface in a tree structure.
[0054] Among them, the visual rule configuration interface is an interface for configuring rules that can be seen by the naked eye. The source document is a source document, which is used to provide relevant information for generating a target document. That is, based on the source document, the target document can be generated according to the document generation method in the embodiment of the present application. The rule information related to document processing is the rules used to process the source document.
[0055] Specifically, the user pre-configures rules in the visual rule configuration interface according to the processing to be performed on the source document to configure and generate a rule tree. The terminal filters the rule information pre-configured for at least one source document from the rule tree pre-configured in the visual rule configuration interface.
[0056] It can be understood that different source documents have different rule information, and thus matching rule information can be screened out from the rule tree according to the source document.
[0057] In one embodiment, the source document may be a document originating from the same system or a document originating from different systems.
[0058] Step 104, calling the rule engine to parse the acquired rule information to obtain the document processing rules.
[0059] The rule engine is an engine that executes the corresponding script according to the pre-selected rules. Parsing is to translate the rule information configured by the user into instructions that can be executed by the rule engine. The document processing rules are the rules for processing the source documents.
[0060] Specifically, the terminal calls the rule engine to translate the rule information configured by the user in the rule tree to obtain the document processing rules that can be executed by the rule engine.
[0061] Step 106, executing the document processing rules according to the rule engine, so as to trigger the corresponding document generation operation in the output document processing rules when the preset triggering conditions in the document processing rules are met.
[0062] The preset trigger condition is a condition preset to trigger the document generation operation. It can be understood that as long as the preset trigger condition is met, the rule engine will output the corresponding document generation operation in the document processing rule. The document generation operation is a specific step for processing the source document.
[0063] Specifically, the terminal calls the rule engine to execute the document processing rules obtained after parsing. The terminal calls the rule engine to execute the document processing rules step by step from the root node to the lower node. If the preset trigger condition in the document processing rule is met, the terminal calls the rule engine to trigger the corresponding document generation operation in the output document processing rule.
[0064] In one embodiment, the trigger condition is preset, including that each source document attribute satisfies the corresponding condition. For example, attribute 1 of the source document satisfies condition 1 and attribute 2 of the source document satisfies condition 2. Figure 4 The specific attributes in are used as examples. Figure 4 In (g), the status of "**Document Status" is equal to "Reviewed" and the "Verification Date" is in the "Current Accounting Period", which is the preset trigger condition. After the preset trigger condition is met, the corresponding document generation operation in the output document processing rule can be triggered. Step 108, according to the document generation operation, the source document is processed accordingly to generate the target document.
[0065] Among them, the target document is the document to be generated.
[0066] Specifically, the terminal obtains the document generation operation by calling the rule engine, and then processes the source document according to the specific processing steps included in the document generation operation, and finally generates the target document.
[0067] In one embodiment, the document generation operation may include performing an expansion operation and a trimming operation on the source document. The expansion operation may include at least one operation such as adding a row and adding a column. The trimming operation may include at least one operation such as deleting a row and deleting a column. Figure 2It is used to illustrate the document generation operation. For ease of understanding, an example is given below. For example, if the specific processing steps included in the document generation operation require adding a row to the source document, the terminal can take values according to the value taking rules of each field and put them into the added row of the source document to generate a new document, which is the target document.
[0068] In one embodiment, the terminal may obtain a document generation operation by calling a rule engine, and process a source document according to specific processing steps included in the document generation operation to finally generate a target document.
[0069] In one embodiment, the terminal may obtain a document generation operation by calling a rule engine, and process multiple source documents from different systems according to specific processing steps included in the document generation operation, and finally generate a target document.
[0070] In one embodiment, the terminal may obtain a document generation operation by calling a rule engine, and process a source document according to specific processing steps included in the document generation operation to ultimately generate multiple target documents.
[0071] In one embodiment, the terminal may obtain a document generation operation by calling a rule engine, and process multiple source documents from different systems according to specific processing steps included in the document generation operation, and finally generate multiple target documents.
[0072] The above document generation method does not require manual code writing, and only needs to configure the rule tree according to the source document. After the user configures the rule tree, the rule engine can obtain the rule information from the rule tree, parse the rule information to obtain the document processing rules, and finally execute the document processing rules to generate the target document. In the above steps, in the process of configuring the rule tree, the time and workload of writing code are saved, and the rule information is freely and flexibly configured by the user into a rule tree according to different source documents to generate different target documents, thereby effectively improving the efficiency of generating documents.
[0073] In one embodiment, the method further includes: displaying an initial rule tree in a visual rule configuration interface; and in response to a rule configuration operation on the initial rule tree, configuring rule information related to document processing to corresponding tree nodes of the initial rule tree to obtain a configured rule tree.
[0074] The initial rule tree is a tree structure that has not yet been configured with rule information. The rule configuration operation is an operation in which a user configures rule information into the initial rule tree. The tree nodes are the branch nodes of the rule tree.
[0075] Specifically, the terminal displays an initial rule tree in the visual rule configuration interface. The user configures the rule information related to document processing to the corresponding tree node of the initial rule tree. In response to the rule configuration operation performed by the user in the visual rule configuration interface, the terminal configures the rule information related to document processing to the corresponding tree node of the initial rule tree to obtain a configured rule tree.
[0076] In one embodiment, in the visual rule configuration interface, the user can perform rule configuration operations by dragging rule information related to document processing to the corresponding position of the tree node of the initial rule tree, or by selecting rule information related to document processing in the corresponding tree node of the initial rule tree.
[0077] In this embodiment, the user only needs to configure the required rule information into the initial rule tree in the visual rule configuration interface to obtain the configured rule tree, eliminating the step of generating the rule tree by writing code, thereby improving the efficiency of generating the rule tree.
[0078] In one embodiment, in response to a rule configuration operation on an initial rule tree, rule information related to document processing is configured on corresponding tree nodes of the initial rule tree, including: in response to a rule configuration operation on the initial rule tree, document attributes are configured on tree nodes of the initial rule tree, and document-related operations for each document attribute under different condition values are configured to obtain a rule tree including a rule set; wherein each document processing rule in the rule set includes a configured document attribute set, condition set, value set, and operation set, respectively; each rule starting tree node and subordinate nodes of the rule starting tree node constitute a complete document processing rule.
[0079] Among them, document attributes are attributes contained in the document. It can be understood that a document can contain multiple entities, and entities can have corresponding attributes, so document attributes can include entity attributes. For example, a document attribute can be at least one of the name attribute "Company A" name contained in the entity "supplier" in the document, the name attribute "Product A" name contained in the entity "product" or the date attribute contained in the entity "date". The conditional value is data representing conditional judgment. The rule set is a set with document processing rules as elements. The attribute set is a set with document attributes as elements. The value set is a set that includes the values of the source document and the values generated during the execution of the rules as elements. The operation set is a set with operation instructions as elements. Operation instructions are instructions for the rule engine to perform operations.
[0080] Specifically, in the visual rule configuration interface, the user configures the rule information in the initial rule tree to the rule start tree node and the lower nodes of the rule start tree node, that is, the attribute set, condition set, value set and operation set included in each document processing rule are configured to the rule start tree node and the lower nodes of the rule start tree node. In response to the rule configuration operation for the initial rule tree, the terminal configures the document attributes and the document-related operations under different condition values of each document attribute to the tree nodes of the initial rule tree, and obtains a rule tree including a rule set.
[0081] In one embodiment, the tree nodes of the rule tree may add nodes to the lower level as the rule information configured by the user increases.
[0082] In one embodiment, "Company A", "Product A" or a date in a source document may be referred to as an entity corresponding to the source document, and the attribute of the entity may be the name of "Company A", the name of "Product A" or a date value. Among them, associations may be established between entities of the source document. For example, "Company A" may be changed to "Company A1" later, and an association may be established between "Company A" and "Company A1".
[0083] In one embodiment, Figure 3 As shown, the user can configure "attribute 1, attribute 2" contained in the document processing rule attribute set, "satisfy condition A, satisfy condition B, satisfy condition C, satisfy condition D, satisfy condition E, satisfy condition F" contained in a condition set, "satisfy condition a, satisfy condition b" contained in another condition set, value set and operation set to the corresponding tree nodes of the initial rule tree in the initial rule tree displayed in the visual rule configuration interface, so that each rule starting tree node and the subordinate nodes of the rule starting tree node constitute a complete document processing rule, for example, from "attribute 1 satisfies condition A", "and attribute 2 satisfies a" and "execute Aa", a complete document processing rule is constituted.
[0084] In this embodiment, the user only needs to configure the rule information to the corresponding tree nodes in the rule tree according to the requirements in the visual rule configuration interface to form multiple complete rules, thus achieving the flexibility of rule configuration.
[0085] In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set; calling a rule engine to parse the acquired rule information to obtain a document processing rule, including: calling a rule engine to parse the attribute set, condition set, value set, and operation set acquired from a tree node in a rule tree to obtain attributes in the attribute set, conditions in the condition set, values in the value set, and operation instructions in the operation set corresponding to the document processing rule.
[0086] Specifically, the terminal can call the rule engine to parse the attribute set obtained from the tree node in the rule tree to obtain the attribute of the relevant change of the source document. The terminal can call the rule engine to parse the condition set obtained from the tree node in the rule tree to obtain the condition for judging the attribute of the source document. The terminal can call the rule engine to parse the value set obtained from the tree node in the rule tree to obtain the relevant value of the source document. The terminal can also call the rule engine to parse the operation set obtained from the tree node in the rule tree to obtain the relevant operation instructions for the source document.
[0087] In one embodiment, the terminal can call the rule engine to parse the attribute set obtained from the tree node in the rule tree to obtain the attribute of the relevant change of the source document. For example, the attribute of the current document is "submitted", which is later updated to "reviewed".
[0088] In this embodiment, the rule engine only needs to parse the attribute set, condition set, value set and operation set obtained from the tree nodes in the rule tree to obtain the attributes in the attribute set, the conditions in the condition set, the values in the value set and the operation instructions in the operation set corresponding to the document processing rules, thereby improving the efficiency of obtaining document processing rules.
[0089] In one embodiment, executing document processing rules according to a rule engine includes: executing document processing rules according to the rule engine, and dynamically displaying some of the document processing rules currently being executed, as well as the status related to the source document obtained after executing some of the rules.
[0090] Among them, partial rules are parts of the document processing rules. The status related to the source document is the status of the source document at each stage. For example, in the stage of waiting to be submitted, the status of the source document can be "waiting to be submitted" or "submitted".
[0091] Specifically, the terminal calls the rule engine to execute the document processing rules obtained after parsing. The rule engine dynamically displays some of the document processing rules currently being executed, as well as the status related to the source document obtained after executing some of the rules.
[0092] In one embodiment, the rule engine can dynamically display some of the document processing rules currently being executed, as well as the status related to the source document obtained after executing some of the rules, in the rule configuration interface, or in another interface independent of the rule configuration interface.
[0093] In a real-time example, Figure 4 When the rule engine executes the part of the document processing rule that determines the "** document status", if it is determined that the status of the "** document status" is equal to "Submitted", the following is displayed. Figure 4The execution process shown in (a) of the example, and the status of the source document obtained, i.e., "Submitted". It is determined that the status of "**Document Status" is "Submitted", which does not meet the preset triggering conditions that the status of "**Document Status" must be "Reviewed" and the "Write-off Date" is in the "Current Accounting Period", that is, the preset triggering conditions are not met, and the rule engine does not output the corresponding document generation operation in the document processing rule.
[0094] Execute to the next part of the rule, that is, to determine whether the "Write-off Date" is in the "Current Accounting Period", and then display this process, such as Figure 4 The execution process shown in (b) or (c) above dynamically displays the status of source documents whose "Write-off Date" is not in or in the "Current Accounting Period". At this time, it is still necessary to execute the rule to determine whether the status of "**Document Status" equals "Submitted" has changed. However, there is no change. Therefore, Figure 3 (b) in the example will display the "**Document Status" that is judged to be "Submitted" and unchanged. If the "**Document Status" is still "Submitted", and does not meet the preset triggering conditions that the "**Document Status" must be "Reviewed" and the "Write-off Date" is in the "Current Accounting Period", that is, the preset triggering conditions are not met, the rule engine will not output the corresponding document generation operation in the document processing rule.
[0095] like Figure 4 In the execution process shown in (d) or (e), when it is determined that the status of "**Document Status" is updated from "Submitted" to "Unaudited", the execution result of the "**Document Status" rule of "Unaudited" is displayed. At this time, the judgment that "Write-off Form Date" is not in or in the "Current Accounting Period" is still being executed, so the execution result of the rule that "Write-off Form Date" is not in or in the "Current Accounting Period" is still displayed. It is determined that the status of "**Document Status" is "Unaudited", which does not meet the preset triggering conditions that the status of "**Document Status" must be "Audited" and the "Write-off Form Date" is in the "Current Accounting Period", that is, the preset triggering conditions are not met, and the rule engine does not output the corresponding document generation operation in the document processing rule.
[0096] like Figure 4In (f) or (g), when it is determined that the status of "**Document Status" is updated from "Unaudited" to "Audited", the execution result of the "**Document Status" rule of "Audited" is displayed. At this time, the judgment that "Write-off Date" is not or is in the "Current Accounting Period" is still being executed, so the execution result of the rule that "Write-off Date" is not or is in the "Current Accounting Period" is still displayed. When the status of "**Document Status" is determined to be "Audited", but it is determined that "Write-off Date" is not in the "Current Accounting Period", the preset trigger condition is not met, and the rule engine does not output the corresponding document generation operation in the document processing rule.
[0097] Finally, if Figure 4 In (g), when it is determined that the status of "**Document Status" is updated from "Unaudited" to "Audited", and it is determined that the "Verification Date" is in the "Current Accounting Period", the preset trigger conditions are met, and the rule engine outputs the corresponding document generation operation in the document processing rules.
[0098] In this embodiment, the rule engine dynamically displays some of the currently executed document processing rules and the status related to the source document obtained after the execution of some of the rules. The user can intuitively see the partial rules of the current document processing rules that are executed and the status related to the source document obtained after the execution of some of the rules.
[0099] In one embodiment, the method further includes: if a rule combination operation is received, retrieving multiple existing document processing rules specified by the rule combination operation from the rule library; and configuring the rule information of the retrieved document processing rules to the tree node position in the rule tree.
[0100] The rule combination operation is an operation of combining multiple different rules. The rule base is a database that stores existing document processing rules.
[0101] Specifically, in the visual rule configuration interface, the user combines different rules according to the processing to be performed on the source document. In response to the user's rule combination operation, the terminal retrieves multiple existing document processing rules specified by the rule combination operation from the rule library. When the terminal retrieves the document processing rule to be combined, the rule information of the retrieved document processing rule is configured to the tree node position in the rule tree.
[0102] In one embodiment, the existing document processing rules may be existing document processing rules that have been executed or that have not been executed.
[0103] In this embodiment, the existing document processing rules are stored in a rule base and can be directly called when needed, which can improve the utilization rate of the existing rules.
[0104] In one embodiment, Figure 5 As shown, a schematic diagram of the principle of a document generation method is provided, in which the terminal obtains multiple source documents, namely "**system source document", "heterogeneous source document 2"... "heterogeneous source document N", and receives a request to generate multiple target documents. The terminal calls the rule engine, parses the pre-configured rule information for these multiple source documents obtained from the rule tree, obtains the document processing rules and executes them. When the preset trigger conditions in the document processing rules are met, the rule engine triggers the corresponding document generation operation in the output document processing rules. After the rule engine processes the source documents according to the document generation operation, it finally generates multiple target documents. Among them, heterogeneous source documents refer to source documents from different systems.
[0105] In one embodiment, the source documents may be a receivable, a collection document, and a write-off document, and when the rule engine determines that the three documents have generated accounting events at the same time, a collection write-off voucher is generated. The write-off voucher of the write-off document includes the credit account of the collection document, the debit account of the receivable document, the collection write-off amount, the original currency amount of the collection, and the write-off amount.
[0106] It should be understood that, although each step in each flow chart of the above-described embodiment is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each flow chart of the above-described embodiment may include a plurality of steps or a plurality of stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0107] In one embodiment, Figure 6 As shown, a document generation device 600 is provided, comprising: an acquisition module 602, a calling module 604 and a generation module 606, wherein:
[0108] The acquisition module 602 is used to acquire the pre-configured rule information for at least one source document from the rule tree pre-configured in the visual rule configuration interface; the rule tree is the rule information related to document processing pre-configured in the visual rule configuration interface in the form of a tree structure.
[0109] The calling module 604 is used to call the rule engine to parse the acquired rule information to obtain the document processing rules.
[0110] The calling module 604 is also used to execute the document processing rules according to the rule engine, so as to trigger the corresponding document generation operation in the output document processing rules when the preset trigger conditions in the document processing rules are met.
[0111] The generation module 606 is used to perform corresponding processing on the source document according to the document generation operation to generate a target document.
[0112] In one embodiment, Figure 7 As shown, the device also includes:
[0113] Configuration module 601 is used to display the initial rule tree in the visual rule configuration interface; in response to the rule configuration operation on the initial rule tree, the rule information related to document processing is configured to the corresponding tree node of the initial rule tree to obtain the configured rule tree.
[0114] In one embodiment, the configuration module 601 is also used to configure document attributes on the tree nodes of the initial rule tree in response to the rule configuration operation on the initial rule tree, and configure document-related operations of each document attribute under different condition values, to obtain a rule tree including a rule set; wherein each document processing rule in the rule set respectively includes a configured document attribute set, condition set, value set and operation set; each rule starting tree node and the subordinate nodes of the rule starting tree node constitute a complete document processing rule.
[0115] In one embodiment, the rule information includes: an attribute set, a condition set, a value set and an operation set; the calling module 604 is also used to call the rule engine to parse the attribute set, condition set, value set and operation set obtained from the tree node in the rule tree, and obtain the attributes in the attribute set, the conditions in the condition set, the values in the value set and the operation instructions in the operation set corresponding to the document processing rule.
[0116] In one embodiment, the calling module 604 is also used to execute the document processing rules according to the rule engine, and dynamically display some of the document processing rules currently being executed, as well as the status related to the source document obtained after executing some of the rules.
[0117] In one embodiment, the configuration module 601 is also used to retrieve multiple existing document processing rules specified by the rule combination operation from the rule library if a rule combination operation is received; and configure the rule information of the retrieved document processing rules to the tree node position in the rule tree.
[0118] For the specific definition of the stand-alone generation device, please refer to the definition of the document generation method above, which will not be repeated here. Each module in the above-mentioned stand-alone generation device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0119] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a document generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0120] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0121] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0122] Obtaining pre-configured rule information for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the visual rule configuration interface in a tree structure;
[0123] Call the rule engine to parse the acquired rule information and obtain the document processing rules;
[0124] Execute the document processing rules according to the rule engine to trigger the corresponding document generation operation in the output document processing rules when the preset trigger conditions in the document processing rules are met;
[0125] Based on the document generation operation, corresponding processing is performed on the source document to generate the target document.
[0126] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in a visual rule configuration interface, an initial rule tree is displayed; in response to a rule configuration operation on the initial rule tree, rule information related to document processing is configured to corresponding tree nodes of the initial rule tree to obtain a configured rule tree.
[0127] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in response to the rule configuration operation for the initial rule tree, document attributes are configured on the tree nodes of the initial rule tree, and document-related operations of each document attribute under different condition values are configured to obtain a rule tree including a rule set; wherein each document processing rule in the rule set respectively includes a configured document attribute set, condition set, value set and operation set; each rule starting tree node and the subordinate nodes of the rule starting tree node constitute a complete document processing rule.
[0128] In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set; when the processor executes the computer program, the following steps are also implemented: calling the rule engine to parse the attribute set, condition set, value set, and operation set obtained from the tree node in the rule tree, and obtaining the attributes in the attribute set, the conditions in the condition set, the values in the value set, and the operation instructions in the operation set corresponding to the document processing rule.
[0129] In one embodiment, when the processor executes the computer program, it also implements the following steps: execute the document processing rules according to the rule engine, and dynamically display some of the document processing rules currently being executed, as well as the status related to the source document obtained after executing some of the rules.
[0130] In one embodiment, when the processor executes the computer program, the following steps are also implemented: if a rule combination operation is received, multiple existing document processing rules specified by the rule combination operation are retrieved from the rule library; and the rule information of the retrieved document processing rules is configured to the tree node position in the rule tree.
[0131] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0132] Obtaining pre-configured rule information for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the visual rule configuration interface in a tree structure;
[0133] Call the rule engine to parse the acquired rule information and obtain the document processing rules;
[0134] Execute the document processing rules according to the rule engine to trigger the corresponding document generation operation in the output document processing rules when the preset trigger conditions in the document processing rules are met;
[0135] Based on the document generation operation, corresponding processing is performed on the source document to generate the target document.
[0136] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in a visual rule configuration interface, an initial rule tree is displayed; in response to a rule configuration operation on the initial rule tree, rule information related to document processing is configured to corresponding tree nodes of the initial rule tree to obtain a configured rule tree.
[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the rule configuration operation for the initial rule tree, document attributes are configured on the tree nodes of the initial rule tree, and document-related operations of each document attribute under different condition values are configured to obtain a rule tree including a rule set; wherein each document processing rule in the rule set respectively includes a configured document attribute set, condition set, value set and operation set; each rule starting tree node and the subordinate nodes of the rule starting tree node constitute a complete document processing rule.
[0138] In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set; when the computer program is executed by the processor, the following steps are also implemented: calling the rule engine to parse the attribute set, condition set, value set, and operation set obtained from the tree node in the rule tree, and obtaining the attributes in the attribute set, the conditions in the condition set, the values in the value set, and the operation instructions in the operation set corresponding to the document processing rule.
[0139] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: executing the document processing rules according to the rule engine, and dynamically displaying some of the document processing rules currently being executed, as well as the status related to the source document obtained after executing some of the rules.
[0140] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if a rule combination operation is received, multiple existing document processing rules specified by the rule combination operation are retrieved from the rule library; and the rule information of the retrieved document processing rules is configured to the tree node position in the rule tree.
[0141] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A document generation method, characterized in that: The method comprises: Obtaining rule information pre-configured for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the form of a tree structure in the visual rule configuration interface; Calling a rule engine to parse the acquired rule information to obtain a document processing rule; Executing the document processing rule according to the rule engine to trigger output of a corresponding document generation operation in the document processing rule when a preset trigger condition in the document processing rule is met, wherein the preset trigger condition includes that an attribute of each source document satisfies a corresponding condition; According to the document generation operation, corresponding processing is performed on the source document to generate a target document.
2. The method according to claim 1, characterized in that The method further comprises: In the visual rule configuration interface, the initial rule tree is displayed; In response to the rule configuration operation for the initial rule tree, the rule information related to the document processing is configured to the corresponding tree nodes of the initial rule tree to obtain a configured rule tree.
3. The method according to claim 2, characterized in that In response to the rule configuration operation on the initial rule tree, configuring the rule information related to the document processing to the corresponding tree node of the initial rule tree includes: In response to the rule configuration operation for the initial rule tree, document attributes are configured on tree nodes of the initial rule tree, and document-related operations for each document attribute under different condition values are configured to obtain a rule tree including a rule set; Each document processing rule in the rule set includes a configured document attribute set, condition set, value set and operation set; each rule starting tree node and the subordinate nodes of the rule starting tree node constitute a complete document processing rule.
4. The method according to claim 1, characterized in that The rule information includes: an attribute set, a condition set, a value set and an operation set; The calling rule engine parses the acquired rule information to obtain the document processing rules, including: The rule engine is called to parse the attribute set, condition set, value set and operation set obtained from the tree node in the rule tree to obtain the attributes in the attribute set, the conditions in the condition set, the values in the value set and the operation instructions in the operation set corresponding to the document processing rule.
5. The method according to claim 1, characterized in that The executing the document processing rule according to the rule engine includes: The document processing rules are executed according to the rule engine, and part of the document processing rules currently being executed, as well as the status related to the source document obtained after the execution of part of the rules, are dynamically displayed.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: If a rule combination operation is received, then Retrieving multiple existing document processing rules specified by the rule combination operation from a rule library; The retrieved rule information of the document processing rule is configured correspondingly to the tree node position in the rule tree.
7. A document generating device, characterized in that: The device comprises: An acquisition module, used to acquire pre-configured rule information for at least one source document from a rule tree pre-configured in the visual rule configuration interface; the rule tree is rule information related to document processing pre-configured in the form of a tree structure in the visual rule configuration interface; The calling module is used to call the rule engine to parse the acquired rule information and obtain the document processing rules; The calling module is further used to execute the document processing rule according to the rule engine, so as to trigger the output of the corresponding document generation operation in the document processing rule when a preset trigger condition in the document processing rule is met, and the preset trigger condition includes that the attributes of each source document meet the corresponding condition; A generation module is used to perform corresponding processing on the source document according to the document generation operation to generate a target document.
8. The device according to claim 7, characterized in that The device also includes a configuration module, which is used to display the initial rule tree in the visual rule configuration interface; In response to the rule configuration operation for the initial rule tree, the rule information related to the document processing is configured to the corresponding tree nodes of the initial rule tree to obtain a configured rule tree.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data processing method and system
CN105630797A
Service document conversion method and device, storage medium and computer equipment
CN110704519A
