Receipt generation method and device, computer equipment and storage medium

文档序号:763054 发布日期:2021-04-06 浏览:9次 中文

阅读说明:本技术 单据生成方法、装置、计算机设备和存储介质 (Receipt generation method and device, computer equipment and storage medium ) 是由 涂克东 张锦 于 2020-12-24 设计创作,主要内容包括:本申请涉及一种单据生成方法、装置、计算机设备和存储介质。所述方法包括:可视化规则配置界面中预先配置的规则树中,获取针对至少一个源单据预先配置的规则信息;所述规则树,是预先在所述可视化规则配置界面中以树形结构形式配置的与单据处理相关的规则信息;调用规则引擎对获取到的规则信息进行解析,得到单据处理规则;根据所述规则引擎执行所述单据处理规则,以在满足所述单据处理规则中的预设触发条件时,触发输出所述单据处理规则中相应的单据生成操作;根据所述单据生成操作,对所述源单据执行相应处理以生成目标单据。采用本方法能够提高生成单据的效率。(The application relates to a bill generation method, a bill generation device, computer equipment and a storage medium. The method comprises the following steps: acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visual rule configuration interface; the rule tree is the rule information which is configured in the visualization rule configuration interface in advance in a tree structure form and is relevant to bill processing; calling a rule engine to analyze the obtained rule information to obtain a document processing rule; executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met; and according to the bill generation operation, performing corresponding processing on the source bill to generate a target bill. By adopting the method, the efficiency of generating the document can be improved.)

1. A document generation method, the method comprising:

acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visual rule configuration interface; the rule tree is the rule information which is configured in the visualization rule configuration interface in advance in a tree structure form and is relevant to bill processing;

calling a rule engine to analyze the obtained rule information to obtain a document processing rule;

executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and according to the bill generation operation, performing corresponding processing on the source bill to generate a target bill.

2. The method of claim 1, further comprising:

displaying an initial rule tree in a visual rule configuration interface;

and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

3. The method of claim 2, wherein the configuring, in response to the rule configuration operation for the initial rule tree, rule information related to document processing onto a respective tree node of the initial rule tree comprises:

responding to rule configuration operation aiming at the initial rule tree, configuring bill attributes on tree nodes of the initial rule tree, and configuring bill related operation of each bill attribute under different condition values to obtain a rule tree comprising a rule set;

each bill processing rule in the rule set respectively comprises a configured bill attribute set, a condition set, a value set and an operation set; each rule starting tree node and the lower nodes of the rule starting tree nodes form a complete bill processing rule.

4. The method of claim 1, wherein the rule information comprises: an attribute set, a condition set, a value set, and an operation set;

the calling rule engine analyzes the obtained rule information to obtain a document processing rule, and the method comprises the following steps:

and calling a rule engine to analyze the attribute set, the condition set, the value set and the operation set which are acquired from the tree node in the rule tree to obtain the attribute in the attribute set, the condition in the condition set, the value in the value set and the operation instruction in the operation set corresponding to the bill processing rule.

5. The method of claim 1, wherein the executing the document processing rules according to the rules engine comprises:

and executing the bill processing rule according to the rule engine, and dynamically displaying part of rules in the currently executed bill processing rule and the state related to the source bill obtained after the execution of the part of rules.

6. The method according to any one of claims 1 to 5, further comprising:

if a rule combination operation is received, then

Calling a plurality of existing bill processing rules specified by the rule combination operation from a rule base;

and correspondingly configuring the called rule information of the bill processing rule to the tree node position in the rule tree.

7. A document generation apparatus, the apparatus comprising:

the acquisition module is used for acquiring rule information which is pre-configured aiming at least one source document from a rule tree which is pre-configured in a visual rule configuration interface; the rule tree is the rule information which is configured in the visualization rule configuration interface in advance in a tree structure form and is relevant to bill processing;

the calling module is used for calling the rule engine to analyze the obtained rule information to obtain a document processing rule;

the calling module is further used for executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and the generating module is used for executing corresponding processing on the source bill according to the bill generating operation so as to generate a target bill.

8. The apparatus of claim 7, further comprising a configuration module for exposing an initial rule tree in a visual rule configuration interface; and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a document, a computer device, and a storage medium.

Background

With the development of computer technology, new documents are generally generated by using a rule engine in the management industry. At present, a method for generating a new document by using a rule engine obtains a document generating rule by writing a corresponding code, and the engine generates the new document after executing the document generating rule.

However, at present, the rules for generating documents are obtained by writing corresponding codes, and as long as documents required to be generated are different, the written codes cannot be used continuously, and the corresponding codes also need to be rewritten. Therefore, the method for obtaining the rules for generating the document by writing the corresponding codes can reduce the efficiency of document generation.

Disclosure of Invention

In view of the above, it is necessary to provide a document generation method, apparatus, computer device and storage medium capable of improving efficiency.

A document generation method, the method comprising:

acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visual rule configuration interface; the rule tree is the rule information which is configured in the visualization rule configuration interface in advance in a tree structure form and is relevant to bill processing;

calling a rule engine to analyze the obtained rule information to obtain a document processing rule;

executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and according to the bill generation operation, performing corresponding processing on the source bill to generate a target bill.

In one embodiment, the method further comprises:

displaying an initial rule tree in a visual rule configuration interface;

and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

In one embodiment, the configuring, in response to the rule configuration operation for the initial rule tree, rule information related to document processing onto a corresponding tree node of the initial rule tree includes:

responding to rule configuration operation aiming at the initial rule tree, configuring bill attributes on tree nodes of the initial rule tree, and configuring bill related operation of each bill attribute under different condition values to obtain a rule tree comprising a rule set;

each bill processing rule in the rule set respectively comprises a configured bill attribute set, a condition set, a value set and an operation set; each rule starting tree node and the lower nodes of the rule starting tree nodes form a complete bill processing rule.

In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set;

the calling rule engine analyzes the obtained rule information to obtain a document processing rule, and the method comprises the following steps:

and calling a rule engine to analyze the attribute set, the condition set, the value set and the operation set which are acquired from the tree node in the rule tree to obtain the attribute in the attribute set, the condition in the condition set, the value in the value set and the operation instruction in the operation set corresponding to the bill processing rule.

In one embodiment, the executing the document processing rule according to the rules engine includes:

and executing the bill processing rule according to the rule engine, and dynamically displaying part of rules in the currently executed bill processing rule and the state related to the source bill obtained after the execution of the part of rules.

In one embodiment, the method further comprises:

if a rule combination operation is received, then

Calling a plurality of existing bill processing rules specified by the rule combination operation from a rule base;

and correspondingly configuring the called rule information of the bill processing rule to the tree node position in the rule tree.

A document generation apparatus, the apparatus comprising:

the acquisition module is used for acquiring rule information which is pre-configured aiming at least one source document from a rule tree which is pre-configured in a visual rule configuration interface; the rule tree is the rule information which is configured in the visualization rule configuration interface in advance in a tree structure form and is relevant to bill processing;

the calling module is used for calling the rule engine to analyze the obtained rule information to obtain a document processing rule;

the calling module is further used for executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and the generating module is used for executing corresponding processing on the source bill according to the bill generating operation so as to generate a target bill.

In one embodiment, the apparatus further comprises a configuration module for presenting the initial rule tree in a visualization rule configuration interface; and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:

acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visual rule configuration interface; the rule tree is the rule information which is configured in the visualization rule configuration interface in advance in a tree structure form and is relevant to bill processing;

calling a rule engine to analyze the obtained rule information to obtain a document processing rule;

executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and according to the bill generation operation, performing corresponding processing on the source bill to generate a target bill.

A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:

acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visual rule configuration interface; the rule tree is the rule information which is configured in the visualization rule configuration interface in advance in a tree structure form and is relevant to bill processing;

