CN112613275A - Receipt generation method and device, computer equipment and storage medium - Google Patents

Receipt generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112613275A
CN112613275A CN202011556478.4A CN202011556478A CN112613275A CN 112613275 A CN112613275 A CN 112613275A CN 202011556478 A CN202011556478 A CN 202011556478A CN 112613275 A CN112613275 A CN 112613275A
Authority
CN
China
Prior art keywords
rule
tree
bill
document
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011556478.4A
Other languages
Chinese (zh)
Inventor
涂克东
张锦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202011556478.4A priority Critical patent/CN112613275A/en
Publication of CN112613275A publication Critical patent/CN112613275A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

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.

Description

Receipt generation method and device, computer equipment and storage medium
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.

Claims (10)

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.
CN202011556478.4A 2020-12-24 2020-12-24 Receipt generation method and device, computer equipment and storage medium Pending CN112613275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011556478.4A CN112613275A (en) 2020-12-24 2020-12-24 Receipt generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011556478.4A CN112613275A (en) 2020-12-24 2020-12-24 Receipt generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112613275A true CN112613275A (en) 2021-04-06

Family

ID=75245197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011556478.4A Pending CN112613275A (en) 2020-12-24 2020-12-24 Receipt generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112613275A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377372A (en) * 2021-06-29 2021-09-10 平安普惠企业管理有限公司 Business rule analysis method and device, computer equipment and storage medium
CN115688683A (en) * 2023-01-05 2023-02-03 东方合智数据科技(广东)有限责任公司 Document number issuing method, device, equipment and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101694708A (en) * 2009-11-06 2010-04-14 金蝶软件(中国)有限公司 Method and device for enabling encoding rules
CN101706907A (en) * 2009-11-26 2010-05-12 金蝶软件(中国)有限公司 Method and device for adjusting data
CN101833714A (en) * 2010-06-12 2010-09-15 山东中创软件工程股份有限公司 Method, device and system for controlling power of examination and approval
CN102222060A (en) * 2011-06-28 2011-10-19 用友软件股份有限公司 Receipt conversion device and receipt conversion method
CN102402731A (en) * 2010-09-15 2012-04-04 金蝶软件(中国)有限公司 Cross-document workflow implementation method and system
CN102982414A (en) * 2012-11-22 2013-03-20 用友软件股份有限公司 Data generating device and method
CN105630797A (en) * 2014-10-29 2016-06-01 阿里巴巴集团控股有限公司 Data processing method and system
CN105809305A (en) * 2014-12-30 2016-07-27 金蝶软件(中国)有限公司 Method and device for realizing flow automatic approval
CN109034622A (en) * 2018-07-27 2018-12-18 肇庆华锋电子铝箔股份有限公司 A kind of data processing method and system
CN109815389A (en) * 2019-02-02 2019-05-28 北京三快在线科技有限公司 Using the node matching method, apparatus and computer equipment of regulation engine
CN110610352A (en) * 2019-09-16 2019-12-24 中国铁塔股份有限公司 Flow processing method and device, electronic equipment and computer readable storage medium
CN110704519A (en) * 2019-08-29 2020-01-17 中国平安财产保险股份有限公司 Business document conversion method and device, storage medium and computer equipment
CN111400353A (en) * 2020-03-19 2020-07-10 中国建设银行股份有限公司 Rule calculation method, device, equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101694708A (en) * 2009-11-06 2010-04-14 金蝶软件(中国)有限公司 Method and device for enabling encoding rules
CN101706907A (en) * 2009-11-26 2010-05-12 金蝶软件(中国)有限公司 Method and device for adjusting data
CN101833714A (en) * 2010-06-12 2010-09-15 山东中创软件工程股份有限公司 Method, device and system for controlling power of examination and approval
CN102402731A (en) * 2010-09-15 2012-04-04 金蝶软件(中国)有限公司 Cross-document workflow implementation method and system
CN102222060A (en) * 2011-06-28 2011-10-19 用友软件股份有限公司 Receipt conversion device and receipt conversion method
CN102982414A (en) * 2012-11-22 2013-03-20 用友软件股份有限公司 Data generating device and method
CN105630797A (en) * 2014-10-29 2016-06-01 阿里巴巴集团控股有限公司 Data processing method and system
CN105809305A (en) * 2014-12-30 2016-07-27 金蝶软件(中国)有限公司 Method and device for realizing flow automatic approval
CN109034622A (en) * 2018-07-27 2018-12-18 肇庆华锋电子铝箔股份有限公司 A kind of data processing method and system
CN109815389A (en) * 2019-02-02 2019-05-28 北京三快在线科技有限公司 Using the node matching method, apparatus and computer equipment of regulation engine
CN110704519A (en) * 2019-08-29 2020-01-17 中国平安财产保险股份有限公司 Business document conversion method and device, storage medium and computer equipment
CN110610352A (en) * 2019-09-16 2019-12-24 中国铁塔股份有限公司 Flow processing method and device, electronic equipment and computer readable storage medium
CN111400353A (en) * 2020-03-19 2020-07-10 中国建设银行股份有限公司 Rule calculation method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377372A (en) * 2021-06-29 2021-09-10 平安普惠企业管理有限公司 Business rule analysis method and device, computer equipment and storage medium
CN115688683A (en) * 2023-01-05 2023-02-03 东方合智数据科技(广东)有限责任公司 Document number issuing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109901834B (en) Document page generation method, device, computer equipment and storage medium
US9977658B2 (en) Code validation using content assist
CN110266752B (en) Block chain information pushing method and device, computer equipment and storage medium
CN108459964B (en) Test case selection method, device, equipment and computer readable storage medium
CN111930370A (en) Visualized page processing method and device, computer equipment and storage medium
CN108492005B (en) Project data processing method and device, computer equipment and storage medium
US9563404B2 (en) Installing software using a set of characteristics and a task list
CN111796799B (en) Sub-application development method and device, computer equipment and storage medium
CN110688598A (en) Service parameter acquisition method and device, computer equipment and storage medium
CN112114914A (en) Method and device for generating report, computer equipment and storage medium
CN112613275A (en) Receipt generation method and device, computer equipment and storage medium
CN112433712A (en) Report display method and device, computer equipment and storage medium
CN112765497A (en) Business data analysis result query display method, device, equipment and medium
CN112306471A (en) Task scheduling method and device
CN110232018A (en) Interface test method, device, computer equipment
CN114764296A (en) Machine learning model training method and device, electronic equipment and storage medium
CN112527416A (en) Task processing method and device, computer equipment and storage medium
CN114997813A (en) Flow chart generation method, device, equipment and storage medium
CN114116761A (en) Variable processing method, variable processing device, computer equipment and storage medium
CN109711809B (en) Merchant attribute setting method and device, computer equipment and storage medium
CN113986679A (en) Performance analysis method and device based on configuration information hot loading
CN112685023A (en) Front-end development processing method, device, equipment and storage medium based on basic library
CN112328450A (en) Data monitoring method and device, computer equipment and storage medium
CN111625830A (en) Data processing method, data display method, system and equipment
US9875290B2 (en) Method, system and computer program product for using an intermediation function

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination