CN111027296A - Report generation method and system based on knowledge base - Google Patents

Report generation method and system based on knowledge base Download PDF

Info

Publication number
CN111027296A
CN111027296A CN201911149514.2A CN201911149514A CN111027296A CN 111027296 A CN111027296 A CN 111027296A CN 201911149514 A CN201911149514 A CN 201911149514A CN 111027296 A CN111027296 A CN 111027296A
Authority
CN
China
Prior art keywords
report
subject
target
evaluation
evaluation variable
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
CN201911149514.2A
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201911149514.2A priority Critical patent/CN111027296A/en
Publication of CN111027296A publication Critical patent/CN111027296A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a report generation method based on a knowledge base, which comprises the following steps: acquiring a report generation request instruction of a user, wherein the report generation request instruction comprises a report type; acquiring a corresponding configuration document according to the report type; receiving input data of the user and inputting the input data into the configuration document, wherein the input data comprises evaluation variables and report data; and identifying the configuration document to obtain the evaluation variable, wherein the evaluation variable is the entry report subject of the entry data. The invention also discloses a report generation system based on the knowledge base. The invention has the beneficial effects that: the evaluation variables received by the configuration file are identified, and then the evaluation variables are matched and screened according to the knowledge base to generate a report document, so that the accuracy of report subject identification is improved.

Description

Report generation method and system based on knowledge base
Technical Field
The embodiment of the invention relates to the field of report generation, in particular to a report generation method and system based on a knowledge base.
Technical Field
The report forms are important written documents which comprehensively reflect the financial conditions, the operation results, the profit distribution conditions, the cash flow and the change conditions of the enterprises, are the main basis for the financial institutions such as banks, leasing companies and rural credit unions to judge the comprehensive financial conditions, the profitability and the payment and debt-paying capacity of the enterprises, and have very important functions for the financial institutions to develop the services such as credit, financial leasing, agriculture and telecommunications.
The traditional mechanism report data acquisition and knowledge base generation technology is often heavy and inflexible, and once the mechanism report data is modified, no matter the mechanism report data is slightly modified or greatly modified, the current system cannot identify the mechanism report data or calculation errors occur. The report data needs to be filled in by the user according to a limited financial template, and the user needs to read for a long time according to a complex, long and tedious financial template specification; meanwhile, even if the user reads the financial template description completely, errors may occur in the filling of the financial template, so that the system cannot identify report data, and the report is generated wrongly.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and a system for generating a report based on a knowledge base, in which an evaluation variable received by a configuration file is identified, and then the evaluation variable is matched and screened according to the knowledge base to generate a report document, so that accuracy of identifying a subject of the report is improved.
In order to achieve the above object, an embodiment of the present invention provides a report generation method based on a knowledge base, including:
acquiring a report generation request instruction of a user, wherein the report generation request instruction comprises a report type;
acquiring a corresponding configuration document according to the report type;
receiving input data of the user and inputting the input data into the configuration document, wherein the input data comprises evaluation variables and report data;
identifying the configuration document to obtain the evaluation variable, wherein the evaluation variable is the input report subject of the input data;
inquiring whether the evaluation variable has a matched report subject in a knowledge base or not, wherein the matched report subject is a target report subject;
and generating a target report according to the report data, the report type and the target report subject.
Further, the identifying the profile to derive the evaluation variable comprises:
identifying keywords of the configuration document based on an AI intelligent identification algorithm to obtain values corresponding to the keywords, wherein the values corresponding to the keywords are evaluation variables;
and identifying the target attribute corresponding to the evaluation variable according to a pre-trained neural network model.
Further, the training neural network model includes:
acquiring a plurality of sample reports and sample report subjects corresponding to the sample reports;
analyzing the preset attribute of the subject of the sample report;
and inputting the sample report subject and the corresponding preset attribute into the neural network model so that the neural network model outputs the corresponding preset attribute according to the sample report subject.
Further, the querying whether the evaluation variable has a matched target report subject in the knowledge base or not, where the matching report subject is a target report subject includes:
storing the evaluation variables and the target attributes corresponding to the evaluation variables into a stack;
matching the field of the evaluation variable with the field of the report subject in the knowledge base from the stack from low to high according to the hierarchy by using a character matching algorithm;
and if the target report subject matched with the field of the evaluation variable exists in the knowledge base, comparing whether the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, wherein if the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, judging that the target report subject matched with the evaluation variable exists in the report subject.
Further, the generating a target report according to the report data, the report type and the target report subject includes:
associating the report parameters of the evaluation variables to corresponding target report subjects;
calculating the report data associated with the target report subject according to the report type to obtain parameter configuration information of the target report subject;
acquiring a preset report template according to the report type;
and inputting the parameter configuration information and the target report subject into the preset report template to generate a report document.
In order to achieve the above object, an embodiment of the present invention further provides a report generation system based on a knowledge base, including:
the system comprises a first acquisition module, a second acquisition module and a report generation module, wherein the first acquisition module is used for acquiring a report generation request instruction of a user, and the report generation request instruction comprises a report type;
the second acquisition module is used for acquiring a corresponding configuration document according to the report type;
the receiving module is used for receiving input data of the user and inputting the input data into the configuration document, wherein the input data comprises evaluation variables and report data;
the identification module is used for analyzing the configuration document to obtain the evaluation variable, and the evaluation variable is the entry report subject of the entry data;
the query module is used for querying whether the evaluation variable has a matched report subject in the knowledge base, and the matched report subject is a target report subject;
and the generating module is used for generating a target report according to the report data, the report type and the target report subject.
Further, the query module is further configured to:
storing the evaluation variables and the target attributes corresponding to the evaluation variables into a stack;
matching the field of the evaluation variable with the field of the report subject in the knowledge base from low to high according to the hierarchy by using a character matching algorithm;
and if the target report subject matched with the field of the evaluation variable exists in the knowledge base, comparing whether the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, wherein if the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, judging that the target report subject matched with the evaluation variable exists in the report subject.
Further, the generation module is further configured to:
associating the report parameters of the evaluation variables to corresponding target report subjects;
calculating the report data associated with the target report subject according to the report type to obtain parameter configuration information of the target report subject;
acquiring a preset report template according to the report type;
and inputting the parameter configuration information and the target report subject into the preset report template to generate a report document.
In order to achieve the above object, an embodiment of the present invention further provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the computer program, when executed by the processor, implements the steps of the repository-based report generation method described above.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor to cause the at least one processor to execute the steps of the repository-based report generation method as described above.
According to the report generation method and system based on the knowledge base, provided by the embodiment of the invention, the evaluation variables received by the configuration file are identified, and then the evaluation variables are matched and screened according to the knowledge base to generate the report document, so that the accuracy of report subject identification is improved.
Drawings
FIG. 1 is a flowchart of a first embodiment of a knowledge-base-based report generation method according to the present invention.
FIG. 2 is a flowchart illustrating step S106 of FIG. 1 according to the present invention.
FIG. 3 is a flow chart of the present invention for training the neural network model of FIG. 1.
FIG. 4 is a flowchart illustrating step S108 of FIG. 1 according to the present invention.
FIG. 5 is a flowchart illustrating step S110 of FIG. 1 according to the present invention.
FIG. 6 is a schematic diagram of program modules of a second embodiment of a knowledge-base-based report generation system according to the present invention.
Fig. 7 is a schematic diagram of a hardware structure of a third embodiment of the computer apparatus according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention 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 invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a method for generating a report based on a knowledge base according to a first embodiment of the present invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is made by way of example with the computer device 2 as the execution subject. The details are as follows.
Step S100, a report generation request instruction of a user is obtained, wherein the report generation request instruction comprises a report type.
Specifically, the report request instruction is used for selecting a report type and generating a corresponding report document according to the report type and the input data of the user.
And step S102, acquiring a corresponding configuration document according to the report type.
Specifically, the configuration document is a configuration document of a report document configured according to a report type, the configuration document is an xml text configuration document, and the configuration document includes contents required to be filled in the report document, and can evaluate financial systems of an enterprise, such as subjects and amounts. The configuration file can be subjected to the operations of adding, deleting, modifying and checking, and the operated configuration file is synchronized into the database. The configuration document takes effect in real time after being modified, and a program does not need to be modified.
And step S104, receiving the input data of the user and inputting the input data into the configuration document, wherein the input data comprises evaluation variables and report data.
Specifically, the entry data of the user includes evaluation variables and statement data related to statements, the entry data includes required evaluation variables such as liability information, cash flow information, profit information and remark information, and also includes amount data such as liability, profit and cash flow, and the statement data is amount data.
And S106, identifying the configuration document to obtain the evaluation variable, wherein the evaluation variable is the entry report subject of the entry data.
Specifically, an AI (Artificial Intelligence) intelligent recognition algorithm is used for recognizing evaluation variables of the configuration document, wherein the evaluation variables are report subjects generated according to the pre-configured requirements. And the levels of all required report subjects in the configuration file are classified step by step according to the attributes, and the required report subject attributes divided step by step are displayed on the configuration file according to the format of the configuration file, so that the level confusion can not be caused when a user fills in input data.
Exemplarily, referring to fig. 2, step S106 further includes:
step S106A, identifying keywords of the configuration document based on an AI intelligent identification algorithm to obtain values corresponding to the keywords, wherein the values corresponding to the keywords are evaluation variables.
Specifically, by setting an AI intelligent recognition algorithm to recognize the evaluation variables in the input data, the AI intelligent recognition algorithm may be a decision tree, and recognizes the evaluation variables according to a preset level, for example: primary subjects, secondary subjects, etc. And identifying the keywords of the configuration document by using an AI intelligent identification algorithm, and acquiring corresponding evaluation variables according to the keywords.
And S106B, identifying target attributes corresponding to the evaluation variables according to a pre-trained neural network model.
Specifically, the pre-trained neural network model can output corresponding target attributes according to the evaluation variables, the evaluation variables are input into the trained neural network model, and the preset attributes with the maximum evaluation variable similarity are obtained through softmaxs function calculation, namely the target attributes.
Illustratively, referring to fig. 3, the training neural network model includes:
step S106B1, a plurality of sample reports and the sample report subjects corresponding to each sample report are obtained.
Specifically, training can be performed through sample reports of the existing template and the subjects of the sample reports corresponding to each sample report.
And step S106B2, analyzing the preset attributes of the subjects of the sample report.
Specifically, the sample report subject is analyzed according to a tree-structured configuration rule, and the sample report subject is subjected to level marking according to a primary subject and a secondary subject mode, wherein the level marking is a preset attribute. And the corresponding preset attribute can be obtained by marking the subjects of the sample report.
Step S106B3, inputting the subject of the sample report and the corresponding preset attribute into the neural network model, so that the neural network model outputs the corresponding preset attribute according to the subject of the sample report.
Specifically, the neural network model performs feature extraction on the input sample report and the sample report subject corresponding to each sample report by using a Convolutional Neural Network (CNN) during training and recognition, and the classification and similarity of recognition are output according to the extracted features during recognition.
Illustratively, if there is an unrecognized evaluation variable, the system automatically records and writes the evaluation variable into a database, judges whether the evaluation variable is needed by the evaluation item through a judgment algorithm, and if so, puts the evaluation variable into a configuration file.
And S108, inquiring whether the evaluation variable has a matched report subject in the knowledge base, wherein the matched report subject is a target report subject.
Specifically, the knowledge base stores report subjects associated according to a knowledge frame and corresponding attributes thereof, and the report subjects are hierarchically divided, wherein the knowledge frame is formulated according to an assessment enterprise financial system. During recognition, corresponding report types and report subjects in the knowledge base can be extracted and stored in a stack, so that the recognition efficiency is improved. The report subjects comprise report subjects used by each report type, the general report subjects comprise 300 items and 77 key indexes, and the key indexes are generally the first level and have corresponding attribute classification; the report subjects may include all report subjects on the market, and have a classification of sub-subjects and main subject, and the subjects with the same name may exist in different levels, and the level is the attribute of the report subject. For example: the food is of the main family, the next level is of the sub-family, while the fruit of the same main family is of the sub-family, but 2 apples are of different sub-families.
Exemplarily, referring to fig. 4, step S108 further includes:
step S108A, storing the evaluation variable and the target attribute corresponding to the evaluation variable in a stack.
Specifically, the evaluation variables are stored according to the hierarchy by using the characteristic that the stack is put in first and then put out, and when the evaluation variables are stored from high to low, the evaluation variables are stored into the preset attributes of the evaluation variables, namely the hierarchy relation.
And step S108B, matching the field of the evaluation variable with the field of the report subject in the knowledge base from the stack from low to high according to the hierarchy by using a character matching algorithm.
Specifically, by using the characteristic that the stack is put in first and then put out, the character matching algorithm firstly identifies the fields of the low-level evaluation variables and the fields of the report subjects in the knowledge base, and if no fields are consistent, the fields with the highest matching degree or higher than a preset threshold are selected for further matching the attributes.
Step S108C, if there is a target report subject matching the field of the evaluation variable in the knowledge base, comparing whether the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, wherein if the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, it is determined that there is a target report subject matching the evaluation variable in the report subject.
Specifically, the text matching algorithm does not completely match the subject according to all names, but needs to identify the subject according to attribute classification, so that sub-subjects at different levels can be distinguished and identified.
And step S110, generating a target report according to the report data, the report type and the target report subject.
Specifically, when it is determined that the evaluation variables match the reporting subject, a reporting document may be generated to reduce the time for repeated fills.
Exemplarily, referring to fig. 5, step S110 further includes:
step S110A, associating the report parameters of the evaluation variables to corresponding target report subjects.
Specifically, if there is a target report subject matched with the evaluation variable in the report subjects, the report parameters of the evaluation variable are associated with the corresponding target report subject. And if no target report subject matched with the evaluation variable exists in the report subjects, discarding or labeling the evaluation variable without performing the next operation. If marking, redefining as the newly added report subject.
Step S110B, performing calculation processing on the report data associated with the target report subject according to the report type to obtain parameter configuration information of the target report subject.
Specifically, some report data of report subjects are calculated according to other report subjects, such as net profit. The report data to be processed, which is input by the user, is processed by extracting the target key words from the evaluation variables, searching the calculation formulas associated with the target key words and processing the report data according to the searched calculation formulas, so that the formulas are not required to be screened manually in the whole process, the time of the user is saved, and the processing efficiency of the report data and the accuracy of the processing result are improved.
And step S110C, acquiring a preset report template according to the report type.
Specifically, each report type is associated with a preset report template in advance, and when a report document needs to be generated, the report document can be directly acquired according to the report type.
Step S110D, inputting the parameter configuration information and the target report subject into the preset report template to generate a report document.
Specifically, the parameter configuration information and the target report subject are substituted into a preset report template corresponding to the report type, and a corresponding report document is generated.
Illustratively, further comprising updating the knowledge base.
Specifically, the general subjects obtained from various analyzed report documents are obtained, newly added subjects different from the knowledge base in the general subjects are identified, attribute classification of the newly added subjects is set according to the evaluation index, fuzzy semantic definition, an attribution function and fuzzy rules are made on the newly added subjects, the newly added subjects are stored according to a knowledge frame, and report subjects of the previous level and the next level are associated according to corresponding attributes so that the attribute classification of the newly added subjects is defined in the knowledge base.
Illustratively, by comparing the evaluation variables in the existing database with the data crawled by the web crawler, a comparative analysis can be performed with the same row.
Example two
Continuing to refer to fig. 6, a program module diagram of a second embodiment of the report generation system based on knowledge base according to the present invention is shown. In this embodiment, the repository-based report generating system 20 may include or be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to implement the present invention and implement the repository-based report generating method described above. The program module referred to in the embodiments of the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the report generation system 20 based on the knowledge base in the storage medium than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
the first obtaining module 200 is configured to obtain a report generation request instruction of a user, where the report generation request instruction includes a report type.
Specifically, the report request instruction is used for selecting a report type and generating a corresponding report document according to the report type and the input data of the user.
The second obtaining module 202 is configured to obtain a corresponding configuration document according to the report type.
Specifically, the configuration document is a configuration document of a report document configured according to a report type, the configuration document is an xml text configuration document, and the configuration document includes contents required to be filled in the report document, and can evaluate financial systems of an enterprise, such as subjects and amounts. The configuration file can be subjected to the operations of adding, deleting, modifying and checking, and the operated configuration file is synchronized into the database. The configuration document takes effect in real time after being modified, and a program does not need to be modified.
The receiving module 204 is configured to receive entry data of the user and enter the configuration document, where the entry data includes an evaluation variable and report data.
Specifically, the entry data of the user includes evaluation variables and statement data related to statements, the entry data includes required evaluation variables such as liability information, cash flow information, profit information and remark information, and also includes amount data such as liability, profit and cash flow, and the statement data is amount data.
The identifying module 206 is configured to identify the configuration document to obtain the evaluation variable, where the evaluation variable is the entry report subject of the entry data.
Specifically, an evaluation variable of the configuration document is identified through an AI intelligent identification algorithm, and the evaluation variable is a report subject generated according to a pre-configured requirement. And the levels of all required report subjects in the configuration file are classified step by step according to the attributes, and the required report subject attributes divided step by step are displayed on the configuration file according to the format of the configuration file, so that the level confusion can not be caused when a user fills in input data.
Illustratively, the identification module 206 is further configured to:
and identifying the keywords of the configuration document based on an AI intelligent identification algorithm to obtain the values corresponding to the keywords, wherein the values corresponding to the keywords are evaluation variables.
Specifically, by setting an AI intelligent recognition algorithm to recognize the evaluation variables in the input data, the AI intelligent recognition algorithm may be a decision tree, and recognizes the evaluation variables according to a preset level, for example: primary subjects, secondary subjects, etc. And identifying the keywords of the configuration document by using an AI intelligent identification algorithm, and acquiring corresponding evaluation variables according to the keywords.
And identifying the target attribute corresponding to the evaluation variable according to a pre-trained neural network model.
Specifically, the pre-trained neural network model can output corresponding target attributes according to the evaluation variables, the evaluation variables are input into the trained neural network model, and the preset attributes with the maximum evaluation variable similarity are obtained through softmaxs function calculation, namely the target attributes.
Illustratively, the training neural network model includes:
and acquiring a plurality of sample reports and the sample report subjects corresponding to the sample reports.
Specifically, training can be performed through sample reports of the existing template and the subjects of the sample reports corresponding to each sample report.
And analyzing the preset attribute of the subject of the sample report.
Specifically, the sample report subject is analyzed according to a tree-structured configuration rule, and the sample report subject is subjected to level marking according to a primary subject and a secondary subject mode, wherein the level marking is a preset attribute. And the corresponding preset attribute can be obtained by marking the subjects of the sample report.
And inputting the sample report subjects and the corresponding preset attributes into the neural network model so that the neural network model outputs the corresponding preset attributes according to the sample report subjects, or outputs the corresponding sample report subjects according to the preset attributes.
Specifically, the neural network model performs feature extraction on the input sample report and the sample report subject corresponding to each sample report by using a Convolutional Neural Network (CNN) during training and recognition, and the classification and similarity of recognition are output according to the extracted features during recognition.
Illustratively, if there is an unrecognized evaluation variable, the system automatically records and writes the evaluation variable into a database, judges whether the evaluation variable is needed by the evaluation item through a judgment algorithm, and if so, puts the evaluation variable into a configuration file.
And the query module 208 is configured to query whether the evaluation variable has a matched report subject in the knowledge base, where the matched report subject is a target report subject.
Specifically, the knowledge base stores report subjects associated according to a knowledge frame and corresponding attributes thereof, and the report subjects are hierarchically divided, wherein the knowledge frame is formulated according to an assessment enterprise financial system. During recognition, corresponding report types and report subjects in the knowledge base can be extracted and stored in a stack, so that the recognition efficiency is improved. The report subjects comprise report subjects used by each report type, the general report subjects comprise 300 items and 77 key indexes, and the key indexes are generally the first level and have corresponding attribute classification; the report subjects may include all report subjects on the market, and have a classification of sub-subjects and main subject, and the subjects with the same name may exist in different levels, and the level is the attribute of the report subject. For example: the food is of the main family, the next level is of the sub-family, while the fruit of the same main family is of the sub-family, but 2 apples are of different sub-families.
Illustratively, the query module 208 is further configured to:
and storing the evaluation variables and the target attributes corresponding to the evaluation variables into a stack.
Specifically, the evaluation variables are stored according to the hierarchy by using the characteristic that the stack is put in first and then put out, and when the evaluation variables are stored from high to low, the evaluation variables are stored into the preset attributes of the evaluation variables, namely the hierarchy relation.
And matching the field of the evaluation variable with the field of the report subject in the knowledge base from the stack from low to high according to the hierarchy by using a character matching algorithm.
Specifically, by using the characteristic that the stack is put in first and then put out, the character matching algorithm firstly identifies the fields of the low-level evaluation variables and the fields of the report subjects in the knowledge base, and if no fields are consistent, the fields with the highest matching degree or higher than a preset threshold are selected for further matching the attributes.
And if the target report subject matched with the field of the evaluation variable exists in the knowledge base, comparing whether the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, wherein if the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, judging that the target report subject matched with the evaluation variable exists in the report subject.
Specifically, the text matching algorithm does not completely match the subject according to all names, but needs to identify the subject according to attribute classification, so that sub-subjects at different levels can be distinguished and identified.
The generating module 210 is configured to generate a report document according to the report data, the report type, and the target report subject.
Specifically, when it is determined that the evaluation variables match the reporting subject, a reporting document may be generated to reduce the time for repeated fills.
Illustratively, the generating module 210 is further configured to:
and associating the report parameters of the evaluation variables to corresponding target report subjects.
Specifically, if there is a target report subject matched with the evaluation variable in the report subjects, the report parameters of the evaluation variable are associated with the corresponding target report subject. And if no target report subject matched with the evaluation variable exists in the report subjects, discarding or labeling the evaluation variable without performing the next operation. If marking, redefining as the newly added report subject.
And calculating the report data associated with the target report subject according to the report type to obtain the parameter configuration information of the target report subject.
Specifically, some data of the report subjects need to be calculated according to other data of the report subjects, such as net profits. The report data to be processed, which is input by the user, is processed by extracting the target key words from the evaluation variables, searching the calculation formulas associated with the target key words and processing the report data according to the searched calculation formulas, so that the formulas are not required to be screened manually in the whole process, the time of the user is saved, and the processing efficiency of the report data and the accuracy of the processing result are improved.
And acquiring a preset report template according to the report type.
Specifically, each report type is associated with a preset report template in advance, and when a report document needs to be generated, the report document can be directly acquired according to the report type.
Step S110D, inputting the parameter configuration information and the target report subject into the preset report template to generate a report document.
Specifically, the parameter configuration information and the target report subject are substituted into a preset report template corresponding to the report type, and a corresponding report document is generated.
EXAMPLE III
Fig. 7 is a schematic diagram of a hardware architecture of a computer device according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown in FIG. 7, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a repository-based report generating system 20, which may be communicatively coupled to each other via a system bus. Wherein:
in this embodiment, the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the computer device 2. Of course, the memory 21 may also comprise both internal and external memory units of the computer device 2. In this embodiment, the memory 21 is generally used for storing an operating system and various application software installed on the computer device 2, such as the program code of the repository-based report generating system 20 of the second embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device 2. In this embodiment, the processor 22 is configured to run the program code stored in the memory 21 or process data, for example, run the report generation system 20 based on the knowledge base, so as to implement the report generation method based on the knowledge base according to the first embodiment.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the server 2 and other electronic devices. For example, the network interface 23 is used to connect the server 2 to an external terminal via a network, establish a data transmission channel and a communication connection between the server 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like. It is noted that fig. 7 only shows the computer device 2 with components 20-23, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the knowledgebase-based report generating system 20 stored in the memory 21 may be further divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
For example, fig. 6 is a schematic diagram of program modules of a second embodiment of implementing the knowledge-base-based report generating system 20, in which the knowledge-base-based report generating system 20 can be divided into a first obtaining module 200, a second obtaining module 202, a receiving module 204, an identifying module 206, a querying module 208, and a generating module 210. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the knowledge-base-based report generation system 20 in the computer device 2. The specific functions of the program modules 200 and 210 have been described in detail in the second embodiment, and are not described herein again.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of the embodiment is used for storing the report generating system 20 based on the knowledge base, and when being executed by the processor, the report generating method based on the knowledge base of the first embodiment is implemented.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A report generation method based on a knowledge base is characterized by comprising the following steps:
acquiring a report generation request instruction of a user, wherein the report generation request instruction comprises a report type;
acquiring a corresponding configuration document according to the report type;
receiving input data of the user and inputting the input data into the configuration document, wherein the input data comprises evaluation variables and report data;
identifying the configuration document to obtain the evaluation variable, wherein the evaluation variable is the input report subject of the input data;
inquiring whether the evaluation variable has a matched report subject in a knowledge base or not, wherein the matched report subject is a target report subject;
and generating a target report according to the report data, the report type and the target report subject.
2. A report generation method according to claim 1, characterized in that said identifying said configuration document for obtaining said evaluation variables comprises:
identifying keywords of the configuration document based on an AI intelligent identification algorithm to obtain values corresponding to the keywords, wherein the values corresponding to the keywords are evaluation variables;
and identifying the target attribute corresponding to the evaluation variable according to a pre-trained neural network model.
3. A report generation method according to claim 2, characterized in that said training neural network model comprises:
acquiring a plurality of sample reports and sample report subjects corresponding to the sample reports;
analyzing the preset attribute of the subject of the sample report;
and inputting the sample report subject and the corresponding preset attribute into the neural network model so that the neural network model outputs the corresponding preset attribute according to the sample report subject.
4. The report generation method according to claim 1, wherein the querying whether the evaluation variable has a matched target report subject in the knowledge base, the matching report subject being a target report subject comprises:
storing the evaluation variables and the target attributes corresponding to the evaluation variables into a stack;
matching the field of the evaluation variable with the field of the report subject in the knowledge base from the stack from low to high according to the hierarchy by using a character matching algorithm;
and if the target report subject matched with the field of the evaluation variable exists in the knowledge base, comparing whether the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, wherein if the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, judging that the target report subject matched with the evaluation variable exists in the report subject.
5. The report generation method according to claim 1, wherein generating a target report according to the report data, the report type and the target report subject comprises:
associating the report parameters of the evaluation variables to corresponding target report subjects;
calculating the report data associated with the target report subject according to the report type to obtain parameter configuration information of the target report subject;
acquiring a preset report template according to the report type;
and inputting the parameter configuration information and the target report subject into the preset report template to generate a report document.
6. A system for generating reports based on a knowledge base, comprising:
the system comprises a first acquisition module, a second acquisition module and a report generation module, wherein the first acquisition module is used for acquiring a report generation request instruction of a user, and the report generation request instruction comprises a report type;
the second acquisition module is used for acquiring a corresponding configuration document according to the report type;
the receiving module is used for receiving input data of the user and inputting the input data into the configuration document, wherein the input data comprises evaluation variables and report data;
the identification module is used for analyzing the configuration document to obtain the evaluation variable, and the evaluation variable is the entry report subject of the entry data;
the query module is used for querying whether the evaluation variable has a matched report subject in the knowledge base, and the matched report subject is a target report subject;
and the generating module is used for generating a target report according to the report data, the report type and the target report subject.
7. A statement generation system according to claim 6, wherein the query module is further configured to:
storing the evaluation variables and the target attributes corresponding to the evaluation variables into a stack;
matching the field of the evaluation variable with the field of the report subject in the knowledge base from low to high according to the hierarchy by using a character matching algorithm;
and if the target report subject matched with the field of the evaluation variable exists in the knowledge base, comparing whether the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, wherein if the preset attribute of the evaluation variable is consistent with the target attribute of the target report subject, judging that the target report subject matched with the evaluation variable exists in the report subject.
8. The report generation system of claim 6, wherein the generation module is further configured to:
associating the report parameters of the evaluation variables to corresponding target report subjects;
calculating the report data associated with the target report subject according to the report type to obtain parameter configuration information of the target report subject;
acquiring a preset report template according to the report type;
and inputting the parameter configuration information and the target report subject into the preset report template to generate a report document.
9. A computer arrangement, characterized in that the computer arrangement comprises a memory, a processor, the memory having stored thereon a computer program being executable on the processor, the computer program, when being executed by the processor, realizing the steps of the repository-based report generating method according to any of the claims 1-5.
10. A computer-readable storage medium, having stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the repository-based report generation method according to any one of claims 1-5.
CN201911149514.2A 2019-11-21 2019-11-21 Report generation method and system based on knowledge base Pending CN111027296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911149514.2A CN111027296A (en) 2019-11-21 2019-11-21 Report generation method and system based on knowledge base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911149514.2A CN111027296A (en) 2019-11-21 2019-11-21 Report generation method and system based on knowledge base