calling a rule engine to analyze the obtained rule information to obtain a document processing rule;

executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and according to the bill generation operation, performing corresponding processing on the source bill to generate a target bill.

According to the receipt generation method, the receipt generation device, the computer equipment and the storage medium, the rule tree can be configured only according to the source receipt without manually compiling codes, the rule engine can acquire the rule information from the rule tree after the user configures the rule tree, the rule information is analyzed to obtain the receipt processing rule, and finally the receipt processing rule is executed to generate the target receipt. In the steps, in the configuration process of the rule tree, the time and the workload for writing codes are saved, and the rule information is freely and flexibly configured into the rule tree by a user according to different source documents to generate different target documents, so that the document generation efficiency can be effectively improved.

Drawings

FIG. 1 is a schematic flow chart diagram of a document generation method in one embodiment;

FIG. 2 is a diagram illustrating specific steps in document generation operations in one embodiment;

FIG. 3 is a schematic diagram of a configuration rule tree in one embodiment;

FIG. 4 is a diagram illustrating the dynamic display of the process and results of the rules engine execution in one embodiment;

FIG. 5 is a schematic diagram of a document generation method in another embodiment;

FIG. 6 is a block diagram of the structure of a document generation apparatus in one embodiment;

FIG. 7 is a block diagram of the document generation apparatus in another embodiment;

FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

In an embodiment, as shown in fig. 1, a document generation method is provided, and this embodiment is illustrated by applying the method to a terminal, and it is understood that the method may also be applied to a server. In this embodiment, the method includes the steps of:

102, acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visualization rule configuration interface.

The rule tree is rule information which is configured in a visualization rule configuration interface in advance in a tree structure mode and is relevant to document processing.

The visual rule configuration interface is an interface of configuration rules which can be observed by naked eyes. The source document is a source document and is used for providing relevant information for generating the target document. That is, based on the source document, the target document may be generated according to the document generation method in the embodiment of the present application. The rule information related to document processing is a rule for processing a source document.

Specifically, in the visualization rule configuration interface, the user performs rule configuration in advance according to the processing to be performed on the source document so as to configure the spanning rule tree. And the terminal screens rule information pre-configured for at least one source document from a rule tree pre-configured in a visualization rule configuration interface.

It can be understood that different source documents have different rule information, and therefore, matched rule information can be screened out from the rule tree according to the source documents.

In one embodiment, the source document may be a document from the same system or a document from a different system.

And 104, calling a rule engine to analyze the obtained rule information to obtain a document processing rule.

The rule engine is an engine that executes a corresponding script according to a preset rule. Parsing is the translation of rule information configured by a user into instructions executable by a rule engine. The document processing rule is a rule for processing a source document.

Specifically, the terminal calls a rule engine to translate rule information configured in a rule tree by a user, and a document processing rule which can be executed by the rule engine is obtained.

And 106, executing the bill processing rule according to the rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met.

The preset triggering condition is a preset condition for triggering generation operation of the document. It can be understood that the rule engine outputs the corresponding document generation operation in the document processing rule as long as the preset trigger condition is reached. The document generation operation is a specific step of processing a source document.

Specifically, the terminal calls a rule engine to execute the document processing rule obtained after analysis. The terminal calls the rule engine to execute the bill processing rules step by step from the root node to the next node. And if the preset triggering conditions in the bill processing rule are met, the terminal calls the rule engine to trigger and output corresponding bill generation operation in the bill processing rule.

In one embodiment, the triggering condition is preset, including that each source document attribute meets the corresponding condition. For example, attribute 1 of the source document satisfies condition 1 and attribute 2 of the source document satisfies condition 2. By way of example, referring to specific attributes in fig. 4, as shown in (g) in fig. 4, the state of "# document state" is equal to "checked" and "the verification date" is in the "current accounting period", which is a preset trigger condition, and after the preset trigger condition is met, the corresponding document generation operation in the output document processing rule may be triggered. And step 108, performing corresponding processing on the source document according to the document generation operation to generate the target document.

The target document is a document to be generated.

Specifically, the terminal obtains a document generation operation by calling the rule engine, processes the source document according to specific processing steps included in the document generation operation, and finally generates the target document.

In one embodiment, the document generation operation may include an expand operation and a cut operation on the source document. The expanding operation may include at least one of adding rows and adding columns. The clipping operation may include at least one of deleting rows and deleting columns. FIG. 2 is used to illustrate document generation operations. For ease of understanding, this is now exemplified. For example, the specific processing steps included in the document generation operation are operations for adding rows to the source document, and the terminal may take values according to the field value rules and place the values in the rows added to the source document to generate a new document, which is the target document.

In one embodiment, the terminal may obtain a document generation operation by calling the rule engine, process a source document according to specific processing steps included in the document generation operation, and finally generate a target document.

In one embodiment, the terminal may obtain a document generation operation by calling the rule engine, and process a plurality of source documents from different systems according to specific processing steps included in the document generation operation, so as to finally generate a target document.

In one embodiment, the terminal may obtain a document generation operation by calling the rule engine, process one source document according to specific processing steps included in the document generation operation, and finally generate a plurality of target documents.

In one embodiment, the terminal may obtain a document generation operation by calling the rule engine, process a plurality of source documents from different systems according to specific processing steps included in the document generation operation, and finally generate a plurality of target documents.

According to the receipt generation method, the rule tree can be configured only according to the source receipt without manually compiling codes, the rule engine can acquire the rule information from the rule tree after the user configures the rule tree, the rule information is analyzed to acquire the receipt processing rule, and finally the receipt processing rule is executed to generate the target receipt. In the steps, in the configuration process of the rule tree, the time and the workload for writing codes are saved, and the rule information is freely and flexibly configured into the rule tree by a user according to different source documents to generate different target documents, so that the document generation efficiency can be effectively improved.

In one embodiment, the method further comprises: displaying an initial rule tree in a visual rule configuration interface; and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to the bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

The initial rule tree is a tree structure in which rule information is not yet configured. The rule configuration operation is an operation in which the user configures rule information into an initial rule tree. The tree node is each branch node of the rule tree.

Specifically, the terminal displays the initial rule tree in a visualization rule configuration interface. And the user configures the rule information related to the document processing to the corresponding tree node of the initial rule tree. And the terminal responds to the rule configuration operation of the user on the visual rule configuration interface, and configures the rule information related to the document processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

In one embodiment, in the visualization rule configuration interface, the rule configuration operation may be to drag rule information related to document processing to a corresponding position of a tree node of the initial rule tree, or to select rule information related to document processing from the corresponding tree node of the initial rule tree.

In the embodiment, the user can obtain the configured rule tree only by configuring the required rule information into the initial rule tree in the visual rule configuration interface, and the step of generating the rule tree by writing codes is omitted, so that the rule tree generating efficiency can be improved.

In one embodiment, in response to a rule configuration operation for the initial rule tree, configuring rule information related to document processing onto a respective tree node of the initial rule tree, comprising: responding to the rule configuration operation aiming at the initial rule tree, configuring document attributes on tree nodes of the initial rule tree, and configuring document related operations of the document attributes under different condition values to obtain a rule tree comprising a rule set; each bill processing rule in the rule set respectively comprises a configured bill attribute set, a condition set, a value set and an operation set; each rule starting tree node and the lower level nodes of the rule starting tree nodes form a complete document processing rule.

The document attribute is an attribute contained in the document. It will be appreciated that a document may contain a plurality of entities, which may have corresponding attributes, and thus, document attributes may include attributes of an entity. For example, the document attribute may be at least one of a name attribute "company a" name included in the document whose entity is "supplier", a name attribute "item a" name included in the document whose entity is "item", a date attribute included in the document whose entity is "date", and the like. The condition value is data indicating a condition judgment. The rule set is a set of document processing rules as elements. The attribute set is a set in which attributes of documents are elements. The value set is a set including, as elements, the value of the source document and the value generated during execution of the rule. The operation set is a set having operation instructions as elements. The operation instruction is an instruction for the rule engine to perform an operation.

