CN113158635A - Electronic report generation method and device - Google Patents

Electronic report generation method and device Download PDF

Info

Publication number
CN113158635A
CN113158635A CN202110480974.4A CN202110480974A CN113158635A CN 113158635 A CN113158635 A CN 113158635A CN 202110480974 A CN202110480974 A CN 202110480974A CN 113158635 A CN113158635 A CN 113158635A
Authority
CN
China
Prior art keywords
electronic
electronic report
historical
generating
transaction file
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.)
Granted
Application number
CN202110480974.4A
Other languages
Chinese (zh)
Other versions
CN113158635B (en
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110480974.4A priority Critical patent/CN113158635B/en
Publication of CN113158635A publication Critical patent/CN113158635A/en
Application granted granted Critical
Publication of CN113158635B publication Critical patent/CN113158635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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/186Templates
    • 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/02Banking, e.g. interest calculation or account maintenance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Accounting & Taxation (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides an electronic report generation method and device, which relate to the technical field of artificial intelligence, and the method comprises the following steps: acquiring an original transaction file; generating an electronic report corresponding to the original transaction file according to a preset report generation model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model. According to the method and the device, the efficiency and the reliability of electronic report generation can be improved, and meanwhile, the universality of application scenes can be increased.

Description

Electronic report generation method and device
Technical Field
The application relates to the technical field of artificial intelligence, in particular to an electronic report generation method and device.
Background
In the financial industry, generating electronic reports is a common data arrangement and display mode, and the electronic reports are often used for data analysis, account checking and the like.
The conventional electronic report generation method is an electronic report generation tool, and mainly comprises two types, one type is that Excel is operated based on an Apache POI library, including ExcelUtils, JXLS and the like, the method has a complex development process and a large code amount, and is difficult to cope with the current situation that the electronic report format and the data amount are increased gradually, which are complex and have strict requirements, and the tool has a serious memory consumption problem; the other type is an open source-based excel processing framework easy excel, the framework is a programming library, a user needs to call API codes to generate a spreadsheet, the operation is complex, and the problem that the user cannot use or is inconvenient to use can exist for non-technical end users.
Disclosure of Invention
Aiming at least one problem in the prior art, the application provides a method and a device for generating an electronic report, which can improve the efficiency and the reliability of generating the electronic report and can increase the universality of application scenes.
In order to solve the technical problem, the present application provides the following technical solutions:
in a first aspect, the present application provides a method for generating an electronic report, including:
acquiring an original transaction file;
generating an electronic report corresponding to the original transaction file according to a preset report generation model;
the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
Further, the generating an electronic report corresponding to the original transaction file according to a preset report generating model includes:
according to the preset report generation model and the original transaction file, obtaining a processing mode and writing position information of transaction data in the original transaction file;
and generating the electronic report according to the transaction data, the processing mode of the transaction data and the written position information.
Further, before generating the electronic report corresponding to the original transaction file according to a preset report generation model, the method further includes:
acquiring a historical transaction file and a historical electronic report corresponding to the historical transaction file;
and training the meta-interpretation learning model according to preset background knowledge, the historical transaction file and the corresponding historical electronic report to obtain the report generation model.
Further, the number of pieces of sample data in the historical transaction file is greater than or equal to 5 and less than or equal to 10.
In a second aspect, the present application provides an electronic report generating apparatus, including:
the acquisition module is used for acquiring an original transaction file;
the generating module is used for generating an electronic report corresponding to the original transaction file according to a preset report generating model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
Further, the generating module includes:
the first obtaining unit is used for obtaining a processing mode and writing position information of transaction data in the original transaction file according to the preset report generation model and the original transaction file;
and the second obtaining unit is used for generating the electronic report according to the transaction data, the processing mode of the transaction data and the written position information.
Further, the electronic report generating apparatus further includes:
the historical data acquisition module is used for acquiring a historical transaction file and a historical electronic report corresponding to the historical transaction file;
and the training module is used for training the meta-interpretation learning model according to preset background knowledge, the historical transaction file and the corresponding historical electronic report to obtain the report generation model.
Further, the number of pieces of sample data in the historical transaction file is greater than or equal to 5 and less than or equal to 10.
In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the electronic report generating method when executing the program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer instructions that, when executed, implement the electronic report generating method.
According to the technical scheme, the electronic report generation method and device are provided. Wherein, the method comprises the following steps: acquiring an original transaction file; generating an electronic report corresponding to the original transaction file according to a preset report generation model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model, so that the efficiency and reliability of electronic report generation can be improved, and the universality of application scenes can be increased; particularly, the method is strong in expandability, is particularly suitable for the electronic report generation process with complex format specification requirements and large data volume, and can reduce the labor cost.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating a method for generating an electronic report according to an embodiment of the present application;
FIG. 2 is a diagram illustrating an exemplary data structure of an original transaction document;
FIG. 3 is a schematic flow chart illustrating a method for generating an electronic report according to an exemplary application of the present application;
FIG. 4 is a schematic structural diagram of an electronic report generating apparatus according to an embodiment of the present application;
fig. 5 is a schematic block diagram of a system configuration of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
With the development of the financial industry, a great deal of time is usually invested in processing financial transaction data, and how to process huge and fine data is a problem faced by financial institutions such as bank workers in daily life; target programmers can automatically complete repeated work by writing scripts, for example, processing tools manufactured based on Apache POI class libraries are applied, the method is complex in development process, large in code amount and difficult to apply to tables with complex data amount and logic; based on this, considering that each type of electronic report in financial institutions has definite format specifications and is easy to be abstractly described, the application starts from changing the existing electronic report generation mode, combines artificial intelligence and Inductive Logic Programming (ILP) technology, provides a new electronic report generation method and device, and is different from the common big data learning method, the application can obtain a reliable report generation model by only a small amount of sample data, the ILP provides assumption in a symbolic form, compared with a black box model such as a neural network, the ILP has excellent expressive force and intelligibility, input and output objects are described by using a Logic language and a function with high abstract force, so as to obtain a report generation model, the expressive form of the report generation model can be a group of Prolog programs, and the programs describe the generation rules from source data to target data, multiplexing may generate data that conforms to the same rules. That is, the present application obtains the electronic report generation rule through meta-interpretation learning framework induction learning, the rule is expressed in the form of Prolog program, and the program is reused to generate the same type of electronic report.
The Swi-Prolog is a relatively common operating environment of Prolog language, has very strong internal library and strong extensibility. For the electronic report forms in the bank system, the requirements of format specification are strict, such as column height, line width, font and the like, and the data can be input in a front-end interaction mode for setting.
In order to improve the efficiency and reliability of electronic report generation and increase the universality of application scenarios, an embodiment of the present application provides an electronic report generation apparatus, which may be a server or a client device, where the client device may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, an intelligent wearable device, and the like. Wherein, intelligence wearing equipment can include intelligent glasses, intelligent wrist-watch and intelligent bracelet etc..
In practical applications, part of the apparatus for generating an electronic report form may be executed on the server side as described above, or all operations may be completed in the client device. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. The client device may further include a processor if all operations are performed in the client device.
The client device may have a communication module (i.e., a communication unit), and may be communicatively connected to a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, the server may also include a server on an intermediate platform, for example, a server on a third-party server platform that is communicatively linked to the task scheduling center server. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
The server and the client device may communicate using any suitable network protocol, including network protocols not yet developed at the filing date of this application. The network protocol may include, for example, a TCP/IP protocol, a UDP/IP protocol, an HTTP protocol, an HTTPS protocol, or the like. Of course, the network Protocol may also include, for example, an RPC Protocol (Remote Procedure Call Protocol), a REST Protocol (Representational State Transfer Protocol), and the like used above the above Protocol.
The following examples are intended to illustrate the details.
In order to improve the efficiency and reliability of electronic report generation and increase the universality of application scenarios, the present embodiment provides an electronic report generation method in which the execution subject is an electronic report generation apparatus, where the electronic report generation apparatus includes but is not limited to a server, and as shown in fig. 1, the method specifically includes the following contents:
step 100: an original transaction file is obtained.
Specifically, the original transaction file may include: a plurality of raw transaction records, each raw transaction record may include a plurality of transaction data, the transaction data including: control codes, area numbers, network point numbers, teller numbers, and the like; as shown in fig. 2, empty rows may be set between the original transaction records, and the transaction data in the same original transaction record are separated by line breaks, wherein 500000270, 4600,500 and 1054 constitute one original transaction record, 500000271,4600,500 and 2785 constitute one original transaction record, and 500001191, 4600,500 and 3788 constitute one original transaction record. The original transaction file may be a text file.
Step 200: generating an electronic report corresponding to the original transaction file according to a preset report generation model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
Specifically, the electronic report includes: header, footer, and processed transaction data; the electronic report may be a daily or monthly financial report, such as a monthly payment authorization statistics table. In an example, the form of the electronic report is shown in table 1, where line data in a first line of the electronic report represents a transaction data type, and line data outside the first line represents an original transaction record; the meta interpretation learning model is a meta interpretation learner or a meta interpretation learning engine; the preset background knowledge comprises: the restricted clauses and meta-rules may be set according to actual needs, and the application is not limited thereto. The method and the device have no limitation on the form of the electronic report, such as the form of EXCEL or text file and the like, and can improve the universality of the application scene of electronic report generation.
TABLE 1
A B C D
1 Control code Area code Network point number Counter number
2 500000270 4600 500 1054
3 500000271 4600 500 2785
4 500001191 4600 500 3788
To further improve the reliability of generating the electronic report, in one embodiment of the present application, step 200 includes:
step 201: and according to the preset report generation model and the original transaction file, obtaining a processing mode and writing position information of the transaction data in the original transaction file.
The processing mode may include: addition, subtraction, multiplication, division, deletion and replacement of transaction data and the like. The writing position information represents a position where the processed transaction data is written in the electronic report.
Step 202: and generating the electronic report according to the transaction data, the processing mode of the transaction data and the written position information.
In order to improve the efficiency of training the report generation model and further improve the accuracy and efficiency of generating the electronic report on the basis of ensuring the reliability of the report generation model, in an embodiment of the present application, before step 200, the method further includes:
step 021: and acquiring a historical transaction file and a corresponding historical electronic report.
Specifically, in a financial transaction system, daily transaction amount is often in ten thousand units, and for the same type of electronic report, the difference is only in the transaction amount and the specific data, and the generation rules are the same, so the historical electronic report is the same as the generated electronic report in type.
Step 022: and training the meta-interpretation learning model according to preset background knowledge, the historical transaction file and the corresponding historical electronic report to obtain the report generation model.
Wherein the number of sample data in the historical transaction file is greater than or equal to 5 and less than or equal to 10.
Specifically, the meta-interpretation learning framework is a framework based on inductive logic programming, and the meta-interpretation learning belongs to small sample learning; the learning process does not need to be trained by tens of thousands of data. Only 5 to 10 sample data need be taken as a training set, and the training efficiency can be improved on the basis of ensuring the reliability of model training. The label of the sample data, namely the data of the historical electronic report form, has a one-to-one mapping relation with the sample data; sample data is historical transaction records in the historical transaction file, and one record corresponds to one line of data in the file; the records are separated by empty lines before recording, data in each record are separated by line feed characters, and the well-organized data are used as the input of a meta-interpretation learning model in a text form; in the historical transaction file, the data in the form of a table is output of the meta-interpretation learning model; a piece of sample data includes the input and output of the record.
Furthermore, the header and the footer of the table can be directly abstracted through the position coordinates to obtain the mapping rule, and because the header and the footer information do not belong to a large number of repeated contents, the Prolog program can be written through the abstracted position information and action. The program comprises the steps of obtaining the head and tail information of the electronic form from the history file record and writing the head and tail information into an empty target form.
It is central how to get an output spreadsheet from the input text information is the key to the present invention. Firstly, the operation principle of the following meta-interpretation learning mechanism is explained, the mechanism is to induce and learn a Prolog program through a given sample and background knowledge, a target and the head of an available first-order clause are unified, atoms in the unified clause body become new targets subject to the same constraint, a certification chain is accumulated in the process of continuously iterating and certifying the new targets, and the certification chain is generalized to obtain a program for describing the mapping relation from input data to output data (namely, text data obtained by sorting to an electronic report). Because the writing forms of the programs are various, in order to enhance the readability and the normalization of the programs and reduce the hypothesis space, the meta-interpretation learning introduces meta-rules as strong constraints of the canonical hypothesis form, and the currently common relationship meta-rules are mainly binary relationships. The user provides a restricted clause and a meta rule to the meta interpretation learner, and the restricted clause needs to be given according to different application scenes, namely characteristic information. For further explanation of the present solution, referring to fig. 3, the present application provides an application example of an electronic report generating method, including:
step 1: and acquiring an electronic month report and collecting 10 sample data corresponding to the electronic month report.
Step 2: and carrying out data processing on the sample data so as to abstract the data content and extract the characteristics.
Specifically, the data size of the data portion is large and may involve data transformation, the input data is arranged into a text form, the data is separated from the data of the same group by line breaks, each group of data is separated by one line for distinction, the content of the portion is abstracted into an object A in f (A, B), the object A represents the learning target of the meta-interpretation learning model, namely the report generation model, f (A, B), A is a data stream as input, and B is output.
And step 3: and processing the electronic month report according to the processed sample data to obtain a label corresponding to the sample data, wherein the sample data corresponds to the label.
Specifically, a part of the electronic month report corresponding to the sample data in the electronic month report is selected, and the content of the part is abstracted into an object B in the target f (A, B). The contents of the electronic report should include a header, a footer, and a data portion, and the header and footer information is single and can be mapped by coordinates without calculation.
And 4, step 4: and selecting proper meta-rules and constructing background knowledge required by model training learning.
For header information, taking an authorized payment service monthly statistical table as an example, where the header includes information such as a website number, a website name, and an account name, the location of the information is clear, the information is simple, a configurable high-abstraction restricted clause can be obtained by extracting feature information at a coordinate location, and the restricted clause may include: the table header content, the coordinate position information of the table header content in the electronic report, the action information of writing the table header content into the corresponding position, and the like; the same applies to the table tail information.
For example, the header may be generated by a high abstraction of the following Horn clause: f (entered text information, header position information) — location (entered text information, header information), map (header information, header position information, write). The clause meaning is that according to the input text information, the header information and the header position information, the header information is written into the position corresponding to the header position information in the electronic report.
Critically, for a data part, in addition to a directly mapped data relationship, operations such as addition, subtraction, multiplication, division, data deletion, substitution and the like may also be involved in the part of data, so that a limited clause that needs to be provided needs to provide related characteristic information in addition to a mapping relationship of positions according to specific situations, for example: information such as head information of a character string, tail information of a character string, merging of two character strings, dividing a character string by a certain character, addition, subtraction, multiplication, division, judgment, and iteration.
Specifically, a set of samples ε and background knowledge β are given. Applying (beta, epsilon) training meta interpretation learner to get a certain program H that can output consistent input hypothesis, or terminate, declaring no program found. Each sample contains unique sample data and a label corresponding to the sample data.
The background knowledge β is composed of a restricted clause D and a meta-rule M, the restricted clause including: a mapping relation filterMap between the positions of the transaction data in the transaction file and the positions of the transaction data corresponding to the actual electronic report forms, a simple operational relation which may occur in the transaction data, and the like, for example, combining two columns of data to one column; meta-rules exist in the form of a high-level logical expression describing the clause forms allowed in a hypothetical program. The expression form of the common meta-rule is shown in table 2:
TABLE 2
Meta rule Name Meta rule form Metaresults Order
Example Instance P(A,B) True
Identity P(A,B)←Q(A,B) P>Q
Precon connection P(A,B)←Q(A),R(A,B) P>Q,Q>R
Post-connection PostCon P(A,B)←Q(A,B),R(B) P>Q,Q>R
Chain P(A,B)←Q(A,C),R(C,B) P>Q,Q>R
Tail recursion Tailrec P(A,B)←Q(A,C),P(C,B) P>Q,Q>R,A>B>C
Binary identity Dident P(A,B)←Q(A,B),R(A,B) P>Q,Q>R
Wherein, the order can represent the priority relation that the variables need to satisfy in the meta-rule; A. b and C represent variables, and P, Q and R represent predicates; p (a, B), Q (a, B) represent different relationships or actions between variable a and variable B, e.g., reverse (a, B) represents inverting list a to get list B; head (A, B) indicates that B is the head of List A; true always, and P (a, B) is often used to represent a restricted clause D in the background. P (a, B) ← Q (a, B) indicates that if Q (a, B) holds, then P (a, B) holds. The symbol ">" means that the priority of a variable on the left side of the symbol is proportional to the value, the priority of the variable on the left side of the symbol is greater than that on the right side, P > Q' represents the condition that the priority of the predicate P needs to be higher than that of Q, the specific expression is that the predicate P appears in the text in an order prior to the predicate Q, and the main purpose of the constraint relation is to reduce the search cost in the process of searching a target program. P (a, B) ← q (a), R (a, B) denotes that if q (a) and R (a, B) both hold, then P (a, B) holds. The predicate is a functional relation needed for generating the electronic report form, and the functional relation can be output to an interactive interface for a user to select.
Restricted clause D refers to a first-order clause that describes characteristic information. In addition to conforming to the first-order clauses under this scenario, there are some commonly used high-order predicates: map/3, unity/4 and ifthenelse/5, wherein 3, 4 and 5 represent the number of parameters possessed by the predicate. The high-order clauses are used for providing meanings which cannot be expressed by the meta-rules, and can appear at positions where variables appear in the meta-rules and positions where predicates appear in the meta-rules, so that the learned programs are not limited to binary forms. For example, map/3 means:
map([],[],F)
map([A|As],[B|Bs],F)←F(A,B),map(As,Bs,F)
f represents one or more actions/relationships, and map means that each time the head elements A and B are taken from the list, F (A, B) is then executed until the elements of both lists are taken.
Until/4 has the following meanings:
until(A,A,Cond,F)←Cond(A)
until(A,B,Cond,F)←not(Cond(A)),F(A,C),until(C,B,Cond,F)
f represents one or more actions/relations, and the predicate unity represents that when A does not satisfy the condition Cond, A is used as the input of the action/relation F to obtain an output C. C is then the same validation as above with the new input until the input meets Cond.
And 5: and taking the processed sample data as the input of the meta-interpretation learning model, and taking the label as the output to carry out training learning.
Matching is done through a series of atomic targets and the head of meta-rules, which are then recursively proven. After testing the Order constraint, the save _ metasub function checks if a meta-substitution already exists in the program, otherwise it is added to the extension program. After completion, the procedure is returned and then all hypotheses at the derivative are constructed.
For example, the inputs for the current sample are: [500000271,4600,500,2785], the result is output as the third row data in Table 1.
First, corresponding to pro ([ Atom | Atoms ], Prog1, Prog2), sample f ([500000271,4600,500,2785], table information description of data) is taken as the input of the meta-interpretation framework, i.e., the first target Atom; then matching the Atom with a given limited clause such as position information, and the like, wherein the matching is successful only when two parameters of f are completely the same as the binary limited clause, and if no such limited clause exists, the meta rule matching is performed, taking the chain meta rule as an example:
meta (Name, MetaSub, (Atom: -Body, Order)), Order, save _ MetaSub (MetaSub (Name, MetaSub), Prog1, Prog3) refers to matching the current target Atom with the meta rule header (i.e. the side pointed by the arrow) to obtain the rule Body (i.e. the end of the arrow), i.e. Q ([500000271,4600,500,2785], unknown) and R (unknown, table information description of the data), corresponding to P (a, B) one-to-one, by matching, and if Q or R can be directly matched to the header of the restricted clause, the header is saved in the meta substitute MetaSub; otherwise, the two clauses are saved in Body as new targets, and the meta-substitution saves the invented predicates such as f1, f2, when the parameters of the initial target have been passed; the following is a restricted clause for proving whether all clauses in the Body can be matched with given information such as position coordinates, if the Body cannot be proved finally, a meta rule needs to be changed for trying, and if the Body is proved completely, a proving chain is saved as the first sentence of the final program. Subsequently, the other samples continue to be proved in turn until all samples are proved to be completed.
The induction flow of the meta-interpreter is as follows:
Figure BDA0003048538470000101
step 6: and integrating the learning result and reusing the learning result as the generation rule of the electronic report.
In terms of software, in order to improve the efficiency and reliability of electronic report generation and increase the universality of application scenarios, the present application provides an embodiment of an electronic report generation apparatus for implementing all or part of the contents in the electronic report generation method, and referring to fig. 4, the electronic report generation apparatus specifically includes the following contents:
and the acquisition module 10 is used for acquiring the original transaction file.
The generating module 20 is configured to generate an electronic report corresponding to the original transaction file according to a preset report generating model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
In an embodiment of the present application, the generating module includes:
and the first obtaining unit is used for obtaining a processing mode and writing position information of the transaction data in the original transaction file according to the preset report generation model and the original transaction file.
And the second obtaining unit is used for generating the electronic report according to the transaction data, the processing mode of the transaction data and the written position information.
In an embodiment of the present application, the electronic report generating apparatus further includes:
and the historical data acquisition module is used for acquiring the historical transaction file and the corresponding historical electronic report.
And the training module is used for training the meta-interpretation learning model according to preset background knowledge, the historical transaction file and the corresponding historical electronic report to obtain the report generation model.
Wherein the number of sample data in the historical transaction file is greater than or equal to 5 and less than or equal to 10.
The embodiment of the electronic report generating apparatus provided in this specification may be specifically configured to execute the processing procedure of the embodiment of the electronic report generating method, and the functions of the embodiment are not described herein again, and refer to the detailed description of the embodiment of the electronic report generating method.
As can be seen from the above description, the electronic report generation apparatus provided by the present application can improve the efficiency and reliability of electronic report generation, and can increase the universality of application scenarios; particularly, the method is strong in expandability, is particularly suitable for the electronic report generation process with complex format specification requirements and large data volume, and can reduce the labor cost.
In terms of hardware, in order to improve the efficiency and reliability of electronic report generation and increase the universality of application scenarios, the present application provides an embodiment of an electronic device for implementing all or part of the contents in the electronic report generation method, where the electronic device specifically includes the following contents:
a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between the electronic report generating device and the related equipment such as the user terminal; the electronic device may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the electronic device may be implemented with reference to the embodiment for implementing the electronic report generating method and the embodiment for implementing the electronic report generating apparatus in the embodiments, and the contents of the embodiments are incorporated herein, and repeated details are not repeated.
Fig. 5 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 5, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this FIG. 5 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one or more embodiments of the present application, the spreadsheet function may be integrated into the central processor 9100. The central processor 9100 may be configured to control as follows:
step 100: an original transaction file is obtained.
Step 200: generating an electronic report corresponding to the original transaction file according to a preset report generation model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
As can be seen from the above description, the electronic device provided in the embodiments of the present application can improve the efficiency and reliability of electronic report generation, and increase the universality of application scenarios.
In another embodiment, the electronic report generator may be configured separately from the central processor 9100, for example, the electronic report generator may be configured as a chip connected to the central processor 9100, and the function of the electronic report generator may be realized under the control of the central processor.
As shown in fig. 5, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 5; further, the electronic device 9600 may further include components not shown in fig. 5, which may be referred to in the art.
As shown in fig. 5, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. Memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
As can be seen from the above description, the electronic device provided in the embodiments of the present application can improve the efficiency and reliability of electronic report generation, and increase the universality of application scenarios.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the electronic report generating method in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and the computer program implements all the steps of the electronic report generating method in the foregoing embodiment when being executed by a processor, for example, the processor implements the following steps when executing the computer program:
step 100: an original transaction file is obtained.
Step 200: generating an electronic report corresponding to the original transaction file according to a preset report generation model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
As can be seen from the above description, the computer-readable storage medium provided in the embodiments of the present application can improve the efficiency and reliability of electronic report generation, and increase the universality of application scenarios.
In the present application, each embodiment of the method is described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. Reference is made to the description of the method embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the present application are explained by applying specific embodiments in the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An electronic report generation method, comprising:
acquiring an original transaction file;
generating an electronic report corresponding to the original transaction file according to a preset report generation model;
the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
2. The electronic report generation method according to claim 1, wherein generating the electronic report corresponding to the original transaction file according to a preset report generation model comprises:
according to the preset report generation model and the original transaction file, obtaining a processing mode and writing position information of transaction data in the original transaction file;
and generating the electronic report according to the transaction data, the processing mode of the transaction data and the written position information.
3. The method according to claim 1, wherein before generating the electronic report corresponding to the original transaction document according to the preset report generation model, the method further comprises:
acquiring a historical transaction file and a historical electronic report corresponding to the historical transaction file;
and training the meta-interpretation learning model according to preset background knowledge, the historical transaction file and the corresponding historical electronic report to obtain the report generation model.
4. The electronic report generating method according to claim 3, wherein the number of sample data in the historical transaction file is equal to or greater than 5 and equal to or less than 10.
5. An electronic report generation apparatus, comprising:
the acquisition module is used for acquiring an original transaction file;
the generating module is used for generating an electronic report corresponding to the original transaction file according to a preset report generating model; the preset report generation model is obtained by applying preset background knowledge, historical transaction files and corresponding historical electronic reports to pre-train the meta-interpretation learning model.
6. The electronic report generation apparatus according to claim 5, wherein the generation module includes:
the first obtaining unit is used for obtaining a processing mode and writing position information of transaction data in the original transaction file according to the preset report generation model and the original transaction file;
and the second obtaining unit is used for generating the electronic report according to the transaction data, the processing mode of the transaction data and the written position information.
7. The electronic report generating apparatus according to claim 5, further comprising:
the historical data acquisition module is used for acquiring a historical transaction file and a historical electronic report corresponding to the historical transaction file;
and the training module is used for training the meta-interpretation learning model according to preset background knowledge, the historical transaction file and the corresponding historical electronic report to obtain the report generation model.
8. The electronic report generating apparatus according to claim 7, wherein the number of sample data in the historical transaction file is 5 or more and 10 or less.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the electronic report generating method according to any one of claims 1 to 4 when executing the program.
10. A computer-readable storage medium having computer instructions stored thereon, wherein the instructions, when executed, implement the electronic report generating method of any of claims 1 to 4.
CN202110480974.4A 2021-04-30 2021-04-30 Electronic report generation method and device Active CN113158635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110480974.4A CN113158635B (en) 2021-04-30 2021-04-30 Electronic report generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110480974.4A CN113158635B (en) 2021-04-30 2021-04-30 Electronic report generation method and device

Publications (2)

Publication Number Publication Date
CN113158635A true CN113158635A (en) 2021-07-23
CN113158635B CN113158635B (en) 2024-01-30

Family

ID=76872779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110480974.4A Active CN113158635B (en) 2021-04-30 2021-04-30 Electronic report generation method and device

Country Status (1)

Country Link
CN (1) CN113158635B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113627141A (en) * 2021-08-10 2021-11-09 中国工商银行股份有限公司 Electronic report generation method, device, equipment, medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5842193A (en) * 1995-07-28 1998-11-24 Sterling Software, Inc. Knowledge based planning and analysis (KbPA)™
US20060112123A1 (en) * 2004-11-24 2006-05-25 Macnica, Inc. Spreadsheet user-interfaced business data visualization and publishing system
CN104020997A (en) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 Extensible graphical rule application system
CN111159991A (en) * 2019-12-12 2020-05-15 远光软件股份有限公司 Report modeling design device and method
CN111708801A (en) * 2020-05-29 2020-09-25 北京金山云网络技术有限公司 Report generation method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5842193A (en) * 1995-07-28 1998-11-24 Sterling Software, Inc. Knowledge based planning and analysis (KbPA)™
US20060112123A1 (en) * 2004-11-24 2006-05-25 Macnica, Inc. Spreadsheet user-interfaced business data visualization and publishing system
CN104020997A (en) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 Extensible graphical rule application system
CN111159991A (en) * 2019-12-12 2020-05-15 远光软件股份有限公司 Report modeling design device and method
CN111708801A (en) * 2020-05-29 2020-09-25 北京金山云网络技术有限公司 Report generation method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113627141A (en) * 2021-08-10 2021-11-09 中国工商银行股份有限公司 Electronic report generation method, device, equipment, medium and program product

Also Published As

Publication number Publication date
CN113158635B (en) 2024-01-30

Similar Documents

Publication Publication Date Title
US11663409B2 (en) Systems and methods for training machine learning models using active learning
US11468239B2 (en) Joint intent and entity recognition using transformer models
US20190180196A1 (en) Systems and methods for generating and updating machine hybrid deep learning models
KR20210037619A (en) Multimodal content processing method, apparatus, device and storage medium
US11636341B2 (en) Processing sequential interaction data
JP7179123B2 (en) Language model training method, device, electronic device and readable storage medium
KR102294364B1 (en) System for automatically converting document based on artificial intelligence and method thereof
CN110489120A (en) Page development method component-based and server
CN110674188A (en) Feature extraction method, device and equipment
CN108153729A (en) A kind of Knowledge Extraction Method towards financial field
CN112085087B (en) Business rule generation method, device, computer equipment and storage medium
CN110569428A (en) recommendation model construction method, device and equipment
CN113360619A (en) Form generation method, device, equipment and medium
CN112784112A (en) Message checking method and device
CN113868252A (en) Database mode matching method and device and SQL query statement generation method
CN113158635A (en) Electronic report generation method and device
CN110222282A (en) Data processing method, device, server and storage medium
CN112579773A (en) Risk event grading method and device
WO2021093320A1 (en) Method and apparatus for outputting information
CN111259975B (en) Method and device for generating classifier and method and device for classifying text
CN106779992B (en) Method and device for generating financial record and electronic account book according to short message
Khan et al. Non Functional Requirements Identification and Classification Using Transfer Learning Model
CN113553530A (en) Information reporting dynamic page configuration method and device
CN112950382A (en) Transaction business matching method and device, electronic equipment and medium
CN117992601B (en) Document generation method and device based on artificial intelligence

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
GR01 Patent grant
GR01 Patent grant