Publications (1)

Publication Number Publication Date
CN111027296A true CN111027296A (en) 2020-04-17

Family

ID=70206216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911149514.2A Pending CN111027296A (en) 2019-11-21 2019-11-21 Report generation method and system based on knowledge base

Country Status (1)

Country Link
CN (1) CN111027296A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792138A (en) * 2021-09-14 2021-12-14 广东电网有限责任公司 Report generation method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792138A (en) * 2021-09-14 2021-12-14 广东电网有限责任公司 Report generation method and device, electronic equipment and storage medium
CN113792138B (en) * 2021-09-14 2024-04-30 广东电网有限责任公司 Report generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111798312B (en) Financial transaction system anomaly identification method based on isolated forest algorithm
CN110458324B (en) Method and device for calculating risk probability and computer equipment
US20200005089A1 (en) System and method for enrichment of ocr-extracted data
CN115547466B (en) Medical institution registration and review system and method based on big data
CN111581193A (en) Data processing method, device, computer system and storage medium
CN112118551A (en) Equipment risk identification method and related equipment
CN112765003B (en) Risk prediction method based on APP behavior log
CN112990281A (en) Abnormal bid identification model training method, abnormal bid identification method and abnormal bid identification device
CN112328805A (en) Entity mapping method of vulnerability description information and database table based on NLP
CN114297140A (en) Archive management system based on artificial intelligence
CN115879017A (en) Automatic classification and grading method and device for power sensitive data and storage medium
CN115794803A (en) Engineering audit problem monitoring method and system based on big data AI technology
CN112966965A (en) Import and export big data analysis and decision method, device, equipment and storage medium
CN111831817A (en) Questionnaire generation and analysis method and device, computer equipment and readable storage medium
CN111027296A (en) Report generation method and system based on knowledge base
CN112363996A (en) Method, system, and medium for building a physical model of a power grid knowledge graph
CN112699245A (en) Construction method and device and application method and device of budget management knowledge graph
CN110852893A (en) Risk identification method, system, equipment and storage medium based on mass data
CN114298819A (en) Enterprise credit risk prediction method
CN115171136A (en) Method, equipment and storage medium for classifying and identifying content of banking business material
CN111460268B (en) Method and device for determining database query request and computer equipment
CN113901075A (en) Method and device for generating SQL (structured query language) statement, computer equipment and storage medium
CN113239126A (en) Business activity information standardization scheme based on BOR method
CN112380321A (en) Primary and secondary database distribution method based on bill knowledge graph and related equipment
CN112529319A (en) Grading method and device based on multi-dimensional features, computer equipment and storage medium

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