Specifically, in the visual rule configuration interface, the user correspondingly configures rule information in the initial rule tree into the rule starting tree node and the lower nodes of the rule starting tree node, that is, the attribute set, the condition set, the value set and the operation set respectively included in each document processing rule are correspondingly configured into the rule starting tree node and the lower nodes of the rule starting tree node. And the terminal responds to the rule configuration operation aiming at the initial rule tree, and configures the document attributes and the document related operation of each document attribute under different condition values to tree nodes of the initial rule tree to obtain the rule tree comprising the rule set.

In one embodiment, the tree nodes of the rule tree may add nodes to the next level as the user configured rule information increases.

In one embodiment, the "company a", "item a" or date in the source document may be referred to as the entity to which the source document corresponds, and the attribute of the entity may be the "company a" name, item a "name or date value. And the entity of the source document can establish an incidence relation. For example, "company a" becomes "company a 1" later, and an association between "company a" and "company a 1" can be established.

In an embodiment, as shown in fig. 3, it may be that, in an initial rule tree displayed on a visualized rule configuration interface, a user configures "attribute 1, attribute 2" included in an attribute set of a document processing rule, "satisfy condition a, satisfy condition B, satisfy condition C, satisfy condition D, satisfy condition E, satisfy condition F" included in a condition set, "satisfy condition a, satisfy condition B", and configure a value set and an operation set on corresponding tree nodes of the initial rule tree, so that each rule start tree node and subordinate nodes of the rule start tree node form a complete document processing rule, for example, a complete document processing rule is formed from "attribute 1 satisfies condition a", "attribute 2 satisfies a", and "execute Aa".

In this embodiment, a user can configure the rule information to the corresponding tree node in the rule tree according to the requirement only in the visual rule configuration interface, so as to form a plurality of complete rules, thereby achieving the flexibility of rule configuration.

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 analyze the obtained rule information to obtain a document processing rule, wherein the document processing rule comprises the following steps: and calling a rule engine to analyze the attribute set, the condition set, the value set and the operation set which are acquired from the tree node in the rule tree to obtain the attribute in the attribute set, the condition in the condition set, the value in the value set and the operation instruction in the operation set corresponding to the bill processing rule.

Specifically, the terminal may invoke the rule engine to analyze the attribute set acquired from the tree node in the rule tree, so as to obtain the attribute of the relevant change of the source document. The terminal can call the rule engine to analyze the condition set acquired from the tree node in the rule tree, so as to obtain the condition for judging the attribute of the source document. The terminal can call the rule engine to analyze the value set acquired 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 analyze the operation set acquired from the tree node in the rule tree, so as to obtain the relevant operation instruction of the source document.

In one embodiment, the terminal may invoke the rule engine to parse the attribute set obtained from the tree node in the rule tree to obtain the attributes of the relevant changes of the source document. For example, the current document attribute is "submitted", and is updated to "approved" after the current document attribute is "submitted".

In this embodiment, the rule engine only needs to analyze the attribute set, the condition set, the value set, and the operation set acquired from the tree node in the rule tree, so as to obtain the attribute set, the condition set, the value set, and the operation instruction in the operation set corresponding to the document processing rule, thereby improving the efficiency of acquiring the document processing rule.

In one embodiment, executing document processing rules according to a rules engine includes: and executing the bill processing rule according to the rule engine, and dynamically displaying part of rules in the currently executed bill processing rule and the state related to the source bill obtained after the execution of the part of rules.

Wherein, the partial rule is a part of the bill processing rule. The state associated with the source document is the state of the source document at each stage. For example, in the to-submit phase, the status of the source document may be "to submit" or may be "submitted".

Specifically, the terminal calls a rule engine to execute the document processing rule obtained after analysis. And the rule engine dynamically displays part of rules in the currently executed bill processing rules and the state related to the source bill obtained after the execution of the part of rules.

In one embodiment, the rule engine may dynamically display a part of rules in the currently executed document processing rules and the state related to the source document obtained after the execution of the part of rules in the rule configuration interface, or dynamically display the state in another interface independent from the rule configuration interface.

In a real-time example, as shown in FIG. 4. When the rule engine executes the part of the rule for judging the 'document state' in the document processing rule, if the state of the 'document state' is judged to be equal to 'submitted', the execution process shown as (a) in fig. 4 and the state of the obtained source document, namely 'submitted', are shown. And judging that the state of the 'document state' is 'submitted', the state which does not meet the 'document state' needs to be 'checked' and the preset trigger condition of the 'verification date' in the 'current accounting period', namely the preset trigger condition is not met, and the rule engine does not output the corresponding document generation operation in the document processing rule.

Executing the next part of rules, namely judging whether the 'verification date' is in the 'current accounting period', displaying the process, and dynamically displaying the state of the source document of which the 'verification date' is not in or in the 'current accounting period' by executing the process shown in (b) or (c) in fig. 4. Since the partial rule of determining whether the status of the document is equal to the status of the submitted still needs to be executed at this time. And there is no change, so, at this time, the document status "of" submitted "judged to have no change is shown in fig. 3 (b). And judging that the state of the 'document state' is still 'submitted', the state which does not meet the 'document state' is required to be 'checked' and the preset trigger condition of the 'verification date' in the 'current accounting period' is not met, namely the preset trigger condition is not met, and the rule engine does not output the corresponding document generation operation in the document processing rule.

As shown in (d) or (e) of fig. 4, when the status of the "document state" is judged to be updated from "submitted" to "not checked", the execution result of the part of the rule of "not checked" document state "is displayed, and the execution judgment of the" verification date "is not in or during" current accounting "is still performed, so the execution result of the part of the rule of" verification date "is not in or during" current accounting "is still displayed. And judging that the state of the 'document state' is 'not checked', the state which does not meet the 'document state' needs to be 'checked', the 'verification date' is in the preset trigger condition of the 'current accounting period', namely the preset trigger condition is not met, and the rule engine does not output the corresponding document generation operation in the document processing rule.

As shown in fig. 4 (f) or (g), when it is determined that the state of the "document state" is updated from "not checked" to "checked", the execution result of the part of the rule of the "checked" document state "is displayed. And at the moment, judging that the 'verification date' is not in or in the 'current accounting period' is still carried out, so the execution result of the part of the rule that the 'verification date' is not in or in the 'current accounting period' is still displayed. And judging that the state of the 'document state' is 'audited', judging that the 'verification and cancellation date' is not in the 'current accounting period', not meeting the preset trigger condition, and not outputting the corresponding document generation operation in the document processing rule by the rule engine.

Finally, as shown in (g) in fig. 4, when it is determined that the state of the document state is updated from "not checked" to "checked", and it is determined that the "verification date" is in the "current accounting period", that is, the preset trigger condition is satisfied, the rule engine outputs the corresponding document generation operation in the document processing rule.

In this embodiment, the rule engine dynamically displays a part of rules in the currently executed document processing rules and the state related to the source document obtained after the execution of the part of rules. The user can visually see the executed partial rules of the current bill processing rules and the state related to the source bill obtained after the partial rules are executed.

In one embodiment, the method further comprises: if the rule combination operation is received, calling a plurality of existing bill processing rules specified by the rule combination operation from a rule base; and correspondingly configuring the rule information of the called document processing rule to the tree node position in the rule tree.

The rule combination operation is an operation of combining a plurality of different rules. The rule base is a database for storing the existing bill processing rules.

Specifically, in a visualized rule configuration interface, a user performs a combination operation on different rules according to the processing to be performed on the source document. The terminal responds to the rule combination operation of the user and calls a plurality of existing bill processing rules specified by the rule combination operation from the rule base. And the terminal calls the bill processing rule to be combined, and correspondingly configures the rule information of the called bill processing rule to the tree node position in the rule tree.

In one embodiment, the existing document processing rules may be executed or may be existing document processing rules that have not been executed.

In the embodiment, the existing bill processing rules are stored in the rule base and are directly called when needed, so that the utilization rate of the existing rules can be improved.

In one embodiment, as shown in fig. 5, a schematic diagram of a document generation method is provided, and a terminal acquires a plurality of source documents of ". system source only", "heterogeneous source only 2" … ", and receives a request for generating a plurality of target documents. And the terminal calls a rule engine, analyzes rule information which is acquired from the rule tree and is configured in advance for the plurality of source documents, acquires document processing rules and executes the rules. And when the preset triggering condition in the bill processing rule is met, the rule engine triggers and outputs the corresponding bill generation operation in the bill processing rule. And the rule engine processes the source document according to the document generation operation and finally generates a plurality of target documents. The heterogeneous source document refers to source documents from different systems.

In one embodiment, the source documents may be an account receivable, a receipt and a verification document, and the rule engine executes to determine that three documents have generated an accounting event at the same time, and then generates a receipt verification document. The verification certificate of the verification and cancellation bill comprises a credit subject of the certificate of the receipt, a debit subject of the certificate of the receipt, a payment verification and cancellation amount, a payment original currency amount and a verification and cancellation amount.

It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in each flowchart of the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.

In one embodiment, as shown in FIG. 6, there is provided a document generation apparatus 600 comprising: an obtaining module 602, a calling module 604, and a generating module 606, wherein:

an obtaining module 602, configured to obtain rule information preconfigured for at least one source document from a rule tree preconfigured in a visualization rule configuration interface; the rule tree is rule information related to document processing and is configured in a visualization rule configuration interface in a tree structure mode in advance.

And the calling module 604 is configured to call the rule engine to analyze the obtained rule information to obtain a document processing rule.

The invoking module 604 is further configured to execute the document processing rule according to the rule engine, so as to trigger to output a corresponding document generation operation in the document processing rule when a preset trigger condition in the document processing rule is met.

And the generating module 606 is configured to perform corresponding processing on the source document according to the document generating operation to generate the target document.

In one embodiment, as shown in fig. 7, the apparatus further comprises:

a configuration module 601, configured to display an initial rule tree in a visualization rule configuration interface; and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to the bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

In an embodiment, the configuring module 601 is further configured to, in response to a rule configuring operation for the initial rule tree, configure a document attribute on a tree node of 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; each bill processing rule in the rule set respectively comprises a configured bill attribute set, a condition set, a value set and an operation set; each rule starting tree node and the lower level nodes of the rule starting tree nodes form a complete document processing rule.

In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set; the invoking module 604 is further configured to invoke the rule engine to analyze the attribute set, the condition set, the value set, and the operation set obtained from the tree node in the rule tree, so as to obtain an attribute in the attribute set, a condition in the condition set, a value in the value set, and an operation instruction in the operation set corresponding to the document processing rule.

In an embodiment, the invoking module 604 is further configured to execute the document processing rule according to the rule engine, and dynamically display a part of rules in the currently executed document processing rule and a state related to the source document obtained after the part of rules are executed.

In an embodiment, the configuration module 601 is further configured to, if the rule combination operation is received, retrieve a plurality of existing document processing rules specified by the rule combination operation from the rule base; and correspondingly configuring the rule information of the called document processing rule to the tree node position in the rule tree.

For specific limitations of the stand-alone generation device, reference may be made to the above limitations of the document generation method, which are not described herein again. The modules in the stand-alone generating device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program when executed by a processor implements a document generation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.

Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.

In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:

acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visual rule configuration interface; the rule tree is rule information which is configured in a visualization rule configuration interface in advance in a tree structure mode and is relevant to document processing;

calling a rule engine to analyze the obtained rule information to obtain a document processing rule;

executing a bill processing rule according to a rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and according to the bill generation operation, performing corresponding processing on the source bill to generate a target bill.

In one embodiment, the processor, when executing the computer program, further performs the steps of: displaying an initial rule tree in a visual rule configuration interface; and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to the bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

In one embodiment, the processor, when executing the computer program, further performs the steps of: responding to the rule configuration operation aiming at the initial rule tree, configuring document attributes on tree nodes of the initial rule tree, and configuring document related operations of the document attributes under different condition values to obtain a rule tree comprising a rule set; each bill processing rule in the rule set respectively comprises a configured bill attribute set, a condition set, a value set and an operation set; each rule starting tree node and the lower level nodes of the rule starting tree nodes form a complete document processing rule.

In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set; the processor, when executing the computer program, further performs the steps of: and calling a rule engine to analyze the attribute set, the condition set, the value set and the operation set which are acquired from the tree node in the rule tree to obtain the attribute in the attribute set, the condition in the condition set, the value in the value set and the operation instruction in the operation set corresponding to the bill processing rule.

In one embodiment, the processor, when executing the computer program, further performs the steps of: and executing the bill processing rule according to the rule engine, and dynamically displaying part of rules in the currently executed bill processing rule and the state related to the source bill obtained after the execution of the part of rules.

In one embodiment, the processor, when executing the computer program, further performs the steps of: if the rule combination operation is received, calling a plurality of existing bill processing rules specified by the rule combination operation from a rule base; and correspondingly configuring the rule information of the called document processing rule to the tree node position in the rule tree.

In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:

acquiring rule information pre-configured for at least one source document from a rule tree pre-configured in a visual rule configuration interface; the rule tree is rule information which is configured in a visualization rule configuration interface in advance in a tree structure mode and is relevant to document processing;

calling a rule engine to analyze the obtained rule information to obtain a document processing rule;

executing a bill processing rule according to a rule engine so as to trigger and output corresponding bill generation operation in the bill processing rule when a preset trigger condition in the bill processing rule is met;

and according to the bill generation operation, performing corresponding processing on the source bill to generate a target bill.

In one embodiment, the computer program when executed by the processor further performs the steps of: displaying an initial rule tree in a visual rule configuration interface; and responding to the rule configuration operation aiming at the initial rule tree, and configuring the rule information related to the bill processing to the corresponding tree node of the initial rule tree to obtain the configured rule tree.

In one embodiment, the computer program when executed by the processor further performs the steps of: responding to the rule configuration operation aiming at the initial rule tree, configuring document attributes on tree nodes of the initial rule tree, and configuring document related operations of the document attributes under different condition values to obtain a rule tree comprising a rule set; each bill processing rule in the rule set respectively comprises a configured bill attribute set, a condition set, a value set and an operation set; each rule starting tree node and the lower level nodes of the rule starting tree nodes form a complete document processing rule.

In one embodiment, the rule information includes: an attribute set, a condition set, a value set, and an operation set; the computer program when executed by the processor further realizes the steps of: and calling a rule engine to analyze the attribute set, the condition set, the value set and the operation set which are acquired from the tree node in the rule tree to obtain the attribute in the attribute set, the condition in the condition set, the value in the value set and the operation instruction in the operation set corresponding to the bill processing rule.

In one embodiment, the computer program when executed by the processor further performs the steps of: and executing the bill processing rule according to the rule engine, and dynamically displaying part of rules in the currently executed bill processing rule and the state related to the source bill obtained after the execution of the part of rules.

In one embodiment, the computer program when executed by the processor further performs the steps of: if the rule combination operation is received, calling a plurality of existing bill processing rules specified by the rule combination operation from a rule base; and correspondingly configuring the rule information of the called document processing rule to the tree node position in the rule tree.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.

The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种流式文档解析的并行执行方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!